by kandhariakhil » Tue Aug 05, 2014 10:40 pm
by kandhariakhil
Tue Aug 05, 2014 10:40 pm
Hello,
I am using an MX-64 TTL servo along with the OpenCM9.04 board,which is being powered directly by a DC power supply at 12 V. When I read the Present Position of the servo using Dxl.readWord while in “Wheel Mode”, I randomly get a position of 65535. The valid range is 0 to 4095. The same issue has occurred when reading other values, such as Present Load. As far as I can tell, it appears that it is the servo returning this value rather than an issue with SerialUSB. I have multiple MX-64 servos and OpenCM9.04 boards and the issue occurs in all cases. It has also been replicated with the IDE running in both Windows 8.1 and OS X 10.9.4. I’m using Robotis_OpenCM_1.02 as my IDE.
Is this this a known issue? Is there a fix other than the obvious one of ignoring the bad values? Here is simple code that demonstrates the issue:
#define DXL_BUS_SERIAL1 1
#define ID_NUM 2
#define CW_Angle_Limit 6
#define CCW_Angle_Limit 8
#define GOAL_SPEED 32
#define PRESENT_POS 36
Dynamixel Dxl(DXL_BUS_SERIAL1);
void setup() {
Dxl.begin(3);
delay(3000);
Dxl.writeWord(ID_NUM, CW_Angle_Limit, 0); // Set wheel mode
Dxl.writeWord(ID_NUM, CCW_Angle_Limit, 0); // Set wheel mode
Dxl.writeWord(ID_NUM, GOAL_SPEED, 100); // Set speed, issue doesn’t seem to depend on speed
}
void loop() {
int pos;
pos = Dxl.readWord(ID_NUM, PRESENT_POS); // Read present position
SerialUSB.print("Present Position: ");
SerialUSB.println(pos);
delay(500);
}
Hello,
I am using an MX-64 TTL servo along with the OpenCM9.04 board,which is being powered directly by a DC power supply at 12 V. When I read the Present Position of the servo using Dxl.readWord while in “Wheel Mode”, I randomly get a position of 65535. The valid range is 0 to 4095. The same issue has occurred when reading other values, such as Present Load. As far as I can tell, it appears that it is the servo returning this value rather than an issue with SerialUSB. I have multiple MX-64 servos and OpenCM9.04 boards and the issue occurs in all cases. It has also been replicated with the IDE running in both Windows 8.1 and OS X 10.9.4. I’m using Robotis_OpenCM_1.02 as my IDE.
Is this this a known issue? Is there a fix other than the obvious one of ignoring the bad values? Here is simple code that demonstrates the issue:
#define DXL_BUS_SERIAL1 1
#define ID_NUM 2
#define CW_Angle_Limit 6
#define CCW_Angle_Limit 8
#define GOAL_SPEED 32
#define PRESENT_POS 36
Dynamixel Dxl(DXL_BUS_SERIAL1);
void setup() {
Dxl.begin(3);
delay(3000);
Dxl.writeWord(ID_NUM, CW_Angle_Limit, 0); // Set wheel mode
Dxl.writeWord(ID_NUM, CCW_Angle_Limit, 0); // Set wheel mode
Dxl.writeWord(ID_NUM, GOAL_SPEED, 100); // Set speed, issue doesn’t seem to depend on speed
}
void loop() {
int pos;
pos = Dxl.readWord(ID_NUM, PRESENT_POS); // Read present position
SerialUSB.print("Present Position: ");
SerialUSB.println(pos);
delay(500);
}