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 3–6.

Rung # 2: Input BEGREAD triggers READREQ, which enables execution of the MOVE and COMMREQ functions. READREQ is a one-shot (Positive Transition) coil, activating once when BEGREAD transitions from OFF to ON.

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 # 4–5: The BLKMV INT functions set up the COMMREQ Command Block contents. When these rungs are activated, the constant operands are moved into the memory beginning at the address indicated in the instruction. The constant operands in this example are defined in the Establish Read Channel Example in this chapter.

Rung # 6: The COMMREQ Function Block has three input parameters and one output parameter (two output parameters for Series 90-70 PLCs).

ƒ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 90-30 CPU364, this value should always be set to 0001 to specify rack 0, slot 1.)

ƒThe TASK field of the COMMREQ Function Block indicates which mailbox task ID to use for the specified rack and slot. For the Series 90-30 Ethernet Interface and the Series 90-70 Ethernet Interface (Type 2), this value should always be zero. For the Series 90-30 CPU364, this value should always be 21 decimal (0015H).

ƒ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 90-70 PLCs only, the OK output may also be monitored to verify the COMMREQ was successfully sent to the Ethernet Interface.

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).

GFK-1541B

Chapter 3 Programming Channel Commands

3-45

Page 112
Image 112
GE GFK-1541B manual Troubleshooting Your Ladder Program