Example Programs; Connection Of The Optical Reader To A Simatic Controller Using Fb 79 - Siemens SIMATIC MV500 Operating Instructions Manual

Hide thumbs Also See for SIMATIC MV500:
Table of Contents

Advertisement

Process interfacing via an automation system (PLC, PC)

9.10 Example programs

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.
216
Operating Instructions, 03/2021, C79000-G8976-C494-05
SIMATIC MV500

Advertisement

Table of Contents
loading

Table of Contents