Code: Select all
; Check for rotary table homing
IF #50010 ; Prevent lookahead from parsing past here
IF [#20104 == 78] THEN GOTO 1000 ; "N" for 4th axis turned off
M92/$[#20104]
G91 G20 G1 $[#20104]30.596 F1800.0
M26/$[#20104]
N1000
Moderator: cnckeith
Code: Select all
; Check for rotary table homing
IF #50010 ; Prevent lookahead from parsing past here
IF [#20104 == 78] THEN GOTO 1000 ; "N" for 4th axis turned off
M92/$[#20104]
G91 G20 G1 $[#20104]30.596 F1800.0
M26/$[#20104]
N1000
Code: Select all
M91/A
M26/A
That's neat! I'll try that out later when I get back into the workshop. I'm likely to be disconnected the 4th axis when not in use, so this would be a good approach.cncsnw wrote: ↑Fri May 22, 2020 4:34 pm If you leave out the G91 move, then you don't even need the GOTO and N1000 logic. You can just include, for example:If Parameter 131 indicates that there is a part-time A axis (or other label), then CNC12 will silently ignore M9x and M26 codes for it when it is not active.Code: Select all
M91/A M26/A
The "IF #50001" in the example is not necessary in any event, since the 4th axis label is not going to change between the time you press Cycle Start to begin homing, and when CNC12 gets to that line of the macro.
Enter the following program:swissi wrote:do you have any code samples that actually prove that the command "If #50001" does indeed stop the look ahead. I'm getting increasingly suspicious that this command doesn't do anything, at least not on the Acorn board.
Code: Select all
N10 #150 = 1.234
N20 G10 P701 R2.345
N30 G0 X0
N40 G1 F2 X2
N50 IF [#50001]
N60 #150 = 3.1416
N70 G10 P701 R2.7183