Reported In

Reported In shows products that are verified to work for the solution described in this article. This solution might also apply to other similar products or applications.

Software

LabVIEW Full

LabVIEW Professional

Issue Details

How do I get TCP VI's to return an IP address instead of a machine name to the remote address output of TCP Listen.vi and/or the TCP Wait on Listener function?

Solution

LabVIEW 8.2 and Later

The TCP Wait on Listener function and the TCP Listen.vi (located on the block diagram in the functions palette at All Functions » Data Communication » Protocols » TCP) both have an input called resolve remote address. When this input is set to true, it causes the function to return the machine name in the remote address output. When the resolve remote address input is set to false, the function will return the IP address.

Earlier Versions of LabVIEWTo have TCP Listen.vi always return an IP address to its remote address output do the following:

Drop TCP Listen.vi on the block diagram of a blank VI.

Double click the TCP Listen.vi icon now on the block diagram to open its front panel.

On the TCP Listen.vi's block diagram wire the boolean control icon corresponding to control created in step 4 above into the TCP Wait on Listener function's resolve remote address input.

Switch back to the front panel of TCP Listen.vi.

Right click on the icon in the upper right corner of the block diagram and select Show Connector.

With the wiring tool, left click on an open (white) input terminal in the connector which has now replaced the icon in the front panel's upper right corner; it will now become colored.

Without clicking anywhere, move the mouse directly over the boolean control you created in step 4 on the front panel.

Now left click (while the mouse is directly over the boolean control as specified in the previous step); you have now associated the terminal you selected in step 8 with the boolean control you created in step 4.

Move to hover your mouse over the connector in the upper right corner of the front panel, right click, and select Show Icon.

Save TCP Listen.vi (select File » Save).

Additional Information

Earlier Versions of LabVIEW​

The TCP Wait on Listener function (located on the block diagram in the functions palette at All Functions » Communication » TCP) has an input called resolve remote address. When this input is set to true, it causes the function to return the machine name in the remote address output. When the resolve remote address input is set to false, the function will return the IP address.

TCP Listen.vi (located on the block diagram in the functions palette at All Functions » Communication » TCP) uses the TCP Wait on Listener function (open the TCP Listen.vi block diagram to see this), however, it uses the default value of true for the resolve remote address input. More specifically, TCP Listen.vi does not include an input terminal for the resolve remote address input by default.