×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 17661306, Entry date: 12/01/2003
(3)
Rate

Commissioning and Configuring an ISO Transport Connection between the SIMATIC S5 and SIMATIC S7 via Industrial Ethernet

  • Entry
  • Associated product(s)

QUESTION:
How do I create an ISO transport connection between the SIMATIC S5 (CP1430) and SIMATIC S7 via Industrial Ethernet?

ANSWER:
The following FAQ contains a description of how to configure an unspecified ISO transport connection on the S7 side and configure the corresponding transport connection on the S5 side.

Configuration of ISO transport communication on the SIMATIC S7

Use the SIMATIC Manager to open your STEP 7 project, which contains the SIMATIC S7 controller.

Go to "Options > Configure Network" to change to NetPro. The connection is configured in NetPro.



Fig. 1: Open NetPro

Highlight the CPU and insert a new connection via "Insert > New Connection…".

Fig. 2: Create a new connection

Select "(Unspecified)" as the connection partner because the partner, the S5, is not integrated in the project, and "ISO transport connection" as the connection type. Once you click on OK to close the dialog, the Properties dialog box for the connection opens.



Fig. 3: ISO transport connection unspecified

Define a name for the ISO transport connection.

Note:
There is more detailed information on establishing the connection in the basic configuration rules at the end of this FAQ.



Fig. 4: Connection Properties: In general, enter the MAC address of the S5-CP1430. The TSAPs are responsible for identifying the connection between the PC and the S5.

Note:
There are more detailed configuration information on assigning the addresses and TSAPs in the basic configuration rules at the end of this FAQ.

Important:
The defaults used must be taken into consideration in the connection configuration on the S5 side (see Fig. 14).



Fig. 5: Properties dialog: Addresses

Click on "OK" to apply the settings.

If you highlight the CPU, the connection that you have created is shown in the connections table.



Fig. 6: Created ISO transport connection

Save and compile the configuration in NetPro via "Network > Save and compile...".

Then load the configuration into the S7 controller.

Close NetPro and return to the SIMATIC Manager.

Description of the S7 program
In the STEP 7 project, the callfor the "AG_SEND" (FC5) and "AG_RECV" (FC6) functions must be added to the program code. This is done with an S7 300 in our example. The procedure is similar in an S7 400.

Programming procedure:

Open the "SIMATIC_NET_CP" library via "File > Open > Libraries".



Fig. 7: Open the library

FC5 ("AG_SEND") and FC6 ("AG_RECV") are contained in the SIMATIC_NET_CP library under "CP300 > Blocks".



Fig. 8: Copy FC5 and FC6

These blocks have to be copied to the block container for the STEP 7 project.

Close the library.

Open the block in your STEP 7 project in which you wish to program the call for FC5 and FC6.

Important:
This block has to run permanently in the OB1 cycle.

Add the call for FC5 to the program code:

"Call FC5"

Once you have clicked on ENTER to confirm the entry, the function parameters that are required to execute the function are displayed.



Fig. 9: FC5 function call

The function parameters "ID" and "LADDR" have already been defined by the connection created in NetPro.

The parameters can be set to be entered automatically by right-clicking and selecting "Connections...".



Fig. 10: Linking the "AG_SEND" function to the ISO transport connection

In the next mask that appears, select the ISO transport connection and click on "OK".



Fig. 11: Select the ISO transport connection

Assign the remaining parameters for the FC5 ("AG_SEND") in accordance with the criteria listed in the figure.

Configure the call for the FC6 ("AG_RECV") on the same principle.

A sample program for the call for the FC5 / FC6 could look something like this.



Fig. 12: Sample program for FC5 / FC6

In order to activate the SEND job, memory marker 100.0 should be set in a start-up OB (e.g. OB100) so that communication is initiated when the CPU is rebooted.

The "AG_SEND" job is activated if clock memory 10.5 has a positive edge and if there isn't an existing "AG-SEND" job running. The end of the job is indicated by the output parameters "DONE" (M15.0) and "ERROR" (M15.1). Once the job has ended, "AG_SEND" can be re-activated. In the event of an error, the status word (MW11) can be saved and can be referred to for evaluating the error. Once the "AG_SEND" job has been evaluated, "AG_RECV" is called.

