QUESTION: What is the meaning of the error STATUS
"0x7000" on function block FC5 / FC50 (AG_SEND) with Send/Receive
communication on the S7-400 controller?
ANSWER:
Send/Receive communication on the S7-400 can be realized using the
blocks FC5 / FC50 (AG_RECV) and FC6 / FC60 (AG_SEND). When the
AG_SEND block is called, the "ERROR" parameter has the value "True"
and the "STATUS" parameter the value "0x7000".
STATUS "0x7000" does not indicate an error on the block, but
simply indicates that the AG_SEND block has been called with ACT=0
without a job being triggered beforehand with ACT=TRUE. A simple
way of responding to this situation is illustrated below. The
complete example of a Send/Receive communication is available in
FAQ Entry ID 18513371.
Logical representation:
|
IF (ERROR = = 1 ) |
|
{ |
|
|
|
IF (STATUS != 0x7000) |
|
|
{ |
|
|
==> trigger error processing |
|
} |
|
|
} |
|
|
STL example:
|
e.g. ERROR = M0.2
STATUS = MW4 |
|
|
|
UN M0.2 |
// no error |
|
SPB NOER |
|
|
L MW4 |
// status |
|
L W#16#7000 |
|
|
= = I |
// if equal to 7000, then no error is present |
|
SPB NOER |
// no error |
|
|
|
// run error processing |
|
|
|
BEA |
|
|
NOER: SET |
|
|