LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I toggle left and right keys to scrolling on a waveform graph?

I am working on a VI that records voltages from a DAQ and I need to be able to scroll left and right, back and forth through time using left and right keys. I am a beginner so please try to keep it simple, thank you!

0 Kudos
Message 1 of 6
(2,581 Views)

You can use an Event structure (responding to Key Down) and a While loop to update the graph's X scale.

 

Example_VI_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 2 of 6
(2,568 Views)

Thank you so much for your reply! But what is the source for the stop? When I try to wire it to the event structure it acts like a sink.

0 Kudos
Message 3 of 6
(2,550 Views)

It is wired in the stop event case from the inside.

 

The picture is actually a snippet. Simply drag it to the diagram and it will turn into fuctional code.

Message 4 of 6
(2,542 Views)

@jcarmody wrote:

You can use an Event structure (responding to Key Down) and a While loop to update the graph's X scale.


I would probably use an array of two elements simplifying the increment/decrement operations and eliminating half the SRs. Instead it needs an index array before the property nodes, no big deal. 😉

Message 5 of 6
(2,535 Views)

@sarahsrox wrote:

Thank you so much for your reply! But what is the source for the stop? When I try to wire it to the event structure it acts like a sink.


Example_VI_BD.png

 

I wish LabVIEW had this as the default frame in an Event structure instead of Timeout; I use this more often.  This is cleaner than using a Stop button.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 6 of 6
(2,528 Views)