LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB-8452 data streaming from MEMS sensor

New insights from today:

 

- The read data look like this: 

read_data.PNG

The bytes are always repeated in the following order: empty byte - x - x - y - y - z - z 

 

- I filtered out the empty byte (see lower square in the screenshot below)

continuous.PNG

 

- So i get the following output:

graph.PNG

 

- Problems:

- sometimes the axes are reversed (see screenshot with the diagram)

- when i place the sensor on a shaker i have jumps again in the measured sinus signal of the shaker. I think the problem is that I always stop and restart streaming in the while loop. I have to do this that I can read out the FIFO level. If the streaming is running and I read the FIFO level I get an error message

 

I tried to place the start and stop of the streaming outside the while loop and deleted the block with the FIFO level. I set 4096 bytes (FIFO buffer size) as "bytes to read". Without success...

 

- Michael

0 Kudos
Message 11 of 12
(485 Views)

I don't need the FIFO-level. I can also read a fixed number of bytes from FIFO. If there are fewer values ​​in the FIFO than the number of bytes to be read out, then at the end of the array there is simply garbage (which can be discarded). However, if you look at the peak value of the sine, you can see that the peaks are further apart after a reading process than with the contiguous sine curve. This is most likely due to the fact that the start and stop streaming is in the while loop.

fix_bytes.PNG

Verlauf.png

 

If I put "start stream" and "stop stream" before or after the while loop, then no meaningful data are received .. the first data are correct, but after that there is only wrong data in the array (see picture).

 

forum.PNG

 

Some ideas for this problem?

I think if I find the problem now, I can get a continuous stream!

 

- Michael

0 Kudos
Message 12 of 12
(474 Views)