Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Double AI Channel Data Aquisition with NI-5782

Hello everyone,

I'm currently working on my master project and I will need a lot of help with the LabVIEW code, since I'm pretty new to LabVIEW and especially LabVIEW FPGA. So my goal is to record some MHz signal and process it, like filtering, taking average over it etc. From that I would calculate some parameters, from which I can reconstruct some quantum signals. I'm using the NI-5782 adapter module on the Target FPGA 7972R FlexRIO.

 

One of my first tasks is to record both of the analog inputs and save the data into some files. I saw that there was some code already for aquiring data from the adapter module (Getting Started code) and modified it for my own purposes. When running the program, the data aquired in the AI 0 channel is shown in the second graph and vice versa. Does anyone know why it is so? And if I would choose two different record sizes for the 2 channels, one of the graphs would obtain a step like attribution. Why is that so?

 

My second question is about saving the obtained data. How do I implement "Write Meas File" correctly?

0 Kudos
Message 1 of 2
(2,263 Views)

I'm currently working on my master project and I will need a lot of help with the LabVIEW code, since I'm pretty new to LabVIEW and especially LabVIEW FPGA.


University students get free access to online training and access to application engineers. I recommend you register an account and do the training course for labview fpga. 

Online Training: http://www.ni.com/training/online/

Open a service request: https://sine.ni.com/srm/app/getassistance

Since you're using a flexrio device you'll also want to take a look at the LabVIEW High-Performance FPGA Developer's Guide.

LabVIEW High-Performance FPGA Developer's Guide: https://www.ni.com/en/support/documentation/supplemental/13/the-ni-labview-high-performance-fpga-dev...

 

 


One of my first tasks is to record both of the analog inputs and save the data into some files. I saw that there was some code already for aquiring data from the adapter module (Getting Started code) and modified it for my own purposes. When running the program, the data aquired in the AI 0 channel is shown in the second graph and vice versa. Does anyone know why it is so? And if I would choose two different record sizes for the 2 channels, one of the graphs would obtain a step like attribution. Why is that so?

 

You've created two loops that are both trying to access the same shared resource. This won't work. In a single loop you need to serially access the data you want by first acquiring from channel 0 and logging the data, then acquire from the second channel and log that data. If you need to acquire data from both channels at the same time then you will need to modify the top level fpga vi that the 5782 ships with. 

 


 My second question is about saving the obtained data. How do I implement "Write Meas File" correctly?


This depends on a lot of things. How much data are you logging? If you are logging a couple megabytes then you can log to a human readable format. If you are logging hundreds of megabytes a second then you will want to log to a binary format like tdms. In either case there are several examples that demonstrate how to write to a measurement file. You may get better traction on this question by starting a new thread in the labview forum and telling folks what examples you've already looked at and what unexpected behavior do you get when you try to implement them in your application. 

0 Kudos
Message 2 of 2
(2,189 Views)