07-06-2012 05:18 AM
I have a LabWindows 2010 application using RS232 reception with ComRd function. It works well on a windows XP with a RS233 port.
I have a usb-rs232 converter, it also works.
Now, I have to use a new PC with windows 7 and no RS232 port, so I have to use the usb-rs232 converter. The application does not work, I have a timeout with the ComRd function. In fact, I have to receive 3328 bytes but the application receives approximatively 3300 bytes before timeout. What is the problem ?
07-06-2012 06:29 AM
I cannot think of a specific issue related to the OS. Have you installed a win7 specific driver for your USB-to-232 converter or are you using the xp version?
07-07-2012 04:41 AM
I think the drvier is correct for windows 7. Indeed, I have downloaded an usb spy tool to see the traffic on usb and I see all the bytes so for me it is a problem with ComRd of labwindows...
I have no idea of what to do ;-(
07-07-2012 03:38 PM
How are you opening the port? If you are using OpenComConfig, are you setting outputQueueSize parameter to -1? It may improve the transmission efficiency: see the help for the function.
07-09-2012 01:54 AM
Indeed, I use the OpenComConfig with 2048 for queue size. I use -1 but it does not work...
07-09-2012 02:06 AM
sfla ha scritto:
I use -1 but it does not work...
What does it mean? Do you receive any error in the function call? You have no error but you are still getting the timeout error?
Which speed are you opening the port at? And which timeout time have you set?
07-09-2012 02:36 AM
The ComRd is set to 0 => timeout according documentation. 9600 bauds, timeout set to 3s
07-09-2012 03:02 AM
sfla ha scritto:
The ComRd is set to 0 => timeout according documentation
I don't understand this sentence: can you post the full opening/timeout/read instructions?
In any case, 1 start bit + 8 data bit + 1 stop bit: 10 bits/char
3328 characters @ 9600 bps means approx. 3.4 seconds, which means the timeout value is too short for the transmission!
07-09-2012 07:27 AM
Slfa,
Have you fully validated the USB convertor on the W7 computer by the use of a terminal program. HyperTerminal can be copied to the machine and connected to another PC via a NULL modem, you can then confirm all is OK, independently of CVI. I would also check your hardware handshaking settings.
Kevin
07-10-2012 07:53 AM
Ok, it seems to work now. I have changed the driver of the rs232-usb converter...
Thanks a lot for your support.