LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SCTL & FIFO strange behaviour

Hello everybody,

my code inside the sctl aquires a digital sensor signal and also the current position.

The time between falling edges is measured and written into the fifo.

 

If the code recognize a trigger sequenze from the digital sensor signal,I write the current position,Voltage and also current into the fifo.

 

I read the FIFO elements on a RT system, most of the time the read date is perfect.

But sometimes there are a lot of zeros elements and i dont know where are the zeros come from.

I never write the value zero.

 

So does anybody have an idea where the zeros come from and why?

 

Normal

6701
2393
100000000
5000
24
1556
2512
2512
2153
1675
3111
2273
10289

 

 

With the zeros:

6702
2872
100000000
5000
24
1556
2512
2512
2632
1674
0
0
0
0
0
0
0
0
0
0
3111
1795
9332
0 Kudos
Message 1 of 4
(3,006 Views)

I can't see your entire application, but my first suspicion is your host code reading from the FIFO on RT.  Do you have a timeout wired into the FIFO Read function?  Is it possible that the host side read is emptying the FIFO buffer and returning zeros on the iterations when the FIFO Read times out?

 

To filter these types of zeroes, you should check for warnings and errors coming out of the FIFO Read and discard bad values.

 

-spex

Spex
National Instruments

To the pessimist, the glass is half empty; to the optimist, the glass is half full; to the engineer, the glass is twice as big as it needs to be has a 2x safety factor...
0 Kudos
Message 2 of 4
(2,979 Views)

Hello,

there are no errors or timeout. Because if i delete the "synchronisation part" and just write the signal into the fifo.

I never get that problems with the zeros. Even if the System runs a whole day.

 

So thats why i guess there is something wrong with the fpga code.

 

Maybe there is another methode or idea to synchronize the position with the trigger sequenze of the digital signal.

 

Thanks in forward 🙂

0 Kudos
Message 3 of 4
(2,977 Views)

Hey B.Buerkert,

 

have you already used the NI Example finder to find usefull code to implement in your application? I would try to use the examples for orientation. Good examples for your application would be the "Hardware Trigger Detection.lvlproj" and the "Streaming Data (DMA).lvlproj". Theses examples will show you the proper synthax you should use to realize your plan.

 

 

 

Best Regards.

Daniel

0 Kudos
Message 4 of 4
(2,918 Views)