Tool material computer, S7- 1200PLC.
Methods/Steps 1- Set PLC communication parameters and read them step by step.
1
/2
Open the S7- 1200 project in TIA Bo Tu configuration software, and the steps of PLC hardware configuration are not detailed here.
Note that if you use S7- 1200 CPU with firmware version 4.0 or higher, you need the following additional settings to ensure normal communication.
Please click on the CPU in the device configuration, "Properties->; General->; "Allow remote partner access (PLC \ HMI \ OPC \ ...) to use PUT/GET communication" needs to be checked in the "Connection Mechanism" item in "Protection", as shown in the following figure:
2
/2
Set the IP address of PLC.
Method/Step 2- Computer Network Card Parameter Settings
1
/ 1
Set the IP address and subnet mask of this network card in the operating system network connection. In this case, the IP address and the IP address of PLC are in the same network segment, and the subnet mask is the same.
Method/Step 3- Test the network connection between the computer and PLC.
1
/ 1
Connect Ethernet communication cable between PLC and computer, and test whether the physical connection between computer and PLC is normal. Select the "Start" menu in the lower left corner of the operating system, enter the "CMD" command in the bottom line of the running bar, and then press enter to enter the DOS command interface. Enter the ping command in the interface, with the format: ping enter. If the physical connection is normal, as shown in Figure 6. If timeout or hardware failure is displayed, please check the IP address setting, network card driver and physical network cable.
Method/Step 4- Set PG/PC Interface
1
/4
Open the control panel of the computer and select the option "Set PG/PC interface".
2
/4
Click the "Application Access Point" drop-down list in the interface and select
three
/4
Fill in "S7- 1200" in the pop-up "New Access Point", click "Add" to add an access point, and then close the dialog box.
four
/4
Return to the interface of setting PG/PC interface, select S7- 1200 as the application access point, and choose TCPIP protocol as the common Ethernet card of the interface to be used. When finished, click OK to exit.
Method/Step 5-WinCC Configuration
1
/4
You can add this driver in WinCC project, open the variable management interface, select variable management, right click, select Add New Driver, and select SIMATIC S7- 1200 and S7- 1500 channel drivers in the driver list.
2
/4
Right-click "SIMATIC S7- 1200, S7- 1500 channel" to drive the OMS+ option, and select "New Connection" to create a new connection with S7- 1200 PLC. Right-click the connection name and select Connection Parameters.
three
/4
In the connection parameters, fill in the IP address of PLC communication port for IP address, the access point set in Setting PG/PC Interface for access point and S7 1200 for product series, as shown in figure 1 1.
four
/4
In the new connection list, create the corresponding variable.
Method/Step 6
1
/ 1
test