Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to separate the serial data

Solved!
Go to solution

I am trying to make a simple serial read vi but facing a problem that all the data serially coming are not getting separated and getting the plot on the same graph. I m using comma delimiter still not able to separate the data.

 

The format of coming data :-

Serial.println("95336");
delay(1000); 
Serial.println("36.2");
delay(1000);
Serial.println("526.23");
delay(1000);

so on .

I have added the screenshot of my VI 
please help me out 

0 Kudos
Message 1 of 3
(2,816 Views)
Solution
Accepted by vibhork10

You are using Println which separates your date with linefeed characters.  Your LabVIEW code is expecting a comma separator.

 

You need to either do 3 VISA Reads in LabVIEW, or better yet, do a single Println in your C code with the data separated by commas.

Message 2 of 3
(2,803 Views)

thank you so much it worked 
now I am trying to plot 
Serial.println("$,2232,32.23,96534,826.2232,8,58,3,-19.2,38.6");
delay(1000);

Serial.println("#,4562,56.53,78965,25.23,25.6,58");
delay(1000);

this where $ and # are starting checking symbol of the whole data whether it is correct value or garbage one 
if $ or # is found than only it will plot 

0 Kudos
Message 3 of 3
(2,798 Views)