Open topic with navigation
Calculation example: controlling when a pump runs
In this example of using the Calculation feature, we want to control
when a pump shuts down and starts up again. The pump we want to control
is called Pump_3 and it pumps
a liquid into a tank called Tank_FR2
as indicated by the illustration below.
We want to prevent the pump from running when the level of the tank
is above a certain level. If the level in the tank falls below the level
defined, then the pump should start up again. Our pump has two states,
OFF (0) and ON (1).
- In the Definition
module, double click on Pump_3
and go to the Calculation tab.
- Select the
Command in the Atom
list. (We don’t want to use the State
atom, which can be overwritten by the PLC when informing IGSS of the present
state of the pump.)
- Under the
Execution trigger select the option
On object changes in expression,
which ensures execution when changes occur on the object in question.
- In the field
under Expression, key in the following parameters: IIF(Value('Tank_FR2')>4500.75,
0,1)
- The
expression says that if the level of the tank, Tank_FR2, is greater than
4500.75 m3, then the command 0 is to be sent to the pump, Pump_3 and remains
in force until the level falls below 4500.75 in which case the pump is
sent the command 1.
- Make sure
to click the button Test Expression…
to ensure correct syntax.
- Key
in a comment about how the expression is being used for controlling purposes.

- Set the pump’s
state to 1 and save and install the configuration.
- Activate
the IGSS Starter
and test if the expression is executed by changing the process value of
the tank to a level above 4500.75 m3. Watch for the state change to 0.
- If
it's necessary to record the workings of the Calculation function, then
make sure All changes and Log outgoing commands is selected on
the object's Data Management Definitions
tab.
For a complete list of the object functions available for Calculation,
please click
here.
For a complete list of the arithmetical functions and operators available
for Calculation, please click
here.
Open topic with navigation