Chapter 7. Programming SRTP Channel Commands126 PACSystems* RX7i & RX3i TCP/IP Ethernet Communications User Manual GFK-2224QRetrieve Detailed Channel Status (2002)The Retrieve Detailed Channel Status command requests that the current Detailed Channel Status words arereturned for a channel. The Detailed Channel Status words contain an active/inactive channel indicator and thelast channel error codes seen. These two words of detailed status supplement the information available in theCOMMREQ Status word and the Channel Status bits. The command has no effect on the value of the ChannelStatus bits.The Detailed Channel Status words are updated every time the status of the channel changes. If the channel isoperating with a fast repetition period, the status words may change faster than the ladder executes theCOMMREQ to retrieve them. If that happens, some status values could be missed by the application program.Example Command BlockRetrieve detailed channel status for Channel 5. Store the Detailed Channel Status words to Registers %R100–%R101. Return the COMMREQ status word to %R10.Dec (Hex)Word 1 00004 (0004) Length of Channel command Data Block (4 words)Word 2 00000 (0000) Always 0 (no-wait mode request)Word 3 00008 (0008) Memory Type of COMMREQ status word (%R)The term localPLC is used hereto identify theclient PLC—thePLC that initiatesthecommunicationsrequest.Word 413 00009 (0009) COMMREQ status word address minus 1 (%R10)Word 5 00000 (0000) ReservedWord 6 00000 (0000) ReservedWord 7 02002 (07D2) Retrieve Detailed Channel Status Command numberWord 8 00005 (0005) Channel number 5Word 9 00008 (0008) Local PLC - Memory type to store Detailed Chan. Stat. (%R)Word 10 00100 (0064) Local PLC - Starting address (%R100)(Word 7) Channel Command Number: Requests that Detailed Channel Status words be returned. The DetailedChannel Status words are written to the location specified in Words 9 and 10. The COMMREQ status wordindicates successful completion of the command. If the specified channel is not currently in use, the lateststatus is returned.(Word 8) Channel Number: Specifies the channel (1 – 32) whose status is to be read.(Word 9) Local PLC - Memory Type: Words 9 and 10 specify the starting point in the client CPU memory wherethe Detailed Channel Status words are to be written. The length of the transfer is always 2 words.(Word 10) Local PLC - Memory Starting Address: Determines the starting address to store the DetailedChannel Status data. The value entered is the offset (1-based) from the beginning of PLC memory for thememory type and mode specified in Word 9. This offset is in bits, bytes, or words depending on the modespecified (for example, if Word 9=16 and Word 10=2, then the starting address will be %I9). Valid ranges ofvalues depend on the PLC’s memory ranges. Make sure this area can contain the 2 words of data withoutoverwriting other application data.Note: For the Abort Channel and Retrieve Detailed Channel Status commands, no actual data istransmitted on the network. Communication occurs between the client CPU and the localEthernet Interface only. For these commands, known as “local” commands, the function isperformed locally within the Ethernet Interface and then the COMMREQ Status word issent immediately to the CPU.Monitoring the Detailed Channel Status WordsThe Detailed Channel Status words (DCS words) are returned from the Ethernet Interface to the CPU inresponse to a Retrieve Detailed Channel Status command from the application program. The first two DetailedChannel Status bytes report status and errors in the same format as the COMMREQ Status word. See the list oferror codes in Chapter 12.The second word of the DCS words indicates when the channel is active.