11-17-2006 10:06 AM
Hi all,
I have a barcode scanner that we purchased from SICK, model CLP100-0010. I'm having difficulties communicating with it using the serial port. I know it can work because of the terminal emulator that is supplied but I need to control it using LabVIEW.
The documentation is not very helpful but It did supply the following info:
"Host Commands
Number of Codes: UA0: Free, UA1-10: 1-10 Codes in one reading gate
Multiple Reads: X1-10: Multiple read is possible from 1-10
Min. Time between Labels: UD0: No Read, UD 01-99: Time Interval 10 - 990 ms"
When I use the emulator the commands send are not displayed, but are echoed back to the screen as <Esc>A0<CR> for example.
It is suggested the <Esc> and <CR> are only used when it sends data back to the PC. I have tried all of the following using LabVIEW 8.0 & VISA - with no success:
Initialise port to the correct settings (baud etc, termination character is correct) and then sending the following using a string control to enter the data connected ti VISA write:
A0 (HEX)
A0 (ASCII)
UA0 (ASCII)
1BA0 0D (hex)
1BA0 (hex)
A0 0D (hex)
No VISA errors and no data back from the scanner. I'm not sure what else to do, any ideas? Has anyone else been unfortunate enough to use one of the scanners?
TIA
11-18-2006 03:41 AM
11-18-2006 11:19 AM
never used one of their barcode scanners but I did interface wit their laser scanners. I remeber because they used a non-standard baud rate! We used a board with a non-standard crystal.
So double check the baud rate req's.
Trying to help,
Ben
11-21-2006 05:49 AM
Hi - Thanks for the suggestions,
The baud rate is specified as being standard speeds, I have chosen 9600.
I think I have the termination character to notify the end of VISA read set OK. But I'm think the issue maybe with the start and/or stop bits or similar. I have attached an image of the emulator program window that is supplied with the SICK scanner. It shows an echoed command of <Esc>A0<CR> so I assumed I need to send 1BA00D in hex where 1B is the code for Esc and 0D is the code for CR. In the very limited documentation for the terminal window it suggests that the start and stop bits are automatically added to the command. Could they mean that the Esc and CR are the start and stop bits? This is the exact text from the terminal help system:
"The Terminal Emulator is giving you direct access to the scanner. The corresponding dialogue is split into three parts.
Commands may be typed in using the command line at the top of the terminal. The commands are sent after pressing the return key. Start and Stop characters are automatically put in front and back of the command string. A local echo is given in the result output with a terminal symbol in front indicating the source of the echo.
Scanner responses are diplayed with a scanner symbol in front."
I seem to have limited control of the start and stop bits using VISA, could this be why I can't get the scanner to work? The documentation does not specify the start and stop bits anywhere else in the manual.
Any ideas are welcome.
TIA
-Martin