If have downloaded the serial driver and tested on both my PC and in the “real” world connected to a number of scanners with a serial connection via a gateway. I am using the event based mode and everything is working, but in some telegrams I get a CRLF in the middle of the string and since my event char is 10 this cause problem.
I have used a sniffer to collect the data I am receive from the scanners but they are correct. So somehow the CRLF is generated in the driver. What can cause this failure?
The system is a Windows 7 system.
Claus M. Jensen
Posted on: Jan 31 2017 at 07:57:08 PM
When you get an unexpected event (in the middle of the string) and read the data from the serial port do you actually get CRLF chars in the data?
I have no idea what could cause that. The gateway you mentioned. What is that? Is it possible that the gateway is breaking the string and adding the spurious CRLF?
Posted on: Feb 1 2017 at 09:15:01 AM
Yes, the CRLF appear in the middle of the data at no specific place. My first guess was that the problem was related to a buffer that was too small, but that does not seem to be the case.
The Gateway is a SICK barcode scanner which collects data from 5 other scanners via a CANBUS. All data then pass thru the SICK Master scanner. The connection from the Master scanner to the PC is a 3 wire connection send, receive and ground.
I have used a sniffer to collect the data from the scanner to be able to compare the data collect from the program and the data coming to the PC and found that the CRLF do not appear in the sniffer data.
Posted on: Feb 1 2017 at 03:30:21 PM
When you get the unexpected event are you able to look back in the sniffer buffer at that exact packet of data and confirm that the CRLF is not there?
I really have no idea where the CRLF is coming from. What RS232 port are you using? Is it possible that something in the RS232 port/driver is adding the CRLF? I mean some option in the RS232 device that reads 'lines' automatically inserting CRLF after a specific timeout?
As you can see I'm clutching at straws here because I really have never heard of anything like this before.
Reply - add a comment to this topic.
You may enter letters, numbers and standard punctuation only. HTML and other scripts/tags will be rejected.