Siemens SIMATIC MV500 Operating Instructions Manual page 191

Hide thumbs Also See for SIMATIC MV500:
Table of Contents

Advertisement

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).
SIMATIC MV500
Operating Instructions, 03/2021, C79000-G8976-C494-05
Process interfacing via an automation system (PLC, PC)
9.4 Control with FB 79
191

Advertisement

Table of Contents
loading

Table of Contents