what might stop daemon.g running?
-
I have a daemon.g, and in testing it runs fine, but I set a long print running (it's currently about 14 hours in and at 50%) and at some point daemon.g has stoped running. It's not now doing what it should.
Board: Duet 3 MB6HC (MB6HC)
DSF Version: 3.3.0
Firmware: RepRapFirmware for Duet 3 MB6HC 3.3 (2021-06-15)
SBC: attached Pi4config.g defines sensor 6 (it's a thermocouple, it is still reporting temperature correctly) and a servo 1. They are still reporting correctly and responding to manually injected commands correctly respectively.
M308 S6 P"temp3" Y"thermistor" T4701 B4266 C1.048787e-7 A"trailing" M950 S1 C"io7.out"
The daemon.g is supposed to operate the servo to open and close a chamber vent. It worked fine for the first five hours or so, (ie until I went to bed) but this morning it's not reacting to temperature changes.
This is what daemon.g had from start of print.
At 38C it opens the vent, at 37.5C it closes it (at least, that's the intention).if boards[0].vIn.current > 12 if sensors.analog[6].lastReading > 38 if state.gpOut[1].pwm < 0.09 echo "chamber",sensors.analog[6].lastReading,"- open vent" M280 P1 S260 ; open vent if sensors.analog[6].lastReading < 37.5 if state.gpOut[1].pwm > 0.06 echo "chamber",sensors.analog[6].lastReading,"- close vent" M280 P1 S10 ; close vent G4 S10 ; pause 10 seconds
I've tried substituting this, and it doesn't run either (at least, no message appears)
echo "daemon.g" G4 S10 ; pause 10 seconds
-
@achrn run M122 and check in the report what the daemon input channel is doing.
-
@dc42 M122 includes:
Daemon: Buffered code: M106 P4 S1 L0.25 B0.2 H6 T35:36 C"encl" ; fan thermostatic ==> 92 bytes Executing macro daemon.g, started by system Number of flush requests: 1
I have to say I don't know how that fan definition got in there! It's not in the (current) daemon.g.
As implied, I have been fiddling with daemon.g while the print is running (which is presumably not very bright), and a version of daemon.g did have some fan commands, but not (intentionally) creating a thermostatic control on one - it had simple
M106 P4 S0.6
type things. Presumably at some point I've inadvertently saved something I shouldn't into daemon.g, and now therefore I don't actually know what is in the daemon.g it's running.Is there a way to kick daemon.g to tell it to to re-read the daemon.g file and start again, without upsetting a running print job?
-
@achrn I think deamon.g will be periodically "reloaded" (every 10 seconds).
-
@cosmowave said in what might stop daemon.g running?:
@achrn I think deamon.g will be periodically "reloaded" (every 10 seconds).
It's not reloading - it is still (two hours later) stuck on the same line of 'buffered code' which isn't in the current daemon.g (and probably hasn't been for at least 12 hours, because I haven't changed daemon.g since yesterday, though since I don't know how it got there, I can't be definitive about when it got there).
It's not a big problem - I can operate the vent manually, and do a M999 when the job completes.
-
@achrn Eventually it is possible to rename deamon.g in the sys folder. But i think it will not help with "unstucking" the system...
-
@achrn this is the section of the M122 report that I was interested in:
=== GCodes === Segments left: 0 Movement lock held by null HTTP is idle in state(s) 0 Telnet is idle in state(s) 0 File is idle in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger is idle in state(s) 0 Queue is idle in state(s) 0 LCD is idle in state(s) 0 Daemon is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty
-
@dc42 OK:
=== GCodes === Segments left: 1 Movement lock held by null HTTP* is doing "M122" in state(s) 0 Telnet is idle in state(s) 0 File* is doing "G1 X17.202999 Y17.684000 E0.256060" in state(s) 0 USB is idle in state(s) 0 Aux is idle in state(s) 0 Trigger* is idle in state(s) 0 Queue* is idle in state(s) 0 LCD is idle in state(s) 0 SBC is idle in state(s) 0 Daemon* is doing "M106 P4 S1 L0.250000 B0.200000 H6 T35:36 C"encl"" in state(s) 0 0, running macro Aux2 is idle in state(s) 0 Autopause is idle in state(s) 0 Code queue is empty.
-
@achrn maybe rename daemon.g, give it a couple of minutes and then name it back
-
@jay_s_uk
Renaming it achieves nothing. Deleting it achieves nothing. Putting a new different one back in achieves nothing. In both the parts of M122 I've quoted up thread it stays stuck on doing an M106.Anyway, I'm now on layer 2496 of a 3180 layer print so I become less and less inclined to tamper in case I do something bad and it fails again (this being second attempt - first time it failed with some dodgy wiring, now replaced).
-
Just for completeness: Job completed. I issued M999 and it's working fine now.
-
Note to self. Don't muck with a running macro file.