Map descriptor example – read on/off status – FieldServer Optomux FS-8700-17 User Manual
Page 11
FS-8700-17_Opto22.doc Manual
Page 9 of 24
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com
Tel: (408) 262 2299 Fax: (408) 262 2269 Toll Free: (888) 509 1970 email: [email protected]
5.3.4 Map Descriptor Example – Read on/off Status
In this example the on/off status of all module positions of the Optomux device are read and stored. They are read continuously (Rdbc) every 5 seconds
(Scan_Interval). The Read Status command returns one packed 16 bit value. There is one bit per module position, thus, if the returned value was 2 then this
would indicate that the 2
nd
position is on and all other positions are off.
Map_Descriptor_Name , Data_Array_Name , Data_Array_Offset , Function , Node_Name , Length , Scan_Interval , Opto22_Function
DEVICE77_STAT
, DISC_INPUTS
, 0
, Rdbc
, DEV77
, 1
, 5.0s
, READ STATUS
This is the name of the
Optomux command /
query that must be
performed.
It must be spelled and
spaced exactly as in
Appendix B.1
Only one
element of the
data array is
reserved for
this Map
Descriptor.
The data will be
stored at offset
zero (First
element) of the
data array.
The device will
be read
continuously.
Map Descriptor
names are often
used in error
messages so it is
usefull to have
unique names.
Dashes, spaces,
upper and
lowercase
characters may be
used.
The data array in
which the data will
be stored.
Ensure that the
Data Format of the
array is suitable for
storing the data
returned by the
device. Appendix
B.1 provides details
of the type of data
returned by each
command.
The node must
have previously
been defined in
the Nodes
section of the
CSV file. Its
Node_ID should
be set to 77 to
reference the
device
addressed as
77.