
Process interfacing via an automation system (PLC, PC)
9.4 Control with FB 79
SIMATIC MV500
186
Operating Instructions, 03/2021, C79000-G8976-C494-05
=W#16#0001), "Save a program" (COMMAND =W#16#0002) and "Output currently
selected program" (COMMAND =W#16#0003), the number of the selected program is
queried by the optical reader. For this reason, output of the result string must also be set
to PROFINET IO in these cases.
•
The interface for the "DISA", "SEL0" to "SEL3", "TRN", "RES", "IN_OP", "TRD", "RDY" signals
must always be set to PROFINET IO.
•
The setting of the interface for the result bits "READ", "MATCH", "N_OK" is irrelevant for the
function block.
9.4.5.1
How it works
FB 79 "VS130-2_CONTROL" is an asynchronous block. This means the processing can extend
over several block calls. You start job execution by calling the FB with a job number > "0".
Job execution is completed when the "ACTIVE" parameter changes to the value "FALSE" and
either "DONE" or "ERROR" has the value "TRUE" (positive edge). Note that various jobs can be
handled in one CPU cycle and the "ACTIVE" parameter does not therefore change to the value
"TRUE". This involves the "Read out status" and "Reset DISA bit" jobs. In this case, it may also
not be possible to detect an edge change at "DONE" or "ERROR".
You should therefore process the "DONE" and "ERROR" parameters at each block call. If the job
was completed without error, "DONE = TRUE" is set. Always process the "ERRCODE" parameter
to get warnings from the FB.
As long as the "ACTIVE" parameter has the value "TRUE", you must call the FB with identical
assignment of the "COMMAND" input parameter. It is also not possible to start a new job
during this time.
Read jobs are cyclic jobs. This means that after starting a job with "COMMAND = W#16#0081
... 008F", the "ACTIVE" parameter assumes the value "TRUE". "ACTIVE" retains this value until
the job is canceled or stopped.
The read cycle (in other words, the transfer of a complete result string) is completed when
the "ACTIVE" parameter has assumed the value "TRUE" and either "DONE" or "ERROR" has
assumed the value "TRUE" (positive edge). If you want to start a different job while a read job
is running, you will need to cancel the read job first. This is done by calling the FB with
"COMMAND = W#16#0000". In this case, the "ACTIVE" parameter assumes the value "FALSE".
Depending on whether a result string is currently being transferred, either "DONE" or "ERROR"
has the value "TRUE". If "ERROR" has the value "TRUE", "ERRCODE" has the value
"DW#16#00010007".
Note
Change of operating state from "Stop" to "Start"
If an error has occurred that changes the optical reader to "Stop", eliminate and acknowledge
the error. You can then return the optical reader to "Start" mode by changing program
(COMMAND = W#16#0001).
Содержание 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 ...