Use the following template to help create your post:
%%%
- What model of servo are you using?
XM430-W350-R
%%% - Describe your control environment. This includes the controller or interface, and any power source.
Matlab 2020b, ‘PCWIN’, compiler: ‘PCWIN64’, protocode version: 2.0
%%% - Specify the operating mode for applicable models, and any firmware settings you are using.
EXT_POSITION_CONTROL_MODE, mode number: 4, control table address: 11
%%% - Include pictures if possible.
Velocity is recorded using the following code:
v_present = double(typecast(uint32(read4ByteTxRx(port_num, PROTOCOL_VERSION, DXL_ID, ADDR_PRO_PRESENT_VELOCITY)),‘int32’));
p_present = double(typecast(uint32(read4ByteTxRx(port_num, PROTOCOL_VERSION, DXL_ID, ADDR_PRO_PRESENT_POSITION)),‘int32’));
%%%% - Include a full description of the issue.
Hello, i want to perform a bi-directional rotation via XM430-W350-R at a constant velocity.
I’m confused with the definition of velocity limit, velocity profit, or goal velocity to achieve the control of velocity.
The actual results shows that the output velocity is not stable. Thus I want to ask that which variable need to be contrainted to achieve to the constant velocity in ext position mode.
I attach here the code to definition de motion mode:
v_rot=5;
write4ByteTxRx(port_num, PROTOCOL_VERSION, DXL_ID, ADDR_PRO_PROFILE_VELOCITY, typecast(int32(v_rot), ‘uint32’));
write4ByteTxRx(port_num, PROTOCOL_VERSION, DXL_ID, ADDR_PRO_PROFILE_ACCELERATION, typecast(int32(50), ‘uint32’));
write4ByteTxRx(port_num, PROTOCOL_VERSION, DXL_ID, ADDR_PRO_GOAL_VELOCITY, typecast(int32(v_rot*2), ‘uint32’));
write1ByteTxRx(port_num, PROTOCOL_VERSION, DXL_ID, ADDR_OPERATING_MODE, EXT_POSITION_CONTROL_MODE);