LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How make a cluster become a graph?

Hey guys, I tryed search at examples and I find, but I didn't understand how I can make a graph using a cluster

I need make a cluster of 3 elements, time stamp, a normal dt "single" and a 2D array

but how can I make this cluster a graph? If I change it to constant I can put elements inside of my cluster, but I don't know how to convert it to a graph!

 

Can someone help me on that?

or maybe tell me where I can find it in examples?

I already have find some graphs that is a cluster of X elements, but no one is like I need

and I didn't know how to change it!

 

Thanks

0 Kudos
Message 1 of 32
(16,992 Views)
Have you ever turned on Context Help? You should really have this turned on at all times. After dropping a graph on the front panel, go to the block diagram and move your mouse over the graph. The context help window will show you exactly what you need to do with a regular cluster. A Build Waveform function is also suitable
0 Kudos
Message 2 of 32
(16,979 Views)

Yes, I already read the context but my problem is I have a 2D array to plot when I tryed it with "build waveform" the Y is only 1 dimension so it don't work, i will show the screen shot of context help:

build + graph.JPG

 

and when i try to use a bundle I put time stamp, dt and the data "2d array" and linked the output to a waveform graph so appears:

bundle + graph.JPG

 

Maybe is because to make a cluster I have to use relative time, but I want use absolute time so I have to find how can I change the dimension of "Y"

 

This is my problem, I already read that Introduction to LabVIEW 8.6 in 6 hours but in page 74 only show it:

cluster with graph.JPG

 

I know this is very easy to solve, but I tryed several times and can't make it happens

so I'm here to get some help if you can!

 

Thanks

0 Kudos
Message 3 of 32
(16,971 Views)

grafico.JPG

 

This is the 2 ways I know I can make that, the first one I already tryed XY graph, waveform chart, waveform graph and nothing works, the second one I have the problem with the Y dimension.

 

I think now I will be more clear in my doubt!

Thanks

0 Kudos
Message 4 of 32
(16,965 Views)
You can't use a 2D array. If these are separate plots, then use an Index array to get two 1D arrays and two clusters/Build Waveform functions. Use the Build Array function on the outputs. If you want a single plot, then convert the 2D array to 1D.
0 Kudos
Message 5 of 32
(16,964 Views)

Well I need show it in a single plot, so How can I convert a 2D array into a 1D array?

Because this 2D array is from DAQMX read (analog 2D Nsamples Nchan) maybe I have to put a index array and its done?

like:

 

index array.JPG

 

Only that? Or I have to connect some number at index 0?

0 Kudos
Message 6 of 32
(16,959 Views)
That does not make any sense. If it comes from the DAQmx Read, then that indicates separate channels and why would you want different channels in the same plot? You can also make it simple and change the DAQmx Read to return an array of waveforms. You can wire this directly to a graph and the t0/dt are automatically done for you by the driver.
0 Kudos
Message 7 of 32
(16,952 Views)

You have several possibilites. If you use index array, you can graph only one trace, which one depends on what you wire to index array above. If you leave this unwired, you'll get the first one.

 

If you use a plain bundle (instead of built waveform), you can use a 2D graph and things work as expected (see image).

 

You can also wire the plain 2D array to the graph and set x0 and dx of the x-axis with a property node.

 

 

 

 

 

 

Message Edited by altenbach on 10-14-2009 09:17 AM
0 Kudos
Message 8 of 32
(16,951 Views)

Yes altan I know that

but how can I get the real time in bundle?

This is my problem

because I need to plot at X-axis the real time like "13:38pm 10/14/2009" something like that

and when I tryed put time stamp in t0 don't work!

 

Dennis,

I need to plot in the same graph because I only can have 2 graphs in a screen at my program

1 for it and 1 for two temperatures i'm measuring too

this one will show the waveform of voltages and currents 

something like that:

voltage graph.JPG

 

Now can you see? the only problem for me is the time in X-axis

"09:00 31/12/1903" i need to fix that time to the real time today

 

thanks

Message Edited by EduU on 10-14-2009 11:37 AM
0 Kudos
Message 9 of 32
(16,943 Views)
Well, when I asked, I did not mean two graphs. I meant two separate plots in the same graph. As I said, if you want to use the Build Waveform function, then use one for each row/column in your 2D data. I would also like to know why you don't just acquire data as waveforms in the first place.
0 Kudos
Message 10 of 32
(16,938 Views)