LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connection between Reset and Measurement

Hello, 

I would like to reset my Graph andnot everything is working properly. The problem is when resetting my Graph on button press the angle is not resetting correctly. 

Before Reset

Julsbng_0-1709214599388.png

After Reset

Julsbng_1-1709214622415.png

When the Torque falls under 0 the Measurement is stoppping because i just want to print this part of the measurement. When starting the measurement manually again before resetting the Graph, the measurement makes a jump to a higher angle which is undertandable because i stopped the measurement but the counter got the newest value and gives it out as soon as the measurement starts again. When i then reset the Graph it is working and the Angle is resetted properly to 0. But when i just hit the reset button the measuremnt jumps from 0 to the difference of the last measured value and the reset Value.

 

Meausement

Julsbng_2-1709214984323.png

Jump of angle after MANUALLY pressing the Start meausurement button.

Julsbng_3-1709214996311.png

Reset is working because the measurement was activated before resetting.

Julsbng_4-1709215016702.png

 

 

This is my abord criterion which is perfect for my use.  The measurement needs to be stopped because i dont want many data after the torque goes to 0. 

Julsbng_5-1709215231866.png

 

 

So heres my question: Any idea how i can reset the graph such that the measurement is starting first again and after the jump of the angle the reset is done? I dont know if its understandable what i want to achieve. 

 

Thanks in advance

 

0 Kudos
Message 1 of 5
(488 Views)

My thought was, that the programm would need to do one iteration without resetting but measuring again so that the actual value of the angle is the rest value. After that reset the graph...

0 Kudos
Message 2 of 5
(486 Views)

I tried some things with sequences etc. but it didnt work. I attached the programm. 

0 Kudos
Message 3 of 5
(485 Views)

I tried it like this now and it seems to work. I owuld be interested to see any other solutions which would be better. 

Julsbng_1-1709217561599.pngJulsbng_2-1709217628150.pngJulsbng_3-1709217636346.png

 

 

0 Kudos
Message 4 of 5
(450 Views)

@Julsbng wrote:

Hello, 

I would like to reset my Graph andnot everything is working properly. The problem is when resetting my Graph on button press the angle is not resetting correctly. 


This seems to be a continuation of this old story and I am not sure why you are starting a new thread.

 

Why would you have a greedy secondary loop (bottom) that spins millions of times per second just burning the CPU. If something is not working correctly, you need to define exactly what "correctly" means in your specific case.

You are apparently bouncing the angle value around via a shift register as well as a local variable with a hidden indicator, That's like herding cats! Is it correct that some of your shift registers are not initialized?

 

You need exactly one loop and a simple state machine architecture!!!

0 Kudos
Message 5 of 5
(418 Views)