Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Synchronizing data with visa read

$
0
0

Hello guys.

Sorry for the silly question.

I'm receiving, through my serial port, the following bit package: 0x80, 0x80, 0x00, 0x40. I receve this constant package every 1 second, with a baud rate of 115200.

The block diagram print screen is at the bottom of this post.

I just need to check out the package to verify that the first two bytes start with 1 and the last two with 0. When this condition is true, I want to turn on a led.

Problem is: the visa read/shift registers are receiving the data in a messed up way. It is randomly out of order. 

For example, sometimes the shift registers receive 0x00, 0x40, 0x80, 0x80, then another random combination.

How can I make the read data synchronized with the order of the package i'm receiving?

Thank you in advance :smileyhappy:

 

 


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>