
Process interfacing via an automation system (PLC, PC)
9.4 Control with FB 79
SIMATIC MV500
Operating Instructions, 03/2021, C79000-G8976-C494-05
191
Sequence when changing a program ("COMMAND" = W#16#0001)
To perform a program change while the optical reader is actively executing a read job, follow
these steps:
1.
Call FB79 with "COMMAND = W#16#0000".
This cancels the output of the result string (job "W#16#0081").
2.
Run the program change by calling FB 79 with "COMMAND = W#16#0001" and "PARAM =
new program no.".
When the job is triggered, the parameters "DONE" and "ERROR" have the value "FALSE".
The "ACTIVE" parameter has the value "TRUE". The block changes the program selected on
the optical reader to the value at the "PARAM1" parameter. The module then queries the
program selected now on the optical reader and outputs it via the "CODE_OUT" parameter.
If the program now selected matches the program specified at the "PARAM1" parameter,
the "ACTIVE" parameter has the value "FALSE" and the "DONE" parameter the value "TRUE".
If the program now selected does not match the program specified at the "PARAM1"
parameter, the "ACTIVE" parameter has the value "FALSE" and the "ERROR" parameter the
value "TRUE". The "ERRCODE" parameter contains an appropriate error message. The
system also checks whether the program change is being blocked by a "Service" or "User1"
user logged on in the WBM who has taken control of the optical reader, and whether the
newly selected program has been saved.
If an error is detected, the "ACTIVE" parameter has the value "FALSE" and the "ERROR"
parameter has the value "TRUE". The "ERRCODE" parameter contains an appropriate error
message.
3.
Call FB 79 again cyclically with "COMMAND=W#16#0081".
If you attempt to cancel a current change program job, the "ERRCODE" parameter will change
to "DW#16#00000002"; however, processing for the job will be completed.
Note
Notes on the program change
Note the following points when changing programs:
•
When there is a program change, the optical reader changes to "STOP" for at least 150 ms.
In isolated cases, a program change can take up to 15 s.
•
If you specify the value "0" in the "PARAM1" parameter, the previously selected program
will be retained.
•
The value of "PARAM1" must not be changed before the job is completed.
Sequence when saving a program ("COMMAND" = W#16#0002)
In order for the FB to initiate saving of a code, the "Control" parameter must have the value
"PROFINET IO" in the "Settings > Communication > Use > Connection" menu of the WBM.
The job can only be sent when the optical reader does not have the "ERROR" state (see also
the operating state table following the parameter table).
Summary of Contents for SIMATIC MV500
Page 10: ...Preface SIMATIC MV500 10 Operating Instructions 03 2021 C79000 G8976 C494 05 ...
Page 16: ......
Page 28: ......
Page 32: ......
Page 92: ......
Page 114: ......
Page 148: ......
Page 244: ......
Page 254: ......
Page 260: ......
Page 292: ......
Page 294: ...Service Support SIMATIC MV500 294 Operating Instructions 03 2021 C79000 G8976 C494 05 ...