S7-1200 important information about configuration control

Publisher:EnchantedWishLatest update time:2024-06-17 Source: elecfansKeywords:S7-1200 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

How it works

With S7-1200 firmware version 4.1 or higher, the configuration control can be used to configure the structure of the control system and facilitates the use of variants (options) that differ from this configuration.


All modules required for a series of similar equipment units or machines are configured in a master project with the largest configuration (full station configuration method).

In the user program of the main project, there are various station configurations for different equipment units or machines, as well as station configuration options. For example, a station configuration uses only a part of the configured modules, and these modules are inserted in a different order.

Operators can choose a station configuration method based on the specific equipment on site. They do not need to modify the project and therefore do not need to download the modified configuration.

9e360294-3f3d-11ee-ac96-dac502259ad0.png

The control data record programmed in the startup program informs the CPU which modules are missing and which modules are located in slots that differ from the preset configuration. Configuration control has no effect on the parameter assignment of the modules.

Configuration control provides users with the flexibility to make changes to a centralized installation as long as the actual configuration does not exceed the preset maximum configuration.

In the following, we describe how to activate configuration control (CPU parameter assignment) and how to structure the required data records.

Require

STEP 7 version V13 SP1 or higher

CPU S7-12XX firmware version V4.1 or higher: Modules that support the "Configuration control" function also have the entry "Configuration control" in the description (info text) in the hardware catalog.

Recommendation: Before loading a new program with modified control data records, perform a memory reset. This prevents inconsistent states due to incompatible control data records.

The startup parameter "Compare preset configuration with actual configuration" is set to "Start CPU even if there is a discrepancy" (default setting).

Required steps

Enable the "Allow to reconfigure the device via the user program" parameter when configuring the CPU in the "Configuration control" area.

9e616bf0-3f3d-11ee-ac96-dac502259ad0.png

With the control data record example described below, create a control data record (for example in a data block) according to the current configuration. The control data record has the number 196. If you want to transfer the control data record as a block to the WRREC instruction (input parameter RECORD), please note that you first need to create a PLC data type that contains the structure of the control data record and define the data block as this PLC data type.

9e6e1a08-3f3d-11ee-ac96-dac502259ad0.png

The control data record is transferred to the CPU during the startup procedure.

For centrally inserted modules, configuration control only takes effect after the operating mode of the CPU changes from STOP to RUN. Therefore, call the extended WRREC (write data record) instruction in the startup OB to transfer the created control data record to the CPU; see the next section.

If no valid control data record is transferred in the startup OB, the control is not ready for operation. In this case, the CPU returns from the startup state to the STOP state.

Transferring control data records during the startup procedure

The CPU processes the WRREC instruction for asynchronous transfer of control data records. Therefore, you must call WRREC repeatedly in a startup OB within a cycle until the output parameter "BUSY" or "DONE" indicates that the data record has been transferred.

Note: Please use the SCL programming language and the REPEAT ... UNTIL instruction to program this cycle.

REPEAT

"WRREC_DB"(REQ := "start_config_control",

ID := 33,

INDEX := 196,

LEN := "conf_LEN",

DONE => "conf_DONE",

BUSY => "conf_BUSY",

ERROR => "conf_ERROR",

RECORD := "ConfDB".ConfigControl,

STATUS => "conf_STATUS");

UNTIL NOT "conf_BUSY"

END_REPEAT;

The following table lists the block parameters for which you must specify specific values ​​in the configuration control. For other block parameters, see also "WRREC":

parameter illustrate
ID Hardware identifier, for centrally arranged module configuration control, always 33 (decimal).
INDEX Data record number, for centrally arranged module configuration control, is always 196 (decimal).
RECORD Control data record to be transferred.
See the structure of the control data record in the section "Control data record".
Information: The WRREC instruction (V1.1 and higher) has the data type "VARIANT" for the block parameter "RECORD", so a variable with a data type is required. If the control data record is stored in a data block, this data block must have a data type. The created data block must not be of the "global DB" type, but rather must be a user data type.
Proceed as follows:
First create a new PLC data type (user data type) with the structure of the control data record and give it a name, for example, "ConfDB".
Create a new data block. Select the newly created user data type (e.g. "ConfDB") as the type of the data block.

