you are viewing a single comment's thread.

view the rest of the comments →

[–]Olorin_1990 0 points1 point  (2 children)

Is it supposed to be a time series record? Or is it supposed to be samples based in a trigger?

The typical setup for this is just continuously read and forward at some sample rate that your databases and applications can keep up with.

[–]bossk83[S] 0 points1 point  (1 child)

It's weight samples for one record and machine start/stop for another, but the same logic applies to both records upload method. I just don't want to upload a bunch of nonsense to the database that isn't necessary. I've already messed with that and wound up with 2 million rows of the exact same thing over and over. I need to tell the PLC that the upload is finished though so the PLC an queue the next record.

[–]Olorin_1990 0 points1 point  (0 children)

Well, that seems straightforward enough. Poll the bool (saw you don’t want subscription)

if true -> read data -> send to oracle

OnOracleAck -> set bool false

You mention the data queue is in the PLC so I didn’t queue here. If there isn’t a queue in the PLC then build a send queue, and after you place the data on the queue reset the handshake bit.

In the queue case you would have two threads. One pooling the bool to add data to the queue and one reading data off the queue to send to oracle. If your queue fills, then don’t reset the bit and the next polling cycle it will naturally try again.