I have a block of data in the PLC which contains several arrays of numbers and other values (less than 50 DINTs). These values are updated every cycle of the machine, and it would make sense to use a block transaction group with a ‘cycle complete’ trigger.
User Defined Data Type (UDT)
- CycleComplete (bool)
- array1[]
- array2[]
- value1 (int)
- value2 (float)
- …
However, I am trying to design this to scale: I will ultimately have several hundred of these blocks of data, all with unique tag paths, residing in PLCs across the factory.
PLC1
- Block1 (instance of UDT)
- Block2 (instance of UDT)
… - Block10 (instance of UDT)
PLC2
- Block1 (instance of UDT)
- Block2 (instance of UDT)
…
I was thinking about creating a Data Type and writing a Tag Event script on the Cycle Complete tag which would write all of the other values to the database, however I am worried that this might not be efficient, and I don’t see a way yet to access the Data Type parameters from within the script.
It would be great if there was a way to parameterize transaction groups (sort of like a transaction group data type), but I don’t see any way to do it. Does anyone have a suggestion on how to go about this?