Using structured PLC tags (S7-1200 V4 and higher / S7-1500)
To make it easier to view the program content, several input/output addresses can be grouped in a higher-level PLC tag. A higher-level PLC tag is a structure that contains several logically related inputs/outputs. When a block is called, the higher-level tag is transferred first, and then only the input/output parameters of all related inputs/outputs are required.
How it works
To create a structured PLC variable, you first need to define a PLC data type (UDT). In this data type, declare the required data elements and specify their names and data types.
Then, switch back to the PLC tag table and specify the higher-level PLC tag there. Select the PLC data type as the data type for the tag. Starting from the start address of the higher-level tag, the system will now reserve a certain number of input or output addresses. The number of reserved addresses depends on the length of the PLC data type.
If you call a block and the block needs to use reserved inputs or outputs during program execution, you can pass a higher-level variable as a block parameter.
Individual PLC tags are addressed in the same way as structure elements in the program code.
In the following sections, each processing step will be described in detail:
Application Examples
To group the inputs or outputs of a function module, you can use structured PLC tags. The following figure shows the semantic representation of Motor: In the "Datatype_Motor" PLC data type, an element is created for each of the three inputs.
However, the memory areas of the declared variables cannot overlap. In this example, the "Speed" component has the data type "Integer" and must therefore start with a word address. Therefore, the first input word will be filled with the "Dummy" filler variable. This means that "Speed" is in the second input word.
The following figure shows a higher-level "Motor" PLC tag based on the "Data type_Motor" data type. By declaring "Motor", the addresses IW0 and IW1 are reserved on the input module.
The following figure shows how the "Motor" PLC tag is transferred as an input parameter of the "Motor_Control" block.
The individual members of this tag can be addressed in the "Motor_Control" block.
Addressing | illustrate |
---|---|
"Motor" | Addressing of higher-level PLC tags. |
"Motor".On | Addressing members of structured PLC tags. |
"Motor".On:P | Addressing I/O input or output (PI or PQ). |
Rules for using structured PLC variables
Considerations to follow when creating and using structured PLC tags.
Structured PLC tags are available in the "Inputs" and "Outputs" operand areas.
Structured variables cannot be used in bit memory address areas.
Structured PLC tags cannot be addressed from the HMI.
Creating structured PLC variables
rule
When creating structured PLC tags, follow these rules:
For the "Inputs" and "Outputs" operand areas, different PLC data types are used.
Structured variables cannot be used in bit memory address areas.
Do not group inputs or outputs of different modules in PLC data types, as a synchronous update of the process images of the modules cannot be ensured.
step
To create a structured PLC tag, follow these steps:
In the project tree, double-click the command "Add new data type" in the "PLC data types" folder.
This creates and opens a new declaration table for creating a PLC data type. Declare all required elements as PLC types. You can use all data types except the "STRING" and "WSTRING" data types. Select the PLC data type in the project tree and select the command "Compile > Software (only changes)" in the shortcut menu. The PLC data type is compiled and then used in the PLC tag table. Even if you make changes to existing PLC data types, you must recompile the program. This will update all locations where the PLC data type is used. Open a PLC tag table in the same CPU. Declare a new tag or select an existing tag. In the "Data type" column, select the PLC data type and assign it to the PLC tag. The PLC tag adopts the structure of the PLC data type. A corresponding address is automatically assigned. Structured PLC tags always start with a word address. |
Previous article:Things about PWM modulation
Next article:Parameters of POINTER type in Siemens TIA Portal
- Popular Resources
- Popular amplifiers
- Red Hat announces definitive agreement to acquire Neural Magic
- 5G network speed is faster than 4G, but the perception is poor! Wu Hequan: 6G standard formulation should focus on user needs
- SEMI report: Global silicon wafer shipments increased by 6% in the third quarter of 2024
- OpenAI calls for a "North American Artificial Intelligence Alliance" to compete with China
- OpenAI is rumored to be launching a new intelligent body that can automatically perform tasks for users
- Arm: Focusing on efficient computing platforms, we work together to build a sustainable future
- AMD to cut 4% of its workforce to gain a stronger position in artificial intelligence chips
- NEC receives new supercomputer orders: Intel CPU + AMD accelerator + Nvidia switch
- RW61X: Wi-Fi 6 tri-band device in a secure i.MX RT MCU
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
- Red Hat announces definitive agreement to acquire Neural Magic
- 5G network speed is faster than 4G, but the perception is poor! Wu Hequan: 6G standard formulation should focus on user needs
- SEMI report: Global silicon wafer shipments increased by 6% in the third quarter of 2024
- OpenAI calls for a "North American Artificial Intelligence Alliance" to compete with China
- OpenAI is rumored to be launching a new intelligent body that can automatically perform tasks for users
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- ASML provides update on market opportunities at 2024 Investor Day
- Arm: Focusing on efficient computing platforms, we work together to build a sustainable future
- AMD to cut 4% of its workforce to gain a stronger position in artificial intelligence chips
- 2020Show me what I think of XXX
- Experts from Station B come to help: Portable, fast-charging, and temperature-adjustable soldering iron, let’s get started?
- What is the salary of embedded engineers in 2022?
- LCD Operation (S3C2440)
- The operational amplifier forms a three-point capacitor oscillation
- [NXP Rapid IoT Review] First give SLN-RPK-NODE an emulator
- 【Topmicro Intelligent Display Module】Part 2: Power on and experience the demo
- Guangdong companies are looking for electronic engineers/structural engineers/acoustic engineers
- 【Distributed Temperature and Humidity Acquisition System】Work Submission
- Analog Modulation Attached (PPT)