שאלות נפוצות
EcoStruxure Operator Terminal Expert - Color animation of pipes.
Issue:
How to animate the pipes color based on status of pumps.
Product Line:
EcoStruxure Operator Terminal Expert (all versions)
Resolution:
For the animation of the pipes, the attached project example ( Test_PipeAnimation) shows 3 ways of animating the pipes colors.
(The example was build with version 3.3 SP1)
1- The pipe's color is changed based on an integer value representing the pipe's state.
Here the Function - Basic - Current Value property of the pipe is link to the variable Pipe1_State.Value.
Under the Shape - Basic - States property, the number possible states is defined (8 in this case) and for each Items 0 to 7 (the 8 states), the pipe's inside and outside colors are set.
Now, running the project in simulation, using the numeric input field to change the state value, you can see the color change.
2- The pipe's color is changed based on the digital states (ON/OFF) of 3 pumps, by using a User-Defined Converter.
Here the Function - Basic - Current Value property of the pipe is still link to an integer variable, Pipe2_State.Value. The difference is that this variable is linked to an User-Define Converter that will convert the digital states of the 3 pumps into an integer number representing the wanted state/color for the pipe.
The converter used is an Expression converter which evaluates the expression: 4*Pump3.Value+2*Pump2.Value+Pump1.Value (PumpX.Value being either 0 or 1).
The Function - Basic - Current Value property of the pipe is linked to the variable Pipe2_State.Value which is set to use the PipeAnimation converter and "receive" the value of the expression.
The different states and colors for the pipe are configured in the same way as in method 1.
And running the project in simulation, using the pumps buttons to change their states, you can see the associated color change of the pipe.
3- The pipe's color is changed based on the digital states (ON/OFF) of 3 pumps, by using a script.
Finally, in this method, instead of using a User-Defined Converter to evaluate the expression based on the pumps' states, a periodic screen script is used to do it.
The following script calculates the pipe's state value Pipe3_State.Value.
The Pipe3_State.Value variable is linked to the Function - Basic - Current Value property of the pipe and the States and Colors are configured the same as in method 1.
In simulation, the pipe's color will follow the Pumps button states just as with method 2 but with a delay due to the periodic scan of the script.