LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

linking x-axis of two graphs (with seperate data types)

Hi all,
 
I am plotting a sine wave and a resulting waveform generated after driving a component with that sine wave.
 
I have 2 data types:
i) One is a waveform - of the sine wave
ii) The other is a cluster - resulting from two arrays (DBL)
 
Ideally I would like to display both of these on a single plot.  But I can't seem to do that. If you know how to do this, then please let me know.
 
So, the next solution was to display them on a waveform chart and XY-plot, respectively. 
 
Is there some way of linking the x axis, such that when I zoom into one plot, I simultaneously zoom into the other?
 
I hope my question is clear.
 
Thanks
0 Kudos
Message 1 of 6
(2,965 Views)
As long as 'dt' is the same on both data sets (sine wave generated and samples acquired) you can just use the 'build waveform' function to bundle your data collected into a waveform datatype and then use build array adding both waveforms, then wire your array of waveforms into the waveform chart indicator.

Actually, it doesn't matter it 'dt' is different. You just define what 'dt' is in the build waveform function and it should plot them correctly!



Message Edited by Troy K on 07-25-2008 01:41 PM
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2 of 6
(2,951 Views)
Thusly...



Message Edited by Troy K on 07-25-2008 01:47 PM
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 3 of 6
(2,945 Views)
Hi Troy,
 
Thanks for the reply.  I did it and it works.
 
But the problem is if I zoom in, then since the amplitudes are quite different, then if I see one then i don't see the other.
 
I can normalize it, but then since this is actually driving a component, its not such a good idea.
 
Is there anyway to link the who x-axes? so when i zoom on the x-axis on one, the same happens to the other.
 
Thanks
 
0 Kudos
Message 4 of 6
(2,936 Views)
If you are talking about the amplitude then it is the Y axis scale. Have a look here on how to add a second scale (http://forums.ni.com/ni/board/message?board.id=170&message.id=314415&query.id=105962#M314415).

Then you can have a separate scale for each plot. All plots on one graph with separate scales... you've got your cake and you can eat it too!


Message Edited by Troy K on 07-25-2008 03:40 PM
Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 5 of 6
(2,931 Views)
Thanks for your useful advices Troy.

It works fine now.


0 Kudos
Message 6 of 6
(2,911 Views)