From Thursday, May 23rd (05:00 PM CDT) through Friday, April 24th (1:30 AM 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: 

Resetting XY Plot after data input cycle

Hello,

 

I am a new member here and I am working with a MyDAQ board and Labview. Basically, I am continuously getting voltage inputs from the myDAQ and plotting it against an x-axis that is created from a function generator. My x-axis basically loops from 3-4V, then restarts at 3V. After the function generator restarts at 3V, I want the X-Y Plot to also reset. At the moment, the y-axis is just constantly updating and retaining the old values. I am trying to make a waveform that repeatedly sweeps through a range of inputs.

 

Is there a way to get around this issue?

 

Thanks for all the help!

0 Kudos
Message 1 of 5
(2,576 Views)

Hi osiris17,

 

Do you have a VI which you can share? From what I understand, you want the XY Graph to reset when function generator = 3V?

 

If you want to reset, you can just use "Invoke Node" to "Reinitialize to Default" (right click on the XY graph >> Create >> Invoke Node >> Reinitialize to Default)

 

Of course, you would need to think of a logic maybe use case structure to run the true case only when function gen = 3, where true case reinitialize the values in XY Graph to default?

 

Hope that helps

 

Warmest regards,

Lennard.C

Learning new things everyday...
0 Kudos
Message 2 of 5
(2,561 Views)

Hi Lennard,

 

Thank you for your reply. I will look into the Invoke node function. I think I came across something similar but I ran into difficulties implementing a logic gate to active it on time. 

0 Kudos
Message 3 of 5
(2,543 Views)
Since the default might not be empty, I usually just write a cluster with empty x and y arrays. Right click on the graph and select Create Constant.

I don't understand your comment about logic gates. You must have some logic that starts the sweep again so place the graph clear in that.
0 Kudos
Message 4 of 5
(2,533 Views)

Hi osiris17,

 

As mentioned by Dennis, you can also force a value to the XY graph with empty x and y arrays if invoke node does not work. May I ask what is the complication you were facing?

 

Warmest regards,

Lennard.C

Learning new things everyday...
0 Kudos
Message 5 of 5
(2,527 Views)