Perspective Input/Output Parameters and embedded views

Hi,

I am new to Ignition and messing around with stuff a bit over my head so excuse me if I get terminology and such wrong, I’m trying.

Today’s problem is I have a template of an analog indicator. I would like to use it several times in embedded views on a page. I am trying to figure out how parameters function, they don’t seem to be working the way I expect or want. In the analog indicator template I have several parameters in the PARAMS section for Tag, EGU, and decimal points. EGU and decimal points are a sub-tag buried in the root Tag parameter of the indicator template.

Tag:
EGU: {Tag}/PV/Cfg_EU
Decimal_Points: {Tag}/PV/PVDec_Plcs

The various bits of the indicator then use these for display configuration.

The embedded view has the same parameters under the PROPS section. I would like to be able to just enter the base tag here and have the other components link to the relative path. That way I can use it for different instruments without having to change anything but the base tag. the relative tag structure is the same underneath so it should pull the correct values if I can get the links working right.

Embedded View

PROPS
Path: path to indicator template
Params
Tag: (enter base instrument tag here)

First big question, from the point of view of the Analog Indicator Template an “Input Parameter” will receive the value placed into the same parameter in the embedded view?

Second question, is what I am trying to do possible, recommended or am I totally off base?

Thanks,
Jason

  1. Yes, the template view you create with an input parameter defined will receive the value you assign to the props.params.(paramName) property of the same view when it is embedded elsewhere.

  2. If I am understanding your description correctly, I think you are headed in the correct direction, assuming that your “tag” param will contain a tag path to your base tag folder that you will use in your indirect tag bindings to get your eng unit and decimal place values. It is a little unclear whether you are attempting to define those two values also as parameters on your view, but if you are, I would suggest creating custom properties within your template view for them unless you really need to access their values from outside of the template. This will avoid any confusion as to whether those params need to be defined as input or output and will still allow for easy referencing from anywhere else within your template view.

image

As @swolnisty alluded, the key is indirect binding. Parameters to views are basically snapshots. If you pass a tag value, it won’t update in the view as the tag changes. Instead, pass tag paths as parameters wherever you need live data. You can indirect bind inside the view to get that item in an updating fashion.

Thank guys,

Well my coworker figured it out. What I really needed to have asked was how to edit paths. Turn out that being able to use paths with the {tag}+ "/TEXTtext" was what I needed to get things where I wanted them to go.