In graphical programming languages, loops are implemented using program control instructions.

Example in FBD: Programming a loop using the LABEL (jump label) and JMP (jump if RLO=1) instructions.

9e930548-3f3d-11ee-ac96-dac502259ad0.png

Arrangement of modules

The following table shows the slot number assignments:

Slots Modules illustrate
1 Signal board, communication board, battery board CPU front socket
2 - 9 Signal Module Slot to the right of the CPU
101 - 103 Communication Module Socket to the left of the CPU

Control data logging

Control data record 196 containing the slot assignments is defined for configuration control.

The following codes apply:

0 The module is included in the hardware configuration but is not used in the current configuration.
1 to 9, 101 to 103 The current slot of the module
16#FF (255) In the hardware configuration, the module is not located in this slot.
byte element Code illustrate
0 Block length 4 + number of slots Header
1 Block ID 196
2 Version 5 (for centralized I/O)
3 Subversion 0
4 CPU expansion board assignment Expansion board, 0 or 16#FF Control elements
Each element is a real slot in the device that corresponds to a configured slot. The structure of a control element is shown below.
5 Assigned configured slot 2 Actual slot, 0 or 16#FF
... ... ...
12 Assignment of configured slot 9 Actual slot, 0 or 16#FF
13 Assignment of configured slot 101 Actual slot or 16#FF In contrast to signal modules, the actual slot of a communication module must correspond to the configured slot.
14 Assignment of configured slot 102 Actual slot or 16#FF
15 Assignment of configured slot 103 Actual slot or 16#FF

Structure of control elements

The control element contains the information about which module is plugged into which slot.

The byte numbers represent the configured slots in ascending order (see above):

Byte 4 represents the configured slot of the expansion board

Bytes 5 to 9 represent the configured slots 2 to 9

Bytes 13 to 15 represent the configured slots 101 to 103

Enter the specified value in the corresponding byte, according to the following rules:

If the module exists in the actual configuration, enter the actual slot number of the module.

Example 1: A module configured for insertion into slot 2 is located in slot 2.

In byte 5 (= configured slot 2) the value 2 (= actual slot) is entered.

Example 2: A module configured for slot 3 is located in slot 2.

Enter the value 2 (= actual slot) in byte 6 (= configured slot 3).

If a module is configured but is missing in the actual structure, enter 0 in the byte corresponding to the configured slot.

If the module is not located at this slot in the hardware configuration, enter 16#FF (255) in the byte corresponding to the configured slot.

rule

Please follow these rules:

Configuration control does not support the adjustment of the position of the communication modules. The slot entries for slots 101 to 103 in the control data record must correspond to the actual position of the module or must be defined as non-existent in the hardware configuration via input 16#FF (255).

No slot gaps are permitted in the configuration. For example, if a signal module is inserted into slot 4 in the actual configuration, slots 2 and 3 must also be occupied in the actual configuration. The same applies to slots 101 to 103. If a communication module is inserted into slot 102 in the actual configuration, a communication module must also be inserted into slot 101 in the actual configuration.

If configuration control is enabled, the CPU does not operate without a control data record. If no valid control data record is transferred in the startup OB, the CPU returns from startup mode to STOP mode. The central I/O is not initialized in this case. The reason why the CPU went into STOP operating mode is saved in the diagnostic buffer.

To address the WRREC instruction, write the control data record using the hardware identifier 33 (decimal, for the ID block parameter).

The control data records are always saved in the CPU, so that on restart you do not have to rewrite the control data record 196 if the configuration has not changed. Before commissioning, it is recommended to perform a memory reset on the CPU to delete any control data records that exist.

[1] [2]
Keywords:S7-1200 Reference address:S7-1200 important information about configuration control

Previous article:Sharing of single-phase motor control circuit diagram
Next article:What are the working principles involved in initial value acquisition and conditional analysis on an HMI device?

Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号