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.
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.
04-06-2020 07:09 AM
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!
04-06-2020 07:41 AM
@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.
04-06-2020 07:52 AM
@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.