LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Waveform from individual data points

I have a device that reads from a serial port that I would like to create a waveform graph of. The only problem is that it gives it's data as a set of points, rather than as a waveform set. The manual reads as follows; "CURVe? Might return the following ASCII data: CURVE 13, 6, 3, 2, –1, –9, –14, –19, –29, –35, –67, –1, –78, –62, –50, –31, –27, –7, 0, 12, 29, 39, 45, 43, 41, 47, 41, 38, 33, 26" So, how do I take data like this and turn it into a waveform graph in Labview 7.0?

JohnGalt
----------------------------------------------------------------------------------------------------------------------------------------------------
I've got a sneaking suspicion that Jesus might have been made of bread. Why else did they have to put him in a warm cave and wait three days for him to rise?

Damnant quadnon intelligunt - They condemn what they do not understand.
0 Kudos
Message 1 of 7
(4,595 Views)
To simply graph it you just need to build an array out of the data and wire it to the graph.  If you are getting the points in a loop use a shift register to hold the old array.  If you are getting a ton of points this method can become slow due to the repeated build array.
 
If you are just trying to create a waveform use the "Build Waveform" primative.  The 3 components of the waveform are to, dt, and Y.  Your array is Y.  Can we assume that the data is at a fixed interval?  If so simply that would be your dt value.  If the data is not at even intervals then a waveform will not be appropriate for you, and you should look at XY graphs.
0 Kudos
Message 2 of 7
(4,584 Views)

Use Spreadsheet String to Array. You'll need to strip the "Curve" part off.

Message Edited by Dennis Knutson on 05-11-2006 10:02 AM

Message 3 of 7
(4,585 Views)

First search and extract all ASCII strings that represent points ( 6, 3, 2 etc)

Now, convert each string to numeric using 'decimal string to number' or 'fractional/exponential string to number' function>>strings>> functions pallette,  on block diagram

Insert all these numerics into an array or build an array.

Now either display this array directly on a graph or use build waveform>> from functions  pallette on block diagram, to create a waveform and display it on graph

hope this helps

Any doubts, do get back

0 Kudos
Message 4 of 7
(4,576 Views)
woow!
Three answers within 5 minutes!!Smiley SurprisedSmiley Very Happy
 
top answer, DK!
0 Kudos
Message 5 of 7
(4,571 Views)
So, what is the little thing connected to the bottom right terminal and where do you get it? I have never seen it before. Also, what kind of waveform graph are you using? The ones I find always come up as DBL.

Message Edited by JohnGalt on 05-11-2006 12:54 PM

----------------------------------------------------------------------------------------------------------------------------------------------------
I've got a sneaking suspicion that Jesus might have been made of bread. Why else did they have to put him in a warm cave and wait three days for him to rise?

Damnant quadnon intelligunt - They condemn what they do not understand.
0 Kudos
Message 6 of 7
(4,560 Views)
It's an array constant. It's on the Array palette. Since your data is integers, I just dropped an I32 constant into it. That defines the type of data out of the function. The data type of a graph is whatever data type is wired to it.
0 Kudos
Message 7 of 7
(4,555 Views)