RRF 3.5B2 Error: meta command: unknown variable
-
Hello all,
I run RRF 3.5B2 on Duet 3 in standalone mode.
I am puzzled by an unexpected "unknown variable error".
Here is an extract from "G103.g":
var uClean = false ... if {var.uClean} G90 G1 H2 Y{125+random(226)} X{var.xForth} U{var.uForth} else G90 G1 H2 Y{125+random(226)} X{var.xForth} if {var.uClean && var.xClean && {global.ioMotV!=null} && {global.ioMotW!=null}} G90 G1 H2 V{var.vDive} W{var.wDive} F{move.axes[4].speed} elif {var.xClean && {global.ioMotV!=null}} ...
And there the extract from the "eventlog.txt":
YYYY-MM-DD HH:MM:SS [warn] Error: in file macro line 7 column 16: meta command: unknown variable 'uClean'
However the "var.uClean" variable is being called (several times in the full "G103g" file) between its declaration line 1 and its call line 7 the error occurs line 7 nonetheless.
Has anybody an idea of the possible reason for this issue?
Thank you in advance for your help.
Regards,
-
@jp-douarvil-0
I've been having some weird variable issues too (since 3.4 tbh).Try this out and see what happens
var uClean = 0 set var.uClean = false
-
Has anybody an idea of the possible reason for this issue?
Did you verify the vars and expressions following 'uClean'? The error message blames 'uClean', but points at the following column.
@Exerqtor
Maybe a problem with type coercion? In line 1, 'uClean' might be set up as an int. To verify that, change line 1 tovar uClean = false
-
@jp-douarvil-0 please attach your G103.g file to a post in this thread. It might contain a non-printing character; if not then I will try out your file here.
PS - I suspect this is caused by the multiple file readers in RRF 3.5 and is related to https://forum.duet3d.com/topic/31812/3-5b2-macros-called-from-a-job-lose-parameters. I have added it to my list to investigate.
-
@Exerqtor I've been able to reproduce your example and fixed the underlying bug. Unforunately, I have been unable to reproduce the other two reports so far.
-
@chrishamm can you provide more details about the actual bug? What versions firmware version did it affect? Only 3.5B2?
I'm asking this because I'm facing something similar and I can't find a way to isolate the issue.
I have a g-file with 20 local vars. and I'm getting aunknown variable
To give you a better idea, here are (simplified) contents of the filevar convertedAstart=0 var convertedAEnd=0 var periodAStartHr=19 var periodAStartMin=0 var periodAEndHr=9 var periodAEndMin=0 set var.periodAStartHrToSec=var.periodAStartHr*3600 set var.periodAStartMinToSec=var.periodAStartMin*60 set var.convertedAstart=var.periodAStartHrToSec+var.periodAStartMinToSec set var.periodAEndHrToSec=var.periodAEndHr*3600 set var.periodAEndMinToSec=var.periodAEndMin*60 set var.convertedAEnd=var.periodAEndHrToSec+var.periodAEndMinToSec while true if (var.convertedAstart<=global.legacyEpochSeconds || global.legacyEpochSeconds<=var.convertedAEnd) ; Do stuff here
And here's the error that I receive:
Error: in GCode file line 45 column 26: meta command: unknown variable 'convertedAstart'
The file is called with
M98 P"<path-to-file>"
.
This error usually happens when I callM25
,M0
and thenM98 P"<path-to-file>"
to start printing again.ATM rebooting the device solves the issue, ie, after reboot
M98 P"<path-to-file>"
does not throw any error. -
@AndMaz The problem was that an invalid statement in a macro called by a job file caused the print to abort. The function aborting the print cleared all the variables from the scope of both file readers executing a macro file causing one file reader to output a bad error message.
-
@Exerqtor please can you confirm if this is fixed for you in 3.5.0-beta4 ?
-
@T3P3Tony I haven't been able to run beta4 because of the crashing issues i'm having with it for more than one print. But if I remeber correctly this specific issue was fixed.
-
-
-