06-28-2011 04:09 AM
Hi,
I need establish TCP/IP connection to my hardware device which has ip(10.102.20.90) and port no as 9012 by setting static ip.
Since i am new to this protocol i am bit worried about how to make communication between my pc to hardware. Here my labwindow code act as clinet and hardware as server. after establishing successful connection i need to read the data coming out from that port.
Please help me in making this communication happens.
i am working on Labwindow 9.0 version.
Solved! Go to Solution.
06-28-2011 07:07 AM
A good starting point would be to look at the TCP/IP client sample application that ships with CVI. You'll find it at <CVI Folder>\samples\tcp\client.cws
Martin.
06-29-2011 02:53 AM
Thanks Martin......But still i have confusion....In that example client and server will take local host address of the machine...but i need to connect to external device ip address.Am not able to establish connection between pc and external device.can u give detailed explaination about that.
06-29-2011 06:38 AM
Hi Martin,
i am getting the connection properly established with the external device now as per that client program... I misunderstood the concepts and it went wrong before....now its ok... Thanks a lot.
05-21-2017 10:20 PM
i have the same problem, using Client TCP example, i cant connect with my external device , using IP fixed as server, could some one send me some example? cvi 85, thanks..
05-22-2017 01:38 AM
A TCP/IP communication is subject to several rules before it can be established. As an example, you are subject to the basic IP rules: can you ping the target device? If you can't then you need to correctly define the network addresses so that you and the target pertain to the same network. Second, your firewall must not block desired port and your application need to be granted access to this channel. Last but not least, some devices integrate security attributes that permit limiting access from remote stations: have you checked this with your device?
Can you post the code you use to try connecting to the remote device?
Finally, instead of reviving a six years old, already solved thread it would be better to open a new discussion.