04-15-2010 08:50 AM
My goal is to get the number of elements in an RT FIFO without changing the FIFO. I see that the RT FIFO read and RT FIFO write VIs return the number of elements in the RT FIFO, but calling these VIs will either remove or add an element from the FIFO. Does anyone know of a workaround for this? The only thing I've been able to think of is to typecast the RT FIFO Refnum to a regular Queue Refnum and use the the Get Queue Status VI to get the nubmer of elements, but this does not work. I've also tried to convert type using variants and flattened strings to no success.
04-15-2010 09:00 AM
04-15-2010 09:15 AM
I'm going to be obtaining the RT FIFO in a separate VI from where it's created and I want to monitor the number of elements in it. I would run the separate VI after the original has been running, so modifying the code of the VI that does the RT FIFO Read/Write is out of the pictutre
04-15-2010 10:04 AM
04-15-2010 10:47 AM
04-15-2010 11:13 AM - edited 04-15-2010 11:14 AM
I am showing number of elements as an input to the FPGA method as well:
Edit:
... unless I misunderstood and this is just a FIFO that ison the RT host, and not a DMA FIFO to an FPGA.
04-15-2010 11:52 AM - edited 04-15-2010 11:54 AM
I'm using the RT FIFO VIs, not the FPGA VIs.
04-16-2010 12:30 PM
There isn't the functionallity within the RT FIFO. You can use a normal LabVIEW queue on a real-time system, it just won't guarantee determinism. If you need to know the number of elements in an RT FIFO, you can follow this KB for more information.
http://digital.ni.com/public.nsf/allkb/42E85A333767918B862570D800667FD8?OpenDocument