I have been learning quite a bit by making various displays in Ignition Perspective, but the thought of writing expression scripts for changing component behavior so far I have avoided! I would like to change the coloring of duct-work that I made using pipe segments from inactive, which is just a static grey, to green when default bit B83:0/1 is high… I would appreciate any tips or help! I have checked out the videos in the university and I still run into problems.
Thanks!
Use an if statement in an expression binding on the fill property of the pipe you want to change colors of.
Your if statement should be something along the lines of if({path/to/driving/tag}, "#008000", "#ABABAB")
You should take this chance to familiarize yourself with the expression syntax:
Binding types information:
If you post examples of what you have tried so far, we may be able to point out where you appear to be struggling and explain the correct method and reason behind it.
As a side note, it would be considered best practice to update imported tags to have human readable tag names. It will make troubleshooting and future updates much easier for you when you don't have to go back to look at the PLC code to work out what that bit does. ductActive or similar makes it very clear what a true value means and what it relates to.