The engine set consists of 1 petrol engines and 1 diesel engines, which is required to control the engine group with PLC, so that the speed of each engine is stabilized at the set speed, and the starting and delay of the cooling fan are controlled. Each engine is set with a Start button and a Stop button.
The program is as follows:
1. Program Module
2. Symbol table
3. Fan Control Program
4. Starter Control
5. Start the Unit
Note: 1) Complete a local instance of the FB1 type in the Variable declaration table, the declaration of "Gasline_engine", "Diesel_engine".
2) when calling FB1 local instances, you do not need to set the background data block, FB1 instance data is in DB2.
3) The actual speed of the engine can be obtained directly from the shared data block, such as Db1.dbw2
6. Main program
The program code can be downloaded here.
Siemens PLC Learning note 20-(use of multiple background data blocks)