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.
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.
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.
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.
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.
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?
- Popular Resources
- Popular amplifiers
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Sandia Labs develops battery failure early warning technology to detect battery failures faster
- Ranking of installed capacity of smart driving suppliers from January to September 2024: Rise of independent manufacturers and strong growth of LiDAR market
- Industry first! Xiaopeng announces P7 car chip crowdfunding is completed: upgraded to Snapdragon 8295, fluency doubled
- P22-009_Butterfly E3106 Cord Board Solution
- Transistor Selection
- NUCLEO_G431RB Review - RTC Real-time Clock
- 【New Year's Taste Competition】+ Spring Festival Customs
- ESD electrostatic protection classic book - "ESD Secrets: Electrostatic Protection Principles and Typical Applications"
- [TI star product limited time purchase] + AWR683ISK run demo
- Fancy PCB Exhibition (1)
- Why is it said that 90% of EMC is designed? (Long article)
- Recommended postgraduate schools
- Chinese mobile phones continue to sell well in India, Vivo surpasses Samsung to become the second largest brand
- Share CC2541 Bluetooth learning about ADC