LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FPGA - cRIO data acquisition

Hello all,

 

This is my first post in NI discussion forum. I have followed a lot of discussions for my learning purpose, but as I could not find any solution going through the forum, i'm posting my problem here. Please help me with this.  

 

I am using a cRIO-9035 with NI-9205 module to get machining force measurement data. I am using cRIO for the first time, so I followed the tutorial "Getting started with compact RIO - logging data to disk" at <http://www.ni.com/tutorial/11198/en/> for getting the signal. I want to get about 150-200 sample data per second. 

 

I have followed the tutorial by book. But I am not getting any data at all, all the time I am getting this error message. Please check the picture for the error(It's in German because I am in a German University, Sorry!)

 

Can anyone please tell me what am I doing wrong? 

 

Also I was thinking of getting a time related(with the computer time) data, so that i can know later at which time I did my experiment and correspond my other data to the force data. Is there any way to do this? I don't know how to put it in the graph and/or TDMS file at the same time as the data acquisition.

 

Thank you in advance

JP

 

 

 

 

 

 

 

 

Download All
0 Kudos
Message 1 of 7
(5,132 Views)

The problem is probably that you do not have a while loop around your FPGA code. You can put a while loop with a false constant wired to the stop condition and it will continuously acquire data at the rate you specified.

 

Because you are only looking to read data at ~200Hz, is there a reason that you are not just using the scan engine? You could set this up pretty easily as a producer consumer with the prouducer reading data at a specified rate and sending it to your consumer loop which logs to TDMS. If this is one of your first cRIO applications, I would also recommend reading the cRIO developer's guide. The guide has a ton of good information and best practices.

 

https://www.ni.com/compactriodevguide/

Matt J | National Instruments | CLA
Message 2 of 7
(5,098 Views)

Hello Mr. Matt J,

 

Thanks for showing it, I did a very stupid mistake. And I did not use scan engine because my supervisor said not to change the FPGA mode, maybe because this equipment is shared by other people in the department. Would it be a problem to use the FPGA mode for low rate data acquisition?

 

Also I am not getting the required data, I am giving signals to my analogue channels with a constant voltage (like 0 or 5 V), but it is showing a huge variation in all three channels. It is also seen that all three channels change at the same rate, when i put 0V/5V constant in only one channel, all three follow the same variation (please see the attached picture, i am putting a 0V signal there).

 

Do you know any solution? i have put a low-pass filter after the data acquisition(picture), but i don't think that is helping.

 

Regards

JP

Download All
0 Kudos
Message 3 of 7
(5,059 Views)

There's nothing wrong with using the FPGA for slower acquisition, it's usually just easier to use scan engine and I try to save time when possible.

 

The first thing that I want to make sure that you are aware of is that we can't spec what the voltage read will be if nothing is connected to the channel. I don't know how you have anything wired but it's something that people get hung up on if they don't know (in the end you shouldn't care about an unconnected channel anyway).

 

On your FPGA application you are reading three channels at once and feeding them in one at a time to your FIFO, which is exactly what you are supposed to be doing. What you should be doing on the RT side is taking the elements you read from your FIFO and feeding them into a Decimate 1D Array. I think you are trying to do this but that the reshape array function isn't doing what you think it's doing. In the snippet below, I show how you are displaying the data and what I think you want to be doing. Additionally, I would make sure to break up the FIFO into the three original channels before doing anything with the data.

 

Reshape.png

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 7
(5,034 Views)

Thank you Mr. Matt J.

 

I shall try this out and post here what happened. I will also try to put separate voltages on each channel to see if they are working correctly as you said that unassigned channels maynot behave in a predictable way. (Maybe day after tomorrow since I'm having an excursion!!):

 

What I wanted is to gather voltage reading from the transducer and put them in one file for later analysis, it would be a 3 column file with x,y,z axis voltage data for according force values. That is why I displayed and recorded the data together.

 

Is there any benefit of breaking up the FIFO read data? I was thinking maybe the channels are influencing each other (because the other two unassigned channels kind of follow the assigned channel), is that why you are telling me to seperate them?

 

 

Regards

JP

0 Kudos
Message 5 of 7
(5,018 Views)

Hello Mr. Matt J.,

 

I tried to do the decimate 1d array and seperate them like you suggested, also I put three seperate voltages to check if they are working now. 

 

The problem is I still have lot of ups and downs in my acquired data while i am putting one constant value. Also the channels seems like interconnected, they are not giving correct values and when I change one voltage value, the others change as well while i am doing nothing to the other channels. Please check the picture. First values were 0, 2.7. 7.6, i changed the 7.6 V value to 0.8, and all three changed. Also all the values are wrong.

 

You said something about breaking up the FIFO into three different channels. Did I do the right thing in my code? 

 

Regards

JP

Download All
0 Kudos
Message 6 of 7
(4,981 Views)

Hello anyone, a liitle bit of help here please....

 

I'm still getting wrong signals, and still all three channels change their properties simultaneously.

 

Any suggestions what's going wrong.

 

Regards

JP 

 

 

0 Kudos
Message 7 of 7
(4,940 Views)