At the end of the article, there are 55 practical case materials.
Introduction: In automation equipment, the automatic control program is the basic function for the normal operation of the equipment. Since the logic of automatic control is essentially “start condition” result “end condition”, this article uses Siemens S7-1200 PLC and Inovance PLC to write programs, allowing for a comparison of the similarities and differences in programming these automatic control programs!
1.Control Requirements:
There is a liquid mixing system with two feed pumps (PumpA and PumpB), a mixing container, a stirring motor, and a discharge valve.
The process is as follows: First, start PumpA and PumpB for feeding. After feeding is complete, start the stirring motor to stir for a certain period, then open the discharge valve to discharge. After completion, proceed to the next cycle until the stop button is pressed, at which point everything stops.
Programming for S7-1200 PLC
(1) Create a new FB block and define the interface variables.

(2) Program Analysis
Program Segment 1 assigns the step variable value to 1, indicating the “first” step.

Program Segment 2 checks if the step value equals 1 to open both pumps. When both sensors are activated, the step value is modified to “2“, executing the second step action.

Program Segment 3 controls the discharge valve, with a discharge time of 3 seconds. After the time is up, the step value is modified to “3“, executing the third step action.

Program Segment 4 controls the discharge valve, and upon meeting the conditions, it jumps to step 4

Program Segment 5 is for the loop and stop function.

Programming for Inovance PLC
(1) Create a new FB block and define the interface variables.

(2) Implement different functions based on different step sequences; the programming approach is quite similar to Siemens, so it will not be elaborated here!

(3) Call the FB block and assign addresses.
Recently, many friends have requested case books, stating that reading articles on mobile is not very convenient. I took some time to organize all 55 practical cases, which are quite typical, including cylinder control programs, alarm programs, program frameworks, motion control program encapsulation, analog control of frequency converters, communication, and other practical cases.If you need them, you can add me on WeChat: biao467524527. If you can’t add me, feel free to message me!!



Previous Recommendations
One article teaches you how to choose an analog module!!
A must-read for beginners: How to solve errors in 200SMART software?
Do you really understand Modbus RTU? One article will help you understand it thoroughly!
Universal program framework for PLC programming
Using S7-1200 PLC to write a belt deviation control case
Accurate measurement of motor speed program using encoders
Step-by-step guide to writing Modbus RTU communication programs
One case to master the difference between ladder diagrams and SCL language
A small PLC programming project that surprisingly earned him a few W
[Practical] Sharing a state machine case for PLC ladder diagram writing
Modbus RTU to Modbus TCP and temperature and humidity instrument communication case
Quickly bookmark: Siemens full series software and manuals (including touch screens, PLCs, frequency converters, drives, etc.)
If S7 communication cannot connect, here’s a quick troubleshooting tip!!!
To achieve efficient PLC programming, first solve these three important issues!
Here’s a tip: How to quickly troubleshoot PLC communication faults!!!
It’s not that you can’t program; you might just be missing an idea!
What does a complete project program framework look like?
How PLC communicates with multiple instruments via Modbus
Learn Modbus TCP communication with 200SMART PLC through one case