Good evening everyone, and thanks for any help in advance. I have been working on this for a long portion of the afternoon and finally need to ask for help.
I am trying to pass params out of an embedded view into a popup, and then have actions taken inside of that popup write back to the tag that the parameter in the embedded view is bound to. I'll explain:
I am creating a station page, it is a flex container, and I have an embedded view that is a coordinate container inside of that flex container. The coordinate container is a online diagram of an electric substation with components on it. These components each have 4 boolean tags, and 12 analog values. I am hoping to use this one line as a template. I have set up a list of over 200 parameters that exist in this one line. On each component if you click it launches a popup, that will display the boolean and analog values for that component. If a boolean tag needs to have a state change, it is clicked on which launches another popup that "confirms" that you want to make that choice.
Here is where I am having a problem, it seems to be at the launching of the popup from the component. I can toggle the tag from the station view, and the embedded view and I can see it changing states. I can also inside of the popup toggle the boolean values with no issue. I can't however seem to have the change of state of the boolean value write back to the tag.
I've checked bi-directional to make sure they were all on. I've checked that the right values are being pointed to the right tags. I made sure those params were added to the embedded view. I can't seem to figure how to get it, so that when the component, when it is inside the embedded view, is clicked, that those params get passed from the embedded view into the popup. I'm sure there something simple I am over looking, and I am sorry this got really long.
Don't pass tag values in popup parameters. They are effectively one-shot in both directions at the time the popup opens. Pass tagpaths to let the popups do their own indirect tag binding.
Thank you for the reply. I'm going to have to look into how to do that. The way I have been trying it, which is obviously wrong, is I've been using the configure events function. I have an onclick that calls the popup, I then drop the parameters from the popup into the id field of the table. I guess where I have been incorrect is in the value field I've been binding it to a parameter from the embedded view. If I am understanding you, instead of binding it to the parameter in the embedded view, I would bind it to an indirect tag. Am I following the trail here?
Pass a string parameter that holds the path to the desired tag. Within the popup, use indirect tag binding to reference the live tag value. And, where appropriate, be able to write back.
That's a lot of text to read; screenshots would help here showing:
- your embedded view's params and what they're bound to
- your popup open script
- your popup script or binding that is attempting to change your tag value
- anything else relevant
Although I'm sure it's what Phil has already mentioned, screenshots would help someone looking at this in the future (most people won't read all of that text)
The last screen shot is an example of how I have the tags bound in the embedded view. They are bound directly to the tags themselves. The second to last screen shot is how I have the popup onclick configured. I've been tinkering with this a little the morning, and for the analog values I seem to be able to get the value passed, but it isn't dynamic. I guess this is what the gentleman was referring to yesterday about the popup being a single shot, so I need to figure out how to make that dynamic. The first screen shot is an example of how the popup looks, I fixed the labeling issues so now all of the lables in the A phase Bphase and so on columns are correct. The other issue I am still having the toggling issue where it won't write back to the boolean values. The station screen shot is just how its laid out currently. When you click on any of the squares, it will open the popup and display all of the information related to that breaker.
That's your mistake. Pass tag path strings, not tag values.
You cannot make the popup parameter values dynamic. You must pass a tag path so the popup can make its own indirect tag binding.
View parameters are read once on startup. Changing them afterwards has no effect.
Ideally, you would only be passing in a single tagpath to some folder or UDT instance that contains all of the stuff you need in your popup, and then just use indirect tag bindings to bind to the tags you need. I don't think I've ever passed in multiple tag paths to a popup unless it's for an ad-hoc trend.
Also, generally, if you're manually typing in descriptions for tags (e.g. your UsageName, VAName, etc) into your GUI, you've stuffed up. This should all be defined in your tags/UDT instance parameters, and you should be binding to these so that this configuration is centrally managed, rather than being copied and pasted everywhere it's needed
to be fair, it could make sense to type stuff up manually at first, for something on dev/for a prototype, before you know what structure makes sense to put into a UDT
(this is, fwiw, one of those things I wish Ignition did better -- making it easy to say 'i have this baseline set of things, how do I abstract it back out' -- there's not a sufficiently good programmability layer to make that work atm that i'm aware of)
Ok, thank you, yeah I was going to turn and start looking at UDT's. This is a proof of concept type situation, and I am not plugged into any devices at the moment. I created a whole bunch of simulated tag values and the naming convention I used, though similar to what exists in our real world devices, is a lot more streamlined. We have a bit of a mess when it comes our actual naming convention and so I held off learning about UDT's since none of them are really the same. A problem we are working on fixing, but are no where close to getting done. Maybe I'm not understanding UDT's correctly and the fact that the names aren't similar in the real world won't matter as much. Thank you for pointing me in that direction.
I'd say UDTs give you a chance to standardize naming.
It's not the area I know best, but I believe you could use UDT parameters to pass it paths/names, then use these to build opc paths.
I think most would agree that UDT parameters should be avoided. As stated about 10 times already in this topic, use a tag path (string).
I want to thank all of you for helping me through this process. After taking everyone's advice I have been able to achieve the results I have been hoping for. Thank you guys again for taking time out of your respective weekends to offer your assistance.