LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Random Serial Read Overflow vs variable multi-line reply DUT

Hi All,

 

Been in training the last few days, will try out the suggestions as soon as I get back into the lab.  Will report back.

 

Regards,

Mike

0 Kudos
Message 11 of 12
(286 Views)

Hi All,

 

So taking the advice given in this thread, I made 2 changes that solved my problem.  I took a look over the termination characters "endtest" and decided to keep it the same, but change that way I approach the problem.  I know that my ascii data always returns with "\n" at the end, so instead of reading one byte at a time with no terminating character configured, I setup "Configure Serial Port" with termination character enabled to "\r".  In my loops, I setup the VISA Read to read 4096 bytes (bigger than need to be) to read line by line instead of byte by byte.  Instead of concatenating the string, I am now just searching each line instead.  This way, the string search is not slowed down by an ever increasing string.  I also switched out string "Match Pattern" for "Search/Split" for faster search.

 

Thanks for all the suggestions and help to put me in the right direction.

 

Regards,

Mike

Message 12 of 12
(271 Views)