Disabled Tags

Hi,

We are testing a template which accepts a UDT. The template contains a rectangle which is made visible if one of the UDT Boolean tags is true.

Sometimes, the particular Boolean tag is not implemented (in the PLC) and we disable it in the UDT instance. However, sometimes the template rectangle will then be visible, sometimes not. I haven’t been able to track down why. We wish it to simply remain invisible if the Boolean tag is disabled.

How can I check within the visible binding expression if the tag is enabled/disabled ?

Thanks

Tim

Try using:

{YourTag.Enabled}

OK some progress has been made.

However, tags have dotfields (.EngHigh, .EngLow etc.) - how do I bind to these within a template with a droptarget.

For example - I have a number display component on a template. The value is bound to the drop target custom property ‘Root Container.FlowMeterTag::V_Today’ works great.

How do I bind the ‘.EngUnit’ from the same customer property to the number display suffix property ? EG: ‘Root Container.FlowMeterTag::V_Today.EngUnit’ is not acceptable syntax.

Thanks

Tim

For your template visibility when the tag is Disabled you can use the following script in the propertyChange event of the template, it’s generic so you don’t have to worry about any binding -

#hide the template if the dataQuality is 410 (Disabled) if event.propertyName == "dataQuality": if event.source.dataQuality == 410: event.source.visible = 0 else: event.source.visible = 1

To get the dotfield values you’ll need to use Indirect Binding. Your UDT has a folder called Meta that contains the string variable TagPath that you can use for Indirect Binding.

Personally I set up my UDTs with a folder called MetaData that contains memory tags that hold meta data about the UDT like EngHigh, FormatString, TrendScale, etc. If I have a Tank UDT it’ll have a level tag and multiple setpoint tags, all those tags use the same meta data and I find it easier to reference the tags in my MetaData folder, plus you don’t need to use Indirect Binding to get to the dotfields.