From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem selecting cursor point plot

Hello guys,

I am trying to get peak index from one plot to let me to calculations with this index.

The problem I got is when I have very long signal in graph (around 2h signal with dt=0.002), and I put the max scale to low values to view clearly each peak, The cursor doesnt works and show several lines...  I would like to know if I can fix it.

 

I attached one example. If you load it and put the graph to show from 0 to 10, you can click in each peak detected (red points) perfectly. But If you fix the scale from 0 to 5. You will see that the cursor no works like it is supposed.

This is only one example, In my data I need block of 2h and the plot 1 takes 500 samples/sec.

When I charge my data I need to put at least from 0 to 2'30" to be able to click in each point.

Is possible fix it to use lower scale max?. I would like to use from 0 to 20s at least.

 

Best Regards.

0 Kudos
Message 1 of 14
(5,513 Views)

I tested your VI and I see your problem. After bringing the cursor to the most-left, and making the X-scale from 0 to 5, I try to drag the cursor with the mouse, but it just disappears, and go far to the right based on the cursor value indicator... If I use a 0 to 10 scale, it works fine even with dragging...

I would consider this as a bug (tested with LV 2014 and 2015, same results):

https://youtu.be/3LjDr9MhK7o

 

As a temporary workaround, instead of clicking or dragging on the Graph itself, you could just use little "cursor navigator" panel (no idea what is the official name for this?) to move the cursor, it works:

drfdsfs.png

Message 2 of 14
(5,467 Views)

Yes, Thanks for take your time!.

It seems a bug when you try to show only 5 seconds in the graph. Yes de cursor button you can use to move but it appears in the middle of data. It is not functional for use with large data.

You can use right click in cursor legend and put 'Go to cursor ' or 'Bring to the middle', if you go there yo can click in peaks but it doenst works properly.

 

No way to fit it?. 

Regards.

0 Kudos
Message 3 of 14
(5,453 Views)

Yes, looks buggy. Same in 2016. Haven't studied it in detail, though.

 

(...even after fixing some of the weird things. (Why is there a regular and a filtering even for the same thing (mouse down & mouse down?), what's the purpose of the inner case? Is't it always true (sorry, the boolean output is not even described in the help...)

0 Kudos
Message 4 of 14
(5,446 Views)

Yes, sad No way to fix it.

About the weird things:

1- The inner case, you are right. I copied the example from forum and try to use to my case. 

I dont check it, it is not neccesary.

2- The doble case with down? and down. IF I dont put it, the index of peak detected is not update.

I got the idea from here:

http://forums.ni.com/t5/LabVIEW/exact-position-of-mouse-click-on-xy-graph-while-plotting-graph/m-p/8...

Its true he used Mouse move and mouse down!.

Then there is no way to fix the problem?.

Thanks For help!.

0 Kudos
Message 5 of 14
(5,440 Views)

Sorry, I don't have time at the moment, but since your x scale is linear (equally spaced), you might try a waveform graph instread of an xy graph. To mark the peaks, you could change all other points to NaN for the second graph or even use annotations. Then you could find the closest peak on mouse down and set the cursor there. No guarantees, of course.

0 Kudos
Message 6 of 14
(5,437 Views)

Btw, If I remove the event structure with the cursor and I try to move the cursor it works even in the range 4s. So maybe there is some problem with the event structure getting coordinates.

 

 

0 Kudos
Message 7 of 14
(5,435 Views)

Thanks for your time!.

I understand what you mean. But my proposal in this vi is to remove bad peaks and add peaks manually too. I did and works. I added one event structure case when I push one button to remove peaks, I click the peak. Look at the index of plot1 and remove from the array the peaks detected.

When I want to add one peak, I need to push one button that change the cursor plot to 0 and I can set the point undetected from plot0 and add this point in array peaks of plot1.

It works fine, the only problem is the main topic error. 

I normally works with fragments of 2 data hours. If I can't fix the scale to 20/25s width I can`t see correctly whenthe pulse is bad or good to add/remove and then it is not practical.

 

0 Kudos
Message 8 of 14
(5,428 Views)

Hi altenbach,

I tried the idea you exposed in the previous post. 

But I didnt get it works.

 

Download All
0 Kudos
Message 10 of 14
(5,402 Views)