11-30-2009 05:12 AM
Hi,
I am capturing waveform from Agilent MSO7000 Series oscilloscope. I have created waveformdata for one channel of the oscilloscope and trying to place cursors using cursor property node of waveform data and i see that it getting set at incorrect position as shown in the pics below. I would like to know what would be the reason behind this.
You can see that the cursor is after the position where it has to be.
Thanks,
Regards,
Sailesh
Solved! Go to Solution.
11-30-2009 05:35 AM
Dear Sailesh,
Can you please attach the vi here instead of screenshot, so that we can check the behavior with the different LabVIEW versions. What LabVIEW version you are using? Don't include the instrument drivers section here. Just post the waveform part here.
11-30-2009 05:58 AM
This code is nearly incomprehensible and extremely inefficient. Please attach the VI and some typical data.
You seem to be extracting the same X and Y array over and over in a loop. Once is probably enough. What's up with all the overlapping and backwards wires? It is impossible to tell what's connected to what.
What is the x-spacing of the data? In any case, why don't you simply do an interpolation on the data to find the fractional x-index.
11-30-2009 06:11 AM
Hey guys,
How do i attach a VI???
Thanks
Sailesh
11-30-2009 06:12 AM
Sorry i found it..
here it is.. 🙂
Regards,
Sailesh
11-30-2009 07:10 AM
Looks like the offset for the x-axis is not applied correctly. If you set x0 explicitly, things look better. I'll study it a bit more....
Here's a quick rewrite with the same functionality, but including the x0 fix. 😉
11-30-2009 07:33 AM - edited 11-30-2009 07:37 AM
Also, don't forget that you only really need one instance of the bulk of the code if you autoindex over each graph.
11-30-2009 07:43 AM
If you use the Cursor.Index rather than Cousor.PozX you can eliminate the XScale.Offset and calculations to find the x position, just connect the output from the search array to the Cursor.Index property.
Ian
11-30-2009 07:51 AM
IanW wrote:If you use the Cursor.Index rather than Cousor.PozX you can eliminate the XScale.Offset and calculations to find the x position, just connect the output from the search array to the Cursor.Index property.
That only works for cursors that are locked to a plot. Currently, the cursors are free, so it won't work.
("free" is probably better here, because maybe we want the interpolated "1" crossing later, which might not match an actual data point.)
11-30-2009 08:08 AM
altenbach wrote:
That only works for cursors that are locked to a plot. Currently, the cursors are free, so it won't work.
("free" is probably better here, because maybe we want the interpolated "1" crossing later, which might not match an actual data point.)
Good point about the interpolation altenbach.