You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I am trying use the position control function with my Dynamixel XM430-W350-R on an OpenCR 1.0 board.
It will move to one position but only once, if I have two positions in the same loop it will only go to one of them, and then after that it won't move at all, even in response to any changes I make in the raw position numbers.
I have been able to utilize the velocity operating mode but not this.
I wanted to use Dynamixel Wizard 2.0 to troubleshoot, but it won't recognize the device, and upon following the instructions to update the firmware to fix this, I get a message that says (Port Open Failed) and I know the comm port I am using is correct.
This is the code I am using:
#include <Dynamixel2Arduino.h>
#define DXL_SERIAL Serial3
#define DEBUG_SERIAL Serial
const int DXL_DIR_PIN = 84;
//This namespace is required to use Control table item names
using namespace ControlTableItem;
void setup() {
// put your setup code here, to run once:
// Use UART port of DYNAMIXEL Shield to debug.
DEBUG_SERIAL.begin(115200);
// Set Port baudrate to 57600bps. This has to match with DYNAMIXEL baudrate.
dxl.begin(57600);
// Set Port Protocol Version. This has to match with DYNAMIXEL protocol version.
dxl.setPortProtocolVersion(2.0);
// Get DYNAMIXEL information
dxl.ping(DXL_ID);
// Turn off torque when configuring items in EEPROM area
dxl.torqueOff(DXL_ID);
delay(1000);
dxl.ledOn(DXL_ID);
DEBUG_SERIAL.println("LED ON");
delay(1000);
dxl.setOperatingMode(DXL_ID, OP_POSITION);
dxl.torqueOn(DXL_ID);
}
void loop() {
// put your main code here, to run repeatedly:
int i_present_position = 0;
i_present_position = dxl.getPresentPosition(DXL_ID);
DEBUG_SERIAL.print("Present_Position(raw) : ");
DEBUG_SERIAL.println(i_present_position);
delay(1000);
dxl.setGoalPosition(DXL_ID, 1);
delay(3000);
dxl.setGoalPosition(DXL_ID, 3000);
delay(3000);
}
Hi @hdavidjensen
Your code works fine when I tested it. The motor moves smoothly between position 1 and 3000, repeating correctly.
To resolve your issue, please follow these steps:
Set OpenCR to Recovery Mode (DFU Mode)
Follow the instructions here: Enter DFU Mode
Re-upload the usb_to_dxl source code to OpenCR
This will allow Dynamixel Wizard to recognize the device: Upload Source Code
Use Dynamixel Wizard to restore the firmware
Once OpenCR is recovered and the usb_to_dxl firmware is uploaded, reconnect to Dynamixel Wizard 2.0 and perform a firmware recovery.
⚠ Important: Ensure that no other software (e.g., Arduino Serial Monitor) is occupying the OpenCR port. Close all other applications before proceeding.
After completing these steps, test your code again.
If the issue persists, please provide more details, including your settings and any relevant screenshots.
Hello I am trying use the position control function with my Dynamixel XM430-W350-R on an OpenCR 1.0 board.
It will move to one position but only once, if I have two positions in the same loop it will only go to one of them, and then after that it won't move at all, even in response to any changes I make in the raw position numbers.
I have been able to utilize the velocity operating mode but not this.
I wanted to use Dynamixel Wizard 2.0 to troubleshoot, but it won't recognize the device, and upon following the instructions to update the firmware to fix this, I get a message that says (Port Open Failed) and I know the comm port I am using is correct.
This is the code I am using:
#include <Dynamixel2Arduino.h>
#define DXL_SERIAL Serial3
#define DEBUG_SERIAL Serial
const int DXL_DIR_PIN = 84;
const uint8_t DXL_ID = 1;
const float DXL_PROTOCOL_VERSION = 2.0;
Dynamixel2Arduino dxl(DXL_SERIAL, DXL_DIR_PIN);
//This namespace is required to use Control table item names
using namespace ControlTableItem;
void setup() {
// put your setup code here, to run once:
// Use UART port of DYNAMIXEL Shield to debug.
DEBUG_SERIAL.begin(115200);
// Set Port baudrate to 57600bps. This has to match with DYNAMIXEL baudrate.
dxl.begin(57600);
// Set Port Protocol Version. This has to match with DYNAMIXEL protocol version.
dxl.setPortProtocolVersion(2.0);
// Get DYNAMIXEL information
dxl.ping(DXL_ID);
// Turn off torque when configuring items in EEPROM area
dxl.torqueOff(DXL_ID);
delay(1000);
dxl.ledOn(DXL_ID);
DEBUG_SERIAL.println("LED ON");
delay(1000);
dxl.setOperatingMode(DXL_ID, OP_POSITION);
dxl.torqueOn(DXL_ID);
}
void loop() {
// put your main code here, to run repeatedly:
int i_present_position = 0;
i_present_position = dxl.getPresentPosition(DXL_ID);
DEBUG_SERIAL.print("Present_Position(raw) : ");
DEBUG_SERIAL.println(i_present_position);
delay(1000);
dxl.setGoalPosition(DXL_ID, 1);
delay(3000);
dxl.setGoalPosition(DXL_ID, 3000);
delay(3000);
}
Here is the link to the firmware recovery video I already tried but did not work:
https://www.youtube.com/watch?v=FAnVIE_23AA
The text was updated successfully, but these errors were encountered: