A customer is asking if I can do a check on his batch numbers and reject a batch from starting if the check fails. The setup is as follows:
I have an array of 20 batch numbers, representing trays of material that get loaded in a thermal oven.
A batch of material can be spread across several trays, so for example batchnumber_tray[1] = batchnumber_tray[2] = batchnumber_tray[3], then next batch, will be spread across the next trays :
batchnumber_tray[3] = batchnumber_tray[4] = batchnumber_tray[5] =batchnumber_tray[6] , etc, until all 20 trays are filled.
The number of trays used per batch varies, as well as the number of batches used per array.
He want a check that sets a bit if any of the batchnumbers are not in sequential trays, in other words if
batchnumber_tray[1] = batchnumber_tray[3] = batchnumber_tray[4], but batchnumber_tray[1] NOT equal to batchnumber_tray[2], then set an error flag.
The batches have to be loaded in sequential trays..., if it skips a tray and then occurs again, that can't happen..
I know I can compare the individual batchnumber_tray with each other using an FSC instruction or even EQU, but what is the most efficient way to do a cross search for all the different batch #'s used and flag if any batch numbers are not grouped together?
Thanks for any suggestions.
I have an array of 20 batch numbers, representing trays of material that get loaded in a thermal oven.
A batch of material can be spread across several trays, so for example batchnumber_tray[1] = batchnumber_tray[2] = batchnumber_tray[3], then next batch, will be spread across the next trays :
batchnumber_tray[3] = batchnumber_tray[4] = batchnumber_tray[5] =batchnumber_tray[6] , etc, until all 20 trays are filled.
The number of trays used per batch varies, as well as the number of batches used per array.
He want a check that sets a bit if any of the batchnumbers are not in sequential trays, in other words if
batchnumber_tray[1] = batchnumber_tray[3] = batchnumber_tray[4], but batchnumber_tray[1] NOT equal to batchnumber_tray[2], then set an error flag.
The batches have to be loaded in sequential trays..., if it skips a tray and then occurs again, that can't happen..
I know I can compare the individual batchnumber_tray with each other using an FSC instruction or even EQU, but what is the most efficient way to do a cross search for all the different batch #'s used and flag if any batch numbers are not grouped together?
Thanks for any suggestions.