User manual

Copyright © Dr Robot Inc. 2005
46
SetDcMotorVelocityControlPID sets up the PID control parameters of the specified DC
motor control channel for velocity.
Syntax: SetDcMotorPositionControlPID (channel, K
P
, K
D
, K
I
_x100);
SetDcMotorVelocityControlPID (channel, K
P
, K
D
, K
I
_x100);
Parameter: short channel; // 0, 1, 2, 3, 4, or 5
short K
P
; // Proportional gain
short K
D
; // Derivative gain
short K
I
_x100; // 100 times K
I
(the desired Integral gain), when
K
I
_x100 = 100, the actual integral control term is K
I
= 1, K
I
_x100 with range of 0 ~ 25599
Return value: void
Remarks:
1. When setting K
I
= 0, that means NO integral control
2. System default value for position control: K
P
= 50; K
D
= 5; K
I
_x100 = 0.
3. System default value for velocity control: K
P
= 50; K
D
= 5; K
I
_x100 = 0.
See Also: SetDcMotorControlMode
88 void SetDcMotorTrajectoryPlan (short channel, short TrajPlanMthod);
Description:
This function is obsolete.
89 void SetDcMotorSensorFilter (short channel, short FilterMethod);
Description:
This filtering feature is still under development. All data will be treated as raw data.
90 void SetDcMotorSensorUsage (short channel, short SensorType);
Description:
SetDcMotorSensorUsage sets the sensor type for the specified DC motor control channel
on the Sensing and Motion Controller (PMS5005). The available sensor types are single
potentiometer, dual potentiometers, and quadrature encoder. The single potentiometer
sensor is for the control of robot joint with limited rotation range (0˚ to 332˚). The dual
potentiometers and the quadrature sensor are for continuous rotating joint (like wheels)
control.