Robinson Posted June 1, 2010 Report Share Posted June 1, 2010 HI, I have been trying to take the array subset of a waveform after zooming the waveform using labview zoom in the waveform graph. initially i bundled the y-array, sample time and start point into cluster and displayed it in the waveform graph. using two cursors i select range to be zoomed ....after zooming i need to acquire the zoomed part of the waveform from the graph ... can anybody help me out with this? Quote Link to comment
Norm Kirchner Posted June 1, 2010 Report Share Posted June 1, 2010 ....after zooming i need to acquire the zoomed part of the waveform from the graph ... can anybody help me out with this? I would suggest that you look into the XScale.Range property From this range as you can see from the image below, you can determine the max and min of the currently displayed waveform. From that point it will be up to you to use the proper functions to crop your waveform <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e7e24f33-c471-459c-b127-1036a9352247/2010-06-01_0035.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/e7e24f33-c471-459c-b127-1036a9352247/2010-06-01_0035.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/e7e24f33-c471-459c-b127-1036a9352247/2010-06-01_0035.png" width="532" height="624" border="0" /></a> I would suggest bundling your data into a waveform data type to take advantage of the 'Waveform Subset' function available to that data type <a href="http://content.screencast.com/users/NJKirchner/folders/Jing/media/055343d7-062d-4df0-8aa2-1e289ea16243/2010-06-01_0038.png"><img'>http://content.screencast.com/users/NJKirchner/folders/Jing/media/055343d7-062d-4df0-8aa2-1e289ea16243/2010-06-01_0038.png"><img class="embeddedObject" src="http://content.screencast.com/users/NJKirchner/folders/Jing/media/055343d7-062d-4df0-8aa2-1e289ea16243/2010-06-01_0038.png" width="986" height="498" border="0" /></a> Quote Link to comment
Robinson Posted June 1, 2010 Author Report Share Posted June 1, 2010 i have got the subset starting from the point i require but not to the point have specified i.e. XscaleRange.Max .... it gives excess values of the waveform which is not required. in the vi which i have attached i have 3 waveform graphs ... One has the original waveform, the second is where i zoom the waveform and after pressing OK the zoomed part of the waveform is displayed in the 3rd graph. what am i doing wrong?? this is the block diagram SAMplezoomData.vi Quote Link to comment
Mellroth Posted June 1, 2010 Report Share Posted June 1, 2010 (edited) ...what am i doing wrong??... Hi, I think (I don't have LabVIEW available at the moment), that you are giving the start and end point instead of start and duration. Subtract max value by the start value an use this instead of the current end point (max value). Edit: I just realized that you are scaling the y-axis with the first and last point in the data, try to use y-axis auto-scaling instead. /J Ps. you are shifting back and forth between waveform and DBL-array, I would try to stay in one of them. When using waveforms, you don't have to define the dt and start of the graph. If you want to change the start point (or dt), change the waveform instead. Edited June 1, 2010 by Mellroth Quote Link to comment
Robinson Posted June 1, 2010 Author Report Share Posted June 1, 2010 yep ur right ... i got it working ..... the duration is now max- start and it works fine for me thanks a lot for the support guys ... i appreciate it. :-) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.