1. Visit the Keyence website and look at the product documentation for the BL-600 series of barcode scanners. One of these will be connected to the serial port on the front of the CompactLogix processor. Note that these require a special cable with wire to provide 5V to power the sensor. Also, the sensor will need to be configured using software also available from the website.
2. You will need to write a ladder logic program to write the string ‘LON’, including carriage return and line feed, to start the barcode scanner. (Note: do not look directly into the laser - it is a bad idea and you may experience some sort of blindness.) Your program should also read the barcode string returned. The reader should be triggered by a normal input, such as a proximity sensor.
3. The program should compare the barcode to at least two values and detect a pass fail condition. The barcode and the test condition should be displayed on the HMI. If the test fails one pneumatic cylinder should be fired, if not a second will be fired.
2. Connect the barcode scanner to a PC and run the configuration software to setup the scanner. This may require some trial and error effort. Test the sensor using the ‘Monitor’ to verify that you can read bar codes.