| Driver Manual |
4.4.7Map Descriptor Example 4 – Triggered Action
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.
Map_Descriptor_Name, Data_Array_Name, Data_Array_Offset, Function, Node_Name, Length, Scan_Interval, opto22_function , opto22_trigger, DA_Byte_Name
DEVICE77_STAT , CNTR_POSNS , 0 | , wrbc , DEV77 , 16 , 0.2s | , CLEAR COUNTERS , Yes | , COMMAND_ARRAY |
This map descriptor | The Driver will process this |
is processed as a | map descriptor every 0.2 |
write command and | seconds. |
will be processed | In this example, this does not |
continuously. | |
| mean that the command will |
| be sent to the device every |
| 0.2 seconds. It does mean |
| that the driver will check to |
| see if a trigger has been set |
| every 0.2 seconds. |
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.
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 (408)
Visit our website: www.fieldserver.com
Page 13