LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Network Connection refnum

Hello all,

 

i wanna use a TCP Network Connection Refnum control in my VI, to enter the IP address and port number of a device connected through the TCP/IP port in only one of the VIs. How should i define the reference to the refnum? I find no explanations how TCP Network Connection refnums are used.

 

Regards,

Samira

0 Kudos
Message 1 of 6
(3,349 Views)

Hi,

 

Can anyone help me understand how to find to what the refnum in the attached VI points? how can it find the connection ip and port number?

 

Best,

Samira

0 Kudos
Message 2 of 6
(3,338 Views)

I can't look at your code, but generally, you would call a function called TCP Open on one side (which accepts the IP Address and port and returns the connection reference) and TCP Listen on the other side.

 

I suggest you look at the TCP examples in the example finder (Help>>Find Examples) to see how it works.


___________________
Try to take over the world!
0 Kudos
Message 3 of 6
(3,332 Views)

Thank you

0 Kudos
Message 4 of 6
(3,306 Views)

Hi Samira,

 

as far as I know, it is not possible to define the TCP Network Connection Refnum by yourself. The Refnum is necessary for LabVIEW to handle differnet connections at the same time. National Instruments doens't provide any infommation how the Refnum is generated and how the datas are stored in the Refnum.

 

The only way to get a correct TCP Network Connection Refnum with your desired IP and Port is to use the VI TCP Open Connection. This VI will create a correct Refnum with your information. Simply use this function:

 

TCP Open Connection Function - LabVIEW 2012 Help - National Instruments
http://zone.ni.com/reference/en-XX/help/371361J-01/lvcomm/tcp_open_connection/

 

Stephan

0 Kudos
Message 5 of 6
(3,296 Views)

Hi Stephan,

 

thanks for the informative response.

 

Samira

0 Kudos
Message 6 of 6
(3,269 Views)