LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

send data from labview to labview by internet?

Solved!
Go to solution

Hi all,

 

I am studying yet and my teacher asked me to do Labview program to view the data generated in other Labview (and computer), the computers don´t have to be in the same Wi-fi, so I thought I have to send the data by internet but I don´t know how, is it possible? What do I need?

 

Best Regards

Alan

0 Kudos
Message 1 of 10
(4,696 Views)
Solution
Accepted by topic author alhebu

An easy method is to set the two PC's to static IP addresses and use TCP functions to send messages back and forth. 

 

An example ships with LabVIEW (Help> Find Examples > Simple TCP.lvproj)

Message 2 of 10
(4,689 Views)

But using this I would just have the comunnication if both computers are in the same wi-fi right? Or how can I configure it to send the data by internet?

0 Kudos
Message 3 of 10
(4,649 Views)

TCP/IP... it has absolutely nothing to do with WiFi.  If they are connected to Ethernet ports within the same building, company, network, etc.... you use the PC's IP address to send the messages to it (a poor analogy would be a phone number...).  By using a STATIC IP address, you ensure that the address doesn't get changed by whatever network you are on.

 

So long as your network settings / firewalls do not block the message, you are fine.

Message 4 of 10
(4,644 Views)

Here's a quick test you can do...

Go to the first computer and get its current IP address (write it down).

Go to the second computer and see if you can 'ping' the first one.

  Execute the command "ping IPaddress"   (if you are on Windows, this is done through the CMD window"

 

if it doesn't time out, you are good to go

Message 5 of 10
(4,641 Views)

When I ping to google there´s no problem but when I ping to other IP adrees that is not in the same local network it times out

alhebu_0-1591914983898.png

At left I have the IP adress I am sending the ping and at the right, there´s my command window, both computers have firewall off... and there´s no conection, help please

alhebu_1-1591915194424.png

This is my own ip adress

 

 

0 Kudos
Message 6 of 10
(4,588 Views)

Hi,

 

This may sound rude, but you lack basic understanding of IP addresses.

 

I recommend instead having two computers connected to the same router or switch, and communicating between them. If that works, it will also work across the Internet, if you have external IP addresses.

 

You can reach that google server because it has an internet address.

 

Whenever you seen an IP address starting with 192.168, you are dealing with a local address. That address only makes sense to the router your computer is connected to, and other computers on that router, and nobody else. You cannot use that IP address on different routers, and send data.

 

Trying to address a computer on another network using a 192.168.*.* address is like going to your post office with a letter addressed only to "Mr. Smith". There are tons of Mr. Smiths.

 

My IP right now is 192.168.56.1. There are only 255*255= 65025 in the 192.168.*.* range. Do you think there are only 65025 computers in the world that are on that range? There are millions, if not billions.

 

You should follow my advice, because like I wrote, it if works then, it will always work.

 

Message 7 of 10
(4,579 Views)

I did it! I did the communication between two computers and show the data in LabView, I know it would be something fool for some of you but I feel great with what I did, the link below is the one helped me too much, it is in spanish :c because I am mexican

https://www.youtube.com/watch?v=1VRh2rfImTo&t=1723s

Just the first 20 minutes is what I needed, I post it here if it is useful for somebody in the future. I won´t close the discussion because I just did the connection using the example code with TCP, now I´ll write my own code and I´m almost sure I´ll need your help 😄

I wouldn´t do it without this community

I´ll keep working 😄

Best regards

Alan

0 Kudos
Message 8 of 10
(4,525 Views)

I finished but, there´s something I want to do... My server program doesn´t work if there´s no a client available. The program takes the data from an arduino and it doesn´t take the data if a client does not connect, I want to take the data all the time and if there´s is a client connected, send him the data. How can I do it? Do i have to divide the program in two parts?

 

 

0 Kudos
Message 9 of 10
(4,503 Views)
Solution
Accepted by topic author alhebu

Yes.  Exactly.

 

One loop to communicate with the Arduino.

Another loop to handle messages coming from clients.

 

If you just need to publish current value data, then you could just use local variables or a functional global variable to pass data between the loops.  There is also a toolkit called Current Value Table which provides an architecture for storing and passing data between different  processes.

Message 10 of 10
(4,498 Views)