General Discussions
Negative values as 0

Hello,
Is there a tag setting to interpret negative variable values as 0 ?

Hello, Is there a tag setting to interpret negative variable values as 0 ?

Yes, you can define min and max values in the tag scaling.

Yes, you can define min and max values in the tag scaling.

Trihedral Engineering Ltd.

Hi Dave,
The tag is scalled with 0 min value.

64992a822f963

Still i get the negative value.

64992a81db4d4

Hi Dave, The tag is scalled with 0 min value. ![64992a822f963](serve/attachment&path=64992a822f963) Still i get the negative value. ![64992a81db4d4](serve/attachment&path=64992a81db4d4)
edited Jun 26 '23 at 7:07 am

Sorry, the display range is for certain widgets but does not affect the tags read value. The scaled range only affects a tags write value range and not the read value range.
If your scaled number is correct but you want to limit it, you can create a calculation tag which references the tag and limits the value.

The calculation tag expression would simply be:

//Example using tag absolute path 
Limit([<path/to/reference/tag>],0,100)
//Example using relative path to parent tag
Limit([..],0,100)

The output would be similar to that below:

649b0b24ecf55

If you need to do this a bunch of times, consider creating a tag type for this. It's more effort up front but may provide some great experience and will be more efficient in the long run.

Sorry, the display range is for certain widgets but does not affect the tags read value. The scaled range only affects a tags write value range and not the read value range. If your scaled number is correct but you want to limit it, you can create a calculation tag which references the tag and limits the value. The calculation tag expression would simply be: ```` //Example using tag absolute path Limit([&lt;path/to/reference/tag&gt;],0,100) //Example using relative path to parent tag Limit([..],0,100) ```` The output would be similar to that below: ![649b0b24ecf55](serve/attachment&amp;path=649b0b24ecf55) If you need to do this a bunch of times, consider creating a tag type for this. It&#039;s more effort up front but may provide some great experience and will be more efficient in the long run.

Trihedral Engineering Ltd.

60
4
3
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