Why can't I use the same expression for controlling opacity on Numeric Values and images.

(Scale(Analog_verdi\LowWarning\Value, 0, 1, 0, 1) || Scale(Analog_verdi\HighWarning\Value, 0, 1, 0, 1)) && !(Scale(Analog_verdi\HighAlarm\Value, 0, 1, 0, 1) || Scale(Analog_verdi\LowAlarm\Value, 0, 1, 0, 1))

I controll the opacity on a Numeric Value and on a Text Value, and it looks like this, and works perfect.

598ae4f6d2c70.png

When I paste the exact same expression to Opacity on a image, i get this error.

598ae8e9467c4.png

Image opacity Expressions will only accept direct linked tags, like this.

[<M251_simulator\Modbus_Driver\SensorSalinitet1\LowAlarm>] || [<M251_simulator\Modbus_Driver\SensorSalinitet1\HighAlarm>]
Why can&#039;t I use the same expression for controlling opacity on Numeric Values and images. ```` (Scale(Analog_verdi\LowWarning\Value, 0, 1, 0, 1) || Scale(Analog_verdi\HighWarning\Value, 0, 1, 0, 1)) &amp;&amp; !(Scale(Analog_verdi\HighAlarm\Value, 0, 1, 0, 1) || Scale(Analog_verdi\LowAlarm\Value, 0, 1, 0, 1)) ```` I controll the opacity on a Numeric Value and on a Text Value, and it looks like this, and works perfect. ![598ae4f6d2c70.png](serve/attachment&amp;path=598ae4f6d2c70.png) When I paste the exact same expression to Opacity on a image, i get this error. ![598ae8e9467c4.png](serve/attachment&amp;path=598ae8e9467c4.png) Image opacity Expressions will only accept direct linked tags, like this. ```` [&lt;M251_simulator\Modbus_Driver\SensorSalinitet1\LowAlarm&gt;] || [&lt;M251_simulator\Modbus_Driver\SensorSalinitet1\HighAlarm&gt;] ````
 
0
reply

When you draw a numeric value widget, it is within the scope of the tag database. You have to link it to a tag so it can translate the tag references in the way they are listed. In fact, from the way the expression is built, I would say that you had the opacity on a tag at first, the changed to an expression.

You expression is the equivalent of --

([Analog_verdi\LowWarning] || [Analog_verdi\HighWarning]) && !([Analog_verdi\HighWarning] || [Analog_verdi\LowAlarm])

Try that in the expression for the image, although you may have to further alter it to be -

([<Analog_verdi\LowWarning>] || [<Analog_verdi\HighWarning>]) && !([<Analog_verdi\HighWarning>] || [<Analog_verdi\LowAlarm>])

This will be a direct reference to the tag in the database tree regardless of its context.

When you draw a numeric value widget, it is within the scope of the tag database. You have to link it to a tag so it can translate the tag references in the way they are listed. In fact, from the way the expression is built, I would say that you had the opacity on a tag at first, the changed to an expression. You expression is the equivalent of -- ([Analog_verdi\LowWarning] || [Analog_verdi\HighWarning]) &amp;&amp; !([Analog_verdi\HighWarning] || [Analog_verdi\LowAlarm]) Try that in the expression for the image, although you may have to further alter it to be - ([&lt;Analog_verdi\LowWarning&gt;] || [&lt;Analog_verdi\HighWarning&gt;]) &amp;&amp; !([&lt;Analog_verdi\HighWarning&gt;] || [&lt;Analog_verdi\LowAlarm&gt;]) This will be a direct reference to the tag in the database tree regardless of its context.

Doug Spurrell

 
1
reply
52
views
1
replies
2
followers
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft