LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 63 in executable TCP communication VI

Hi guys,

 

I'm having some trouble with 'simple' TCP communication between two LabVIEW executables.
It works fine if both VIs are on the same machine (localhost or 127.0.0.1, the computer with the development system), but if I compile and then run them I get error 63 ('Network connection was refused...') for the VI that contains 'TCP open connection'.

 

I have read the forums and a number of NI KB articles, but I'm still not sure what properties and options I have to set. There doesn't seem to be a good how to guide.

 

To keep things simple, I have built two example VIs that ship with LabVIEW 8.6 into executables: 'TCP Communicator - Active.vi' and 'TCP Communicator - Passive.vi' (C:\Program Files\National Instruments\LabVIEW 8.6\examples\comm\TCP.llb). Only modification: I have increased the timeout for 'TCP listen' from 10 to 25 seconds, to make the executable easier to use on slower machines.

 

The example programs should work like an instant messaging system:

 

- Start the 'passive' VI, this VI starts a TCP listener service on the specified port and network address.
- Start the 'active' VI next, this VI tries to connect to the 'passive' VI over TCP.
- When the connection is established, you can send and receive text messages

 

That's how it should work and, as long as both VIs run in the development system, it does.
In executable form however, it does not.

 

I have a suspicion I need to add a number of entries to the ini file to allow access from everyone, not just 127.0.0.1
Other troubleshooting suggestions I have read:

 

- setting the 'Svr.TCPAccess' property at run-time
- modifying 'Tools > Options > VI Server: Configuration'

 

Can anybody give me some pointers on where to start debugging? For your convenience I have attached the executables and their ini files.
Thanks in advance for your help.

 

Paul

0 Kudos
Message 1 of 4
(3,031 Views)

When ive had this error in the past it was because i was using the the wrong port number so the destination pc was refusing it

 

hope it helps

Please remember to accept any solutions and give kudos, Thanks


LV 8.6.1, LV2010,LV2011SP1, FPGA, Win7
0 Kudos
Message 2 of 4
(3,022 Views)

Hi Akiel,

 

Thank you for your reply. I did some more experimenting, here's what I did:

 

  • I started the 'active' VI and immediately got error 63, whether or not the 'passive' VI was running (on the local machine).
    I pressed 'continue' in the error dialog and execution of the program stopped.
  • I copied the 'passive' VI to another computer, turned of the Windows (7) Firewall and then ran it.
  • I then changed the machine field of the 'active' program from 'localhost' to 192.168.1.17 (the address of the remote computer).
  • I restarted the 'passive' program (because of error 56, time out)
  • I restarted the 'active' program
  • This time both programs behave as expected.
  • Repeated the above experiment with the firewall turned back on, with both programs on the same machine.
  • This time it does work without modifications

Looks like Windows Firewall is probably to blame here, it's behaviour is unpredictable when it comes to whether or not it blocks connections.

Now for the big challenge: getting the Windows 2008 R2 firewall to cooperate with LabVIEW. 

I'll update this post when I have more information.

 

Paul

0 Kudos
Message 3 of 4
(3,007 Views)

Quick update: I managed to get it to work between a Windows 7 and Windows Server 2008 R2 machine. 

You have to carefully set the firewall's inbound rules and time it right, but it works.

Apparently it's not necessary to change 'VI Server: Configuration' in the LabVIEW options.

0 Kudos
Message 4 of 4
(3,000 Views)