VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer Input (fast) of the cRIO in Labview fpga to Veristand

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(170 Views)
Solution
Accepted by topic author Grusta07

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.

Senior Technical Support Engineer | CLD CTA | NI


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

Message 2 of 6
(159 Views)

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

0 Kudos
Message 3 of 6
(152 Views)

@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.

 

Senior Technical Support Engineer | CLD CTA | NI


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

Message 4 of 6
(143 Views)

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. 

Grusta07_0-1657714088828.png

And here I download my fpga programm and I have acces to the values of the user variables.

Grusta07_1-1657714260184.png

 

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

0 Kudos
Message 5 of 6
(117 Views)

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.

Senior Technical Support Engineer | CLD CTA | NI


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

0 Kudos
Message 6 of 6
(104 Views)