I am starting to work with SQL-Bridge and I’m building it to facilitate downloading of recipe data to a Controllogix PLC.
I browsed to my PLC to create the initial tag structure (an array of 2 UDTs of which 1 UDT is also an array of a UDT) then converted those tags to memory tags so I can test things. The simplified structure is as follows:
Formula_0_
Header (folder)
Tag_1
Tag_2
Tag_3
Step (folder)
Step_0_(folder)
stepNum
stepTag_1
stepTag_2
stepTag_3
...1-39
Step_40 (folder)
stepNum
stepTag_1
stepTag_2
stepTag_3
My stored procedure returns 2 tables. The first table is Header data, 1 row. The 2nd table is the step data 41 rows.
Is there a way for the transaction group to “know” to write each row of the step data to each folder of step tags?
Or would I need to treat each tag in the ‘step’ as block groups?
BlockGroup_0 Write 0-40 stepNum tags
BlockGroup_1 Write 0-40 stepTag_1 tags
BlockGroup_2 Write 0-40 stepTag_2 tags
BlockGroup_3 Write 0-40 stepTag_3 tags
...
BlockGroup_n
The issue I have is it doesn’t appear the transaction group can handle multiple rows being returned. I have a feeling this may become a multi-step procedure where I query the Header data and populate some tags. Query the steps to get a row count and save the unique identifier for each row then retrieve each row individually. Or possibly re-organize my tag structure to match the block structure?