06-29-2011 07:39 AM
I have a timeout question about RT FIFO Read in Producer/Consumer system. Here is the scenario.
Producer writes data to RT FIFO via RT FIFO Write;
Consumer read data from RT FIFO via RT FIFO Read with timeout 100ms;
If RT FIFO is empty, returns 100ms timeout and stops Producer and Consumer.
If RT FIFO is not empty, process the data from FIFO and continue Producer/Consumer.
As I understand, RT FIFO empty means 100ms timeout. But the 100ms timeout condition does not behave properly as expected.
Am I understanding the FIFO Read timeout correctly?
Thanks!
06-29-2011 08:56 AM
The producer stores data only when the data is valid.
I input invalid data on purpose so that the producer won't write data into FIFO, and consumer should have timeout since the FIFO is empty.
But the result always shows there is no timeout at all.
06-30-2011 11:34 AM
MileP,
I find the best way to learn about Real-Time FIFOs is to run some examples of them, check these out and let me know what you think:
https://decibel.ni.com/content/docs/DOC-2303
https://decibel.ni.com/content/docs/DOC-9893
http://zone.ni.com/devzone/cda/tut/p/id/3934
I hope this helps get you going 🙂