beautypg.com

FieldServer FS-8704-13 User Manual

Page 11

background image

FS-8704-13 GE-SRTP

Driver Manual

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

Visit our website: www.fieldserver.com E-mail: [email protected]

Page 9

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 o ne 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]