I am trying to copy information returned from an SQL query to a group of tags.
I could pull the information from database into a String Array(Memory Tag created in Ignition) but my PLC OPC server doesn’t have an equivalent of string array which can be recognized in ignition.
The best I could do is make a Data Structure with 40 string type tags.
(40 is because of the limitation of my PLC memory)
My SQL query is “SELECT DeviceID FROM DeviceLimits”.
I have attached few screenshots below from my transaction Group.
Transaction Group with the sql script displayed. This copies the data in a String array memory tag locally created.
Below is the screenshot of the Memory Tag.
Data Structure created in PLC OPC Server. Each string below is a 16 bit string.
Mitsubishi OPC Server Manual - Page 33 onward it mentions about the Array tags. Unfortunately String data type can’t be choose for creating arrays.
I want to know the best way to get the information returned from SQL query to copy into the String tags data structure created in my PLC OPC Server.
Should I use a for loop? Can I use a for loop to iterate over the data received from the DB because SQL doesn’t allow to use for loops.
Is there any alternate way to solve this issue?