02-22-2024 08:00 AM
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
This is it running and measurering.
And after pressing the reset button it doesnt goes to 0,0 like it should.
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
Any idea how to fix this?
Thanks in advance
Julius
Solved! Go to Solution.
02-22-2024 08:27 AM
My graph don't gets resetted when reinit to default (in general this will reset the data only, but not scales)
Why do not use Scale.Minimum Property node and set it to zero on reset?
02-22-2024 08:34 AM
I could do it, but the problem is that the value is still there which shouldnt
02-22-2024 09:01 AM
@Julsbng wrote:
I could do it, but the problem is that the value is still there which shouldnt
Hmm, for me it works:
02-22-2024 09:23 AM - edited 02-22-2024 09:30 AM
@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
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.
02-22-2024 10:05 AM
@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.
02-22-2024 10:27 AM
Build your data in a 1D complex array and get rid of the express VI.
Also, never delete terminal labels!!!
02-22-2024 10:34 AM
@altenbach wrote:
Build your data in a 1D complex array and get rid of the express VI.
Also, never delete terminal labels!!!
Okay i try this. What is this X Y and re z im block?
02-22-2024 10:50 AM
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
02-22-2024 10:52 AM
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.