Manual

Copyright © Dr Robot Inc. 2008
31
103 void DcMotorPwmNonTimeCtrAll(short cmd1, short cmd2, short cmd3, short cmd4,
short cmd5, short cmd6);
Description:
DcMotorPwmNonTimeCtrAll sends the PWM control command to all 6 DC motor control
channels on the Sensing and Motion Controller (PMS5005) at the same time. The
command includes the target PWM values without specific execution time period. The
motion controller Send the desired PWM pulse width right away.
Syntax: DcMotorPwmNonTimeCtrAll (cmd1, cmd2, cmd3, cmd4, cmd5, cmd6);
Parameter: short cmd1; // Target PWM value for channel #1
short cmd2; // Target PWM value for channel #2
short cmd3; // Target PWM value for channel #3
short cmd4; // Target PWM value for channel #4
short cmd5; // Target PWM value for channel #5
short cmd6; // Target PWM value for channel #6
Return value: void
Remarks:
1. All channel (motors) will be enabled automatically by the system when this
command is received
2. Target pulse width value range is 0 to 32767 (0x7FFF), corresponding to the duty
cycle of 0 to 100% linearly.
3. A pulse width value of 16383 means 50% duty cycle, putting motor in “Stop” stage.
Any value in between 16384 - 32767 will put the motor to turn clockwise (facing
the front side of the motor) and any value in between 0 – 16362 will put the motor
to turn counter-clockwise.
4. When some motors are not under controlled, their command values should be set
as -32768 (0x8000). That means NO_CONTROL.
See also: DcMotorPwmNonTimeCtr
III.2.2. RC Servo Motor Control
104 void EnableServo (short channel);
105 void DisableServo (short channel);
Description:
EnableServo enables the specified servo motor control channel.
DisableServo disables the specified servo motor control channel.
Syntax: EnableServo (channel);
DisableServo (channel);