I am a bit confused about different type of scripts... Maybe someone can push me in the right direction.
As I understand it until now, there are the following type of scripts:
Type 1
For examle "Machine.Home.gcode" which are used by Buttons in the toolbar or the handwheel.
They could not be called by Gcode ??
Type 2
Scripts like "M123.gcode"
Can be used in gcode like "M123 P1 Q2" where P and Q are #<pvalue> and #<qvalue> in the M123.gcode file..
Type 3
Scripts like "subprogram.sub" which contains a o<subprogram>
Can be used in gcode with "o<subprogram> call"
What's about Parameters ???
Type 4
Expressions like expr.txt
So for my understanding I can not call Machine.Home.gcode from within my gcode.
So if I like to do a calibration of the position, I need to copy all content from Machine.Home.gcode to a new script. I tried M200.gcode... but loading this fails because it can not find the subroutine within the script file itself...
So it has to be in a Type3 script??
Hmm... It is a bit confusing....
So how does this all work together and what makes sense?
Which kind of script can be called from which other type and how?
And why does Machine.Home.gcode work but the same content in M200.gcode does not?
Should i prefer Mxxx.gcode files or better subprogram.sub to use in gcode... does this make any difference?
how to pass parameters to the subprogram.sub from gcode?
Sorry for that many questions but I am realy confused why there are so many differences and why for example tool measuring during M6 does not use Machine.Tool_Offset.Measure_Length.gcode but its own implementation.