LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read Bytes and save VISA LabVIEW

Solved!
Go to solution

Hi everyone!

I need to read all the frames bytes, the time and save them in a file/log,

1.- Read if is there bytes in the port

2.- Save all the frames bytes and time for each

3.-One byte begin with 40

4.- If the frame start with 40, then read the others bytes and if match with a Constant Frame Bytes

5.- Turn on a led

jesusglzFELE_0-1681422864225.png

 

Issue, run without issues,but when I add the SubVI "Save all frames" , the code start to get frozen and it doesnt catch the byte that I would expect to read

Any recommendation to improve my code?

Thanks!!!

0 Kudos
Message 1 of 2
(605 Views)
Solution
Accepted by jesusglzFELE

It looks like you are trying to read the data twice.  The first read is regardless of if there is any data in the buffer, so that could cause some slowing down every iteration.  But then if you had the first read, you are trying to read again, but the data was already read.  I would just use the combined string for writing your data instead of adding an additional read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 2
(569 Views)