Writing to memory tags in UDT's

Have a problem here that is driving me to drink. Basically I have been tasked to make a hour tracking system for mills. The mills require maintenance at certain hour readings. I was tasked to do this long ago and kept track of all the hours in Excel. Now I’d like to do it in Ignition. Simple huh? Simply have a numeric text field tied to a memory tag. Enter the hour number and hit enter and the memory tag gets updated to the new value. The problem? I’d like to make a template tied to a UDT because there are 30+ mills. The problem is once you put that tag inside a template or UDT, it no longer works. The editable text field no longer writes to it. I tried it with scripting (system.tag.write) but no dice. I’m ready to scrap the project and have the mechanic use Google Sheets. What am I missing here?

Memory tags can definitely be used in a UDT without the issue you’re seeing.

Some basic checks and questions:

  • What version of Ignition? Vision, it sounds like?
  • Are you using remote tag providers, or is everything local to one gateway?
  • Bindings in your template are set to bi-directional?
  • Can you post the script you’re using?
  • What exactly happens when you try to write? Errors, or just nothing? And does this happen both in the designer and client?

Apologies if some of these are very basic questions - better to ask the dumb questions than assume.

You are missing bidirection indirect bindings.
If you are using bindings don’t use script, if you use script don’t use bindings.

-Ignition 7.9

  • We are using one Gateway
  • Yes both are set to “Bi-Directional”
    -Script didn’t work those I use it all the time on other projects
    -What I am trying to accomplish: Mechanic writes and hour number in a Numeric text field that is bound to a memory tag. He writes the hour reading in the hits enter. The memory tag is updated. This works with just components on the screen. The second you create a template and bind the numeric text field to the memory tag -it no longer updates the tag.

My plan was then to put all the memory tags in a transaction group then write them to a database. Again this is something I’ve done many times but never got this far

Just don’t, you’re turning it into something complicate. Making write to memory tags from a component in a template should be completely simple.

Do you see some output in the console (error-logs)?
Are you using the correct tag provider?

Yes I know, I never imagined this would be this complicated. I’ve been fighting with it for two days. I literally have it set up, one setup with just the components- works fine. Those same components in a template, they don’t work.
Also yes all tags use the same provider

Are you able to post exports of your template and UDT so that one of us can test it? My dev environment is on 8.1 so it’s not a total 1:1, but it couldn’t hurt.

Tougher than it sounds, my engineering station in not connected to the internet and our IT department disabled all our USB ports for security
I’ll try but without my tag database I’m not sure how it will help

Grinding_Hours_CMC Hours_2021-12-29_1214.proj (15.5 KB)
tags.xml (1.1 KB)

Thanks! So it does appear to be a bi-directional issue. When directly binding a UDT like you are here, you need to make sure both the UDT binding (on your vision window) and the individual template bindings (within your template) are bi-directional. Each binding is a separate contract between Vision and your data source, and they all have to agree that something can be written to.

In this case, it looks like the template side just got missed. Once I edited the bi-directionality in both locations, I was able to write to all 3 memory tags.

1 Like

Thank you SO much. This is the reason I posted here. I knew I was missing something very basic. When you get frustrated with a problem this is what happens. Again I’m very grateful!!

1 Like

Why wouldn’t you just interface with a database directly? The great thing about working directly with a database with a power table is that queries aren’t generally going to change (update, select, ect.), but the functionality in ignition of memory tags and how they operate may. Especially when you jump from 7.9 to 8.x. I’d cut the memory tags out altogether. Not sure what your constraints are but if you need some more advice let me know.