I have a line where our machine will not output a state change for rework .
Meaning I get good outfeed counts when an item is passed through more than once .
We are seeing issues where the line has packed 15 physical items but we may have recorded a count of 17 as one of the items had to be processed twice for some reason (sometimes just in error the machine is cycled twice after break etc ..
This is something that we will have an issue with for many of our lines so I want to build something scalable to handle this.
My architecture is -
Highbyte being used mostly as an MQTT broker but also picking up other data sources and outputting to a standard MQTT topic for ignition to handle
Then ignition to ingest in to our MES
MQTT tags are
Outfeed count
Infeed Count
Waste count
State
State code
Production order
Material
Serial number
These feed in to a UDT that we then update the MQTT path in to automatically populate all of the tags on each line.
I want to identify when a serial number has been seen on a machine more than once & if so change the outfeed count to waste count.
I want advice on the best way to do this - should I handle it in Highbyte and convert the tag prior to it coming to ignition or do I do it in ignition.
My thoughts are to manage using an SQL table that has the columns:topic namespace,serial number , seen before and a date time stamp
Then lookup against the topic namespace within a date range of 3 months from now backward to see if the serial number is unique
I want to be able to read the database to see if it is unique if it is write a record if not update the seen before column with a count of 1 - if the seen before already contains a number increment by 1 then update the outfeed count tag to 0 and the waste count tag to 1
Or something similar. I am going to brainstorm with my team tomorrow but also wanted to reach out here to see how you all would or have approached similar problems.
Ideas welcome!