• 23.02.2026, 02:21
  • Registrieren
  • Anmelden
  • Sie sind nicht angemeldet.

 

Speedy-VI

Senior Member

Playground - Countdown Timer & X=CNT Block

Donnerstag, 12. Februar 2026, 06:40

Is there an easy way to set up a countdown timer in the Playground? I am thinking about setting up a control source for fan speeds that includes an override if my CPU temperature exceeds a value for a period of time. My fan speeds would normally be controlled by a virtual sensor that is equal to coolant temp minus ambient temp (Delta-T), but the override path would monitor the CPU temp, and if it exceeds a trigger value (say 80°C) for a period of time (say 15-seconds) the fan speeds would change to a specific value (say 90%), and remain at that speed until the CPU temp drops below the trigger value for a period of time.

I set up the attached in the Playground. The upper left area subtracts Ambient Temp from Coolant Temp to get Delta-T. This value is passed through the Override Select switch when the CPU Temp is lower than the Override Trigger Temp. The lower left area compares the CPU Temp to the Override Trigger Temp. If the CPU Temp exceeds the Override Trigger Temp, the On Delay counter starts counting. When it reaches the Override Delay Time, the output of the On Delay block goes High, which causes the Override Select to switch to the Override Temp (input B). I set this constant to 20. When the Override Select S-input is High, the Override Temp is sent to the Octo. The Octo has a fan speed curve based on Delta-T, which normally never goes above 10°C. When the Override Temp gets sent to the Octo fan speed curve, it will set the fan speeds to 90%. They will stay at that speed until the CPU Temp drops below the Override Trigger Temp. When that happens, the Override Select switches back to the Delta-T Temp (input A). I am emulating some of the values in this test setup and have not tried it live with my Octo. It could certainly be refined a bit, but the general idea appears to work.

My question is, is there an easier way to do this, or more generally, an easier way to set up countdown timers? I tried feeding UTC Seconds into the CNT input of an X=CNT block, with Enable High and an Input connected to the Reset. The Input has no Data Source but has a fallback value of 1 and a Test value of 0. The X=CNT block Time value was left at the default value of 10-seconds. I watched the seconds counter and pulled the Reset Low when the seconds rolled over from 59 to 0, thinking that the X=CNT block output would increase from 0 to 10 in the 10 second Time Period but that is not what happened, I could not figure out how the X=CNT block output correlated to the input Seconds values. Maybe using UTC seconds as the CNT input is the problem but I could not think of something else to count. I tried replacing the UTC Seconds with an X=R(rect) Square Wave Generator but the description of this block just says "Generates a continuous square wave signal over the time T if EN = 1". The value input to T seems to set the period of the Square Wave. When the T input is set to the default value of 10, the output changes state about every 5 seconds. Setting the T value to 1 makes the output change state about every 0.5 seconds, so a 1-second period. Decimal values lower than 1.0 did not make it go any faster. When I connected the output of the Square Wave Generator to the CNT input of the X=CNT block, the output remained at 0, so this experiment did not work.

Also, a minor OCD annoyance, but I could not get the line connecting the output of the Override Select Switch to the Output block to be perfectly horizontal. There seems to be a snap set in the Playground and somehow the X=switch (A.B) block output and the Output block input would not horizontally align. There are no Grid and Snap settings that I could find. Is this just a limitation of the Playground editor or is there a way to force connection lines to be perfectly horizontal?

The attached screenshots show the Override temp Not Active (Delta-T is sent to the Octo curve controller) and Override Temp Active (20°C is sent to the Octo curve controller).

Ähnliche Themen