User manual
Copyright © Dr Robot Inc. 2005
51
97 void DcMotorPwmNonTimeCtr(short channel, short cmdValue);
Description:
DcMotorPwmNonTimeCtr sends the PWM control command to the specified motion
control channel on the Sensing and Motion Controller (PMS5005). The command includes
the target pulse width value without specific execution time period. The motion controller
will set the PWM output of this channel to the target value immediately.
Syntax: DcMotorPwmNonTimeCtr (channel, cmdValue);
Parameter: short channel; // 0, 1, 2, 3, 4, or 5
short cmdValue; // Target pulse width value
Return value: void
Remarks:
1. The specified channel (motor) 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 16363 means 50% duty cycle, putting motor in “Stop” stage.
Any value in between 16364 - 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.
See also: DcMotorPwmTimeCtr
98 void DcMotorPositionTimeCtrAll(short cmd1, short cmd2, short cmd3, short cmd4,
short cmd5, short cmd6, short timePeriod);
Description:
DcMotorPositionTimeCtrAll sends the position 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 positions and the time period to execute the command. The current
trajectory planning method for time control is linear.
Syntax: DcMotorPositionTimeCtrAll (cmd1, cmd2, cmd3, cmd4, cmd5, cmd6,
timePeriod);
Parameter: short cmd1; // Target position for channel #1
short cmd2; // Target position for channel #2
short cmd3; // Target position for channel #3
short cmd4; // Target position for channel #4
short cmd5; // Target position for channel #5
short cmd6; // Target position for channel #6
short timePeriod; // Executing time in milliseconds