I'm running a Duet 3 MB6HC on 3.5.0-rc.1 using SBC (RPi-4) and some Toolboards v1.1
Occasionally I get the error:
Error: in file daemon.g line 12: in file macro line 1: unknown variable 'currentTemp'
The deamon.g looks like this:
var tolearance = 3
var setpoint = 0
var currentTemp = 0
while true
if {global.Idle == false}
set var.currentTemp = heat.heaters[{global.IO_NR[0][global.IO_HEATER]}].current
if heat.heaters[{global.IO_NR[0][global.IO_HEATER]}].state == "off"
if var.currentTemp < 50
M98 P"0:/macros/Lights/T0_Status.g" S"Off"
else
M98 P"0:/macros/Lights/T0_Status.g" S"Blue"
else
if heat.heaters[{global.IO_NR[0][global.IO_HEATER]}].state == "active"
set var.setpoint = heat.heaters[{global.IO_NR[0][global.IO_HEATER]}].active
else ; standby
set var.setpoint = heat.heaters[{global.IO_NR[0][global.IO_HEATER]}].standby
if var.currentTemp >= {var.setpoint + {var.tolearance}}
M98 P"0:/macros/Lights/T0_Status.g" S"Blue" ; cooling
elif var.currentTemp <= {var.setpoint - {var.tolearance}}
M98 P"0:/macros/Lights/T0_Status.g" S"Red" ; heating
else
M98 P"0:/macros/Lights/T0_Status.g" S"Green" ; at setpoint
G4 P2000 ; loop every 2s
It's not a big problem in this case, since It's just turning some LED's different colors, but it still shouldn't happen.
It only happens maybe once an hour, so I cant reproduce it reliably.
I don't think I'm doing anything wrong, since it works most of the time without any issues.
Maybe it is related to: rrf-3-5b2-error-meta-command-unknown-variable