Simple block group problem...I guess

Hi,

If I understand, and you want to extend this idea to multiple PLCs, I would stay with the method you are using to have the stored procedure write to the table. The difference would be that I would add another column to the table, “PLC_ID”. You would then create a block group for each plc, and have it point to the table, with the custom where clause “PLC_ID=1” or 2, and so on.

Your stored procedure can delete the rows for the plc and insert new ones, or update what is already there. It’s ok if the different blocks have a different number of rows, as long as there are rows for all of the PLC addresses. Also, I would make sure that there was a numerical primary key column (auto-increment) on the table, so that the rows get returned in the correct order for each block. You have to imagine - the block group will first execute a select query with your custom where clause, and then will map those values to the lists of PLC addresses.

There isn’t a way to write to arbitrary plc addresses from a stored procedure. The address must first be mapped through a group, or at least to SQLTags. The possibility of using a stored procedure group to bypass the temporary table could work, but if you have thousands of values, I think the block group and table approach is the best.

Regards,