From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

How to make cursors on two plots follow each other

Solved!
Go to solution

I have two waveform graphs on the front panel (Ch3 and Ch4).  Each of these have the same X axis scale and each have 2 cursors (Cursor 0 and Cursor 1). I want to make the cursors follow each other.  For exampe, I select Ch3 Cursor 0 and move it to a certain X position.  I then want Ch4 Cursor 0 to move to the same X position on the Ch4 waveform.  If I then move the cursor on Ch4 Cursor 1 to a certain X position, I want Ch3 Cursor 1 to move to the same X position on the Ch3 waveform. 

 

I have tried using Event Structures and this works great if I just want Ch4 cursors to follow Ch3 cursors.  But if I want to be able to adjust either and have the other follow I can't get it to work.  If I could get two event structures in the same while loop it might work but A) I have read that is not a good idea and B) I ahve been unable to get it to work anyway.  I am sure this is possible...could someone give me some suggestions?  Thanks.

0 Kudos
Message 1 of 3
(2,152 Views)
Solution
Accepted by topic author lme999

What do you mean by 


@lme999 wrote:

If I could get two event structures in the same while loop...


?

You can handle both events in the same event structure (just configure 2 events).

 

(It's true that it's not a good idea to have 2 event structures in one while loop. That's the nature of data flow... the while loop only iterates when both event structures execute exactly once. Anyway, usually 1 event structure is sufficient.)

 

0 Kudos
Message 2 of 3
(2,147 Views)

Wow, ok it is that simple.  I haven't used event structures in a while and for some reason was thinking that each event structure needed to be tied to only one event "source"....I don't know why I was thinking that.  Thanks again.

0 Kudos
Message 3 of 3
(2,140 Views)