LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-Time FIFO instead of "Chart History Length"

Solved!
Go to solution

I was wondering how I can implement the following method with Real-Time FIFO instead of "Chart History Length"

 

 

chart history.png

0 Kudos
Message 1 of 11
(3,745 Views)

Here's NI whitepaper about RT FIFO. I would suggest u to read more specifically in first and third section (Using RT FIFO):  http://www.ni.com/white-paper/3934/en/

Message 2 of 11
(3,730 Views)

Is there any way to read all the data inside a RT FIFO regardless of the size of the FIFO or the amount of data available in the FIFO?

I mean in every iteration of a loop, I want to read all the data in the RT FIFO and make the RT FIFO empty. 

0 Kudos
Message 3 of 11
(3,723 Views)
Solution
Accepted by topic author Cashany

Yup. It uses two FIFO read nodes. The first one reads 0 elements, and the output for Element Remaining is wired to the second node's Number of Elements input. Voila, you check what's in the FIFO and pull everything out of it.

---
CLA
Message 4 of 11
(3,720 Views)

Got it.

0 Kudos
Message 5 of 11
(3,718 Views)

So how does one read 0 elements from the FIFO?  Are we discussing the RT FIFO Read (primitive) or the Shared Variable with RT enabled?

Message 6 of 11
(3,679 Views)

Actually, In every iteration of the loop, I will write 100 elements to the RT FIFO and then will read all the remaining elements from the RT FIFO. 

When I write to the RT FIFO I can get the number of elements remaining in the RT FIFO, then I can wire the number of elements to my read function.

 

So, in my case I don't need to read 0 elements from the RT FIFO. 

Sorry, I couldn't help!

0 Kudos
Message 7 of 11
(3,674 Views)

FIFO node in RT host :]    Just little trick to pull everything from the queue.

 

Message 8 of 11
(3,666 Views)

This is a Property Node, right? ... thanks, I'll read up on them!

0 Kudos
Message 9 of 11
(3,647 Views)

Ok this is not a Property Node, but a Method Node, correct?

 

Ref: http://zone.ni.com/reference/en-XX/help/371599G-01/lvfpga/fpga_fifo_method/

 

Since this is for taking action on a FPGA VI, would the node be available if one is running the cRIO in Scan Mode?

0 Kudos
Message 10 of 11
(3,595 Views)