Map Descriptor Example 3 - Handling Bits - FieldServer FS-8704-13 Driver Manual

Ge-srtp ethernet driver
Table of Contents

Advertisement

FS-8704-13 GE-SRTP
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
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 (408) 262-2299 fax: (408) 262-9042
, 100
, rdbc
, 2.0s
Visit our website: www.fieldserver.com
Page 9
Driver Manual
, PLC-1
, 8
, 2
, %T
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]
E-mail: support@fieldserver.com
, Bit

Advertisement

Table of Contents
loading

Table of Contents

Save PDF