105U-G Wireless Gateway
User Manual
Page
59
©
August 2003
file when initiating a “Typed Logical Write” command or responding to a “Typed Logical
Read” command. Similarly, the 105G will accept ‘0’ or ‘1’ from responding device to a
“Typed Logical Read” command or from an initiating device generating a “Typed Logical
Write” command and store ‘0000’ or ‘FFFF’ in the database location. The file type for a binary
file (bit file) is 0x85.
In the PLC (that is, the DF1 host device), discrete values (“bits”) are stored in 16 bit registers -
each register stores 16 bit values (or 16 discrete values). You can only transfer these values in
groups of 16. That is, a read or write command will transfer a minimum of 16 bits to/from the
105G. If more than 16 are transferred, then they will be transferred in multiples of 16. You
cannot transfer an individual bit - you must transfer the 16 bits in that PLC register, which will
be transferred to/from 16 consecutive I/O registers in the 105G.
Analogue I/O
Analogue I/O from the remote 105U modules are 16 bit register value. A value of 8192 (hex
2000) represents 0mA. A value of 49152 (hex C000) represents 20mA. Each mA has value of
2048 (hex 0800) - a change of 4096 (hex 1000) is equivalent to a change of 2mA. A 4-20mA
signal will vary between 16384 (hex 4000) and 49152 (hex C000). A 0-20mA signal will vary
between 8192 (hex 2000) and 49152 (hex C000).
Note:
If analogue values are read to and written from an integer file in an SLC or Micrologix
CPU, integer files contain 16 bit
signed
values. These represent values in the range -32768 to
32767. The data values from the 105U modules are treated as 16 bit
unsigned
values. To convert
the data from an analogue input, move the data from the integer file to a long file (MOV
command) then mask out the high 16 bits (MVM with mask value FFFF). This will result in a
long integer value in the range 0 to 65535.
Alternatively, use a long integer file type to transfer the analogue value as a long integer in the
range 0-65535.
Pulse I/O
Pulse counts from the remote 105U modules are shown as a 16-bit register. When the register
rolls over, from ‘FFFF’ (hex), the next value will be ‘0001’. The register will only have a
value of ‘0000’ when the remote module starts up, and the previous count is lost. This value
will indicate that the counter has reset.
Note:
The values from the 105G module are 16 bit
unsigned
values. When they are copied to
the Integer file in the PLC, they will be treated as 16 bit
signed
values. These values may be
converted to the original (unsigned) values using the MOV and MVM instructions described
in the previous section (Analogue I/O). Again, using a Long Integer type will avoid this
problem.
500 CPU (SLC and MicroLogix) file types and addressing
The 105G provides a linear address space of 10,000 data words. This is compatible with
PLC2 addresses, but does not match the addressing used by the 500CPU modules (SLC and
Micrologic). These address data by file number and file offset. To address an image location,
L,
in the 105G, set the file number to
L
/ 100 and set the file offset to L % 100. For example,
to read image location 4623 in the 105G, read from file number 46, offset 23.