
Process interfacing via an automation system (PLC, PC)
9.4 Control with FB 79
SIMATIC MV500
194
Operating Instructions, 03/2021, C79000-G8976-C494-05
In contrast to all other jobs, the read jobs are "permanent jobs". This means that the "ACTIVE"
parameter retains the value "TRUE" even after fetching the current read result and/or the
current position and/or the quality characteristics from the optical reader.
You should therefore process the "DONE" and "ERROR" parameters at each block call. If the
transfer was successful, "DONE" = "TRUE" is set. However, this only means that the transfer
between the optical reader and the FB (CPU) was error-free. To find out whether the DMC
processing was successful, you will need to process bits "READ" (bit 3), "MATCH" (bit 4) and
"N_OK" (bit 5) in the status byte of the optical reader. In this case, refer to the following table
for the behavior of FB 79. Always process the "ERRCODE" parameter to get warnings from the
FB.
Table 9- 49 Effects of the behavior of the optical reader on the FB 79
Behavior of the optical reader
Effect on FB 79 ("RECV" target area)
The code could not be decoded.
FB 79 enters the string set in the "ReadErr" parameter.
The code was successfully decoded; howev-
er, you have not set any specifications.
FB 79 enters the result string.
The code was successfully decoded but does
not match your specifications.
FB 79 enters the string set in the "MatchErr" or "FilterMsg" parameter if the
Match or Filter function is set. If both these functions are selected, FB79
enters the string set under "MatchErr".
The code was successfully decoded and
matches your specifications.
FB 79 enters the result string.
Process the data entered in "RECV" before the next trigger; otherwise, the consistency of this
data cannot be guaranteed. At the same time, you should also process the "LENGTH"
parameter because the receive area is written only up to this length.
You can abort an active read job by calling FB79 with "COMMAND = W#16#0000".
If an error occurs when processing a job or when a current read job is canceled, "ERROR =
TRUE" is set. In this case, the "ERRCODE" parameter contains an ID indicating the cause of the
error. FB 79 writes "B#16#00" to the "RECV" target area.
Startup behavior
If an error occurs ("ERRCODE <> DW#16#0000 0000"), you need to initialize the FB once with
"RESET=TRUE" after calling an interrupt OB (for example, OB 82) and after a "STOP-RUN"
change on the CPU. Please include a suitable first call in your user program.
9.4.5.4
Error information
If an error has occurred, the "ERROR" parameter is set to "TRUE". The precise cause of the error
is then displayed in "ERRCODE". There are also warnings for which "ERROR" is set to "FALSE".
They indicate error situations that do not cause the current job to be canceled.
Содержание SIMATIC MV500
Страница 10: ...Preface SIMATIC MV500 10 Operating Instructions 03 2021 C79000 G8976 C494 05 ...
Страница 16: ......
Страница 28: ......
Страница 32: ......
Страница 92: ......
Страница 114: ......
Страница 148: ......
Страница 244: ......
Страница 254: ......
Страница 260: ......
Страница 292: ......
Страница 294: ...Service Support SIMATIC MV500 294 Operating Instructions 03 2021 C79000 G8976 C494 05 ...