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: 

Streaming data between RT Target and PC

Hello, everyone!

 

I have a question regarding streaming of data between RT Target and PC. I am working with a cRIO with several modules and have to get and log data from each of these. Also I will implement a controller which needs the data just from one module, but the rest of the modules have to be logging normally. 

 

Initially:

 

I had a program on my RT target which reads and logs data using NI MAX tasks and DAQ assistant. I published them to shared variables and then could display the data on the PC using the shared variables. 

 

 

Now:

 

I understood that using shared variables is a bad idea so I wanted to it with network streams. However, all of the examples I find are directly programming the FPGA and not using the NI MAX tasks. I would like to evade programming the FPGA as I have many modules and the NI MAX makes it easier for me. Is there a way to do it with the NI MAX? As I will be implementing a controller as well, is there a downside to using the NI MAX tasks with data streams if this is possible?

 

Thank you!

 

 

0 Kudos
Message 1 of 3
(1,770 Views)

@mirelche wrote:

so I wanted to it with network streams. However, all of the examples I find are directly programming the FPGA and not using the NI MAX tasks.


The concepts are still the same:  You have a bunch of data and you stream it to the PC.  Just read the data via DAQmx (I highly recommend you get away from the DAQ Assistant and use the actual DAQmx API).  So just take the data you read and just pipe it directly to your Write Network Stream.


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 2 of 3
(1,753 Views)

@mirelche wrote:

I understood that using shared variables is a bad idea so I wanted to it with network streams.


Nothing too bad about shared variables, if you want current values. If you want all values, a stream sounds like a better idea.

 


@mirelche wrote:

However, all of the examples I find are directly programming the FPGA and not using the NI MAX tasks.


Pretty sure there are no examples for network streams on the FPGA, as this is not possible. But feel free to point to or upload the examples.

 

Network streams stream data, and this is done from the RT target to the PC (or vice versa). It doesn't involve the FPGA, although of course the data can come from the FPGA (through a FIFO for instance).

 


@mirelche wrote:

 I would like to evade programming the FPGA as I have many modules and the NI MAX makes it easier for me. Is there a way to do it with the NI MAX? 


Like the FPGA, NI Max has nothing directly to do with the network streams. NI Max returns data, the network streams can send it. But you have to make it yourself.

0 Kudos
Message 3 of 3
(1,747 Views)