Process interfacing via an automation system (PLC, PC)
9.4 Control with FB 79
SIMATIC MV500
136
Operating Instructions, 06/2018, C79000-G8976-C494-01
Start processing
Processing starts immediately on completion of the program saving.
Table 9- 41 Processing of program memory
Step
Input
Output
Description
1
You select a program, for example, program 11.
2
READ
MATCH
N_OK
The outputs are set as follows depending on the processing re-
sult:
Code was localized and decoded.
Code matches the trained code.
Code was not legible.
9.4.3
Example program for data exchange if code length
≤ 27 bytes
Below, you can find an example program for data exchange when the code length is a
maximum of 27 bytes.
Note
Compatible S7 controllers
The example program can only run on the following S7 controllers:
•
On a CPU 318 and all S7-400 CPUs.
•
On all S7-300 CPUs with MMC
On all other S7-300 and S7-400 CPUs, you must use SFCs 14 and 15 for all access to the
two user data interfaces.
Explanation of the program
The example program has the following properties:
●
Only the pure result string with data ID "B#16#81" is output.
●
The I/O controller does not check how many bytes the optical reader has returned but
always reads 27 bytes.
The I/O controller does not monitor anything.
●
The start of the "Send" user data interface is at address 4 of the process image input.
The start of the "Receive" user data interface is at address 4 of the process image output.
●
To ensure the consistency over the entire area of 32 bytes, there must be no update of
the process image during the program shown here.
●
The user data is stored in data block DB17 starting at byte 4.