Jump to content

subset of a waveform


Recommended Posts

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?

Link to comment

....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>

Link to comment

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

post-16211-127538641893_thumb.jpg

post-16211-12753866285_thumb.jpg

Link to comment

...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 by Mellroth
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.