Before we begin to program the Ladder routine, we went ahead and added a few rungs of ladder logic to simulate the tank level. If you would like to follow along, the Studio file, named RealPars_IEC61131 can be downloaded from this link: https://bit.ly/3sPXOO2 - The first three rungs in the MainRoutine allow us to determine which routine to use by comparing the LanguageType tag to a value of 1, 2, or 3.
- Rungs 3 to 5 in the MainRoutine perform the simulation of the tank level.
- Rung 6 moves the LevelControl counter accumulated value to the SoftWaterTank.TankLevel tag.
Let’s begin to program the ladder logic routine.
We will add two new rungs to our ladder routine.
We use a greater than or equal element that compares the tank level tag, with the pump start setpoint tag, and latches the SoftWaterTank.PumpStarter and SoftWaterTank.WaterValve coils.
Let’s startup Studio 5000, and select the program RealPars_IEC61131, previously created in the first section.
After the Studio 5000 program starts up, the “Logic Designer GUI” appears. In the “Controller Organizer Area” - “Tasks” folder - “MainProgram” folder, we can see the three different progr...