Passed parameter trouble

I am having touble getting a new pop up window to display the real time tag values. They are correct when the window launches, but they don’t update as the value changes. I have a template that has an event handler script that launches the window and the pop up has custom properties that are used in the window. It apears the value is only read once?


How are you bringing the values into the popup? It sounds like your not using indirect bindings to get the values. Check out this link … ndow_p.htm

When I drop a template on my window I bind each tag to the corresponding numeric label through the custom properties I made for the template. The Numeric label in the template is bound to the property in the template.

On the pop up window I have tried to bind using a property to the root container, and I tried the Indirect tag binding the same way.

The values apear in the pop up window correctly, but do not update as the tag value changes. Do I need to bind the tag path to make this work right? I want to just drag the tags into the custom properties on my template and then when I click on my template a script in the event handeler passes the properties to the pop up window.

I think I see what is happening. My pop up window custom property’s are not bound to anything. My script does pass the value I want to my pop up window when it launches, but does’t have any binding to keep it updated.

One of my custom property values I am working on is a Float. Do I need to keep everything a string to use indirect tag binding or is there a different way to bind this value the way I have set it up?

You dont need to change the data type. If its a float it can stay a float.

You don’t want to bind custom properties on the root container that you pass values into. Otherwise, it will overwrite the value you pass in.

I think you are trying to pass in tags you want to display on the popup window. You have been passing in the actual value of the tag not the reference to the tag. So if you pass in a value of 1.54 it will stay 1.54 forever.

You need to pass in something to the window that allows you to reference the tag through an indirect tag binding. Let’s take an example where you have three motors 1, 2, and 3. Each motor has the same two tags:


The structure looks like this:

Motor 1/Amps
Motor 1/HOA
Motor 2/Amps
Motor 2/HOA

The only difference between Motor 1 and Motor 2 is just the number. So if I pass in 1 or 2 it can link to the Amps or HOA tags through indirect tag binding:

Motor {1}/Amps

where {1} is linked to the value passed in.

Basically, you need to either pass in a reference to a tag or an instance of a UDT so you can link to the actual tag. That way when the tag changes you will see it update on your popup.