×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 21988384, Entry date: 09/06/2005
(0)
Rate

How can you configure an S7 CP during runtime?

  • Entry
  • Associated product(s)

Description:
There are application areas in which it is best not to set up the communications connections via the configuration interface (NetPro) of STEP 7, but program-controlled via a specific application. This option is offered by the function block FB55 "IP_CONFIG".

This functionality is only supported by the following SIMATIC CPs:
 

Type MLFB
CP343-1 6GK7 343-1EX21-0XE0
CP343-1 6GK7 343-1EX30-0XE0
CP343-1 Lean 6GK7 343-1CX00-0XE0
CP343-1 Lean 6GK7 343-1CX10-0XE0
CP343-1 IT 6GK7 343-1GX20-0XE0
CP343-1 Advanced 6GK7 343-1GX21-0XE0
CP443-1 6GK7 443-1EX20-0XE0
CP443-1 Advanced 6GK7 443-1EX40-0XE0
CP443-1 Advanced 6GK7 443-1EX41-0XE0

Requirements:
You must have at least STEP 7 V5.2 SP1 to be able to implement SFB55/FB55.

Instructions:
Proceed as follows to configure a CP that is to keep its configuration during runtime:
 

No. Procedure
1 Open or create a STEP 7 project. Make your hardware configuration.
2 Open the Properties of your CP and in the "IP Configuration" tab you select the item "Set IP address in user program".

3 Load the station. Once the CPU switches to the RUN state you see that the SF LED is still lit on the CP. This is because the CP has not yet received its complete configuration. Only once you have called FB55 "IP_CONFIG" does the CP apply the IP address from the data block and switch to the RUN state.
4 In order to add FB55 to your project you select "File -> Open" in the SIMATIC Manager, switch to the "Libraries" tab and there you select "SIMATIC_NET_CP".

5 Now you select FB55 depending on your controller (300/400) and copy it to the blocks of your CPU.
6 Install the configuration DB and call FB55 in your user program.

Note:
Information on the setup and structure of the configuration DB is available in the manual "S7 CPs for Industrial Ethernet - Configuring and Commissioning", chapter 6 "Programmed Communication Connections". General information on FB55 is also in this manual in section 7.5 "FB55 IP_CONFIG for Programmed Communication Connections". The complete manual is available in Entry ID 8777865 or on your hard disk under 'Start -> SIMATIC -> Documentation -> English -> NCM S7 Manuals -> S7 CPs for Industrial Ethernet".

Attached is a sample configuration DB.

Attachment 1: DB101_e.pdf ( 16 KB )

7

If the configuration option is not selected (see point no. 2), calling FB55 does not succeed. Provided for such a case in the manual is a specific error message (STATUS) that is also supplied by the S7-300 series CPs.

STATUS = 0x8B10
"There is no setting for configuring via the user program."

Error message of the S7-400 CP:
With 400 series CPs the STATUS = 0x80A4 is returned. This status value is not documented for FB55 and comes from a lower-level SFC. It means:

"The K bus connection between CPU and CP is not set up".

The status value in this case is equivalent to status value 0x8B10 for S7-300 described in the manual.

Reason for the differences between S7-300 and S7-400:
The different status values are due to the system-specific realization of data transmission between CPU and CP in S7-300 and S7-400 respectively.

The attached download contains the archived STEP 7 project with the functions and data block described above. In the user program FB55 is called with a rising edge at input 0.0 and thus the CP is configured.

Attachment 2: STEP7_Proj.zip ( 269 KB )  

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.