LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving graph`s cursor manually by numeric control

Highlighted

Dear guys,

 

I wonder if is it somehow possible to move graph`s cursor by putting a number to numeric control and preserve the possiblity of moving the cursor by mouse too. Please see the attached screenshot.

 

Thank you for your tips!

Download All
0 Kudos
Message 1 of 13
(2,103 Views)
Highlighted
Yes, it's possible, and relatively easy. Use the Cursor.PosX (right-click on graph and then select Create -> Property Node -> Cursor -> Cursor Position -> Cursor X) and Cursor.PosY properties. You will need to change your indicators to controls and then handle the value change events for them so that you can write to those properties. Obviously in your current "Cursor Move" event you will need to use the Value property for the controls so you can update them if the cursor is moved with the mouse.
0 Kudos
Message 2 of 13
(2,100 Views)
Highlighted

Hello smercurio,

 

thank you for your tip. I  did as you suggeste however the it now doesn`t react to cursor move by mouse.

 

Maybe, I understood "in your current "Cursor Move" event you will need to use the Value property for the controls" wrong. Did you mean just removing Cursor Move event and instead of it set "Value change" event?

0 Kudos
Message 3 of 13
(2,079 Views)
Highlighted

No, that's not what I meant. Attached is your original VI with the mod I was suggesting. A couple of notes:

 

  • There is no point in having a timeout for the event structure just to write the same data to the graph. I removed the timeout and created an event case for the Stop button.
  • I only implemented the handling of the frame control change.Trying to change the Cursor.PosY does not work, and I do not know why yet.
Message 4 of 13
(2,067 Views)
Highlighted

Hi smercurio,

 

your suggested mod works like a charm! Thank you for providing the VI example. I have already implemented it to my broader labview project.

 

I tried to modify it to too, adding another event "Load"-value change. Then I connected the control with property nodes as you did in "Selected frame"-value change, but didn`t work too. Handeling value between Move cursor - Load control works well. However, the rest of handeling chain doesn`t.

 

Thank you for your interest in my issue!

 

Martin

0 Kudos
Message 5 of 13
(2,046 Views)
Highlighted

Could you upload your edited VI?

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 13
(2,020 Views)
Highlighted

I attached the updated version on plotting_graphMOD and the broader project where I`m implementing it. Basic idea of the project is:

 

Select specific frame on Load-frame curve and then immediately show it next graph.

 

Finaly there is also raw data file that you need to load. Unfortunatelly, *.avi is to big.

Download All
0 Kudos
Message 7 of 13
(2,010 Views)
Highlighted

What exactly is not working?

The only advise I can give is to use the 'Value signalling' property in the 'Cursor move' event .

That will trigger the 'value change' event of the Load control.

However you will get a lot of events, maybe the 'Cursor Release' event is a better choice than the 'cursor move'.

 

Wait maybe I get the point, I think you can't do a Set Y-value of a cursor linked to a single plot. For some reason LabVIEW doesn't generate an error on such action (which it should IMHO, this is a BUG).

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 8 of 13
(2,001 Views)
Highlighted

"you can't do a Set Y-value of a cursor linked to a single plot" - you are right, that`s the problem!

0 Kudos
Message 9 of 13
(1,981 Views)
Highlighted

TonP wrote:

Wait maybe I get the point, I think you can't do a Set Y-value of a cursor linked to a single plot. For some reason LabVIEW doesn't generate an error on such action (which it should IMHO, this is a BUG).


Yeah, that's what I couldn't get to work in my example. I would agree that it looks like a bug to me. 

0 Kudos
Message 10 of 13
(1,937 Views)