31 |
P a g e
rmcs.Enable_Digital_Mode(slave_id,1);
Enable motor in digital mode with forward or reverse direction. 0 is forward (encoder count +)
and 1 is reverse (encoder count -).
Forward :
rmcs.Enable_Digital_Mode(slave_id,0);
Reverse:
rmcs.Enable_Digital_Mode(slave_id,1);
rmcs.Speed_Feedback(slave_id);
This function returns the current speed of motor in long integer. Speed less than 0 is received when motor is
moving in reverse direction.
rmcs.Brake_Motor(slave_id, 1);
This function is used to brake motor in digital speed control mode. Should be used with direction as below, if
not drive may misbehave and motor may jerk.
Forward
: rmcs.Brake_Motor(slave_id,0);
Reverse:
rmcs.Brake_Motor(slave_id,1);
rmcs.Disable_Digital_Mode(slave_id,1);
This function will disable Digital speed control mode in entered direction. Should be used with direction as
below, if not drive may misbehave and motor may jerk.
Forward:
rmcs.Disable_Digital_Mode(slave_id,0);
Reverse:
rmcs.Disable_Digital_Mode(slave_id,1);
Position Control Mode:
rmcs.Absolute_position(slave_id,10000);
This function enables drive in position control mode. Positive range is 1 to 2147483647 and negative range
is -1 to -2147483648. Direction is selected automatically by drive.
rmcs.Absolute_position(slave_id,-10000);
rmcs.Position_Feedback(slave_id);
Current Position of motor can be read by this function on Serial monitor. This function will
return long integer.