Process interfacing via an automation system (PLC, PC)
9.10 Example programs
SIMATIC MV500
216
Operating Instructions, 03/2021, C79000-G8976-C494-05
9.10
Example programs
This section describes various examples of process connection.
Examples
•
Example 1:
Program for connecting the optical reader with a SIMATIC controller using FB79.
•
Example 2:
Program for archiving diagnostic information on a PC using MMI diagnostics.
•
Example 3:
You can find an application example for the communication of an optical reader with a
SIMATIC S7-1200-/S7-1500 controller on the Web pages of Siemens Industry Online
Support (
https://support.industry.siemens.com/cs/ww/en/view/103528928
).
9.10.1
Connection of the optical reader to a SIMATIC controller using FB 79
You can find the program described in this section on the Web pages of Siemens Online
Product Support (
https://support.industry.siemens.com/cs/ww/en/ps/15147/ae
).
Integration of FB 79 into a STEP 7 program
In the accompanying STEP 7 program, the FC1 function contains a simple example for
outputting the result string. You can execute a program change using the FC2 function.
When supplied, only FC1 is called in OB1. To activate FC2, you will need to either delete the
first network with the FC1 call or skip it.
Note
Requirement
You may only assign the value "W#16#0081" for the "COMMAND" parameter (output result
string) when bit 2 is set to TRUE in the status byte (corresponds to the "RDY" signal). If this
condition is not met, the "Invalid operating mode" error is output.
Process interfacing
The optical reader is connected with a programmable logic controller via PROFINET IO. A light
barrier or sensor is used additionally for triggering and must be read in via a digital input
module. The received data is stored in data block DB48 in bytes 0 to 500.
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 ...