I posted a bit ago about a timer program I was making. I realized it would make much more sense to use templates and template repeaters. The project is 100 different timers that get started with a barcode event. Right now, I have nested UDT’s for all of my timing variables, but I am trying to set up all 100 possible timers using templates and template repeaters. The problem I am running into is that it feels way too manual to where I feel like I must be missing something. I will have 10 sets of 10 timers in the program, so I started by making the individual timer in it’s own template, then made another template with a template repeater inside of it to list all 10 timers in the container. Each timing instance has 5 different tags to it, so in total the project has a little over 500 tags being referenced. When making the repeater, it doesn’t appear to have a way to specify a property UDT after setting the parent UDT as a custom property. Is there no way to do this? Any help would be appreciated, let me know if you need more information.
in theory it wouldn’t ever close, but in the case of any other issues, ideally it would maintain it’s values, but there are no OPC connections or any backups to store it on. Not sure if there are other ways to run the timers other than on memory tags, in my last post, people were saying not to use tags, but not sure what else there is.
Personally I wouldn’t use a tag to try and store the timer value but I would use a tag to store a start time and then your timer is just the current time - start time
thats similar to what is happening, I do have a tag referencing the time elapsed, as I do reference that within the program, but the timer itself is the difference between the total time and time elapsed.
A little more info, here is the binding screen for the template repeater. I would like to be able to bind all 10 rows of PN to the respective PN UDT in in the parent Bin UDT that is linked to the template that houses the template repeater. Is there no way to do this?
Answering strictly the question asked, the only way to do it is with additional custom properties with (indirect, as needed) tag bindings of their own. Then reference those custom properties within the cell update binding. This necessarily (along with the cell update binding) means you're not going to be dynamic to more than your hardcoded number of instances of the PN UDT, if that's a problem.