LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xy graph.

Need to plot data from a lock-in amplifier vs magnetic field.  The lock-in data can be ploted in a chart, the magnetic field is a single array of numbers (SGL).  I need the y axis (intensity) of the lock-in reading vs the magnetic field.  There is a problem when I try to plot this two different sets of data.  Is there any way I can do this in an xy graph?  Thank you very much.
0 Kudos
Message 1 of 5
(3,262 Views)

It would help if you would also explain what kind of problems you're having. Your description is too generic.

If your lock-in data goes to a chart, could it be that it is only a scalar instead of an array? In this case, you would need to accumulate it into an array (e.g. using a shift register and a built array node) to be plotted with the field values in an xy graph. Could you attach an simplified version of your VI containing some sample data? Once you are more specific, we can give more specific answers. 😉

If your chart gets cleared at the beginning of the run, you might also be able to simply get the chart history data (property node) and graph it against the field array. Have you tried that?

Message 2 of 5
(3,252 Views)

Hi Altenbach,

Thanks you for your reply.  Attached is the vi i am trying to run.  I have not wired the last xy graph, it will give ar error because the two different types of input data.  I need a continuous plot with x being the magnetic field and y being the intensity of the lock-in.  As you can see, I have a chart of Intensity vs time for the lock-in, and an xy graph of intensity vs magnetic field, but it only shows a single point and not a continuous line.  Thanks again.

wcup2.

 

0 Kudos
Message 3 of 5
(3,248 Views)
Sorry, I cannot tell from your VI what you want to do. Is this supposed to run in a loop?
 
If your field values are equally spaced, you can use a plain waveform graph and only plot y. You can set the scaling and offset of the x-axis with a property node. (An xy-graph is only needed if your x-values are randomly spaced.)
 
You only get a single field point from the gauss meter, but you get an entire array from your SR830 device. What is the relation between the two axes? What do you want to graph as a function of magnetic field?
 
Could it be your gauss meter only gives a field reference (e.g. the center field value)?
 
Could you create simple indicators on the data output wires of your subVIs. Run the VI once, then change the indicators to diagram constants (right-click...change to constant) so we have some real data to play with.
 
 
0 Kudos
Message 4 of 5
(3,224 Views)
 
Hi Altenbach,
 
I solved the problem by way of your initial suggestion of accumulating the lock-in data into an array (e.g. using a shift register and a built array node) to be plotted with the field values in an xy graph.   This seems to work very well and the VI is still simple enough.
In general, the measurements I am taking go as follows:
A DAQ card is used to control an instrument that generates a magnetic field, the DAQ goes from 0-5 volts, and the field is swept ~ 1000 Gauss (this is what i needed to be my x-axis).  At the same time, a lock-in reads a signal as a function of time (this can be plotted independently in a chart as Intensity vs time).  What I wanted was to plot the intensity of the lock-in vs the magnetic field and this was giving me the problems due to the two different types of data.  Thank you very much for your help and prompt responses, I really appreciate it.
 
Sincerely,
 
wcup2.
0 Kudos
Message 5 of 5
(3,208 Views)