User manual
Copyright © Dr Robot Inc. 2006 
46
ival = SetMotorPolarity5 (short polarity);  // Motor #5 
ival = SetMotorPolarity6 (short polarity); // Motor #6 
ival = SetMotorPolarity (short channel, short polarity); 
// motor#1, 2, 3, 4, 5, or 6 
Parameter:  short polarity;    //1 or -1 
short  channel;   // 0, 1, 2, 3, 4, or 5 for Sonar #1, 2, 3, 4, 5, 6 
Return value:  void  ival; 
82  void EnableDcMotor (short channel); 
83  void DisableDcMotor ( short channel); 
Description: 
These functions are obsolete. Please see function ResumeDcMotor(short channel) and 
SuspendDcMotor(short channel). 
84  void ResumeDcMotor (short channel); 
85  void SuspendDcMotor (short channel); 
Description: 
ResumeDcMotor resumes the specified DC motor control channel. 
SuspendDcMotor suspends the specified DC motor control channel. PWM output is all low. 
Syntax: ResumeDcMotor (channel); 
  SuspendDcMotor (channel); 
Parameter:  short channel;  // 0, 1, 2, 3, 4, or 5 
Return value:  void 
Remarks: 
1.  All motor control channels are initially suspended when the system boot-up. 
86  void SetDcMotorPositionControlPID (short channel, short Kp, short Kd, short Ki_x100); 
87  void SetDcMotorVelocityControlPID (short channel, short Kp, short Kd, short Ki_x100); 
Description: 
SetDcMotorPositionControlPID sets up the PID control parameters of the specified DC 
motor channel for position control. 










