Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Countdown function

Countdown function 5 years 2 months ago #10160

  • TrygveHe
  • TrygveHe's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hi.

In my brewery project i need a countdown function to control the mash and boiling process, and I have been looking in the documentation and experimented a bit but haven't found a good way implement this.

The function is tried to make had the following input: time (in minutes), Start (boolean), Pause (boolean) and Reset (boolean)
The output: Running time (minutes), Completed (boolean)

Is this something that can easily be made from the standard functions, or have someone made something similar that they can share? Or is there a function block already there that I haven't found?

Regards,
Trygve
The administrator has disabled public write access.

Countdown function 5 years 2 months ago #10161

  • drac
  • drac's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 1
  • Karma: 0
You can do like this.
timer.png

brew.png
Last Edit: 5 years 2 months ago by drac.
The administrator has disabled public write access.

Countdown function 5 years 2 months ago #10162

  • TrygveHe
  • TrygveHe's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hi Drac.

Thanks. I will try this out when I get time.

Regards,
Trygve
The administrator has disabled public write access.

Countdown function 5 years 2 months ago #10181

  • TrygveHe
  • TrygveHe's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 42
  • Karma: 0
Hi Drac.

I tried to implement the code you suggested, but there was no W-Waith0-TimerCount in the Waith block. The W-Waith0-TimerTime was available.

Any suggestion what I have done wrong?

Regards,
Trygve
The administrator has disabled public write access.

Countdown function 5 years 2 months ago #10182

  • drac
  • drac's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 1
  • Karma: 0
Hi
Just pick an integer value in Waith0 and change it to .TimerCount

// Daniel
The administrator has disabled public write access.

Countdown function 5 years 2 months ago #10183

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Hi all.

Maybe you can do this, works fine:


countd_1.png




countd_2.jpg



sorry: the time is in seconds, but it's easy to change last line of the code:
if((OA1*60)>= etc.


/Bruno
Last Edit: 5 years 2 months ago by brunad.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 8.864 seconds