Transaction group array OPC

I have an int array OPC that is sent from the PLC into Ignition. Inside the array different counted error signals are stored. I am trying to use the OPC array into a transaction group to write to my db but it gives errors


Should I choose another data type or is there something I have to do ?

this is what I get when the transaction group runs:
image

A plain transaction group only writes to one row in the database. JDBC doesn’t really have a generic way to pass arrays to a single entry in the DB. You should look at a block transaction group–you can generate multiple inserted rows with that, specifying the array subscript for each.

2 Likes

I made a transaction group block and it seems to work the way I want it to. The numeric array is a counter for production errors of n-index of causes. When an "error" (array outputs) changes in value, the block group should insert a new row using insert changed row (in the table action parameter) and looks like this now (I use count(block_ndx) to count the number of row and return te number of "errors" or instances for a particular time frame)

But I am running into an issue where the values jump. Some sort of aliasing I suppose

I have as trigger option, when values for all tags change. But the Machine cycle is 600 ms and should not jump, in this case, from 56 to 64 instances in less than 2 seconds (t_stamp 10:28:29 to 10:30:19). In the PLC, the counter is working fine

Did you set the group to only insert changed rows?

Yes, so that I only get a new row when one of the values changes (instead of the whole block) as I am trying to use the row number as a counter as a function of the timestamp