Tracking of materials in a conveyance system

Does anyone here have experience tracking materials by index in a rather long conveyance system?

Think of materials being placed on a line to age for a month and indexing down one at a time and then coming off the other end like a FILO queue. Once they come off, and during conveyance, we want to know where everything is in the conveyor system so that we can have a somewhat omniscient view of our factory. We are using the Sepasoft Track and Trace module to handle this at the moment.

We currently don’t do any tracking in a FiFo, but we have some automated warehouses where goods need to be tracked, and details of the goods are shown inside Ignition.

Though we use only custom code for that. A custom DB design and display in Ignition using custom templates (that call SQL queries to show visualise the data).

The only difference between a “pick and place” warehouse and a FiFo is that for a FiFo, you need some kind of shift operation. But if you encode the positions in your FiFo as numbers, its as easy as executing a query like UPDATE Goods SET Position = Position+1 when doing a shift.

Then you can always insert in position 0 and take at position N.

We also do some conveyor systems, but given the speed of the goods on those conveyors, we decided to keep the position data in the PLC. For long term data, it’s more important that it’s easy to backup, so that needs to go in a proper DB (MySql, Postgres, …).

Okay, so there is the potential to set up an independent database (well, hosted where all the other databases that ignition uses are, but not created by the MES in this instance) where at each shift operation we can just index the position of the material either by incrementing the position column of the material OR by just adding the new index to a list of ongoing indexes that it has been at.

The reason for asking is that the conveyance process takes some time and I was wondering if MES/Ignition can handle tracking in a queue over the course of a few weeks or so.

Is there some resource that I can look to learn how to create and communicate with a database via scripting in MES? Thanks for your answer!

You can use the db scripting functions (https://docs.inductiveautomation.com/display/DOC79/system.db).

These functions can be called on tag changes, f.e. when the PLC sets a certain bit. Or from the user interface (f.e. when new goods are added or corrective actions need to be made).

It’s all raw SQL, so it’s up to you to define a suitable DB schema, and use it like you want.