I am attempting to make a list of timers that operators can scan in part numbers and it populates a container with a new timer instance and times from a set value down to zero.
Right now I have 10 sub containers inside of the larger container that all have timers in them, the problem I am running into is that the timers leave gaps in the larger container once cleared. See attached.
How would I go about creating a list of timers that automatically move up to populate from the top down?
Is this in Vision, or Perspective?
not sure if there is a better way to do it, but I just did it manually and it seems to work.
It takes a long time (.5 seconds ish) to compute though
Make sure to perform bulk reading and writing to reduce the time this operation takes.
Ideally, in your whole script, you should perform one initial tag read and one final tag write if possible.
The way you are doing it right now is slow because each write has to wait for the result before moving onto the next write (see quality codes).
Performing one tag write will gather all the results at once, ensuring much better results.
This also applies for tag reads.
I tried doing a bulk write, but it can't compute it because it is an array of arrays. Is there any way to read those, or would I have to make a big 1 level array
Let's take a step back.
You're currently using tags. Is there a particular reason for that? Do the tags matter in some way to the rest of your process? Do you want the behavior of tags where one operator's data entry will be visible to all other operators?
Without more understanding of your process, I'd be attempting to solve this display problem entirely locally - using custom properties on Vision components and not reaching to tags at all. As described, you've only mentioned a user interface issue.
no particular reason for using tags, still new to ignition, so trying to figure out optimal ways to use it. I figured tags were the easiest things to use for moving and analyzing values, I currently have nested UDT's, which seemed like the simplest solution, but totally open to other options.
doing 1 big array doesn't work either since from what I can tell could have coded it wrong though
got it to run without delay using bulk reading and writing, I coded it wrong, if you have better options, I am all ears
Yeah. This is not the sort of set up I usually see. What is the purpose of this? I'm certain there is a more efficient way to do it than a client side timer scripts writing to gateway tags.
1 Like
In general, we need to have certain part numbers sit for a specific period of time, so the idea is the scan the barcode, cross reference the part number through a sepisoft database to pull a part time, start a timer for said time, and have an alarm + visual indication once the alarm is complete. As of now, I write the part time into 1 tag, then bound a timer node value to another tag, subtract them and turn it into mm:ss format.