Manual
Copyright © Dr Robot Inc. 2008
23
// 2 – Quadrature encoder
Return value: void
Remarks:
1. The electrical angular range of the potentiometer position sensor is 0˚ to 332˚ and
the corresponding mechanical rotation range is 14˚ to 346˚, when the 180
position is defined at sensor’s physical middle position.
2. Each DC motor channel for dual potentiometer sensor utilizes two potentiometer
channels. DC motor channel 0 will use potentiometer channel 0 and 5; DC motor
channel 1 will use potentiometer channel 1 and 4; DC motor channel 2 will use
potentiometer channel 2 and 3. Please refer to the relevant application note for
the use of dual potentiometers.
3. Quadrature encoder will only use DC motor channel 0 and 1.
4. System’s default setting for sensor usage is single potentiometer.
See also: GetSensorPot
91 void SetDcMotorControlMode (short channel, short controlMode);
Description:
SetDcMotorControlMode sets the control mode of the specified DC motor control channel
on the Sensing and Motion Controller (PMS5005). The available control modes are open-
loop PWM control, closed-loop position control, closed-loop velocity control.
Syntax: SetDcMotorControlMode (channel, controlMode)
Parameter: short channel; // 0, 1, 2, 3, 4, or 5
short controlMode; // 0 – Open-loop PWM Control
// 1 – Closed-loop Position Control
// 2 – Closed-loop Velocity Control
Return value: void
Remarks:
System’s default setting for control mode is Open-loop PWM Control.
See also: SetDcMotorPositionControlPID, SetDcMotorVelocityControlPID
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.










