laitimes

The Siemens S7-1200 communicates with IO device PROFINET

author:Giant control small week

S7-1200 PROFINET与 IO device 通信

A PROFINET IO device is a distributed field device (e.g., remote IO, valve terminals, frequency converters, switches, etc.) assigned to one or more IO controllers. The PROFINET IO controller addresses the connected IO devices and exchanges input and output signals with the field devices.

Hardware and software requirements and communication tasks to be accomplished

Hardware:

(1) S7-1200 CPU V2.0 or later (V4.2 version S7-1215C DC/DC/DC is used in the document)

(2) PC (with Ethernet card), TP cable (Ethernet cable)

(3) Distributed IO (used in the document ET200SP IM 155-6 PN HF V3.3)

Software:

TIA Blog STEP7 V11 or later (V14 SP1 UPD3 used in the document)

Communication tasks completed:

(1) S7-1200 reads IM 155-6 PN HF digital input point data

(2) The S7-1200 transmits data to the IM 155-6 PN HF output point

Programming of communication, configuration of connection parameters and communication parameters

1. Open the TIA Portal STEP 7 software and create a new project

In the "Project View" of the TIA STEP 7 software, click on "Create New Project" to create a new project

2. S7-1200 hardware configuration and parameter allocation

Select the corresponding order number in the hardware list, as shown in Figure 1.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 1 Adding an S7-1200 CPU

The configuration screen of the S7-1200 is displayed in the device view, as shown in Figure 2.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 2 S7-1200 device view

Next, you need to set the IP address for the S7-1200 CPU, click on the Ethernet port of the S7-1200 in the settings view> "Properties" > "General" > "Ethernet Address" settings, as shown in Figure 3.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 3 Setting an IP address

Go to the network view, select IM155-6PN HF (6ES7155-6AU00-0CN0) in the hardware directory and insert it, as shown in Figure 4.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 4 Adding IM155-6PN HF

Then double-click the IM155-6PN HF to enter the device view for hardware configuration, and add the IO module for the IM155-6PN HF, as shown in Figure 5.

Note is made of the base color (light for using the new potentiometer, dark for the potential bank with the module on the left), as well as the version of the IO module.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 5 IM155-6PN HF hardware configuration

Go back to the device view, click on the icon of the IM155-6PN HF module, and define the name of the interface module "ET200SP HF" in "Properties" > "General" > "Project Information", as shown in Figure 6.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 6 IM155-6PN HF setting name.

After setting the name, you need to set the IP address for the IM155-6PN HF, click the IM155-6PN HF Ethernet port in the network view, and then set the IP address 192.168.1.11 in "Properties" > "General" > "Ethernet Address", as shown in Figure 7.

As can be seen from Figure 7, the device name of the IM155-6PN HF is the same as the name in the project information, but the uppercase letters are replaced with the lowercase letters "et200sp hf".

The Siemens S7-1200 communicates with IO device PROFINET

Figure 7 Setting the IP address of the IM155-6PN HF

Left-click the "Unassigned" icon of the IM155-6PN HF in the network view, select the controller of the IO device in the pop-up box, and select "PLC_1.PROFINET Interface_1" in the document, that is, the newly created CPU S7-1215C, as shown in Figure 8.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 8 IM155-6PN HF distribution I/O controller

In this way, you can see the S7-1200 I/O area occupied by the IM155-6PN HF in the address overview of the IM155-6PN HF, as shown in Figure 9.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 9 IM155-6PN HF IO address and network structure

Right-click on the PROFINET network to assign the device name to the IM155-6PN HF, as shown in Figure 10.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 10 Assign a device name

On the pop-up page, click the "Update List" button and search for ET200SP.

If the network node that is searched contains multiple ET200SP, you can determine the ET200SP that needs to be assigned a device name at this moment by checking the MAC address. The MAC address of the ET200SP network port is located directly above the 24V power supply of the interface module.

If the ET200SP status of the device name to be assigned shows Device Name Different, the offline device name (ET200SP HF) configured is different from the online device name (IM155-6), as shown in Figure 11.

If the ET200SP status of the device name to be assigned shows "OK" at this time, then the offline device name of the configuration is the same as the online device name, and the device name assignment of the module can be skipped (i.e., Figure 12 is skipped).

The Siemens S7-1200 communicates with IO device PROFINET

Figure 11 The names of offline devices are different

If the offline device name is different from the online device name, the node is left to select and click the "Assign Name" button, and after a few seconds, the online device name ET200SP by the network node changes to "et200sp hf", which is the same as the configured offline device name, and the status changes to "OK", and the device name assignment of an IO device is completed, as shown in Figure 12.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 12 The name of the offline device is the same

After the hardware and software of the project are all compiled and downloaded, the status of the DI variable can be monitored in the S7-1200 variable table, and the DO variable can also be assigned to observe the output of the DO module, as shown in Figure 13.

The Siemens S7-1200 communicates with IO device PROFINET

Figure 13 Variable table monitoring

Congratulations to more than 10,000 industrial controllers who have joined the PLC industrial automation elite WeChat group

Congratulations to more than 10,000 industrial controllers who have joined the PLC industrial automation elite WeChat group

Read on