LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial Port Read Issues

I have an application that needs to read in a set-length string of 13 data readings seperated by a commas. I have a vi set up that will take the incoming string and seperate it out to its different data points. BUT, when I'm reading in the data over the serial port, I don't know how to wait until I have a complete set of 13 data points before displaying my data. I'm using a vi that extracts doubles from the string to display all 13 data points, and as each point is recieved from my test item, it scrolls through the 13 seperate data displays. All this is placed inside a while loop, so all of my data is coming in, but i'm having trouble seperating it out for display purposes. My test item will be generating the string of 13 floating point numbers seperated by commas at a rate of about 1 set every 1-2 seconds.

Basically, I need advice on how to read in a full string of 13 data points and after the full string is read in, then display them using an extract_from_string vi.

Thanks in advance

jimmy

Message Edited by JMorgan on 03-02-2005 10:50 AM

0 Kudos
Message 1 of 3
(2,604 Views)
Jimmy,

Is the last data point separated by a comma or by some other character from the beginning of the next data set? If it is a different character, like a carriage return, then all you need to do is to search for that character in the received data. If the stream is continuous and no framing character occurs, then you have to count and hope it never gets out of sync.

Lynn
0 Kudos
Message 2 of 3
(2,597 Views)
the data sets will be seperated by a carraige return.....
0 Kudos
Message 3 of 3
(2,592 Views)