FieldServer FS-8704-13 instruction manual Map Descriptor Example 3 Handling Bits

Models: FS-8704-13

1 19
Download 19 pages 30.73 Kb
Page 11
Image 11

FS-8704-13 GE-SRTP

Driver Manual

4.4.6 Map Descriptor Example 3 – Handling Bits.

This example shows how to read 1 couple of bits from a data table rather than reading a whole byte. The bits can cross byte boundaries. Here we read 2 bits from table %T starting at bit 8. This is most useful when writing to the PLC in cases where you want to turn one particular bit on or off.

Map_Descriptor_Name, Data_Array_Name, Data_Array_Offset, Function, Scan_Interval, node_name, Address, Length, Data_Type, Format

Read_DI

, DA_T

, 100

, rdbc , 2.0s

, PLC-1 , 8

, 2

, %T

, Bit

The format parameter tells the driver to override the default data type and to specifically read bits. In this case the bit states are stored in the data array in two separate elements at DA_T[100] and DA_T[101]

FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 (408) 262-2299 fax: (408) 262-9042

Visit our website: www.fieldserver.com E-mail: support@fieldserver.com Page 9

Page 11
Image 11
FieldServer FS-8704-13 instruction manual Map Descriptor Example 3 Handling Bits