3 |
Rung # 1: Input LANIFOK (bit 16 of the LAN Interface Status bits) monitors the health of the Ethernet Interface. If it is OK to send a COMMREQ, the LAN_OK coil is ON. LAN_OK is used as an interlock for Rungs
Rung # 2: Input BEGREAD triggers READREQ, which enables execution of the MOVE and COMMREQ functions. READREQ is a
Rung # 3: The MOVE WORD function moves a zero to the CRS word referenced in the Command Block (see rung #4). This clears the CRS word. This rung also resets the FT output coil of the COMMREQ Function Block in rung #6.
It is vital that the CRS Status Word be cleared and the COMMREQ fault output coil be cleared each time before initiating a COMMREQ function.
Rungs #
Rung # 6: The COMMREQ Function Block has three input parameters and one output parameter (two output parameters for Series
The IN field points to the starting location of the Command Block parameters (%R00301 in this example).
The SYSID field of the COMMREQ Function Block defines the target rack and slot of the Ethernet Interface to receive the command data. This is a hexadecimal word value that gives the rack (high byte) and slot (low byte) location of the Ethernet Interface module. In the example ladder diagram shown, which is taken from a VersaPro screen, the first three number places (from left to right) are zeros and are not displayed; only the last number, 4, appears. This indicates rack 0, slot 4. On a Logicmaster screen, all four digits will appear (0004). (For the Series
The TASK field of the COMMREQ Function Block indicates which mailbox task ID to use for the specified rack and slot. For the Series
The FT output (energizes the FAULT coil in this example) is turned ON (set to 1) if there were problems preventing the delivery of the Command Block to the Ethernet Interface. In this case, the other status indicators are not updated for this COMMREQ. For Series
Troubleshooting Your Ladder Program
There are several forms of status data which can be used in your ladder program. The use of the LAN Interface OK bit in the LAN Interface Status Word was described in the ladder program fragment above. Some of the status data can be used to troubleshoot your program in its developmental stage. The two primary sources of this data are the FT Output on the COMMREQ Function Block and the COMMREQ Status word (CRS word).
| Chapter 3 Programming Channel Commands |