04-13-2023 04:57 PM
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
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!!!
Solved! Go to Solution.
04-13-2023 09:32 PM
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.