expression inside expression
-
@k01571n3n no, a variable name can't be an expression. What you really want is an array-valued global variable, but they are not implemented yet.
-
@dc42 okay.
i fixed it with this
if global.CurrentToolMemory = 0 T0 G53 G1 X{global.T0ParkX} Y{global.T0ParkY} F20000 ; ToolHead to the center M291 R"Kaikkien akseleiden kotiinajo" P"Kotiinajo valmis" S1 T1 ; Message elif global.CurrentToolMemory = 1 T0 G53 G1 X{global.T1ParkX} Y{global.T1ParkY} F20000 ; ToolHead to the center M291 R"Kaikkien akseleiden kotiinajo" P"Kotiinajo valmis" S1 T1 ; Message elif global.CurrentToolMemory = 2 T0 G53 G1 X{global.T2ParkX} Y{global.T2ParkY} F20000 ; ToolHead to the center M291 R"Kaikkien akseleiden kotiinajo" P"Kotiinajo valmis" S1 T1 ; Message elif global.CurrentToolMemory = 3 T0 G53 G1 X{global.T3ParkX} Y{global.T3ParkY} F20000 ; ToolHead to the center M291 R"Kaikkien akseleiden kotiinajo" P"Kotiinajo valmis" S1 T1 ; Message else M291 R"Kaikkien akseleiden kotiinajo" P"Kotiinajo valmis" S1 T1 ; Message G53 G1 X183 Y320 F20000 ; ToolHead to the center
when those array-valued variables will come?
-
@dc42 and i noticed that this does not work because of "ä" letter.
It says Error: M291: control character in string
M291 R"Filamentin lataus" P{"Kuumapään lämmittäminen " ^global.Temperature^ "-asteeseen"} S1 T3
Like this it works:
M291 R"Filamentin lataus" P{"Kuumapaan lammittaminen " ^global.Temperature^ "-asteeseen"} S1 T3
Also this doesnt work. If i change "ä" to "a" it will work like it should.
M291 R"Filamentin lataus" P"Kuumapään lämmittäminen asteeseen"S1 T3
-
@k01571n3n accented characters in strings should work provided that you save the file in UTF8 format.
-
@dc42 how can i do that? Its not working in console or any macros if i make them in dwc.
-
@k01571n3n does this work for you:
echo "Kuumapään lämmittäminen asteeseen"
-
PS I just entered this in the DWC console:
M291 R"Filamentin lataus" P"Kuumapään lämmittäminen asteeseen"S1 T3
and it worked.
-
@dc42 echo works but that other one doesn't. I don't understand what it could be due to
-
@dc42 echo {"Kuumapään lämmittäminen " ^ global.Temperature ^ "-asteeseen"}
this works also like it should. there is a some problem with that m291 comment
-
@k01571n3n it works OK for me.
This is the macro file: M291 accented character test.g
-
@dc42 interesting
-
@k01571n3n I can reproduce this in SBC mode and I am looking into it.
PS: I've got a fix ready for this which will be included in the next versions.
-
@chrishamm thats nice! i forgot to mention that i got a raspberry with duet...
-