LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How does Labwindows 3.1 and 5.5 differ in TCP communications?

Hi, I have an application running in Ver. 3.1 CVI that can write to TCP Handle wether or not it actually exists. However, when I run that same code in 5.5 it gives error -12 "No connection Established". As well, if I turn off error checking, it will run but will eventually lock up when I try to connect again. Is there a way to do this as in 3.1?
0 Kudos
Message 1 of 2
(2,834 Views)
Due to the nature of the shift from DOS to Windows and other CVI changes over the years, there has been a change in the way TCP is handled between 3.1 and 5.5. CVI 5.5 will return errors when the ConnectToTCPServer cannot find a valid connection. While you can dissable the error warnings for this function, the Write functions later will still be attempting to 'wait' for the port to return, which could explauin your eventual hang and unknown state on the port. Because the TCP standards in Windows and CVI have changed since the time of 3.1 at this point it would likely be easier to modify the code to be compatible with 5.5 than to try and re-create behavior seen in 3.1. I reccommend looking at the TCP examples that ship with 5.5 as a way of getting started.

Regards,


Elaine R.
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 2
(2,834 Views)