Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to parse serial string into numeric data?

Solved!
Go to solution

In brief, we are using a Kent Scientific PhysioSuite to record temperature, oxygen saturation, etc... and need these data to be synced with other electrical recordings that we obtain through SignalExpress. Using their WinCOM32 program we can get the data using their serial to USB interface (FTDI drivers) so we know that the system works.

 

On the LabView end, I can configure things so that I can see the device and even see the values in a read buffer using a modified "Advanced Serial Write and Read.vi". However, I am having trouble converting that read buffer to a data file where each value is separable (i.e., timestamp, pad temp, animal temp, heart rate, respiratory rate, perfusion index). Another complication is that sometimes the device spits out a * if it cannot obtain a value and this I think will create another headache when trying to import or create a spreadsheet like file.

 

\s\s1650.70\s\s\s\s28.7\s\s\s\s25.9\s\s\s\s\s\s\s*\s\s\s\s\s\s\s*\s\s\s\s\s\s\s*\s\s\s\s\s\s\s*\r\n is a typical string we might capture. the * indicate that it could not get a read (no animal is being recorded from) and the three numeric values are the time-stamp, and temp readings from two different sensors.

 

Any help or suggestions would be appreciated. Ideally we want to display these values in waveform charts AND record their values for further analysis.

-smb 

0 Kudos
Message 1 of 4
(3,940 Views)
Solution
Accepted by topic author chinchilla

Well, due to the unknown number of spaces, you need to use the Scan String for Tokens inside of a while loop.  You can do this in order to get the individual outputs.  You can do whatever you need to with the data points from there.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(3,935 Views)

I appreciate the tip! I am a bit new to LabView so let me sort out the control structure and try it out and I will repost soon.

0 Kudos
Message 3 of 4
(3,913 Views)

By the way, for future LabVIEW questions there is a separate LabVIEW message board.

 

 

0 Kudos
Message 4 of 4
(3,890 Views)