FS-8700-17_Opto22

FS-8700-17_Opto22
A Sierra Monitor Company
Driver Manual
(Supplement to the FieldServer Instruction Manual)
FS-8700-17 Opto22
APPLICABILITY & EFFECTIVITY
Effective for all systems manufactured after November 2009
Driver Version:
Document Revision:
1.01
2
FS-8700-17_Opto22.doc Manual
Table of Contents
TABLE OF CONTENTS
1
Optomux Driver Description ..................................................................................................................... 1
1.1
Operating Methods ............................................................................................................................................. 1
1.1.1
Static Operation .......................................................................................................................................... 1
1.1.2
Dynamic Operation ..................................................................................................................................... 1
1.1.3
Triggered Operation.................................................................................................................................... 1
1.2
Statistics and Command Reponses..................................................................................................................... 1
2
Driver Scope of Supply ............................................................................................................................. 2
2.1
Supplied by FieldServer Technologies for this driver ........................................................................................ 2
rd
2.2
Provided by Supplier of 3 Party Equipment .................................................................................................... 2
3
Hardware Connections ............................................................................................................................. 3
3.1
Connection Notes ................................................................................................................................................ 3
4
Data Array Parameters ............................................................................................................................. 4
5
Configuring the FieldServer as an Optomux Driver Client ........................................................................... 5
5.1
Client Side Connection Parameters .................................................................................................................... 5
5.2
Client Side Nodes ................................................................................................................................................. 6
5.3
Client Side Map Descriptors................................................................................................................................ 6
5.3.1
FieldServer Related Map Descriptor Parameters ...................................................................................... 6
5.3.2
Driver Related Map Descriptor Parameters............................................................................................... 7
5.3.3
Timing Parameters ...................................................................................................................................... 8
5.3.4
Map Descriptor Example – Read on/off Status ......................................................................................... 9
Appendix A. Useful Features ........................................................................................................................... 10
Appendix A.1. Module Positions ................................................................................................................................... 10
Appendix A.1.1. Static Specification...................................................................................................................... 10
Appendix A.1.2. Map Descriptor Example - Static Specification Using a Mask to Address specific module
positions
11
Appendix A.1.3. Map Descriptor Example -Specifying Module Positions Dynamically ...................................... 12
Appendix A.1.4. Map Descriptor Example – Triggered Action ............................................................................ 13
Appendix A.2. Store Unpacked Bit Data ....................................................................................................................... 14
Appendix A.3. Expose Command Response/Completion Status ................................................................................ 14
Appendix B. Reference ................................................................................................................................... 15
Appendix B.1. Optomux Commands............................................................................................................................. 15
Appendix B.2. Command Response Status .................................................................................................................. 21
Appendix B.3. Driver Stats ............................................................................................................................................. 21
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
1
Page 1 of 24
OPTOMUX DRIVER DESCRIPTION
The Optomux Driver allows the FieldServer to transfer data to and from devices over either RS-232 or RS-485 using
the Optomux Driver protocol.
The Optomux driver is a client only driver. This means that the driver can poll an Optomux protocol compliant
device but cannot emulate one.
The Optomux protocol provides a large command set. Many of the commands are used for OPTO22 device
configuration. This driver supports the full command set and thus the driver may be used to configure as well as to
poll OPTO22 devices.
1.1
Operating Methods
The Optomux driver provides three methods of operation. Users may use any combination of methods.
1.1.1
Static Operation
The devices to be polled/commanded are configured using the FieldServer CSV file. If the hardware configuration
is fixed and known then this is a suitable method.
1.1.2
Dynamic Operat ion
The commands set can be configured by changing the values in the FieldServer’s Data Arrays. This data driven
operating mode is suitable if the hardware configuration may change or if hardware settings may change
dynamically or to change some aspect of the hardware configuration without changing the CSV file and resetting
the FieldServer..
1.1.3
Triggered Operation
This operating mode allows commands to be triggered by changing the value in the FieldServer’s Data Arrays. This
operating mode is useful if requiring an action triggered by a remote device.
1.2
Statistics and Command Reponses
All FieldServer drivers report communication statistics that allow the operation of the driver to be monitored.
In addition to the standard statistics, this driver exposes the communication statistics for each port by presenting
them in a user specified Data Array where they can be monitored by a remote device or HMI system.
The Optomux driver also exposes the response status to each poll and command (if required) by writing the
response statuses to a user specified Data Array. This useful feature allows remote devices to check whether a
command has been completed successfully.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
2
Page 2 of 24
DRIVER SCOPE OF SUPPLY
2.1
Supplied by FieldServer Technologies for this driver
FieldServer Technologies PART #
FS-8700-17
2.2
Description
Driver Manual.
Provided by Supplier of 3 r d Party Equipment
Part #
Description
Optomux System
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
3
Page 3 of 24
HARDWARE CONNECTIONS
The FieldServer is connected to the OPTO22 device as shown below.
Configure the OPTO22 device according to manufacturer’s instructions.
- +
FO
- +
FH
- +
TH
- +
TO
COM
- +
FO
PREVIOUS OPTOMUX
- +
FH
- +
TH
AC 30 A / B
B1 or B2
- +
TO
COM
-
+
FO
-
+
FH
-
+
TH
-
+
COM
TO
NEXT OPTOMUX
B1 or B2
FieldServer
RS-485
Opto Isolated
3.1
Gnd
_
+
+
FG
Gnd
_
R2
R1
Connection Notes

