Why xPC RS232 FIFO read block produce such big delay? or the delay is due to file write?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
After long time of signal tracing, I measured that the receving side of the xPC application produces long time delay (5~15ms for different char), while on the sending side, the time delay is small and can be ignored.
I did 2 experiments, both at sampling rate 10K Hz, and FIFO block at sampling rate 1K Hz.
1. I looped the serial cable back from COM1 to COM2. and let COM1 send a char to COM2. I'm using analog data logger monitering the RS232 signal on the cable. I measured the time from a char being sent out to that RS232 signal actually appear on the wire. It's like immediate which doesn't take visible time.
However, I received the char with COM2 about 5ms later. All the time are from xPC timeLog, so should be synchronized. Hence, I infer that the delay is produced on the receving side. I guess it due to the FIFO buffer or software?
2. I connected my target PC to my lab equipment, and let COM1 port send commands to the equipment while monitoring the RS232 signal in the mid-way.
Again, the RS232 signal shows up on the wire at the same time when my target PC sends the command out.
Then the replied signal shows up on the wire after 1 or 2 ms. however, when I looked at the logged data on my target PC, the time stamps of the replies are about 15 ms later on average.
Since it doesn't take long for my lab equipment to reply, it seems that the receiving side of the target PC produces significant and undesirable time delay.
Could anyone explain this? is this normal?
Can this be reduced by parameter setting?
Or this is inevitable?
Thanks
3 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Data Import and Analysis 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!