Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5566

NI USB-8452: Read FIFO Accelerometer

$
0
0

Hi everyone,

 

I have written a small program with which I can read an accelerometer via the FIFO with the help of the NI USB-8452 SPI interface.

That works pretty well so far and I can read out the X, Y and Z axes.

Now I wanted to know wheather I am really reading out all data (continuously) or whether I am losing data. So I put the accelerometer on a shaker (e.g. 60Hz) and lo and behold, I have jumps in the measures signal (sine).

 

I think it is because I close the reference every time in the while loop and create it again. In the "SLAVE CONFIG" subVI, a new script reference is generated at the beginning and the reference is closed in the main view of the block diagram (when determining the number of data in the FIFO and when reading out the FIFO).

 

I have already tried to remove the "SLAVE CONFIG" SubVIs and the "Close Reference" block after the while loop, but without success.

 

Attached are screenshots of the main block diagram and of the "SPI_Slave_Config" subVI.

 

Thanks in advance! I hope you can help me!

 


Viewing all articles
Browse latest Browse all 5566

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>