LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use shared variables with FPGA device on Host PC

Hi all I am having a frustrating problem. I am trying to use shared variables linked to a cRIO 9012. The shared variables were created and then written to in a RT vi. is there any way I can assign locations to these not within a RT vi. I altimately need to run the Host vi on a TPC-2512 touch panel computer and I can't run a RT application on that. I just need the variables to update without the RT vi running and I can't figure out how to do that, if its even possible. Here is what I have so far. Thank you in advance for your help.

0 Kudos
Message 1 of 4
(2,444 Views)

Dude - you have blown my mind with the sheer size of your diagrams.

I am not sure what you mean by the NSV updating even if the RT app is not running.

The RT app is hosting the NSV's but any other RT or windows app can R/W to them.

Here are my suggestions:

1. Make everything fit on one screen

2. You do not need to have all those individual arrays.  Use an array of waveforms instead and just index and replace when necessary.

3. Could you use the scan engine which support scaling and would not need any custom FPGA

4. Just drag any RT hosted NSV's from your project to your TP app and it should work out-of-the-box just fine.

5. LV will automatically build a .alias file for your rt and TP app's that will resolve the NSV URLs to IP addresses.

 

Message 2 of 4
(2,428 Views)

I started a new project and used a trick to use my chassis in scan mode. I am passing variables directly from the controller to the TP but I am not getting a sufficient samples a second. On my regular PC I can get over 200 samples a second but I only get 30 from the touch panel. I know it is because my program is so large and I have been working on speeding it up but there are alot of variables to pass. How can I get rid of all those arrays and use maybe 2 2D arrays and just insert data into them? would that cause any kind of speed boost?

0 Kudos
Message 3 of 4
(2,381 Views)

Adam:

 

You may be able to use arrays to speed up your program, but bear in mind that the TPC is pretty much guaranteed to be slower than your computer (as it's likely to have lower system specs).

 

You'll want to use the array manipulation functions to combine and retrieve your data (most useful will likely be "Build Array" and "Index Array," see context/LabVIEW help for more details). Once you have the data in an array, you can likely pass it through a shared variable configured for an array datatype.

 

I'm not sure if/how much of a speed boost it will give you, but I think it's definitely worth trying. If you're not sure about the speed, try simply cutting your variable count in half and see what kind of speed increase you get with the same amount of code but fewer variable values being transmitted through your network connection.

 

Good luck!

Caleb Harris

National Instruments | Mechanical Engineer | http://www.ni.com/support
Message 4 of 4
(2,353 Views)