2 Engineering of the STEP 7 program
Reading QR Codes with SIMATIC MV320 via ET200SP CM PtP
Article ID: 109474684, V2.0, 10/2021
© Siemens AG
2021 All rights reserved
2 Engineering of the STEP 7 program
2.1 Overview
Introduction
The STEP 7 V17 project contains:
• The user program for the S7 CPU with the "PtPFreeport" function block
• The configuration and project engineering of the ET 200SP communication
module CM PtP
In this application example, the configuration of the ET 200SP communication
module CM PtP is carried out with the system block "Port_Config".
If you do not use the system block "Port_Config", you must set the connection
parameters of the ET 200SP CM PtP communication module in the hardware
configuration (see chapter 6.2, Step 11).
Diagram
The following graphic shows the program structure of the whole STEP 7 V17
project.
Figure 2-1
Main
OB1
Startup
OB100
PtPFreeport
FB770
• Port_Config
• Receive_Reset
• Receive_P2P
DataPtP
DB772
Global
• portConfigSettings
• rcvPtPData
Program blocks
The user program of the SIMATIC S7-300 CPU consists of the following elements:
Table 2-1
Sets the communication parameters (see
Table 2-2) when the program is restarted and
enables the port configuration.
Note:
Calling "Port_Config" overwrites the settings of
the hardware configuration.
In OB1, the "PtPFreeport" function block,
including the associated instance data block,
is called cyclically.