Hello!
I am trying to make a popup which will show the interlocks and dependencies of a tag in either grey or yellow depending on if it is causing a problem. For example, if I click on a conveyor belt, I would like to be able to see text saying that it is not working because the conveyor belt ahead of it is in error. I am trying to make only one popup for each UDT so that all motors can use the same popup and all conveyor belts can use the same popup as this will save a lot of time and space. The problem I am having is regarding passing parameters into the popup.
I could create text which is bound to a custom property which I would fill by passing in a parameter from which ever thing on the screen I am animating. I could then have its color indirectly bound to the tag. The problem I am having is that some of the colors are products of expressions. I don’t think I can do an indirect bind and an expression. I am wondering if anyone has any ideas as to how to get around this or if there is a better way to do this in general.
Any responses are appreciated!
What expression exactly are you having issues with? And what graphics module are you using (vision or perspective)?
Indirect tags bindings should be used to bind the tags you need to custom props, then you can use those props in your expressions. You can also use an indirect binding and use binding transforms in Perspective.
Pass in the path to the UDT (i pass in the parent path and the name of the instance and combine these into a custom prop with an expression binding) into your popup so that you can use this in your indirect bindings. You can also pass in the UDT type I think, but I would never go this route as it has limitations.
I am using Vision. I want text to change color based on the tag I pass in with a custom property but in many cases, I want to pass an expression in instead. For example, I want the text to turn yellow if tag LR is true and tag RNG is false. I want to do this with as few custom properties to be passes in as possible because some of the versions of the popup I will be making have lots of interlocks and dependencies.
The way that I do this, is in the plc I have an interlock word where each bit represents a potential interlock condition. If >0 there is an interlock on. In igntion I have a dataset tag as a lookup for the interlocks that has two columns, bit and description. The I have a template that uses the interlock word for the state and the dataset lookup to get the interlock description. The last thing you want in ignition is logic that duplicates your plc logic
1 Like