;------------------------------------------------------------------------------
; Filename: mfunc55.mac - To run from VCP AUX 10 key, set p197 = 5511
; M55 macro
; Description: Calculate Vfc for internal thread milling or circ. pockets
; Requires: Machine home must be set prior to use.
; Please see TB300 for tips on writing custom macros.
;------------------------------------------------------------------------------
IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching
#105=0
N100
M224 #101 "Calculate Vfc for\nint. thread milling\nor circ. pockets\n\nMill Diameter"
M224 #102 "Bore Diameter"
IF #101 >= #102 and #105 == 0 THEN GOTO 900 ELSE GOTO 110
N110
IF #101 >= #102 and #105 >= 1 THEN GOTO 990 ELSE GOTO 200
N200
M224 #104 "Feedrate Vf"
#103=#104/((#102*3.14)/((#102-#101)*3.14))
M225 #100 "Use for:\nMill Diameter: %f mm\nBore Diameter: %f mm\nFeedrate Vf: %f mm/min\n\nCalculated Feedrate\nVfc= %f mm/min" #101#102#104#103
GOTO 1000
N900
M225 #100 "Mill Diameter = %f\n can not be equal or larger then\nBore Diameter = %f\n\n Back to Start" #101#102
#105=1
GOTO 100
N990
M225 #100 "Really?\nThis will also not fit\n\nMill Diameter = %f\n can not be equal or larger then\nBore Diameter = %f\n\n Back to Start you Stupid" #101#102
GOTO 100
N1000 ;End of Macro
johnballard wrote: ↑Wed Jun 22, 2022 8:43 pm
Humm... in your VCP I see buttons I do not have. The 45's between the X & Y jog buttons and the Axis 0 and All zero.
johnballard wrote: ↑Wed Jun 22, 2022 8:43 pm
Humm... in your VCP I see buttons I do not have. The 45's between the X & Y jog buttons and the Axis 0 and All zero.