Siemens PLC TIA Portal: Programming Methods and Principles for Register Assignment

In automation control systems, the operating status of each device follows a certain action logic, just like tasks need to be performed in a specific order to maintain clarity and organization.

For the action process of devices, we can define and manage it through register values. Each action of the device corresponds to different state register values, and by changing the contents of the registers, we can drive the device to perform the corresponding operations.

For example, in daily life, the process of washing hands → eating → washing dishes can be controlled using state registers:

  • State Register = 0: Standby state
  • State Register = 1: Performing hand washing action
  • State Register = 2: Performing eating action
  • State Register = 3: Performing dishwashing action

When the hand washing is completed, the program assigns the state register value from 1 to 2, and the device automatically switches to eating mode.

Similarly, the handling process of a robotic arm is controlled by step registers:

  • Step Register = 1: Move to the grabbing position
  • Step Register = 2: Perform grabbing action
  • Step Register = 3: Lift the workpiece
  • Step Register = 4: Move to the target position
  • Step Register = 5: Place the workpiece and return

Each time the completion flag of the current step is set to 1, the program automatically increments the step register value, achieving seamless action transitions. This register assignment programming method is one of the most important logical control methods for electrical engineers.

Siemens PLC TIA Portal: Programming Methods and Principles for Register Assignment

Now, to illustrate this method, I will explain a real case. After mastering this method, you can directly apply it when you encounter similar problems in the future!

Control Requirements:

The diagram shows the liquid mixing control schematic. The system is configured with three solenoid valves (YV1-YV3) and a mixer (M). The control flow is as follows:

(1) After starting, valve A opens to inject liquid A until the low liquid level, stops for 30 seconds to stabilize the liquid, then valve B opens to inject liquid B;

(2) When the liquid level reaches the high level, valve B closes, and the mixer starts stirring for 2 minutes before opening the discharge port;

(3) After discharging for 1 minute, the discharge port closes;

(4) When the stop button is pressed, the system must complete the entire cycle before stopping.

Siemens PLC TIA Portal: Programming Methods and Principles for Register Assignment

Programming Idea: Using Registers to Implement Step Division

Siemens PLC TIA Portal: Programming Methods and Principles for Register Assignment

Program Writing:

In this program, you can see that it can achieve its functions according to its own steps, for example, when the register value equals 1, it controls valve A, when the register value equals 2, it controls valve B, when the register value equals 3, it controls the mixer, and so on. This method makes our programming thinking clearer and less prone to errors, which is why electrical engineers prefer to use it.

Siemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentSiemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentSiemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentSiemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentSiemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentSiemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentSiemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentNow, pay attention! Recently, many friends have left messages in the background saying they want to systematically learn PLC programming. I have spent 3 years organizing the core ideas and methods of PLC programming, and the cases explained in the course are quite typical, including cylinder control programs, branching control programs, summary control programs, loop control programs, jump control programs, manual/automatic switching control programs, analog control of temperature, pressure, and flow, and practical cases of PLC controlling servo motors for precise positioning.Long press the image below to obtain this set of secret methods:Siemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentAdditionally, for friends who want to systematically learn how to write PLC programs using AI, long press the image below to enter the learning:Siemens PLC TIA Portal: Programming Methods and Principles for Register AssignmentYou must check it out; it is of great value.If you have any questions, feel free to leave a message in the comments, and we can discuss solutions together.

Leave a Comment