bprall Posted August 17, 2021 Posted August 17, 2021 After looking through the G-Code guide that comes with the NC mill program, it seems like it would be helpful to include some info about basic programming in G-Code for the System. For example the M99 mentions its use as a return in a Loop but I do not see anything which sets up the start of Loops. Also I do not see any info about using or defining variables in the G-Code. Even a simple example program with a while loop that says something like n=0 while (n<5) { G01 X0.0 Y0.0 F30 G01 X(0.0+n*1.0) Y0.0 F6 n=n+1 } would be helpful.
bprall Posted August 17, 2021 Author Posted August 17, 2021 Also, is there documentation for the implementation of the G65 command. When I try just basic g-code for variable usage #101 = 5.0 G01 X[#101+0.0] Y[0.0] F30 I get an error about parametric programming not being enabled from the system.
bprall Posted August 18, 2021 Author Posted August 18, 2021 I did find the Parametric programming setting in the ini file. Turning that on allows G65 to be used with parameter passing where the subprogram needs to use the #number aligned with the Letter set of the passed parameters. G65 will accept P(program number in default directory) or G65 (Specific File Path name) then followed by Args A,B,C, ... with a few not allowed to ZZ. (The allowed Args and their corresponding #number are listed on the new tab which appears when Parametric is enabled.) So with actually being able to assign and modify variables, are their Condition States allow like IF and similar.
bprall Posted August 19, 2021 Author Posted August 19, 2021 Seems like Macro B style works with EQ, GT, etc, with both { } enclosures and DOn ENDn So n=0 while (n<5) { G01 X0.0 Y0.0 F30 G01 X(0.0+n*1.0) Y0.0 F6 n=n+1 } is #1 = 0 WHILE [#1 LT 5] DO1 G01 X0.0 Y0.0 F30 G01 X[0.0 + #1 * 1.0] Y0.0 F6 #1 = #1 +1 END1 This type of info would be great in the Mill G-Code manual.
Recommended Posts