B2 Communication connections are made to the rack (PB4AH, PA8AH, PB16AH), not to the brain board.

COM points must not be connected to Earth Ground.

Bridging 4-wire RS-422 to get 2-wire RS-485 may not work in certain applications, and in this case it is
recommended that a RS-232 to RS-422 converter is used in between the FieldServer and the OPTO 22 devices .
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
4
Page 4 of 24
DATA ARRAY PARAMETERS
Data Arrays are “protocol neutral” data buffers for storage of data to be passed between protocols. It is necessary
to declare the data format of each of the Data Arrays to facilitate correct storage of the relevant data.
Section Title
Data_Arrays
Column Title
Data_Array_Name
Function
Provide name for Data Array
Data_Array_Format
Provide data format. Each Data Array can only take on
one format.
Data_Array_Length
Number of Data Objects. Must be larger than the data
storage area required by the Map Descriptors for the
data being placed in this array.
Legal Values
Up to 15 alphanumeric characters
Float, BIT, UInt16, SInt16,
Packed_Bit, Byte, Packed_Byte,
Swapped_Byte
1-10, 000
Example
// Data Arrays
Data_Arrays
Data_Array_Name
DA_AI_01
DA_AO_01
DA_DI_01
DA_DO_01
, Data_Array_Format
, UInt16
, UInt16
, Bit
, Bit
, Data_Array_Length
, 200
, 200
, 200
, 200
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
5
Page 5 of 24
CONFIGURING THE FIEL DSERVER AS AN OPTOMUX DRIVER CLIENT
For a detailed discussion on FieldServer configuration, please refer to the FieldServer Configuration Manual. The
information that follows describes how to expand upon the factory defaults provided in the configuration files
included with the FieldServer (See “.csv” files on the driver diskette).
This section documents and describes the parameters necessary for configuring the FieldServer to communicate
with an Optomux Device.
The configuration file tells the FieldServer about its interfaces, and the routing of data required. In order to enable
the FieldServer for Optomux Driver communications, the driver independent FieldServer buffers need to be
declared in the “Data Arrays” section, the destination device addresses need to be declared in the “Client Side
Nodes” section, and the data required from the servers needs to be mapped in the “Client Side Map Descriptors”
section. Details on how to do this can be found below.
Note that in the tables, * indicates an optional parameter, with the bold legal value being the default.
5.1
Client S ide Connection Parameters
Section Title
Connections
Column Title
Port
Function
Specify which port the device is
connected to the FieldServer
Baud*
Specify baud rate
Parity*
Data_Bits*
Stop_Bits*
Protocol
Poll Delay*
Specify parity
Specify data bits
Specify stop bits
Specify protocol used
Time between internal polls
Legal Values
R1-R2, (FS-X40 Series)
R1 (FS-X20 Series)
Standard baud Rates in the range 300-38400. (Vendor
Limitation), 9600
Even, Odd, None, Mark, Space
7, 8
1 (Vendor Limitation)
Optomux
0-32000 seconds, 1 second
Example
// Client Side Connections
Connections
Port
R1
, Baud
, 9600
, Parity
, None
, Protocol
,Opto22
, Poll_Delay
, 0.100s
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
5.2
Page 6 of 24
Client S ide Nodes
Section Title
Nodes
Column Title
Node_Name
Node_ID
Protocol
Port
Function
Provide name for node
OPTO22 device address.
Specify protocol used
Specify which port the device is connected to the FieldServer
Legal Values
Up to 32 alphanumeric characters
0-255
Optomux
1
P1-P8 (with convertor), R1-R2
Example
// Client Side Nodes
Nodes
Node_Name
Optomux1
5.3
, Node_ID
,1
, Protocol
, Optomux
, Port
, R1
Client S ide Map Descriptors
5.3.1
FieldServer Related Map Descriptor Parameters
Column Title
Function
Map_Descriptor_Name
Name of this Map Descriptor
Legal Values
Up to 32 alphanumeric
characters
Name of Data Array where data is to be stored / retrieved
in the FieldServer.
Data_Array_Name
The use of this array is dependent on the Optomux
command used in the Map Descriptor.
For example some commands use one data value for all
module positions to be affected by the command (Driver
will only use one Data Array element). Other commands
may use one data element per module position specified. In
this case the FieldServer may use up to 16 Data Array
elements.
Data_Array_Offset
Starting location in Data Array
Function
Function of Client Map Descriptor
One of the Data Array
names from Section 4.
O
to
(Data_Array_Length-1)
Rdbc, Wrbc, Wrbx
1
Not all ports shown are necessarily supported by the hardware. Consult the appropriate Instruction manual for details of the ports available
on specific hardware.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
5.3.2
Page 7 of 24
Driver Related Map Descriptor Parameters
Column Title
Function
Node_Name
Name of Node to fetch data from
Length
Opto22_Function
Address*
Opto22_Format*
Opto22_Trigger*
Opto22_modifier1*
Opto22_modifier2*
Opto22_Mask*
Da_Bit_Name*
Da_Byte_Name*
Length of Map Descriptor. Commands and queries that use the value of
this Map Descriptor parameter are indicated in Appendix B.1 The driver
uses a maximum of 16 elements of data.
The FieldServer kernel uses this parameter to ensure that no more than
one Client Map Descriptor has control of a range of array data
elements. It is therefore recommended that the parameter is set even
if not required by the command/query.- in these cases set it to 1.
This parameter is specified using one of the functions listed in Appendix
B.1. The parameter must be spelled and spaced exactly as provided in
the table. Leading and trailing spaces are not important but inter-word
spaces are very important. Tabs are not permitted.
This field is only required if the address/length method of module
position specification is used. Refer to Appendix A.2
This parameter only has meaning when the function is a read of digital
data. The parameter instructs the driver to unpack this data into
separate bit states, writing each module position’s state to a
consecutive Data Array element. Refer to Appendix A.2
An optional parameter used in conjunction with the Da_Byte_Name
parameter. If the parameter is set, a poll will only be sent when the
trigger value is set. More information is provided in Appendix A.1.4.
Some Opto22_Functions require one or more additional arguments.
SET TIME DELAY
GENERATE N PULSES
READ AND AVERAGE INPUTS
This parameter allows the user to statically specify the positions (1-16)
of a module that will be affected by a command. When this parameter
is used and its value is non zero then the driver does not consider the
data contained in the position defining array even if it is also defined.
Refer also to Appendix A.1.1
This parameter is only required for dynamic module position
specification. The Data Array is used to tell the driver which module
positions to affect by a command. Additional information is provided in
Appendix A.1.3
This driver uses DA_Byte_Name exclusively as a location for the
commands to trigger Map Descriptors and in which to store poll
response status. Refer to Appendix A.1.4
One data element is used per Map Descriptor. The element is
determined by the Data_Array_Offset parameter.
Legal Values
One of the
Node
names
specified
in
Section 5.2
1 - 1000
See Appendix
B.1
1..16
Bit, Packed
No, Yes
See
B.1
Appendix
0-65535
or
0x0000 – 0xffff
One of the Data
Array
names
from Section 4.
One of the Data
Array
names
from Section 4.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
5.3.3
Page 8 of 24
Timing Parameters
Column Title
Scan_Interval
Function
Rate at which data is polled
Legal Values
>0.1s
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
5.3.4
Page 9 of 24
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
nd
would indicate that the 2 position is on and all other positions are off.
Map_Descriptor_Name
DEVICE77_STAT
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.
, Data_Array_Name
, DISC_INPUTS
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.
, Data_Array_Offset
,0
, Function
, Rdbc
The device will
be read
continuously.
The data will be
stored at offset
zero (First
element) of the
data array.
, Node_Name
, DEV77
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.
, Length
,1
, Scan_Interval
, 5.0s
Only one
element of the
data array is
reserved for
this Map
Descriptor.
, Opto22_Function
, 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
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Page 10 of 24
Appendix A. Useful Features
Appendix A.1. Module Positions
Appendix A.1.1.
Static Specifi cation
Specify module positions statically by

