User manual

Copyright © Dr Robot Inc. 2005
54
DcMotorVelocityNonTimeCtrAll sends the velocity 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 velocities without specific execution time period. The motion
controller will drive the motor to achieve the target velocity with maximum effort.
Syntax: DcMotorVelocityNonTimeCtrAll (cmd1, cmd2, cmd3, cmd4, cmd5, cmd6);
Parameter: short cmd1; // Target velocity for channel #1
short cmd2; // Target velocity for channel #2
short cmd3; // Target velocity for channel #3
short cmd4; // Target velocity for channel #4
short cmd5; // Target velocity for channel #5
short cmd6; // Target velocity for channel #6
Return value: void
Remarks:
1. Motor will be enabled automatically by the system when this command is received
2. No velocity is available for motor channel using single potentiometer sensor
3. The unit of the velocity is (Position change in A/D sampling data) / second when
using dual potentiometer sensor for rotational position measurement and pulse/
second when using quadrature encoder.
4. Please refer to the description of GetSensorPot for data conversion between
angular values and the A/D sampling data values.
5. When some motors are not under controlled, their command values should be set as
-32768 (0x8000). That means NO_CONTROL.
See also: DcMotorVelocityNonTimeCtr
102 void DcMotorPwmTimeCtrAll(short cmd1, short cmd2, short cmd3, short cmd4, short
cmd5, short cmd6, short timePeriods);
Description:
DcMotorPwmTimeCtrAll 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 and the time period to execute the command. The current
trajectory planning method for time control is linear.
Syntax: DcMotorPwmTimeCtrAll (cmd1, cmd2, cmd3, cmd4, cmd5, cmd6,
timePeriods);
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