LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

setting up of TCP/IP communcation

recently i am trying to set up a basis TCP/IP communcation in labview to transmit ECG wave in a excel file format. Knowing that there is this example in the help section of labview, i use one of them the receiver and sender to try out. unfortunantly it cant work. the sender run for 5 sec and it stop. i wonder want i need to change in the example given in the help section. hope someone would give me some suggestion. thanks
 
 
 
george
0 Kudos
Message 1 of 16
(5,591 Views)

Hi George,

I'm assuming you're using the Simple Data Server and Simple Data Client to transmit your data. You will need to make sure that the address in the Simple Data Client has the address of the other computer you are communicating with? You will also need to replace the case structure in Simple Data Server with your data that you want to send.

Did you get an error message when you ran the Simple Data Server? Do you have firewalls set up on one or both of your computers?

Regards,

Hillary E
National Instruments
0 Kudos
Message 2 of 16
(5,549 Views)

hi, i tried to sent the data using the example you mentioned and i had an error message: error60 and buffer overflow or network addres was ill-formed. We do have firewall so does it mean we have to disable the firewalls from both computers for the client/server communication to function?

 

here is some doubts that i have in mind:

-what is data structure? do you refer to the vi?

-the ip address to be input into the tcp listen? is that ip belonged to the client or the server?

-how do you create a host?

 

thanks a lot for your reply. look forward to your reply again

 

0 Kudos
Message 3 of 16
(5,531 Views)
Hi,
 
Error 60 states that the resource is currently in use. Make sure that the port you designate isn't already in use by another program.
 
Did you modify the examples (Simple Data Server and Simple Data Client) before you ran them?
 
You either need to disable the firewalls on both computers or exempt the port that you are using to share data in your firewall settings.
 
What I meant by the structure that I referenced before was that you would need to replace the Case Structure in the block diagram of the Simple Data Server.vi with the data you want to send over the port.
 
The IP address in the Simple Data Client.vi should be the IP address for the server machine.
 
Can you clarify what you mean by host?
Regards,

Hillary E
National Instruments
0 Kudos
Message 4 of 16
(5,512 Views)
Hi, if you don't mind please take a look at our client.vi block diagram and front panel as attached. Any suggestions for it to work? Thanks.
Download All
0 Kudos
Message 5 of 16
(5,502 Views)

George,

The address on the Simple Data Client should be the IP address for the server. If you are running the Simple Data Client and Simple Data Server on the same computer then you'll want the address to be localhost. As for the ports, it shouldn't matter as long as the values are identical on the Simple Data Client and Simple Data Server. Some ports are reserved for other uses.

After you make these changes do you get an error message?

Regards,

Hillary E
National Instruments
0 Kudos
Message 6 of 16
(5,475 Views)
We have tried as you have mentioned when using two separate laptops (client and server respectively) but there isn't any error message. Instead, from the client panel, there is no display of the results (which in this case, there is supposed to be a graph display on the client panel). We set everything at default including the port but using the server's IP address. What other suggestions you might have?
0 Kudos
Message 7 of 16
(5,410 Views)
another question.... beside setting the address and port into the server/client vi, do i need to implement other things into the vi? like codes?
0 Kudos
Message 8 of 16
(5,396 Views)

George,

Is your Windows Firewall (or other firewall) off or disabled when you run the programs on the different computers?

When the server registers itself with the OS it opens a specific port for listening. To check whether that port has been successfully opened, use the Windows command “netstat” using the Command Prompt:
a) Click on Start » Run and type cmd.
b) On the Command Prompt use the syntax “netstat /a” to highlight all open ports and connections.

Look for the port you specified in the list of Active Connections. If you don't see it there then the server isn't properly opening the port.

To test if you are able to communicate between the two computer you don't need to configure anything else when using the Simple Data Server and Simple Data Client.

Regards,

Hillary E
National Instruments
0 Kudos
Message 9 of 16
(5,380 Views)
i have use a list of port no... after we run both vi and we check the active connection list in command prompt as you suggest... we still could establish the connection between two computer. the port no didnt even appear in the command prompt then both vi end up being time out so what do you suggest?
 
 
there is two section one is the local address and the other is foreign address so which should i refer to if i am a client?
 
 
do we need to configure the "tool>option> vi server configuration" e.g. changing the port no? how about the web server configuration?
 
 
we have a list of port approved by the school to be use- 8000 to 8005.
 
 
hope to hear from you soon.
 
 
0 Kudos
Message 10 of 16
(5,355 Views)