User manual

Copyright © Dr Robot Inc. 2005
40
2. Single sensor is mainly used for the control of robot joint with limited rotation range.
The effective mechanical rotation range is 14˚ to 346˚, corresponding to the effective
electrical rotation range 0˚ to 332˚.
Angle position (˚) = (ival - 2048)/4095*333 + 180
3. Dual-sensor configuration is mainly used for continuous rotating joint control (such as
wheels). The effective rotation range is 0˚ to 360˚. Dual sensor configuration is only
available for channel 0 and 1. By connecting two potentiometers to potentiometer
channel 0 and channel 5, and specify the sensor type with command
SetDCMotorSensorUsage() to “Dual potentiometer sensor”, the channel 0 reading
will combine these two sensor readings into 0˚ to 360˚ range. For channel 1, you
should connect the two potentiometers to channel 1 and 4.
Angle position (˚) = (ival - 2214)/2214*180 + 180
See also: SetDcMotorSensorUsage().
III.1.9 Motor Current Sensors
51 short GetMotorCurrent1 ();
52 short GetMotorCurrent2 ();
53 short GetMotorCurrent3 ();
54 short GetMotorCurrent4 ();
55 short GetMotorCurrent5 ();
56 short GetMotorCurrent6 ();
57 short GetMotorCurrent (short channel);
Description:
GetMotorCurrentX returns the sampling value of motor current sensor.
Syntax: ival = GetMotorCurrent1 (); // Current sensor #1
ival = GetMotorCurrent2 (); // Current sensor #2
ival = GetMotorCurrent3 (); // Current sensor #3
ival = GetMotorCurrent4 (); // Current sensor #4
ival = GetMotorCurrent5 (); // Current sensor #5
ival = GetMotorCurrent6 (); // Current sensor #6
ival = GetMotorCurrent (short channel); // Current sensor #1,2,3,4,5,or 6
Parameter: void // for GetMotorCurrentX
short channel; // 0,1,2,3,4,5 for current sensor #1,2,3,4,5,or 6