EcoStruxure Geo SCADA Expert Forum
Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-12 02:44 PM
Hi
I want to limit my IIF to a range od setpoints to change color of an object. For example :
IIF 0 < x < 0.3 ---> Green
IIF 0.3 < x < 0.5 ---> ORANGE
IIF 0.5 < x < 1 ---- RED
I tried the following line but it is not working:
IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" > 0 AND "..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 0.5,RGB( 0, 255, 0 ),RGB( 255, 0, 0 ))
I couldn't not find any clues how to do that in GeoSCADA help. Any Idea how I can write these condition for an object?
Thanks
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-13 03:14 AM
You need to nest the IIF statements, something like:
IIF("x" < 0, Black, IIF("x" < 0.3, Green, IIF("x" < 0.5, Orange, IIF("x" < 1, Red, Black))))
which uses black for values outside of the range zero to one.
IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 0, RGB( 0, 0, 0 ), IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 0.3, RGB( 0, 255, 0 ), IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 0.5, RGB( 255, 142, 85 ), IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 1, RGB( 255, 0, 0 ), RGB( 0, 0, 0 )))))
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-13 03:14 AM
You need to nest the IIF statements, something like:
IIF("x" < 0, Black, IIF("x" < 0.3, Green, IIF("x" < 0.5, Orange, IIF("x" < 1, Red, Black))))
which uses black for values outside of the range zero to one.
IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 0, RGB( 0, 0, 0 ), IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 0.3, RGB( 0, 255, 0 ), IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 0.5, RGB( 255, 142, 85 ), IIF("..Control Points.NTU1_Control_Points.NTU1.CurrentValue" < 1, RGB( 255, 0, 0 ), RGB( 0, 0, 0 )))))
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-06-16 06:56 PM
Thanks Andrew
Working with no issue. I was thinking I should use something like &&, AND or similar like C, VB and so on.
Regards
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.