From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer data from one VI to another?

Solved!
Go to solution

I am doing a project on obstacle avoidance using a LIDAR sensor and DaNI1.0. I have to separate my VI into two portions as the sbRIO keeps crashing when I deploy my VI. I want to run the LIDAR data acquisition and obstacle avoidance part of my project on the laptop and send the resulting steering frame to the motion control VI on the sbRIO. I am not sure how to achieve this. Can anyone help with this?

0 Kudos
Message 1 of 8
(4,508 Views)

I think global variables might be of use in your case. 

0 Kudos
Message 2 of 8
(4,492 Views)

You mean to say that you have to send the data from the Host to the FPGA target?. You may have to use shared variables to transfer through the TCP/IP connection.

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 8
(4,488 Views)

Network Streams is a good option as well, on 2010 and later.

Richard






0 Kudos
Message 4 of 8
(4,471 Views)
Solution
Accepted by PB_robotics

I am sending the data from the host to the Real-Time processor as my LIDAR sensor does not ineract directly with the FPGA. I wish to use the TCP/IP connection but I have never done it before and I am finding it difficult to follow the TCP VIs and functions in LabVIEW. Are there any examples I can review to help me? I am using LabVIEW 2010.

0 Kudos
Message 5 of 8
(4,464 Views)

Have you tried the Example Finder in LabVIEW (Help->Find Examples...)?  If you do a search for TCP, there are several examples.  The ones that got me going were the Data Client.vi and Data Server.vi.  They work together.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 8
(4,457 Views)

I have looked at the examples and I have developed a TCP/IP communication between the my two VIs but I am getting an error (ERR(1)) from the Resolve Machine Alias VI. Anyone knows what this means and how to solve it?

 

0 Kudos
Message 7 of 8
(4,419 Views)

@PB_robotics wrote:

I have looked at the examples and I have developed a TCP/IP communication between the my two VIs but I am getting an error (ERR(1)) from the Resolve Machine Alias VI. Anyone knows what this means and how to solve it?

 


That VI simply resolves information in the aliases file in your project. Wire the name of the target into Machine Alias and you'll get an IP.

For example, if your alias file looks like:

 

[My Computer] My Computer = "10.0.0.77"

[RT Target] RT Target = "162.136.1.99"

 

Then wiring "RT Target" into Machine Alias will give you 162.136.1.99. Is that not working?

 

OT: To get help, don't mark a response as the Solution until you've got all you need. Especially don't mark your own response, which besides being tacky 9 times out of 10, defeats the purpose the thread. When people are surfing the site looking for ways to help, if there's a Solution marked, they think "that user got what he wanted, I can't help there".

 

Richard






Message 8 of 8
(4,411 Views)