LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean value event SGNL timer change

Solved!
Go to solution

Hello! I have a timer for start / stop heat pump and manual control for it. But i can not do it correct. Looking for same advice. I need high priority for manual control. Thanks!

0 Kudos
Message 1 of 10
(374 Views)

Hi black,

 


@black1 wrote:

I have a timer for start / stop heat pump and manual control for it. But i can not do it correct.


  • In your VI is no timer, only a control labelled "x".
  • Please describe the "correct" required behaviour!

@black1 wrote:

Looking for same advice. I need high priority for manual control.


  • Why is there a wait function next to an event structure with a timeout event?
  • why do you use a "value signalling" property node of the "Manual on/off" control when there is no value change event for that control?
  • What is "high priority" for a manual control?
  • why do you generate a value change event for "Boolean" IN EACH ITERATION of your loop? (This is the main problem here!)

Suggestion: you can easily give "high priority" to the manual input when you only trigger events on rising/falling edges of your boolean signals…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 10
(362 Views)

wait 100ms for RS485 protocol of Heat Pump

When timer is On, i want at any time turn OFF heat pump

 

  • why do you generate a value change event for "Boolean" IN EACH ITERATION of your loop? (This is the main problem here!)   -  i guess, what i must fix?

 

Thanks!

0 Kudos
Message 3 of 10
(357 Views)

Hi black,

 


@black1 wrote:

When timer is On, i want at any time turn OFF heat pump


When you want to act "any time" then you should not use a 100ms wait in the loop!

Btw. for serial communication you should not use wait functions, most often there are better ways: video!

 


@black1 wrote:
why do you generate a value change event for "Boolean" IN EACH ITERATION of your loop? (This is the main problem here!)   -  i guess, what i must fix?

Please re-read my suggestion in the previous message…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 10
(343 Views)

I agree that your code makes very little sense.

 

  • Since you are polling the time, you spin the loop anyway, so just read the terminals.
  • The "hour" is an integer and converting it to DBL is pointless.
  • You don't need to wire the current time to "seconds to date/time". It defaults to the current time.
  • There should not be any signaling property nodes or event structures.
  • What is the purpose of the hidden "boolean". Makes no sense.

If you want to turn on the heat pump as long as the hours are 5..10 AND manual on/off=TRUE, here's all you probably need. (Yes, you definitely need more code, but this should give you a few basics)

 

altenbach_1-1729580694820.png

 

 

 

0 Kudos
Message 5 of 10
(332 Views)

Thanks everyone!
I still can't figure out how to do:
The first event triggered the timer. The manual control button is turned on. The timer is still running. Pressing the manual control button turns off the timer and the heat pump. The highest priority for manual control.

 

Value(Signaling) is always a value change event, regardless of whether the value actually changed or not?

 

Thanks!

0 Kudos
Message 6 of 10
(295 Views)

Hi black,

 


@black1 wrote:

Value(Signaling) is always a value change event, regardless of whether the value actually changed or not?


Yes.

 

That's the reason for my suggestion in the previous posts…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(287 Views)

Thanks for all!

Solved by '' Relay Logic ''

0 Kudos
Message 8 of 10
(267 Views)
Solution
Accepted by topic author black1

Hi black,

 

why so complicated?

You should test for rising/falling edges in your boolean signal!

 

See this:

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(258 Views)

Thank you  !

your VI is more simple solutiom!

0 Kudos
Message 10 of 10
(237 Views)