02-01-2023 01:00 AM
@RTSLVU wrote:
You should watch this video: VIWeek 2020/Proper way to communicate over serial
Have you watched this video yet?
It is a great resource all around and a great second step for those that tried the built-in examples, played around a bit and hit a brick wall.
02-01-2023 06:28 AM
@TylerM8 wrote:
I simplified my program and make it stop when error occurred. Now we can see first batch of data has been received but "VISA Read" popped an overrun error immediately after that. Any idea about this issue?
The immediate answer is to remove your wait from the loop. For a lot more robust setup, go watch this: VIWeek 2020/Proper way to communicate over serial
02-01-2023 07:59 PM - edited 02-01-2023 08:00 PM
If LV throws an overrun error then the LV code isn't reading data fast enough. The device sending out the data is sending the data too fast for the LV code to read it. Try lowering the baud rate. Have you tried lowering the baud rate?
02-01-2023 08:23 PM - edited 02-01-2023 08:35 PM
Thanks, I'd love to but could't open the video from my country. YouTube is blocked.. 😞
02-02-2023 07:25 AM - edited 02-02-2023 07:32 AM
@TylerM8 wrote:
Thanks, I'd love to but could't open the video from my country. YouTube is blocked.. 😞
If you follow my link to the LabVIEW Wiki page, there is a link to the github repository where you can see example code and the power point file.
02-02-2023 08:03 AM
@BigApple0 wrote:
If LV throws an overrun error then the LV code isn't reading data fast enough. The device sending out the data is sending the data too fast for the LV code to read it. Try lowering the baud rate. Have you tried lowering the baud rate?
Or stop using Bytes at port with VISA read
02-02-2023 08:24 AM
@AeroSoul wrote:
@BigApple0 wrote:
If LV throws an overrun error then the LV code isn't reading data fast enough. The device sending out the data is sending the data too fast for the LV code to read it. Try lowering the baud rate. Have you tried lowering the baud rate?
Or stop using Bytes at port with VISA read
Using the Bytes At Port to see if any data is there is fine. I have beef against it being used to state how many bytes to read. But since we are dealing with a streaming source and the fact the code can't keep up, I would remove the wait inside of the loop and the Bytes At Port. Instead, use the messaging framing protocol to find your messages. To give any more advice, I need to know that framing protocol. It is usually a little more difficult to figure out when it is raw/binary/hex data instead of ASCII.