05-16-2019 05:17 AM
I have an accelerometer coupled to a compact RIO controller cRIO-9041 via the NI 9234 module. As this module is a DSA module, one needs to start and stop the acquisition to make sure that it is scanning. I have currently set the data scan rate, set the acquisition to start and use a FIFO buffer transfer it to the RT host to plot it on a
waveform chart and simultaneously log it to TDMS file.
Having followed an older example (compatible with LV 2012) here:
Any insight on where I am going wrong is highly appreciated.
I have managed to get the module to acquire readings at a deterministic rate. While the FIFO buffer isn't overflowing, the recorded values are not right (i.e, a flat line even when I am shaking it).
The FPGA.vi:
The RT.vi on the x86 host:
As for the FIFO buffer used, the data type is set to Fixed point with signed 26 bit word length and 5 bit integer length.
My reasoning behind the choice of FIFO Read parameters is:
1. There are three inputs scanned @ 1.652 kHz simultaneously, i.e., there are roughly 5000 samples (~4956) captured every second. In other words, around 500 samples every 100 milliseconds. Rounding to the nearest multiple of 3, I have chosen to read 501 samples.
2. The timeout is the standard recommendation from the documentation page.
05-16-2019 08:42 AM
Hi,
I cant comment directly on the code as I am not on my development machine at the moment. I can make some comments on your code pictures though:
The code is really simple and should work, so the only real cause I can think of is the coercion of the FXPs. An overflow can cause flat values, but you say this doesn't ever turn on, so its not that.
Max
05-17-2019 12:43 AM
I see the "stop scanning" not being executed. I have edited the VI to stop scanning the module, change the data rate if required and then start scanning. The only reason I need to stop scanning is to sample at a known rate rather than some random rate previously used. That part is fine now, thanks for that.
As for the fixed point coersion, I have the removed the FXP conversion blocks so it is only converting it after the display:
Note: I changed the module slot to check if it's not some issue with the slot, so please ignore the change in the module number from the original question.
So with this change the display should show double values. And it still shows near zeros:
I later checked if there is something wrong my accelerometer sensor by using a cDAQ 9171 lying around and it works just fine on that:
The settings I used for the DAQ assistant for the measurements taken on the cDAQ 9171:
05-17-2019 01:18 AM
05-17-2019 02:43 AM
Yes. It was by default present in the DAQ assistant. So just to see if thats where I am going wrong, I added a scalar gain and saw that while the values are oscillating they are not correlating to the way I am shaking it. So I guess thats not it.
05-17-2019 03:52 AM
05-17-2019 04:03 AM
I added a property node for the module and it's individual channels and set all their values to match the DAQ assistant.
As for the excitation current, the module offers only one amplitude of 2A. Couldnt change it on the DAQ assistant and there is no property for the module to change it too. These are the only configurable properties of the module except Serial Number and ID.
The acclerometer is a Kistler 8763B050BB if that helps. It has a range of +/- 50g with o/p nominal voltage +/- 5V (so sensitivity is around 100mV/g). I will be applying a scaling factor later so I am not concerned with the actual amplitude as much as I am with the trend (time series variation). Thank you very much for following me with questions on this one..
05-17-2019 04:05 AM
I added a property node for the module and it's individual channels and set all their values to match the DAQ assistant.
As for the excitation current, the module offers only one amplitude of 2A. Couldnt change it on the DAQ assistant and there is no property for the module to change it too. These are the only properties of the module except Serial Number and ID.
The acclerometer is a Kistler 8763B050BB if that helps. It has a range of +/- 50g with o/p nominal voltage +/- 5V (so sensitivity is around 100mV/g). I will be applying a scaling factor later so I am not concerned with the actual amplitude as much as I am with the trend (time series variation). Thank you very much for following me with questions on this one..