Using Address and Length

Using the Opto22_Mask parameter
If more than one method is used for module position specification, the driver evaluates the specification in the order listed above. Thus if address & length are
specified as well as the opto22_mask, the driver will use the address and length.
Take care to ensure that the Data Array used for storage has a data format suitable for storing the data type returned by the command. Also take care to ensure
that you understand the scaling of the data returned by the Optomux device. There are parameters that you can add to a Map Descriptor to have the driver scale
the value. This is discussed in the FieldServer Configuration Manual.
A.1.1.1 .
Map Descript or Exam ple - Static Specificati on using Address a nd Length.
This example shows a Map Descriptor which reads analog inputs from an Optomux Device. The address and length tell the driver which inputs to read. This style
of configuration is not suited to writing/commanding since the driver builds its payload based entirely on the address and length. It does not look in the Data Array
to see which positions must be written with a ‘1’ or a ‘0’
Map_Descriptor_Name
DEVICE77_STAT
Data read from the
Optomux Device is
placed in this array.
, Data_Array_Name
, ANA_DATA
, Data_Array_Offset
,0
Starting at this
array position.
, Function
, Rdbc
The first module position
that is read is position 2.
Module positions are
numbered 1 to 16.
, Node_Name
, DEV77
, Address
,2
, Length
, 15
Data from 15 module
positions must be read.
Thus starting at 2, the last
module position read is 16.
, Scan_Interval
, 1.0s
, Opto22_function
, READ ANALOG INPUTS
This is the Optomux
Driver function that
must be performed.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Appendix A.1.2.
Page 11 of 24
Map Descript or Example - Static Specificati on Using a Mask to Address specific module positions
There may be occasions when it is not suitable to use address and length, e.g. when addressing non-consecutive Optomux module positions or when using a
command that affects all module positions. The driver provides an alternate method for module position specification by allowing a mask to be specified as a
parameter in the CSV file. The mask may be specified in decimal or hexadecimal format. In this example, module positions 1 and 5 are pulsed.
The mask specifies the positions (1-16) of a module that will be affected by a command.
When this parameter is used and its value is non zero then the driver does not consider the data contained in the position defining array even if it is defined.
The value of the mask may be specified in hexadecimal or in decimal.
To specify a number in hexadecimal the number must be prefixed with 0x and have a maximum of 4 digits.
Examples:
st
th
Decimal: 257 -> Indicates the 1 and 9 positions.
st
th
Hexadecimal: 0x0101 -> indicates the 1 and 9 positions.
Map_Descriptor_Name
PULSE77
, Data_Array_Name
, TIME_DATA
, Data_Array_Offset
,0
, Function
, Wrbc
Module positions are specified in hexadecimal
0x0001 = Module Position 1
0x0002 = Module Position 2
0x0003 = Module Positions 1 & 2
…..
, Node_Name
, DEV77
, Length
,1
, Scan_Interval
, 0.0s
, Opto22_Mask
, 0x0011
, Opto22_Function
, START ON PULSE
This function turns on the specified module positions for a
specified period. Unspecified positions (mask bit positions equal
zero) are not affected by the command.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Appendix A.1.3.
Page 12 of 24
Map Descript or Example - Specifyi ng Modul e Positions Dyna mically
In this example no address or mask is specified. The driver uses the values stored in the the Data Array named by the ‘DA_Bit_Name’ parameter to determine the
module positions to be affected by a command. Since Data Arrays can have their values changed by remote devices, the module position specification may be
changed dynamically. The CSV file does not require editing. This method can be used for all commands or only when using commands which would typically
require dynamic addressing.
nd
nd
Up to 16 elements will be inspected. The first element will be used for the first module position, the 2 element for the 2 module position ..Module positions
may be specified by setting the corresponding array element to a non-zero value or left unspecified by setting the module array position to zero.
In this example, module positions 1 and 5 are pulsed.
Map_Descriptor_Name
CLRLOW77
, Data_Array_Name
, LOW_ARRAY
, Data_Array_Offset
,0
In this example, the driver will store 16 lowest
values in an array called LOW_ARRAY starting at
position Data_Array_Offset.
, Function
, Wrbc
, Node_Name
, DEV77
Any number 1 to 16.
The driver stops at
16, ignoring larger
values.
Generally set this to
the number of
positions to be
commanded. If set
to a number less
than the max
number of positions
on the field device
the remaining
positions will never
be commanded
, Length
, 16
, Scan_Interval
, 10.0s
, DA_Bit_Name
, POS_ARR
, Opto22_function
, READ AND CLEAR LOWEST VALUES
This data array will be used by the driver to
determine the module positions to be affected by the
command.
The driver uses the length (max=16) and the
Data_Array_Offset. The first specified element
corresponds to module position 1. If its value is nonzero then the position is specified by the driver.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Appendix A.1.4.
Page 13 of 24
Map Descript or Example – Triggered A ction
This example shows the elements necessary to generate a triggered poll. Even though this Map Descriptor appears to write to the device continuously the driver
recognizes the Opto22_Trigger parameter and based on its value will only send the poll when the trigger value is set.
The driver processes the Map Descriptor at the scan interval specified. Each time that it is processed the driver checks the element of the Da_Byte_Name Data
st
Array specified. If the value of the 1 element of array located at Data_Array_offset = 1 then the driver executes the command. If the value is not =1. then the
driver ignores the Map Descriptor.
If the Map Descriptor is triggered then the driver will write a response status to the same data element on completion of the poll. Thus the value of 1 will be set to
zero for success or some other value indicating an error.
Map_Descriptor_Name
DEVICE77_STAT
, Data_Array_Name
, CNTR_POSNS
This Map Descriptor
is processed as a
write command and
will be processed
continuously.
, Data_Array_Offset
,0
, Function
, Wrbc
The driver will check to see if a
trigger has been set every 0.2
seconds.
, Node_Name
, DEV77
, Length
, 16
, Scan_Interval
, 0.2s
, Opto22_Function
, CLEAR COUNTERS
This keyword value for the
opto22_trigger parameter tells
the driver only to send this
Optomux command if it has been
triggered.
When this parameter is used the
DA_Byte_Name parameter must
also be used.
, Opto22_Trigger
,Yes
, DA_Byte_Name
, COMMAND_ARRAY
This is the name of a data array whose
contents will be used to trigger the
command.
The driver looks at the element found at
the Data_Array_Offset and if that value=1
then the command is sent. On
completion/error the driver will change
this value to some other number.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Page 14 of 24
Appendix A.2. Store Unpacked Bit Data
By default the OPTO22 devices returns 16 position states when digital data is read ( eg. READ STATUS). The Optomux driver writes the data as one 16 bit unsigned
st
th
integer to one data element of the Data Array specified. (packed bit format.), e.g. if the 1 and 5 inputs were on and all others were off the driver would write
the value 17 to the first element of the Data Array.
The Driver can be instructed to unpact this data into separate bit states using the Opto22_Format paramater. When this parameter is specified as Bit, each
module position’s state is written to a consecutive Data Array element.starting at Data_Array_Offset. The number of elements that are written is determined by
the Length parameter and a maximum of 16 elements will be written.
Map_Descriptor_Name
DEVICE77_STAT
, Data_Array_Name
, DISC_INPUTS
, Data_Array_Offset
,0
, Function
, Rdbc
, Node_Name
, DEV77
, Length
, 16
, Scan_Interval
, 5.0s
The length is set to 16 to
reserve 16 data array
elements for this Map
Descriptor.
, Opto22_Function
, READ STATUS
, Opto22_Format
, Bit
This is how the
driver is instructed
to unpack the digital
data.
Appendix A.3. Expose Command Response/Completion Status
Use of the DA_Byte_Name parameter allows the driver to expose the response/status generated when the command was executed. The response/status values
indicate the success/failure of the command based either on the driver’s ability to complete the command OR on the ack/nack returned by the device.
Map_Descriptor_Name
DEVICE77_STAT
, Data_Array_Name
, DISC_INPUTS
, Data_Array_Offset
,0
, Function
, Rdbc
, Node_Name
, DEV77
, Length
,1
, Scan_Interval
, 5.0s
, Opto22_Function
, READ STATUS
By virtue of defining the DA_Byte_Name parameter the driver will now store
a response status each time the poll is executed.
The response / status code will be stored in the data array called
REPONSE_ARR. One element of the array located at Data_Array_Offset will be
used. The data array’s data format should at least be able to store a byte of
data as response/status codes range from 0-255.
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: support@fieldserver.com
, DA_Byte_Name
, RESPONSE_ARR
FS-8700-17_Opto22.doc Manual
Page 15 of 24
Appendix B. Reference
Appendix B.1. Optomux Commands
The following provides a list of commands supported by the driver. The Command Names provided in the table
must be used in providing values for the opto22_function parameter. The notes provided only apply when module
positions are specified dynamically.
Read/
Write/
Both
w
w
w
w
w
w
r
w
w
w
w
w
w
w
r
COMMAND NAME
POWER UP CLEAR
RESET
SET TURNAROUND DELAY
SET WATCHDOG
DELAY
SET WATCHDOG
DELAY (Analog)
SET PROTOCOL
IDENTIFY Optomux
TYPE
SET ENHANCED
DIGITAL
WATCHDOG
SET ENHANCED
ANALOG
WATCHDOG
SET TIMER
RESOLUTION
SET
TEMPERATURE
PROBE TYPE
CONFIGURE
POSITIONS
CONFIGURE AS
INPUTS
CONFIGURE AS
OUTPUTS
READ MODULE
CONFIGURATION
OPTO22_FORMAT
OPTION
MASTER
LENGTH
CONSIDERED
(See Notes)
4
4
4
4
3
4
4
NOTES
Uses 1 element of Data Array. Legal values
are 0,1,2,3
Uses 1 element of Data Array. Legal values
are 0 to 7
Uses the 1st element of Data Array for the
timer value.
Uses 1 element of Data Array. Legal values
are 0,1
Polled data is stored in the 1st element of
the Data Array.
3
Delay is found in Data Array.
1
Uses up to Length (max=16) array
elements. Module positions specified get
setup for fail values by using the
corresponding positions in Data Array.
Uses 1 element of Data Array.
3
3
3
3
Temp probe type is found in first element
of Data Array
Non-zero module positions get set to
outputs. Zero module positions get set to
inputs
Only module positions specified get
affected by command.
Only module positions specified get
affected by command.
4
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Read/
Write/
Both
w
w
w
COMMAND NAME
WRITE OUTPUTS
READ STATUS
w
SET LATCH EDGES
w
MASTER
LENGTH
CONSIDERED
(See Notes)
1
ACTIVATE
OUTPUTS
DEACTIVATE
OUTPUTS
r
w
OPTO22_FORMAT
OPTION
Page 16 of 24
3
3
1
2
3
SET LATCH OFF TO
ON
SET LATCH ON TO
OFF
3
3
r
READ LATCHES
1
2
b
READ AND CLEAR
LATCHES
1
3,2
w
CLEAR LATCHES
3
NOTES
Uses up to Length (max=16) array
elements. Non-zero elements get turned
on, zero value elements get turned off.
Only module positions specified get
affected by command.
Only module positions specified get
affected by command.
If format=Bit then length is considered
during storage as bits are unpacked into
Data Array. If format is non equal to bit
then result is written as a single value into
one array element. Retrieved data is stored
in Data Array.
Always affects all module positions. Cannot
be limited by length. Length is only used
when determining which module positions
are specified as non-zero. Non-zero
(Specified) elements get set on->off, Zero
(Non-Specified) module positions get set
off->on
Only module positions specified get
affected by command.
Only module positions specified get
affected by command.
If format=Bit then length is considered
during storage as bits are unpacked into
Data Array. If format is non equal to bit
then result is written as a single value into
one array element.
Non-zero (Specified) module positions get
affected (cleared) by command. But all
positions get read. Read data get stored in
Data Array. During storage opto22_format
is considered. If format=bit then data is
unpacked and stored otherwise the result
for all 16 positions is stored as one data
element.
Only module positions specified get
affected by command.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Read/
Write/
Both
COMMAND NAME
OPTO22_FORMAT
OPTION
Page 17 of 24
MASTER
LENGTH
CONSIDERED
(See Notes)
w
START/STOP
COUNTERS
3
w
START COUNTERS
3
w
STOP COUNTERS
3
r
READ COUNTERS
1
b
READ AND CLEAR
COUNTERS
1
w
CLEAR COUNTERS
3
w
SET TIME DELAY
3
w
w
w
INITIATE SQUARE
WAVE
HIGH RESOLUTION
SQUARE WAVE
RETRIGGER TIME
DELAY
NOTES
All positions are affected by command.
Non-zero (specified) module positions start
counting, zero (unspecified) module
positions stop counting
Only module positions specified get
affected by command.
Only module positions specified get
affected by command.
Data that is read is put into the
corresponding array elements of the Data
Array based on which module positions are
read.
Data that is read is put into the
corresponding array elements of the Data
Array based on which module positions are
read.
Only module positions specified get
affected by command.
The Modifier is specified in the CSV file
with the opto22_modifier1 parameter. The
data (timeout) is retrieved from the first
element of the Data Array.
3
3
3
w
GENERATE N
PULSES
3
w
START ON PULSE
3
w
START OFF PULSE
3
Only module positions specified get
affected by command.
Only specified module positions get
affected. The Modifier (byte 1&2) are
specified in the CSV file with the
opto22_modifier1/2 parameters. The data
(number of pulses) is retrieved from the
1st element of the Data Array.
Only specified module positions get
affected. The data (period of pulses) is
retrieved from the 1st element of the Data
Array.
Only specified module positions get
affected. The data (period of pulses) is
retrieved from the first element of the
Data Array.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Read/
Write/
Both
w
w
w
COMMAND NAME
SET TRIGGER
POLARITY
READ PULSE
COMPLETE BITS
r
READ DURATION
COUNTERS
w
READ AND CLEAR
DURATION
COUNTERS
CLEAR DURATION
COUNTERS
MASTER
LENGTH
CONSIDERED
(See Notes)
3
TRIGGER ON
POSITIVE
TRIGGER ON
NEGATIVE
r
b
OPTO22_FORMAT
OPTION
Page 18 of 24
3
3
1
2
3
3
3
w
WRITE ANALOG
OUTPUTS
3
r
READ ANALOG
OUTPUTS
3
NOTES
All Module positions are affected by this
command. Non-zero (Specified) module
positions triggered by on, zero module
positions (un-specified) elements get
triggered by off.
Only module positions specified get
affected by command.
Only module positions specified get
affected by command.
If format=Bit then length is considered
during storage as bits are unpacked into
Data Array. If format is non equal to bit
then result is written as a single value into
one array element. Retrieved data is stored
in standard Data Array.
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
Only module positions specified get
affected by command.
Only specified module positions get
written. Data written gets extracted from
corresponding positions of data array.
This command is used to write a single
value to one or more outputs on a module.
The value is extracted from a single Data
Array element. The value is written to the
outputs specified in the mask. There are
many ways to specify the mask.
To send a different value to different
outputs use the ‘Update Analog Outputs’
command or make multiple Map
Descriptors using this command..
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Read/
Write/
Both
COMMAND NAME
OPTO22_FORMAT
OPTION
Page 19 of 24
MASTER
LENGTH
CONSIDERED
(See Notes)
w
UPDATE ANALOG
OUTPUTS
3
r
READ ANALOG
INPUTS
3
r
READ AND
AVERAGE INPUT
4
w
START INPUT
AVERAGING
3
r
READ AVERAGE
COMPLETE BITS
r
READ INPUT
AVERAGE DATA
r
r
READ
TEMPERATURE
INPUTS
READ AVERAGE
TEMPERATURE
INPUTS
1
2
3
3
3
NOTES
Only specified module positions get
written. Data written gets extracted from
corresponding positions of data array.
This command can send a different value
to each output on a module. The values
are extracted from the Data Array specified
on the Map Descriptor Which modules get
sent a value is determined by the mask.
There are many ways of specifying the
mask.
The command ‘Write Analog Outputs’
sends a single analog value to one or more
points on the module.
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
Only one module position may be
specified. This position is averaged and the
result is put in the first element of the Data
Array The number of samples is specified
in modifier1 in the csv file.
Only specified module positions get
affected by command. First element in
Data Array is sent as the number of
sample to average over.
If format=Bit then length is considered
during storage as bits are unpacked into
Data Array. If format is non equal to bit
then result is written as a single value into
one array element. Retrieved data is stored
in standard Data Array.
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Read/
Write/
Both
COMMAND NAME
OPTO22_FORMAT
OPTION
Page 20 of 24
MASTER
LENGTH
CONSIDERED
(See Notes)
w
SET INPUT RANGE
3
r
READ OUT-OFRANGE LATCHES
4
b
READ AND CLEAR
RANGE LATCHES
3
w
CLEAR OUT-OFRANGE LATCHES
4
r
READ LOWEST
VALUES
3
w
CLEAR LOWEST
VALUES
3
b
READ AND CLEAR
LOWEST VALUES
3
r
READ PEAK
VALUES
3
w
CLEAR PEAK
VALUES
3
b
READ AND CLEAR
PEAK
3
r
CALCULATE
OFFSETS
1
w
SET OFFSETS
1
r
CALCULATE AND
SET OFFSETS
1
r
CALCULATE GAIN
COEFFICIENTS
1
w
SET GAIN
COEFFICIENTS
1
NOTES
Only specified module positions have their
range set to the 2 values found in the Data
Array. 1st is high limit, second is lo limit.
High limit latches are placed in first
element of Data Array. Low limit latches
are placed in 2nd element of Data Array.
Only specified module positions get read
and cleared. Data read gets put in
corresponding positions of Data Array.
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
Only module positions specified get
affected by command.
Only specified module positions get read
and cleared. Data read gets put in
corresponding positions of Data Array.
Only specified module positions get read.
Data read gets put in corresponding
positions of Data Array.
Only module positions specified get
affected by command.
Only specified module positions get read
and cleared. Data read gets put in
corresponding positions of Data Array.
Only specified module positions get
calculated and read. Data read gets put in
corresponding positions of Data Array.
Only specified module positions get
written. Data written gets extracted from
corresponding positions of Data Array.
Only specified module positions get
calculated and read. Data read gets put in
corresponding positions of Data Array.
Only specified module positions get
calculated and read. Data read gets put in
corresponding positions of Data Array.
Only specified module positions get
written. Data written gets extracted from
corresponding positions of Data Array.
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Page 21 of 24
MASTER
LENGTH
CONSIDERED
(See Notes)
Read/
Write/
Both
COMMAND NAME
r
CALCULATE AND
SET GAIN
1
w
SET OUTPUT
WAVEFORM R
4
w
IMPROVED
OUTPUT
WAVEFORMS
4
OPTO22_FORMAT
OPTION
NOTES
Only specified module positions get
calculated and read. Data read gets put in
corresponding positions of Data Array.
Uses opto22_modifier1/2 from the CSV file
set waveform rates and types. Only
specified positions get affected. 2
elements of Data Array are used.
Uses opto22_modifier1/2 from the CSV file
set waveform rates and types. Only
specified positions get affected. 3
elements of Data Array are used.
Appendix B.2. Command Response Status
If a Data Array is specified using the DA_Byte_Array parameter then the driver will store a response status code i n
the array, updating the value each time a command is executed.
Value
Description
0
Command completed successfully.
1
Used to trigger a command.
All other values indicate error conditions. For Responses 128 to 255 the Optomux literature should be read for
additional information as these are codes returned by the Optomux device.
128
Nak from Optomux Device. Power Up Clear Expected. Command Ignored.
129
Nak from Optomux Device. Undefined Command
130
Nak from Optomux Device. Checksum Error
131
Nak from Optomux Device. Input Buffer Overun
132
Nak from Optomux Device. Non Printable Ascii character received
133
Nak from Optomux Device. Data Field Error
134
Nak from Optomux Device. Communication watchdog timeout
135
Nak from Optomux Device. Specified limits invalid.
250
An ack with no data was expected. Ack with Data was received.
251
The driver Complete function returned an error, could be checksum, bad 1st char ... i.e. The message
was badly formatted.
252
Driver Timeout
253
An ack was received but it was badly formatted
254
A nak was received but was badly formatted
255
Message was not acknowledged correctly.
Appendix B.3. Driver Stats
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: support@fieldserver.com
FS-8700-17_Opto22.doc Manual
Page 22 of 24
In addition to the standard FieldServer communication statistics described in the FieldServer User’s Manual the
Optomux Driver can also expose some driver statistics by writing data to a Data Array. A special Map Descriptor is
required. The driver recognizes the Map Descriptor by its name which must be "opto22-stats”.
The following example shows how this special Map Descriptor can be configured.
Nodes
Node_name
Null_Node
, Node_ID
,0
, Protocol
, Optomux
Data_Arrays
Data_Array_Name
OPTO22_STATS
, Data_Format
, UINT32
, Data_Array_Length
, 300
Map_Descriptors
Map_descriptor_Name
Opto22-stats
, Data_Array_Name
, OPTO22_STATS
, Node_name
, Null_Node
, Length
, 300
When the driver sees this Map Descriptor it uses the Data Array OPTO22_STATS (in this example) to store driver
specific statistics. Only one of these Map Descriptors may be specified per FieldServer.
The driver stores the following data.--+
Array Element
0
1
2
3
4
5
6
7
8
9
10
11
12
13
Contents
OPTO_STAT_BAD_FUNCTION
OPTO_STAT_DYNAMIC_MASK
OPTO_STAT_TIMEOUT
OPTO_STAT_STREAMING
OPTO_STAT_NAK
OPTO_STAT_PROTOCOL
OPTO_STAT_IC_TIMEOUT
OPTO_STAT_DEVICE_MSG_RECD
OPTO_STAT_DEVICE_BYTES_RECD
OPTO_STAT_DEVICE_FUNCTION
OPTO_STAT_NO_START
OPTO_STAT_MSG_IGNORED
OPTO_STAT_POLL_MSG_SENT
OPTO_STAT_POLL_BYTES_SENT
Description
The Opto22_Function has a bad value.
Mask cannot be specified in a CSV file with a zero value.
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: support@fieldserver.com
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising