Lathe Macro execution

More
19 Oct 2024 10:44 #312590 by JuFu
Lathe Macro execution was created by JuFu
Hello, I did CNC (retrofit) an old Magdeburg D30 lathe. 
Started wit AXIS, but changing to gmoccapy now.
Included Lathe Macro and it seems to work (so far).
here my question: when I parameterized a Lathe Macro, how do I get it executed (the lathe to move as wished)?
 

Please Log in or Create an account to join the conversation.

More
19 Oct 2024 11:02 #312593 by Aciera
Replied by Aciera on topic Lathe Macro execution
Not sure if this is what you mean but have you tried clicking on the 'Play' button:

 
Attachments:

Please Log in or Create an account to join the conversation.

More
19 Oct 2024 11:06 #312595 by JuFu
Replied by JuFu on topic Lathe Macro execution
Thanks for the fast response.
Will check for that button. Was not aware of it.

Please Log in or Create an account to join the conversation.

  • tommylight
  • tommylight's Avatar
  • Away
  • Moderator
  • Moderator
More
19 Oct 2024 11:58 #312596 by tommylight
Replied by tommylight on topic Lathe Macro execution
If you have a low resolution screen, the play button will be hidden.
There should be a topic or two here about how to fix that.
Sorry, but on the phone.

Please Log in or Create an account to join the conversation.

More
19 Oct 2024 16:23 #312617 by JuFu
Replied by JuFu on topic Lathe Macro execution
Is there any chance to see/read the nc-code generated by Lathe Macro?

Please Log in or Create an account to join the conversation.

More
19 Oct 2024 16:49 #312619 by Aciera
Replied by Aciera on topic Lathe Macro execution
It doesn't generate gcode. It calls the respective ngc subroutine and passes the required parameters.
eg 'turning.ngc':
;Turning

O<turning> sub

G8 ; Radius mode (easier maths)
G18 ; XZ Plane
G21 ; Metric Units
G90 ; Absolute Distance
G91.1 ; but not for arcs

M6 T#8 G43

#1 = [#1 / 2] ; because of radius mode
#14 = [#<_x>] (starting X)
#13 = #<_z> (starting Z)

#20 = [#6 * SIN[#7]]
#21 = [#6 * COS[#7]]
#22 = [#6 / COS[#7]]
#23 = [#5 + #6 - #20]
#24 = [[#13 - #23] * TAN[#7]]

G96 D2500 S#2 ; Constant Surface Speed Mode
m3 ;Start Spindle
g95 F#4 ; Feed-Per-Rev Mode

O90 IF [#9 GT 0.5]
	M8
O90 ENDIF
g4p1 ; Wait to reach speed

	O100 WHILE [#14 GT [#1 + #3 / 2]]
        g0 X #14
	#14=[#14-#3 / 2]
	G1 X #14
	G1 Z #23 X[#14 + #24]
        O101 IF [#6 GT 0]
                G2 Z#5 X[#14 + #24 + #21] I#21 K#20
		G1 X[#14 + #24 + #21 + #3/2]
        O101 ELSE
	        G1 X[#14 + #24 + [#3 * .6]]
        O101 ENDIF
	O104 IF  [#7 LT 0]
		G0 X#14
	O104 ENDIF
	G0 Z[#13]
	O100 ENDWHILE

	G0 x#1
	G1 Z #23 X[#1 + #24]
        O102 IF [#6 GT 0]
                G2 Z#5 X[#1 + #24 + #21] I#21 K#20
		G1 X[#1 + #24 + #21 + #3]
        O102 ELSE
	        G1 X[#1 + #24 + #3]
        O102 ENDIF
	O106 IF  [#7 LT 0]
		G0 X#14
	O106  ENDIF
	M9
	G0 Z #13
	G0 X #1 ; For touch-off
    M5
	G7
O<turning> endsub
M2

Please Log in or Create an account to join the conversation.

More
27 Nov 2024 19:57 #315410 by Traken
Replied by Traken on topic Lathe Macro execution
Is this the original gmoccapy screen?

Please Log in or Create an account to join the conversation.

More
28 Nov 2024 09:54 - 28 Nov 2024 09:55 #315448 by Aciera
Replied by Aciera on topic Lathe Macro execution

Is this the original gmoccapy screen?


Not sure what you mean exactly but the 'Cycles' tab is usually not part of gmoccapy. It is generated by loading the external lathe macro addon.
Last edit: 28 Nov 2024 09:55 by Aciera.

Please Log in or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.089 seconds
Powered by Kunena Forum