Exp-A/D12
Software Reference
s
69
General Exp-A/D12 Functions
There are several functions specific to Exp-A/D12 boards in
PLC_EXP.LIB
.
Use the higher level functions that reference the signal table.
int add_sig_table( int entry, int addr,
int in_ch, int mode, int comp )
Fills in an entry in the signal table.
PARAMETERS:
entry
selects table entry.
addr
is the 12-bit PLCBus address of Exp-A/D12.
in_ch
is the input channel to read (07).
mode
is the conversion mode (gain and polarity) (017).
comp
1 = use EEPROM compensation coefficients,
0 = no compensation.
RETURN VALUE:
0
signal data successfully entered in table
1
EEPROM hardware error
2
EEPROM write-protect error
3
invalid parameter used
int plcad_addr( int board )
Returns the 12-bit (nibble-interchanged) bus address for an
Exp-A/D-12 board identified by
board
, a logical address (063).
A/D Conversion
float ad_conv( int entry, int value )
Returns the voltage represented by a 12-bit A/D input
value
, assum-
ing a 2.5 V scale. The term
entry
identifies the signal in the signal
table. If the signal table entry specifies compensation for the signal,
the function computes its value using the entrys calibration coeffi-
cients, otherwise it uses a standard set of coefficients.
int plad_rd12( int mode )
Returns a 12-bit A/D value read from the A/D converter chip.
mode
specifies one of the A/D conversion modes (017) to use.
To use this function, make sure that (1) the address of the Exp-A/
D12s B register is placed on the bus and (2) one of the eight input
channels has been selected.
Higher level functions are available.
Summary of Contents for Exp-A/D12
Page 6: ...vi s Contents XP8500 and Exp A D12 Blank...
Page 10: ...XP8500 and Exp A D12 x s About This Manual Blank...
Page 11: ...XP8500...
Page 12: ...Blank...
Page 49: ...EXP A D12...
Page 50: ...Blank...
Page 58: ...Exp A D12 58 s Getting Started Blank...
Page 64: ...Exp A D12 64 s I O Configurations Blank...
Page 73: ...APPENDICES...
Page 74: ...Blank...
Page 86: ...XP8500 and Exp A D12 86 s PLCBus Blank...
Page 87: ...XP8500 and Exp A D12 Specifications s 87 APPENDIX B SPECIFICATIONS...
Page 92: ...XP8500 and Exp A D12 92 s Specifications Blank...
Page 97: ...XP8500 and Exp A D12 Simulated PLCBus Connection s 97 APPENDIX D SIMULATED PLCBUS CONNECTION...
Page 99: ...XP8500 and Exp A D12 Technical Circuit Details s 99 APPENDIX E TECHNICAL CIRCUIT DETAILS...
Page 104: ...XP8500 and Exp A D12 104 s Technical Circuit Details Blank...