Exp-A/D12
Software Reference
s
71
int adee_wr( int board, int addr, int value )
Writes the EEPROM on the Exp-A/D12 at the specified bus address.
The byte
value
is written at
addr
.
The first argument to
adee_wr
is not used. Place the address of the
boards B register on the PLCBus before calling
adee_wr
:
set12adr( board+BREG );
adee_wr( unused, addr, value );
The function return value indicates its success or failure:
0
successful write
1
EEPROM hardware error
2
EEPROM write-protect error
Sample Program
The following sample program demonstrates how to read an input signal
on the Exp-A/D12. In this example, the input signal is obtained from the
TEMP pin on U1 and is connected to AN0+ on Wago connector H1. The
TEMP voltage output is proportional to ambient temperature (near the
chip). At room temperature, the pins potential is about 620 mV.
The program reads AN0+ and prints voltages and temperatures, in the
Dynamic C
STDIO
window. The first step is to create a signal table, which
uses compensation coefficients stored in EEPROM for accurate readings.
Only one sample program is given since Exp-A/D12 functions are not part
of any other library.
These step-by-step instructions explain how to set up the Exp-A/D12, write
and compile the program, and run the sample program to operate the Exp-
A/D12s on a bus.
Use the following steps to run the sample program.
1. Power up the controller and make sure it is working properly. If there
are any problems, consult the controller users manual. Now discon-
nect power from the controller.
2. Connect the Exp-A/D12 to the controller. See Chapter 2, Getting
Started, for details.
3. Check jumpers J1J4 on the Exp-A/D12. Leave header J1 unjum-
pered. Connect pins 23 on headers J2, J3, and J4.
4. Connect a 4" to 6" jumper wire to terminal AN0+ on Wago connector
H1. Push the other end of the wire into the hole for pin 1 of connector
H8. H8 is not normally installed in the board, but you will find the 10
holes for it beside the A/D chip U4. The right-most hole is pin 1 which
is connected to the TEMP output of U1. With a second wire, connect
AN0 to GND (both on H1).
Содержание 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...