Rockwell Automation 57C419 5V-24V DC Input Module User Manual
Page 40

EĆ2
32 Bit Register Reference
WARNING
IF YOU USE DOUBLE INTEGER VARIABLES IN THIS INSTANCE, YOU MUST
IMPLEMENT A SOFTWARE HANDSHAKE TO ENSURE THAT BOTH THE LEAST
SIGNIFICANT AND MOST SIGNIFICANT 16 BITS HAVE BEEN TRANSMITTED
BEFORE THEY ARE READ BY THE RECEIVING APPLICATION PROGRAM.
FAILURE TO OBSERVE THIS PRECAUTION COULD RESULT IN BODILY INJURY
OR DAMAGE TO EQUIPMENT.
Use the following method to reference all 32 inputs as a single register. Only one
statement is necessary. The symbolic name of each register should be as
meaningul as possible:
nnnnn IODEF SYMBOLIC_NAME![ SLOT=s, REGISTER=0]
When referenced as a long register of 32 bits, register 0 becomes the high order
16 bits.
16 Bit Register Reference
Use the following method to reference a 16 bit register as a single input. For this
module, a maximum of four statements can be included in the configuration task
(one for each register). The symbolic name of each register should be as
meaningful as possible:
nnnnn IODEF SYMBOLIC_NAME%[ SLOT=s, REGISTER=r]
Bit Reference
Use the following method to reference individual inputs on the module. For the
entire module, a maximum of 48 statements can be included in the configuration
task (one for each bit that can be read or written by the user). The symbolic name
of each bit should be as meaningful as possible:
nnnnn IODEF SYMBOLIC_NAME@[ SLOT=s, REGISTER=r, BIT=b]
where:
nnnnn Ć BASIC statement number. This number may range from 1Ć32767.
SYMBOLIC_NAME! Ć A symbolic name chosen by the user and ending with (!).
This indicates a long integer data type and all references will access registers 0
and 1.
SYMBOLIC_NAME% Ć A symbolic name chosen by the user and ending with (%).
This indicates an integer data type and all references will access register r".
SYMBOLIC_NAME@ Ć A symbolic name chosen by the user and ending with (@).
This indicates a boolean data type and all references will access bit number b"
in register r".
s Ć Slot number that the module is plugged into. This number may range from
0Ć15.
r Ć Specifies the register that is being referenced. For long integers this number
must be zero. For all other references this number may range from 0Ć3.
b Ć Used with boolean data types only. Specifies the bit in the register that is
being referenced. This number may range from 0Ć15.