Chapter 7. Programming SRTP Channel Commands
GFK-2224Q
January 2017
127
If a channel error is indicated (by the Channel Error bit) after the channel is established, the first word of the
DCS words contains an error code indicating the cause of the error. The second word of the DCS words
indicates whether the channel is active or idle.
The Detailed Channel Status words are updated in the Ethernet Interface every time the status of the channel
changes. If the channel is operating with a fast repetition period, the status words may change faster than the
ladder executes the COMMREQ to retrieve them. Therefore, some status values may be missed by the program
logic.
The DCS words location is specified in the Retrieve Detailed Channel Status Command. The contents of these
status words are defined below.
The initial value of the Detailed Channel Status words is all zeroes. DCS words are reset to zero when:
▪
The Ethernet Interface is powered up or restarted
▪
The CPU transitions from STOP to RUN
▪
A channel abort COMMREQ aborts the channel
Format of the Detailed Channel Status Words (DCS Words)
Display the DCS status words in hexadecimal form to differentiate the high and low bytes.
High
Low
00
00
Minor Error Codes (high byte)
Success and Major Error Codes (low byte)
0000
Channel Active (0001 = channel active,
0000 = channel not active)
DCS Word in Hex Format
Word 1
Word 2
Figure 50: Interpreting Detailed Channel Status Words
7.3
Programming for Channel Commands
The COMMREQ function for a Channel command must be initiated by a one-shot. That will prevent the
COMMREQ from being executed each CPU scan, which would overrun the capability of the Ethernet Interface
and possibly require a manual restart. Checking certain status bits before initiating a COMMREQ function is
also important. In particular, the LAN Interface OK bit should be used as an interlock to prevent execution of
the COMMREQ when the Ethernet Interface is not operational. After initiating a COMMREQ on a channel, no
further COMMREQs should be issued to that channel until a non-zero COMMREQ status word has been returned
to the program from the Ethernet Interface.
Every ladder program should do the following before initiating a COMMREQ function.
1.
Initiate the COMMREQ function with a one-shot. This prevents sending the same COMMREQ Command
Block more than once.
2.
Include at least the LAN Interface OK bit in the LAN Interface Status Word as an interlock contact for
the COMMREQ function.
3.
Zero the word location you specify for the COMMREQ status word and FT Outputs of the COMMREQ
function block before the COMMREQ function is initiated.
4.
Move the command code and parameters for the Channel command into the memory location
specified in the IN input of the COMMREQ Function Block before the COMMREQ function is initiated.
An example ladder program segment on the next page illustrates these points.
Содержание PACSystems RX7i
Страница 45: ......
Страница 54: ...Chapter 4 Configuration GFK 2224Q January 2017 41 Figure 18 CPE400 Advanced Ethernet Configuration LAN1 LAN 2 ...
Страница 80: ...Chapter 4 Configuration GFK 2224Q January 2017 67 ...
Страница 81: ......
Страница 122: ...Chapter 6 Programming EGD Commands GFK 2224Q January 2017 109 ...
Страница 142: ...Chapter 7 Programming SRTP Channel Commands GFK 2224Q January 2017 129 Figure 51 Sample Ladder Logic for COMMREQ ...
Страница 147: ......
Страница 193: ...Chapter 10 OPC UA Server 180 PACSystems RX7i RX3i TCP IP Ethernet Communications User Manual GFK 2224Q Example ...
Страница 202: ...Chapter 10 OPC UA Server GFK 2224Q January 2017 189 Figure 73 Machine Edition Online Command to Set Passwords ...
Страница 211: ......
Страница 253: ...Chapter 12 Diagnostics 240 PACSystems RX7i RX3i TCP IP Ethernet Communications User Manual GFK 2224Q ...
Страница 262: ...Chapter 13 Network Administration GFK 2224Q January 2017 249 ...
Страница 263: ......