XP8500
Software Reference
s
43
int adc4_compute( struct adc4coeff cnvrsn,
int data1, float volt1, int data2,
float volt2 )
Computes the
zero_offset
and
invgain
for the
adc4coeff
structure pointed to by
cnvrsn
. The function computes the constants
zero_offset
and
invgain
based on A/D readings of two known
input voltages to allow input data to be corrected later using the
formula
voltage =
invgain
* (
zero_offset
data) .
data1
is the raw A/D reading for the known input voltage
volt1
.
data2
is the raw A/D reading for the known input voltage
volt2
.
RETURN VALUE: 0 if the constants are computed successfully, 1 if
the data used resulted in divide by zero while computing the constants.
int adc4_eerd( unsigned int board_adr,
int address )
Reads byte data from EEPROM data
address
.
board_adr
is the physical address of the XP8500 board, defined as
0000 1100 ppxy. Addresses range from 0 to 511 for the 512 bytes of
EEPROM memory storage.
RETURN VALUE: non-negative value for data, 1 if the XP8500
board cannot be found, 2 if a problem occurs while accessing the
EEPROM.
int adc4_eewr( unsigned int board_adr,
int address, char data )
Writes byte
data
to EEPROM data
address
.
board_adr
is the physical address of the XP8500 board, defined as
0000 1100 ppxy.
address
is 0 to 511 for the 512 bytes of EEPROM memory storage.
The top 256 bytes can be write-protected using with jumpers on
header J3.
RETURN VALUE: 0 if the data is successfully written to the
EEPROM, 1 if the XP8500 board cannot be found, 2 if a problem
occurs while accessing the EEPROM, 3 if a write to the top 256
bytes of EEPROM was attempted while the write-protect jumper is
connected.
Содержание Exp-A/D12
Страница 6: ...vi s Contents XP8500 and Exp A D12 Blank...
Страница 10: ...XP8500 and Exp A D12 x s About This Manual Blank...
Страница 11: ...XP8500...
Страница 12: ...Blank...
Страница 49: ...EXP A D12...
Страница 50: ...Blank...
Страница 58: ...Exp A D12 58 s Getting Started Blank...
Страница 64: ...Exp A D12 64 s I O Configurations Blank...
Страница 73: ...APPENDICES...
Страница 74: ...Blank...
Страница 86: ...XP8500 and Exp A D12 86 s PLCBus Blank...
Страница 87: ...XP8500 and Exp A D12 Specifications s 87 APPENDIX B SPECIFICATIONS...
Страница 92: ...XP8500 and Exp A D12 92 s Specifications Blank...
Страница 97: ...XP8500 and Exp A D12 Simulated PLCBus Connection s 97 APPENDIX D SIMULATED PLCBUS CONNECTION...
Страница 99: ...XP8500 and Exp A D12 Technical Circuit Details s 99 APPENDIX E TECHNICAL CIRCUIT DETAILS...
Страница 104: ...XP8500 and Exp A D12 104 s Technical Circuit Details Blank...