How to use a button to change the TAG that is being bound to an LED display (or any component)?

HI there, complete newbie so forgive me if this is obvious.
I am creating a view that will emulate the functionality of a 3 phase power meter that I can interrogate via MODBUS.

  1. Upload a decent picture of the power meter
  2. The physical unit has a 3 line display so over lay 3 LED displays on the picture …
  3. So far so good the LED’s are displaying the 3 voltage tags that I used in real time
  4. Next, the Power meter has a couple of buttons that toggle through the various parameters… current, PF, KW.h etc… so “screen grab” just the button from the original source picture and create a button over the picture on the view
  5. Now find a way to link clicking the button to change the MODBUS tag being displayed by the LED item… maybe indirect binding via a script?
  6. Realise that the vastness of my inadequacy requires me to seek a higher power… the FORUM!!!
    I havent found a video or a topic or an example to plagiarise as yet… so any suggestions would be most welcome.

Yes, a string property that contains the path or the changeable part of the path for the changeable display. The actionPerformed event on the button would look up the current string value to then pick the next string value. For that part, I’d use a constant list of strings in a script module. Find the current string with .index(), add one (roll over to zero at the end) to get the next string.

My take would have been to use a dataset with values and changeable parameters to use in indirect tags.

Here’s a mockup you can play with. Tags used are client tags, but feel free to plagiarize away. :slight_smile: (10.1 KB)
Take note of:

  • Custom properties on the group (called meter, because I’m creative that way) and it’s bindings, where applicable
  • Scripts on the up/down buttons to adjust the pointer and checking the size of the dataset. That way, if you adjust the size if the dataset, it won’t throw you into a tailspin.
  • Indirect tag bindings on the LED Displays

Aww, Jordan! You’re supposed to make the newbies work for it. :laughing:

1 Like

Jason’s a visual learner, like me. :wink:

Thank you … thank you thank you for your assistance … forgive me for my slack response time :pray: Now I just have to visualise how to use it… where’s my hammer

I have finally found my hammer and I am trying to work for it… but I just ended up hitting my thumb with it. Was that a project export?.. that I import and then like Aladdins cave shows me all sorts of goodies like a perspective view and such … cause at the moment I cant find the treasure.

Yeah, that was a project export. Try importing it into a blank project. That way, you shouldn’t have any extra stuff to get in the way.

1 Like

I tried a blank project … but shouldn’t the view you created show up in the import window where it allows you to select what items to import? The first screen grab is what is available in the PowerMon zip … the second screen grab is from the help for the import process.

I think @JordanCClark’s export includes a Vision window rather than a Perspective view.

After import, look for it here:

I think the Maker Edition (which I am using) doesn’t include the Vision module?

Maker Edition? That would have been handy to know. :crazy_face:

I’m not at my PC yet, but I’ll see what I can do for you.

Okay Try this one. You’ll need to import the tags separately.

powerMonDemoTags.json (1.7 KB) (10.3 KB)

1 Like

Sorry about that Jordan… yep that worked perfectly. I hadn’t got to the point in the videos that triggered the realisation that Maker edition doesn’t contain all the “basics” from the full version. I was about to install another version and let it run in trial mode so I can look at your vision version.