
32
The following ladder logic uses these tags to send a command:
Rung 4 starts with an XIC element tied to the CmdTrigger as a switch to trigger the
command. Next, two MOV elements store the desired command ID and command
argument in the appropriate AlicatCmd tag element to prepare the command. In this
example, the gas select command (ID 1) with argument 1 (Gas Index) is prepared. Then
the OTU element resets the CmdTrigger, so the command only runs once. Finally, an
OTL element sets the Boolean AlicatCmd.START element to 1.
Rung 5 contains only the AlicatCommand element. This add-on instruction is
evaluated every scan to see if the AlicatCmd.START element is set to 1. If it is set to 1,
the AlicatCmd.CmdID and CmdArg elements are stored in the AlicatCmdData buffer,
then passed to the Request message tag to send the command. Then, instance 103
is read by the Response message tag, and the result is copied back to the command
buffer. Finally, the AlicatCmd.START bit is unlatched. If any error codes are returned to
the command buffer, the ER bit will be tripped.
Note that after setting AlicatCMD.START, it should not be set again until the command
finishes (indicated by the AlicatCMD.EnableOut bit going high), or unpredictable
results may occur.
If you would like additional information regarding the use of this product, please contact:
Alicat Scientific, Inc.
7641 N Business Park Drive
Tucson, Arizona 85743
USA
Phone: 520-290-6060
Fax: 520-290-0109
Email: [email protected]
Website: www.alicat.com