Error Forwarding Data

Hey folks, I'm using a tag change script on Ignition Edge Compute (8.1.17) to log data to my history provider. The script is defined in a UDT, with all 100 instances logging incoming data to the same location, and uses system.tag.storeTagHistory() to push the tag data to the storage provider.

I've noticed an error on the logs (MemoryForwardTransaction -- Error Forwarding Data), saying a SQLiteException was thrown, "A PRIMARY KEY Constraint failed (Unique Constraint failed: tagdata.t_stamp, tagdata.tagid)".

I'm wondering if this is because multiple tags are writing to the same location? Does storeTagHistory() only let you write to a unique location each time? Thanks! (Not much of a SQL expert sorry!)

Only one value permitted for a tag at a particular timestamp. Your storage logic needs to account for that.

1 Like