Create the receive and send buffer for the data (DB10). It must be sufficiently long. In our example, the length of the data is 10 bytes, i.e. the send and receive buffer in the DB10 should be at least 5 words long.

Load the blocks into the S7.

This concludes the configuration/programming of the S7.

Configuration of the transport communication on the SIMATIC S5

  • Initialization of the CP1430 and creation of the SEND/RECEIVE connections

Start STEP 5 via "Start > SIMATIC > STEP 5 > STEP 5".

Press "F9" to switch to the configuration tool for the CP1430 "SINEC NCM COM 1430".

Note:
The configuration tool for the "SINEC NCM COM 1430" is a software plugin that is integrated in STEP 5 for configuring the CP1430. This software is not contained in the standard STEP 5 package and has to be ordered separately. Initialize the CP via "Edit > CP_Init".



Fig. 13: Initialize the CP

  • The MAC address for the CP1430 must match the MAC address configured in NetPro (see Fig. 5: Partner's MAC address).
  • The base interface number (SSNR) specifies the CP in the rack. This interface number has to be used in the block calls in the S5 program.

Press "F7" to apply the settings.

Open the "Edit > Connections > Transport Connections" dialog.

Note:
The address details must be calibrated with the defaults specified in NetPro.

  • Add "SEND" under Job type and enter 2 under "Number of jobs per TSAP : 1 of ".
  • Apply the TSAP, which has been used in NetPro, to the local parameters (see Fig. 5: Partner's TSAP).
  • Enter the MAC address for the CP343-1 as well as the TSAP, which had been specified for the CP343-1 in NetPro (see Fig. 5: TSAP Local), under the Remote parameters.

Note:
There are more detailed configuration instructions on assigning the addresses and TSAPs, as well as information about establishing the connection, in the basic configuration rules at the end of this FAQ.



Fig. 14: Create a SEND connection

Press "F7" to apply the settings.

Configure the RECEIVE job as a second job in accordance with the mask below. Then press "F7" to apply the settings.



Fig. 15: Create a RECEIVE connection

Then load the configuration into the CP1430 via "Transfer > FD > CP".

Click "File > Exit" and "ESC" to go back to the STEP 5 configuration mask.

Description of the S5 program

The function blocks in the S5 program are dependent on the S5 CPU. This description has been created using the AG135 and AG155 blocks.

You have to pay for the data handling blocks for the AG135 and AG155. They can be ordered from your regional Siemens sales agent (MLFB: 6ES5 842-7CB01 single-user license).

Note:
There are comparisons between the AGs and the corresponding communication FBs in the basic configuration rules at the end of this FAQ.

  • Synchronization of the CP1430 with the CPU via the "SYNCHRON" call in the start-up OBs

Insert the start-up OBs OB20, OB21 and OB22 into your STEP 5 project.

Program the call for FB125 (SYNCHRON), which prompts synchronization between the CPU and the CP, in these OBs.



Fig. 16: "SYNCHRON" call

Note:
There is more detailed information on the call for FB125 (SYNCHRON) in the basic configuration rules at the end of this FAQ.

  • Call for the SEND/RECEIVE blocks in the OB1

Create the OB1.

Define RLO = 1 by means of the two instructions

  • O M 0.0
  • ON M 0.0

for cyclical sending.

Important:
If you don't wish to send data cyclically, a lock need to be programmed into the SEND call by analyzing the display word ("job error analysis"). Possible display word statuses are described in the manual "SINEC CP 1430 TF with COM 1430 TF Volume 1 of 2", section on "C Display Word ANZW and Parameterization Error Byte PAFE" under Entry ID: 12586144.

Insert the SEND block (FB120) call.



Fig. 17: SEND block (FB120) call

Important:
The length of the send buffer is indicated in words. (Parameter: "QLAE: +5" > 5 words)

Define RLO = 1 by means of the two instructions

  • O M 0.0
  • ON M 0.0

Then add the RECEIVE block (FB121) call behind it.



Fig. 18: RECEIVE block (FB121) call

  • The "SEND" and "RECEIVE" blocks are only initiated if RLO = 1. If RLO = 0, the only parameters updated are "ANZW" (display word) and "PAFE" (parameterization error byte).
  • If the length of the receive buffer is preconfigured at "-1", the length of the data is automatically detected (Parameter : "ZLAE: -1").

Note:
There is more detailed information on the call for FB120 (SEND) and FB121 (RECEIVE) in the basic configuration rules at the end of this FAQ.

  • Call for the "SEND_ALL/RECEIVE_ALL" block in the OB1

Insert another network.

Program the call for the "SEND_ALL" (FB126) and "RECEIVE_ALL" (FB127) blocks in this network.



Fig. 19: Call for the "SEND_ALL" and "RECEIVE_ALL" blocks in network 2 of the OB1

Important:
There is more detailed information on the call for FB126 (SEND-A) and FB127 (REC-A) in the basic configuration rules at the end of this FAQ. Press "F7" to save the OB1.

Creating the SEND and RECEIVE buffers

As the SEND and RECEIVE buffer is in DB10, it has to be created in the project and has to be adequately long. The data is 10 bytes long in our example, i.e. the SEND and RECEIVE buffer in the DB10 should be at least 5 words long.

Then load the entire program into the S5.

Basic configuration instructions:

Rules for establishing connections

  • A connection is actively established by a station. The partner station then has to passively establish the connection.
  • The way in which the connection is established is linked to the job type on the S5 side.
    SEND = Establish the connection actively
    RECEIVE = Establish the connection passively
  • If there are two jobs being used on one connection ("Number of jobs : 1 of 2"), the way in which the connection is established (active or passive) is determined by the first job. In our example, the first job is "SEND", which means that the connection is actively established by the S5.
  • The way in which the connection is established has no influence on the jobs.

TSAP rules

  • The TSAP should always be 8 characters long.
  • Permitted characters for TSAPs are letters, numbers, dashes and underscores.
  • Only use upper-case lettering.
  • The local and remote TSAPs may be identical.
  • The TSAPs must be unique for each connection.
  • Use hexadecimal format versions of character strings to check the TSAPs.

Interface number (SSNR)

  • The interface number for the CP is assigned in the configuration tool for the CP1430 "SINEC NCM COM 1430" in the mask (Edit > CP Init).
  • Specify the SSNR as a parameter in all the CPU's communication blocks (FB120, FB121, FB125, FB126, FB127).
  • The interface number must always be divisible by 4 (0, 4, 8, 16, ...).

SEND (FB120) and RECEIVE (FB121), SEND_A (FB126) and RECV_A (FB127, SYNCHRON (FB125))

  • The QLAE (length of the send buffer) and ZLAE (length of the receive buffer) details relate to words (QLAE = 0.10 SEND > 10 words; ZLAE = 0.10 RECEIVE > 10 words).
  • The PAFE (parameterization error byte) and ANZW (display word ) parameters are output parameters. They serve the purpose of diagnostics and job monitoring. There is further information in the manuals relating to the CPs.
  • The job number (ANR) specifies the connection configured in the CP (see Fig. 14 and Fig. 15).
  • The blocks must be called in absolute terms - e.g. SPA FB120.

Comparison between PLCs with SYNCHRON, SEND, RECEIVE function blocks

SYNCHRON

SEND

RECEIVE

SEND_ALL

RECEIVE_ALL

AG115

FB249

FB244

FB245

FB244*

FB245*

AG135

FB125

FB120

FB121

FB126

FB127

AG155

FB125

FB120

FB121

FB126

FB127

* The job number (ANR) parameter has to be specified as "0.0".

Keywords:
Send/Receive connection, Getting Started, Ethernet, Configuration, Guideline, Guide, Instructions, LSAP, Send/Receive, Send/Recv, Transport connections, Layer 4, SR connection, ISO transport, S5-compatible communication, CP 143, CP 443-1, CP 343-1


Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
https://www.siemens.com/cybersecurity#Ouraspiration.
Rate entry
no rating
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.