You need to purchase a bar code scanner that has an RS232 or RS485 type of serial output and link to the PLC's COMM1 or COMM3. ?Any model that can communicate at 9600 to 38400 bps will be ideal.
Barcode scanner typically outputs CR-terminated ASCII string. So you can read the data quite easily using the INPUT$(1) or INPUT$(3) command. The input$(n) command always returns an empty string unless it has received a complete ASCII string with CR termination. So you can set up a periodic test of the COMM port such as:
A$ = INPUT$(1)
IF LEN(A$)=0 RETURN: ENDIF ' nothing received.
....... ' else do something with the received data.
......
If you use the PLC's COMM1 to connect to the barcode scanner, you may like to consider purchasing an Auto485 adapter ($49) so that you still can perform programming and on-line monitoring via COMM3 without having to constantly swapping the serial cable during the test phase.