Scripting Help - Device Conditions

I am trying to create the following conditions with an associated value under a UDT expression tag.

  1. Conditions -Value 0 - Motor Not Running && Interlocks/Permissives Not Met
  2. Conditions - Value 1 - Motor Not Running && Interlocks/Permissives Met
  3. Conditions - Value 2 - Not Running && Faulted
  4. Conditions - Value 3 - Running && Not to Speed
  5. Conditions - Value 4 - Running && Up to Speed

These values will be used to associate a templates triangle fill color…

Any help would be greatly appreciated!

Create an Expression tag named Status and use the binEnum expression and then set the color to that tag from the UDT.

binEnum({Motor Not Running}&&{Interlocks/Permissives Not Met},{Motor Not Running}&&{Interlocks/Permissives Met},{Not Running}&&{Faulted},{Running}&&{Not to Speed},{Running}&&{Up to Speed})

1 Like

I did a work around and created a several expression tags with conditions in each to mimic an index. Then I used the tag value change event in each to set the index number in the “Status” tag. After I had a value I could use it to drive set color. It was a little more work then what the binEnum will do and way more slick and clean.

Thanks for the help! I plan on using that next time around for sure…

I meant to say the binEnum is way more slick…not my workaround!