User`s manual
Exp-A/D12
70 s Software Reference
int slow
_
plad12( int entry )
Reads the Exp-A/D12 for the signal identified by the signal table entry
entry. This function handles all the overhead. This function is slow
(~1 ms execution), but relatively easy to use.
void an
_
input
_
ch( int board, int channel )
Switches the Exp-A/D12 addressed so that it begins reading the input
channel (07) specified. This function does not wait for the analog
circuitry to settle. Call mxdel before doing the A/D conversion.
void set
_
mux( int entry )
Sets the Exp-A/D12 multiplexers according to the signal entry in the
signal table. This function does not wait for the analog circuitry to
settle. Call mxdel before doing the A/D conversion.
int adch( int entry )
Returns the conversion mode (017) for a signal entry in the signal
table.
void mxdel18()
void mxdel9()
void mxdel20()
Generates a 450 µs delay for 18 MHz, 9 MHz, and 20 MHz proces-
sors, respectively. These functions offer a simple way to let the
circuitry settle after the multiplexers have been switched. A delay of
450 µs (202X gain) is the maximum needed. Not all A/D modes
require this much time.
int polarity( int mode )
Returns the polarity of an A/D mode (017): either 1 (bipolar) or 0
(unipolar).
Accessing EEPROM
int adee
_
rd( int board, int addr )
Reads the EEPROM on the Exp-A/D12 at the specified bus address.
The byte at addr is returned as an int.
The first argument in adee_rd is not used. Place the address of the
boards B register on the PLCBus before calling adee_rd:
set12adr( board+BREG );
adee
_
rd( unused, addr, value );
The function return value indicates its success or failure.
$0 successful read
1 EEPROM hardware error