Lab 10 - Communications



To explore serial communications with a PLC.



Serial communications can be done using an RS-232 interface, a very common interface. On the CompactLogix CPU there is one RS-232 interface that we can use for serial communication.



Pre-Lab: (due at the start of lab period)

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.

4. Develop all wiring and pneumatic diagrams.



CompactLogix controller

RS-232 Communication cable

Custom cable for BL-600 sensor

Keyence BL-600 series barcode scanner (e.g. BL-651)



1. Make a cable to connect the barcode scanner to a 5V source, and a computer. Note: See the manual.)

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.

3. In RSLogix5000 Set the communication port parameters to match the sensor, and set the port control to ‘USER’. This will allow the PLC to access the serial port.

4. Enter/download your program and verify the operation.




1. Pre-lab and updated design work.

2. Detailed settings for all of the components including the barcode reader so that a technician could reprogram the system.



[an error occurred while processing this directive]