WATCHDOG(9)
π WATCHDOG(9) π
okay bestie, this is a HAL Component manual page and it's lowkey one of the most important ones, so lock in π«Ά
β¨ NAME β¨
watchdog β monitor multiple inputs for a "heartbeat"
it's giving "are you still alive??" energy, but for your machine π
πΈ SYNOPSIS πΈ
loadrt watchdog num_inputs=N
you must specify the number of inputs, and it's gotta be from 1 to 32. no more, no less. each input gets its own separate timeout value, so they're all living their own independent lives fr fr π
π FUNCTIONS π
processβ checks all the input pins for transitions, and clearsok-outif any input has had no transition within its timeout period. this one does not use floating point, so you should add it to a fast thread. speedy queen behavior π₯set-timeoutsβ checks for timeout changes, and converts the float timeout inputs into int values thatprocesscan actually use. this function also monitorsenable-infor false to true transitions, and re-enables monitoring when it catches one of those transitions. heads up: this one does use floating point, so it's appropriate to add it to the servo thread β
π¦ PINS π¦
watchdog.input-nbit in β input number n. the inputs are numbered from 0 to num_inputs-1. yes bestie, zero-indexed, it's iconic like that πwatchdog.enable-inbit in (default: FALSE) β if TRUE, forcesout-okto be false. also, if a timeout occurs on any input, this pin must be set FALSE and then TRUE again to re-start the monitoring of input pins. so like, you have to actually toggle it, no cap πwatchdog.ok-outbit out (default: FALSE) β the OK output. this pin is true only ifenable-inis TRUE and no timeout has been detected. you can connect this output to the enable input of acharge_pumporstepgen(in v mode), to provide a heartbeat signal to external monitoring hardware π«Ά main character output fr
π PARAMETERS π
watchdog.timeout-nfloat in β timeout value for input number n. the inputs are numbered from 0 to num_inputs-1. the timeout is in seconds, and it may not be below zero.
β οΈ note that a timeout of0.0will likely preventok-outfrom ever becoming true. also note that excessively long timeouts are relatively useless for monitoring purposes. like, why even have a watchdog at that point bestie π
π LICENSE π
GPL
and that's the whole vibe π this page is from the LinuxCNC Documentation, dated 2010-06-22, and the manual is WATCHDOG(9) β a certified classic, no notes, obsessed πβ¨
π¦ where this page comes from
- debian bookworm: linuxcnc-uspace 2.9.0~pre1+git20230208.f1270d6ed7-1+deb12u2 Β· GFDL-1.1-or-later
- debian trixie: linuxcnc-uspace 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms