Gobal variable usaege in M190?
-
Hi,
I have a global variable (global.bed_temp_initial) which I want to use at a M like that:
M190 S{global.bed_temp_initial}
That should work when I look at the example from the docu:
https://docs.duet3d.com/User_manual/Reference/Gcode_meta_commands
But I get an error only:
Any ideas? Firmware: RepRapFirmware for Duet 3 Mini 5+ 3.5.0-rc.2
Cheers, Chriss
-
@Chriss if you run this command:
echo global.bed_temp_initial
I think you will find that your global variable doesn't have a numeric value.
-
Background:
I set the variable in the config.g; Some variables for later global tool_temp_initial="0" global bed_temp_initial="0"
And the slicer does the rest:
set global.tool_temp_initial="{first_layer_temperature[initial_extruder]}" set global.bed_temp_initial="[first_layer_bed_temperature]"
Is that a type problem? Should I use:
; Some variables for later global tool_temp_initial=0 global bed_temp_initial=0
Cheers, Chriss
-
@Chriss " " makes it a word and not an int.
So yes, remove the " -
@jay_s_uk
Bugger... you are right.... I just tested it... I do not know why I fall in almost every trap...