Writing Variable Number Of Rows to PLC Array

I am trying to use a block group to write a variable number of rows from a SQL database to my PLC array using the SQL Bridge Module. The problem is that if the results is less than the last query, then it will fill the array with the new data and entries from the old data. Is there a way to clear the block data after it writes to the PLC?

Sounds like a job for a script instead of a block group.

1 Like

It’s a bug, I have a support ticket for it as well.

I got it to work by first triggering a stored procedure using using a standard group and a triggered expression item. The stored procedure writes to another table that fills in blank entries. Then triggering the block group to pull the data from that table to the PLC array. A bit of an annoying work around, but it works.