User manual

Copyright © Dr Robot Inc. 2005
48
92 void DcMotorPositionTimeCtr (short channel, short cmdValue, short timePeriod);
Description:
DcMotorPositionTimeCtr sends the position control command to the specified motion
control channel on the Sensing and Motion Controller (PMS5005). The command includes
the target position and the target time period to execute the command. The current
trajectory planning method with time control is linear.
Syntax: DcMotorPositionTimeCtr (channel, cmdValue, timePeriod);
Parameter: short channel; // 0, 1, 2, 3, 4, or 5
short cmdValue; // Target position value
short timePeriod; // Executing time in milliseconds
Return value: void
Remarks:
1. Motor will be enabled automatically by the system when this command is received.
2. Target position value is in the A/D sampling data range 0 to 4095 when using
single potentiometer, 0-4428 when using dual potentiometers.
3. Please refer to the description of GetSensorPot for data converting between
angular values and the A/D sampling data values.
4. When using encoder as sensor input, the target position value is the pulse count in
the range of 0- 32767.
See also: GetSensorPot
93 void DcMotorPositionNonTimeCtr(short channel, short cmdValue);
Description:
DcMotorPositionNonTimeCtr sends the position control command to the specified motion
control channel on the Sensing and Motion Controller (PMS5005). The command includes
the target position but no time period specified to execute the command. The motion
controller will drive the motor to the target position at the maximum speed.
Syntax: DcMotorPositionNonTimeCtr (channel, cmdValue);
Parameter: short channel; // 0, 1, 2, 3, 4, or 5
short cmdValue; // Target position value
Return value: void
Remarks: