I created a Text area and used a Memory tag to save what I put into it, but the issue I have is that it won’t clear what was put into it. after the cycle is done, not to sure how to go about it
If your binding is bidirectional, write either an empty string or null into the text area (or the tag itself).
If the signal to clear is coming from a tag, then add a custom property to the component.
Bind it to the tag (not bidirectionally) and then right click the property and add a property change script to it.
When the new value of the property comes in (which will happen automatically when the tag changes, thanks to the binding) your script will be run, and you can check if the signal was true before clearing the value property of the text area.
thanks for the reply!
The Text area is Bidirectional to the memory Tag, and i would like it to clear at cycle reset if possible
I'm trying to put text in the text area, then save what I put into a memory tag put that tag into a transaction group, trigger the group to save all the data and after the cycle is done the PLC will have a bool turn off to show the cycle is done and that’s when I would like to clear the memory tag
I wouldn't use a transaction group. It's another layer of indirection that's going to make it harder to reason about.
I would:
- Embrace the project library - put all your non-trivial business logic there, as a series of functions you can call from other places.
- Delegate into the project library from Perspective/tags/etc.
- Use scripting directly to write what you need into the tags and/or DB from Perspective.
So, I have a bunch of data I want to record per station per cycle and I'm doing it thru transaction groups. is there a better way to record data?
Transaction groups have a very particular execution pattern that fits many applications, but not all. Their primary advantage is drag-and-drop ease of configuration. But anything a transaction group can do can be replaced by scripting on gateway timers or tag change events. (Both of these are easiest to maintain when delegating to a project library script function.) Scripted operations can perform post-processing and/or complex handshaking that transaction groups cannot do themselves.
Advanced users of Ignition usually outgrow the SQL Bridge module.