LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reset XY Graph on Button Press Fully

Solved!
Go to solution

Hello, 
So my Problem is that if I reset the Build XY Graph on button click the actual graph does not rest completly. 
I set the Reinitialize Value to 0,0 and if i click on the graph and say do it it actually does it. Also all values reset and the graph is clear but the problem is it is not resetting to 0,0. The last Value measured is still there and when i take new measurements it also start at this point. I attached some pictures Below. 

 

 

So this is my little setup

Julsbng_0-1708610270789.png

 

 

This is it running and measurering.

Julsbng_1-1708610317360.png

 

And after pressing the reset button it doesnt goes to 0,0 like it should.

Julsbng_2-1708610348424.png

It stays at 49,0 no clue why. 

When i then say manually by clicking on the graph -> Data Operation -> Reinit. to default it resets properly

Julsbng_3-1708610419151.png

 

Any idea how to fix this? 

Thanks in advance 

Julius

0 Kudos
Message 1 of 24
(810 Views)

My graph don't gets resetted when reinit to default (in general this will reset the data only, but not scales)

graph.gif

 

Why do not use Scale.Minimum Property node and set it to zero on reset?

0 Kudos
Message 2 of 24
(789 Views)

I could do it, but the problem is that the value is still there which shouldnt

0 Kudos
Message 3 of 24
(784 Views)

@Julsbng wrote:

I could do it, but the problem is that the value is still there which shouldnt


Hmm, for me it works:

graph2.gif

0 Kudos
Message 4 of 24
(767 Views)

@Julsbng wrote:

Hello, 
So my Problem is that if I reset the Build XY Graph on button click the actual graph does not rest completly. 
I set the Reinitialize Value to 0,0 and if i click on the graph and say do it it actually does it. Also all values reset and the graph is clear but the problem is it is not resetting to 0,0. The last Value measured is still there and when i take new measurements it also start at this point. I attached some pictures Below. 

 

 

So this is my little setup

Julsbng_0-1708610270789.png

 


 

Your "build xy graph express VI" is probably set to "retain data between calls", thus the data is stored in there. Don't use this express VI. We cannot tell from the picture!

 

You also have a glaring race condition that the reset happens in parallel to writing to the terminal, so whatever happens last wins.

0 Kudos
Message 5 of 24
(758 Views)

@altenbach wrote:

Your "build xy graph express VI" is probably set to "retain data between calls", thus the data is stored in there. Don't use this express VI. We cannot tell from the picture!

 

You also have a glaring race condition that the reset happens in parallel to writing to the terminal, so whatever happens last wins.


Okay, i looked over my programm and i think this isnt the only issue... Im also not able to save the data of the graph as exel or txt data. 
I will attach my programm. 

So my thought is to start a measurement which takes the angle as TTL signal and every time the angle changes it should measure the torque as well. I plot this on the graph and want to save the graph on button click and the Data regarding to this. I want a reset button for the graph and data so i can run multiple measurements without stopping the programm. 
Im new to Labview and i watched many youtube videos and treid the NI stuff as well. Im getting into it but its very hard for me. I need this for a project. 

I saved the file for vers 2019.


Best regards and thanks for all the help. 

0 Kudos
Message 6 of 24
(745 Views)

Build your data in a 1D complex array and get rid of the express VI.

 

altenbach_0-1708619192718.png

 

Also, never delete terminal labels!!!

 

0 Kudos
Message 7 of 24
(731 Views)

@altenbach wrote:

Build your data in a 1D complex array and get rid of the express VI.

 

altenbach_0-1708619192718.png

 

Also, never delete terminal labels!!!

 


Okay i try this. What is this X Y and re z im block?

 

0 Kudos
Message 8 of 24
(726 Views)

I got it the way you did it and its working thank you. I still got the same problem sadly. 

Do i now have to reinitalize to default? 

Best regards

Screenshot 2024-02-22 174756.png

Screenshot 2024-02-22 174827.png

Screenshot 2024-02-22 174849.png

   

0 Kudos
Message 9 of 24
(713 Views)

It is RE/IM to complex. X and Y are you two scalars from the measurements that you originally wired to the xy express VI.

 

XY graphs understand complex data and will graph IM vs RE.

 

An xy graph terminal is just an indicator and will graph whatever is in the wire.

0 Kudos
Message 10 of 24
(712 Views)