User manual
Copyright © Dr Robot Inc. 2006 
43
III.1.11 Custom Analog and Digital Inputs and Outputs 
64  short GetCustomAD1(); 
65  short GetCustomAD2(); 
66  short GetCustomAD3(); 
67  short GetCustomAD4(); 
68  short GetCustomAD5(); 
69  short GetCustomAD6(); 
70  short GetCustomAD7(); 
71  short GetCustomAD8(); 
72  short GetCustomAD (short channel); 
Description: 
GetCustomADX returns the sampling value of the custom analog to digital input signals. By 
default, custom AD1 - AD3 are used as the inputs of power supply voltage monitors for DSP 
circuits, DC motors and servo motors. User can change this setting by configuring the 
jumpers on PMS5005. Please refer to Chapter IV.I PMS5005 Robot Sensing and Motion 
Controller (Page 67) for detailed information on hardware jumper setting. 
Syntax:  ival = GetCustomAD1();      /* for battery of DSP circuits, 
or custom A/D channel #1 */ 
ival = GetCustomAD2 ();      /* for battery of DC motors, 
or custom A/D channel #2 */ 
    ival = GetCustomAD3();      /* battery for servo motors, 
or custom A/D channel #3 */ 
ival = GetCustomAD4();      // custom A/D channel #4 
ival = GetCustomAD5();      // custom A/D channel #5 
ival = GetCustomAD6();      // custom A/D channel #6 
ival = GetCustomAD7();      // custom A/D channel #7 
ival = GetCustomAD8();       // custom A/D channel #8 
ival = GetCustomAD(short channel);  /* custom A/D channel #1, 2, 3, 4, 
5, 6, 7 or 8 */ 
Parameter: void 
    short  channel;      /* 0, 1, 2, 3, 4, 5, 6 or 7 for 
channel #1, 2, 3, 4, 5, 6, 7, 8 */ 
Return value:  short  ival; 
Return data interpretation: 










