No Copy


No Right Click

Tuesday, March 3, 2009

What should you watch out for when configuring an unspecified S7 connection for data communication between an S7-300 and an S7-400?

Configuration Notes:
For data communication between an S7-300 station and an S7-400 station, you use S7 Communication with communication blocks FB/SFB12 "BSEND" and "FB/SFB13 "BRCV". In this case, the S7 connection must be configured bilaterally, i.e. in the S7-300 and in the S7-400.
Furthermore, the S7-300 station and the S7-400 station are configured in different STEP 7 projects. For this reason, you configure an unspecified S7 connection in the S7-300 station and in the S7-400 station respectively.


Fig. 01: Configuration

Please follow the instructions below for configuring the S7 connections.
In this example, S7 communication is via Industrial Ethernet. An Industrial Ethernet CP is used in the S7-300 station and in the S7-400 station.

Note:
These instructions also apply for S7 communication via PROFIBUS.

Configuring the S7 connection in the S7-300 station:
Open the STEP 7 project of the S7-300 station. Then open NetPro via the menu "Options > Configure Network" or via the "Configure Network" button in the toolbar.


Fig. 02: Open NetPro

You configure the connection in NetPro. Mark the CPU of the S7-300 station. Insert a new connection via the menu "Insert > New Connection".


Fig. 03: Insert a new connection

In the dialog that opens you now select "unspecified" under Connection Partner and "S7 connection" as the connection type. Accept the settings with "OK".

You configure the connection partner and the type of connection in the "Insert New Connection" dialog. Select "unspecified" as connection partner and "S7 connection" as the connection type. Click "Apply" to apply the settings.


Fig. 04: "Insert New Connection" dialog

In the Properties dialog of the S7 connection you enter the address of the partner. In this example you enter the IP address of the S7-400 station.
In this example, the S7-300 station actively sets up the S7 connection. For this you enable the "Establish an active connection" function. Then click the "Address Details..." button. The "Address Details" dialog opens.


Fig. 05: Properties dialog of the S7 connection (S7-300)

In the "Address Details" dialog you specify the local TSAP of the S7-400 station as Partner TSAP. For this, you enter the slot of the CPU in the S7-400 station under Partner Rack/Slot.


Fig. 06: Address Details (S7-300)

Close the "Address Details" dialog and the Properties dialog of the S7 connection with "OK".
Mark the S7-300 station in NetPro. Save and compile the complete configuration and load it into the CPU of the S7-300 station. Then you call communication blocks FB12 "BSEND" and FB13 "BRCV in the user program of the S7-300. These communication blocks are available in the Standard Library -> Communication Blocks.

Now configure the S7 connection in the S7-400 station.

Configuring the S7 connection in the S7-400 station:
Open the STEP 7 project of the S7-400 station. In NetPro, likewise you configure an unspecified S7 connection.
In the Properties dialog of the S7 connection you enter the address of the partner. In this example you enter the IP address of the S7-300 station.
Since in this example the S7-400 station participates passively in setting up the connection, you disable the "Establish an active connection" function. You must also disable the "Operating state messages" function.
Then click the "Address Details..." button. The "Address Details" dialog opens.


Fig. 07: Properties dialog of the S7 connection (S7-400)

In the "Address Details" dialog you specify the local TSAP of the S7-300 station as Partner TSAP. For this, you enter the slot of the CP in the S7-300 station under Partner Rack/Slot.


Fig. 08: Address Details (S7-400)

Close the "Address Details" dialog and the Properties dialog of the S7 connection with "OK".
Mark the S7-400 station in NetPro. Save and compile the complete configuration and load it into the CPU of the S7-400 station. Then you call communication blocks FB12 "BSEND" and FB13 "BRCV in the user program of the S7-400. These communication blocks are available in the Standard Library -> System Function Blocks.

Note:
For data communication via bilaterally configured S7 connection, you can also use communication blocks FB/SFB14 "GET" and FB/SFB15 "PUT". These communication blocks are based on the client-server principle, i.e. you can also use a unilaterally configured S7 connection for data communication. In the case of a unilaterally configured S7 connection, the "Establish an active connection" function is enabled. You specify the following Partner TSAP: 03.0x (x = slot of the CPU).

The following entries contain sample programs for the following communication blocks:

The following entry contains information on which modules support S7 Communication as server and client: 24352751.

More information is also available in the Online Help of STEP 7 under:

  • Creating cross-project subnetworks.
  • Configuring cross-project connections.
  • Creating a new connection to an unspecified partner.
  • Creating a connection to "Another Station", "PG/PC", "SIMATIC S5".

0 Comments:

#