LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursors are not getting set at right place

Solved!
Go to solution

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.

vi_image.JPG scope1.JPG

 

Thanks,

Regards,

Sailesh 

0 Kudos
Message 1 of 14
(4,111 Views)

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.

0 Kudos
Message 2 of 14
(4,107 Views)

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.

0 Kudos
Message 3 of 14
(4,103 Views)

Hey guys,

 

How do i attach a VI???

 

Thanks

Sailesh 

0 Kudos
Message 4 of 14
(4,094 Views)

Sorry i found it..

here it is.. 🙂

 

Regards,

Sailesh 

0 Kudos
Message 5 of 14
(4,093 Views)
Solution
Accepted by topic author Sail

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

 

 

Message 6 of 14
(4,080 Views)

Also, don't forget that you only really need one instance of the bulk of the code if you autoindex over each graph.

 

Message Edited by altenbach on 11-30-2009 05:37 AM
0 Kudos
Message 7 of 14
(4,069 Views)

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

0 Kudos
Message 8 of 14
(4,060 Views)

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

0 Kudos
Message 9 of 14
(4,054 Views)

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.

0 Kudos
Message 10 of 14
(4,047 Views)