JDCROCKETT724
Member
I have an application that I have not come across before, and I am looking for what you experts think regarding the best way to go about it.
Issue:
I need to take a scanned barcode number, compare it to a random list of 230 other numbers stored in the plc, and then execute a particular recipe based on this number. The barcode number consists of numerical information only with a length of 9.
My current solution:
Store the data as integer information, and then have 230 lines of comparison functions where, IF "barcode number" = "1st of 230 in data base" (next rung would be 2 of 230 and so on) THEN execute corresponding program.
So, obviously, my solution would be very time consuming, and I'm figuring there has to be a better way. Perhaps a function that compares one 9 digit number from the barcode scanner to the entire data base, and then execute the corresponding program.
Issue:
I need to take a scanned barcode number, compare it to a random list of 230 other numbers stored in the plc, and then execute a particular recipe based on this number. The barcode number consists of numerical information only with a length of 9.
My current solution:
Store the data as integer information, and then have 230 lines of comparison functions where, IF "barcode number" = "1st of 230 in data base" (next rung would be 2 of 230 and so on) THEN execute corresponding program.
So, obviously, my solution would be very time consuming, and I'm figuring there has to be a better way. Perhaps a function that compares one 9 digit number from the barcode scanner to the entire data base, and then execute the corresponding program.