User manual
Copyright © Dr Robot Inc. 2005
39
The return data is the raw value of the analog to digital converter indicating the output
voltage of the monitor. The data range is between 0 and 4095. The following equation can
be used to calculate the real voltage values.
Voltage = (ival / 4095) * 6 (V)
III.1.8 Potentiometer Position Sensors
44 short GetSensorPot1 ();
45 short GetSensorPot2 ();
46 short GetSensorPot3 ();
47 short GetSensorPot4 ();
48 short GetSensorPot5 ();
49 short GetSensorPot6 ();
50 short GetSensorPot (short channel);
Description:
GetSensorPotX returns the current value of the relevant potentiometer position sensors.
GetSensorPot (short channel) returns the current value of the specified potentiometer
position sensor.
Syntax: ival = GetSensorPot1 (); // Potentiometer sensor #1
ival = GetSensorPot2 (); // Potentiometer sensor #2
ival = GetSensorPot3 (); // Potentiometer sensor #3
ival = GetSensorPot4 (); // Potentiometer sensor #4
ival = GetSensorPot5 (); // Potentiometer sensor #5
ival = GetSensorPot6 (); // Potentiometer sensor #6
ival = GetSensorPot (channel); /* Potentiometer sensor
#1, 2, 3, 4, 5, or 6 */
Parameter: void // for GetSensorPotX
short channel; /* 0, 1, 2, 3, 4, or 5 for Potentiometer #
1, 2, 3, 4, 5, 6 */
Return value: short ival;
Return data interpretation and Remark:
1. The return data is the raw value of the analog to digital converter indicating the output
voltage of the sensor. The data range is between 0 and 4095. The angular position can
be calculated as follows, with the 180˚ position defined at sensor’s physical middle
position. Single sensor or dual sensor can be used for rotation measurement.