07-26-2018 08:32 AM
I refuse to look at a picture of LabVIEW code. Would you like me to send you a picture of a 1000-line C++ program, or would your rather I attached the actual program (as text)?
Please attach the program (as a VI, a file ending with .vi).
Bob Schor
07-26-2018 08:46 AM
Watch your code in execution highlighting mode and see that you have a race condition where a Boolean local is being read BEFORE you writ to it.
Did you ever figure out what the term char was?
Ben
07-26-2018 09:37 AM
07-26-2018 09:55 AM - edited 07-26-2018 09:58 AM
on a more constructive note:
also before you post your VI please clean it up.
wires shouldn't go backwards,
things shouldn't be over wires
arranging stuff in the data-flow sense would also make it easier for people helping you
and last but not least ... the labview programmers (mostly) put specific in/out terminals at the same position so that you could have straight lines, use that to your advantage!
also unused space is just a pain. it's like reading a whole word spread over multiple lines character by character.
regards
EDIT: i'm out ... way too warm .. things only get more ridiculous from here on
good evening to you all!
07-26-2018 10:45 AM
@jwscs wrote:
on a more constructive note:
also before you post your VI please clean it up.
wires shouldn't go backwards,
things shouldn't be over wires
arranging stuff in the data-flow sense would also make it easier for people helping you
and last but not least ... the labview programmers (mostly) put specific in/out terminals at the same position so that you could have straight lines, use that to your advantage!
also unused space is just a pain. it's like reading a whole word spread over multiple lines character by character.
regards
EDIT: i'm out ... way too warm .. things only get more ridiculous from here on
good evening to you all!
Continuing Bob's C++ analogy, you wouldn't give a person source code with random indents. Not if you wanted a reasonable chance of leading a normal life afterwards.
07-27-2018 06:21 AM
@Vinaygowda wrote:
one more picture for reference
Your read loop has me worried.
Do you always expect the same number of lines? If so, use a FOR loop instead of a WHILE loop. Even if the number of lines is different, relying on only the final line being longer than X bytes is dangerous. You are likely to miss data points and/or have too much data. I am sure there is something in the protocol to tell you when you have gotten all of your data points, even if it is just the ID.
Also, you don't need the wait in that loop. The VISA Read will limit your loop rate (an iteration for each read line).