LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Histerisis condition

Solved!
Go to solution

Hi everyone,

 

I've one sensor and one reference value. I want to change a boolean value when de diference above is more than 0.5. Then, I want to keep in that state until the variable value is 0.5 lower than the reference one. How could it be done? I attach a capture where there is a code which only does one part.

 

Thank you!

0 Kudos
Message 1 of 6
(1,796 Views)

Hi George,

 


@George7893 wrote:

I've one sensor and one reference value. I want to change a boolean value when de diference above is more than 0.5. Then, I want to keep in that state until the variable value is 0.5 lower than the reference one. How could it be done?


Use a shift register in your loop to store the current state of the boolean. Then use a case structure to handle your two cases to check for the next "change condition"…

 


@George7893 wrote:

I attach a capture where there is a code which only does one part.


No, you did not attach anything…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(1,772 Views)
Solution
Accepted by topic author George7893

I finally solve it as the capture attached by using another post. Thank you anyway.

0 Kudos
Message 3 of 6
(1,770 Views)

Hi George,

 

why do you need DDT wires and so many functions?

 

See this as suggestion:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(1,766 Views)

Hi again!,

 

Of course your model is really simple but I'm not able to make it work in my VI. I attach the whole graphic. I'm new in LabView, so maybe I'm confused with something.

 

Best Regards

0 Kudos
Message 5 of 6
(1,753 Views)

Hi George,

 

don't use express VIs and their DDT wires: they will not help you in the long run!

 

As a quick fix: place a FromDDT function after the filter express and convert to scalar DBL.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(1,700 Views)