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

[begineer] restarting a 'while' loop while reading from serial port

$
0
0

Hi there! I'm reading some data from a COM port. I want to read my like this "S %d ". the device is sending the data continously and depending on when i push the run button in labview, it may start reading the data from its middle (%d is a four digit number). like: '23 S 15 '

 

whenever the first character of my data isn't 'S", i need to restart the reading. i read data in a while loop. so i need to stop the while loop. According to what i found on the internet, I used a case, another while loop and shift registers.

 

but somehow I get stuck at the inner while loop. my VI is attached. Thanks in advance and sorry if my code is a mess!! :smileytongue:

 

PS: what should I do if the bytes I'm receiving at the port is variable ?! use Bytes at port?


Viewing all articles
Browse latest Browse all 5565

Trending Articles



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