Manual

Copyright © Dr Robot Inc. 2008
14
UWord16 HighWord; // 2
nd
word
Return value: void
Remarks:
1. In infrared communication application, the data format and the interpretation can
be defined by the user at the application level.
2. In infrared remote control application, the control command should be compatible
to the device to which the command is sent.
3. This API function is under development and will be available shortly.
III.1.7. Battery Voltage Monitors
39 short GetSensorBatteryAD1 ();
40 short GetSensorBatteryAD2 ();
41 short GetSensorBatteryAD3 ();
Description:
GetSensorBatteryADX returns the current value of the relevant power supply voltage if
the battery voltage monitor is enabled (default), or returns the relevant custom A/D inputs,
if the custom A/D input is enabled which is configured by the jumpers on PMS5005. Please
refer to PMS5005 Robot Sensing and Motion Controller User Manual for detailed
information on hardware setting.
Syntax: ival = GetSensorBatteryAD1(); /* for battery of DSP circuits,
or custom A/D channel #1 */
ival = GetSensorBatteryAD2(); /* for battery of DC motors,
or custom A/D channel #2 */
ival = GetSensorBatteryAD3(); /* battery for servo motors,
or custom A/D channel #3 */
Parameter: void
Return value: short ival;
Return data interpretation:
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.
When monitoring the voltage of the power supply, following equations can be used to
calculate the real voltage values.
(1) Power supply voltage of DSP circuits = (ival / 4095) * 9 (V)
(2) Power supply voltage of DC motors = (ival / 4095) * 24 (V)
(3) Power supply voltage of servo motors = (ival / 4095) * 9 (V)