Showing results for 
Search instead for 
Did you mean: 

how to view modified serial data after each stage in labview gui, ie after match pattern, after substring etc

Go to solution

Hi , i have a labview GUI which receives serial data via VISA, and basically chops the strings and carries out matches until i have the values I seek. I then convert from Ascii string to decimal and feed the new values to a waveform. However I have discovered that some of the output values are incorrect. I checked this out by pulling the data in through Realterm.


Is there any way that I can see the modified data after each stage of the gui so that I can find where the problem lies? I have created indicators after each stage but they are not displaying the data, i assume its because the data is going in too quick. 


I am very new to labview and have struggled through every bit of this GUI, as any of you regular posters will know. If you can suggest a solution please know that I will probably ask the most basic questions in order to implement your solution.


I have attached my GUI along with a screenshot of the same data coming through Realterm. Basically anywhere that you see TR xxxx TR or W xxxxW, know that it is the data between them ie xxxx which is the data of interest. Everything else is discarded.


I suspect the problem lies in the conversion from string to decimal and where 3 digit values increase to 4 digit values. ie any values under 850 are correct but that is the max value reached. My values should be reaching 2500. Any help would be greatly appreciated.

Download All
0 Kudos
Message 1 of 6
Accepted by topic author lolasue

You've got other debugging tools available to you.  You can use highlight execution to slow down the code and show you the data flowing down each wire.


You can create a subVI that takes the data off of each wire and writes it out to a log file so you can review it later.


You did not attach any screenshots to your message.

Message 2 of 6
Accepted by topic author lolasue

Okay, now the attachments are there.


I see one problem with your initial part where you take the last 14 characters of the response.  14 looks like a good number when you have the 3 digit code TR1,  a space,  4 digit number, space, 3 digit code,  CR, LF.  But when your code is a W, you have some extra spaces after the first one, and not extra on the ending W.  Your W line is only 10 characters long.

Message 3 of 6

Thanks Ravensfan,


Simple solution!

0 Kudos
Message 4 of 6

Yep, just spotted it now during slowed execution. The W value is being chopped incorrectly instead of 2157 i get 157.


Thanks again for your help R.

0 Kudos
Message 5 of 6

You may want to look at the Scan from String function to extract the data and turn it into a number in 1 step.

0 Kudos
Message 6 of 6