VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

RT FIFO Read does not return default value

Solved!
Go to solution

Hello everyone,

 

I am working on a RS485 Custom Device (CD) which shall be accessed via input and output channels.

 

I can send data to the CD, which is read with the "RT FIFO read.vi". The "Element" connector of this VI is an array initialized to 0 (please see attached image). In the event of a timeout I am expecting to get this array. Nevertheless I am getting always after a timeout the last read array. This happens for any timeout value (even 0 ms).

 

Am I missing here something? I need to get the standard array (initialized to 0) in the event of a timeout.

 

Any help is highly appreciated!

 

Regards,

 

DBallen

 

0 Kudos
Message 1 of 3
(2,951 Views)
Solution
Accepted by topic author DBallen

Hi BBallen,

 

I tried to replicate this on my computer, however, I was unsuccessful with the code I've created.

 

As far as I understand, your main aim is to detect the underflow and in case of timeout, you would like to return previously determined value, not the last one - which is the default behaviour of RT FIFO. 

 

Do you think you could use the below code as a workaround?

 

Workaround.png

Let me know if this works for you and if you can treat it as a sufficient solution.

 

Mateusz

 

 

 

---
CLA,CTD,CLED
0 Kudos
Message 2 of 3
(2,855 Views)

Hi Mateusz,

your workaround works. I would expect to get this behavior from the RT FIFO vi, but your solution also provides the functionality I require.

 

Thank you for your help!

 

Regards,

 

Diego

0 Kudos
Message 3 of 3
(2,843 Views)