Host Engineering Forum
General Category => General Discussion => Topic started by: Tired_Old_Man on November 19, 2014, 04:58:09 PM
-
Good afternoon, I am working with a D06 PLC with a barcode scanner on port 2. I am populating a table starting at V10000 and ending at V15000 with a 14 digit barcode (14 bytes due to ascii). I am trying to search the table for duplicate barcodes and would like to place the code in a subroutine as the rest of the process does not proceed until this step is complete. My hope was to test this in an individual program and then move it to a subroutine. I can manually toggle the compare function through the table with a pointer using the "change value" option but am not able to automate it to sequence through on it's own. I am afraid I am just not thinking straight. Will someone who is please take a look at this code and help me from myself? Thanks for any consideration.
-
In case anyone else runs into this I ended up using a for next loop and used a constant of 256 with a RSTWT in case it went over the scan time. There may be a better way but this works. Thanks to all!