Effacer les filtres
Effacer les filtres

How to flush the buffer every time after xPC FIFO read the buffer

3 vues (au cours des 30 derniers jours)
Zhuo Li
Zhuo Li le 1 Juil 2012
Hi, I found that my xPC logged data has a lot of duplicate meassages due to FIFO read block sampling.
To my understanding, the FIFO read block works in the way that keeps sampling the buffer and outputs the samples.
hence, when the xPC receives [97 98 99 100 13] (ASCII of 'a' 'b' 'c' 'd' '\r'), the FIFO read block gives me multiple lines of [97 98 99 100 13 0]. (0 is inserted due to null terminating).
What's more, when the xPC receives a shorter string, e.g., [99 13], the FIFO read block gives me [99 13 0 100 13 0]. It seems just overwrite the old string at the new string length, not after that.
That is why I feel refreshing the buffer is highly needed. I saw in the "read HW FIFO" block, there is a check option of "flush the buffer on start up". I wonder is there similar actions such as flush buffer everytime after the FIFO read the buffer?
Thanks!

Réponses (0)

Catégories

En savoir plus sur Introduction to Installation and Licensing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by