LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

time out RS232 with windows 7

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 ?

0 Kudos
Message 1 of 10
(5,759 Views)

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?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 10
(5,754 Views)

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 ;-(

0 Kudos
Message 3 of 10
(5,746 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 10
(5,738 Views)

Indeed, I use the OpenComConfig with 2048 for queue size. I use -1 but it does not work...

0 Kudos
Message 5 of 10
(5,729 Views)

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?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 6 of 10
(5,727 Views)

The ComRd is set to 0 => timeout according documentation. 9600 bauds, timeout set to 3s

0 Kudos
Message 7 of 10
(5,721 Views)

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!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 8 of 10
(5,717 Views)

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

0 Kudos
Message 9 of 10
(5,709 Views)

Ok, it seems to work now. I have changed the driver of the rs232-usb converter...

 

Thanks a lot for your support.

0 Kudos
Message 10 of 10
(5,696 Views)