07-13-2022 03:58 AM
Hello,
I have a cRIO and a module NI 9205. I want to analyse data from a sensor by measuring the tension. The tension changes very fast, I want have a point each 10 us. I want to put this different values in a array in labview fpga and after export in Veristand or somewhere else (to plot in matlab or excel). The array refreshes it each x ms. Like this each x ms, I want to take the data. I try to create an user variable "aray" but it is unavailable.
Thank you.
Léo
Solved! Go to Solution.
07-13-2022 04:47 AM
To log data faster than the Primary Control Loop, you would need to configure the data as a waveform channel. See Single-point vs. Waveform Acquisition in NI VeriStand. Please note that you cannot map waveform channels unless Waveform-Processing-Custom-Device is used.
If you are using cRIO-904x/905x which supports DAQmx, you can control the module using Real-Time DAQmx mode (Adding Waveform Task Channels.)
If you want to use FPGA mode, use FPGA Addon Custom Device. Please refer to DMA Channels Interleaved Example to learn the use of waveforms with the FPGA Addon.
DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
07-13-2022 05:07 AM
Hello,
I use Custom devices, Scan engine and etherCAT.
I did my programm in Labview FPGA and import to veristand. And at this point I just put the value of the input of my input on a grpahic but it dosen't work (too fast). So I think the best option is to put in an array?
Thank you
Leo
07-13-2022 05:44 AM
@Grusta07 已写:
Hello,
I use Custom devices, Scan engine and etherCAT.
I did my programm in Labview FPGA and import to veristand. And at this point I just put the value of the input of my input on a grpahic but it dosen't work (too fast). So I think the best option is to put in an array?
Thank you
Leo
It is possible but you would need to create another Custom Device to retrieve the data from the array then write into a log file.
I would recommend you to consider FPGA addon instead. The FPGA Addon allows you to load the .lvbitx file directly without using the VeriStand FPGA framework. You just need to add a DMA channel to your VI. FPGA Addon will populate the DMA channel in the complied bitx file as waveform channels. Then you can use Waveform Data Logger Custom Device to log the data.
DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense
07-13-2022 07:10 AM
Hello,
I thing I don't understand something. I will explain you what I did.
I create an hybride programm. I created user defined variables to have the values in Veristand. However veristand is too slow to read each.
And here I download my fpga programm and I have acces to the values of the user variables.
So you tell me, if I add FPGA addon and DMA I can read all the values? (each 10 us). I don't understand the FPGA addon and DMA, and how to do it.
Thanks to your time.
Leo
07-13-2022 09:09 PM
Please see Table 1 and 2 of Understanding Communication Options Between the Windows HMI, RT Processor, and FPGA.
User Defined Variable is a tag and does not have a buffer to stream high speed data.
If you want a lossless data communication, you should use a stream, for example DMA FIFO with FPGA Addon.
DISCLAIMER: The attached Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense