Calculator on the VCP

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
suntravel
Posts: 1982
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Calculator on the VCP

Post by suntravel »

Played with macros.... :)

Made an M55 macro to calculate Vfc for circular pockets or internal thread milling, for the case I can´t find my calculator :mrgreen:

Replaced code with a correct calculating version and logic for senseless user input :D

Code: Select all

;------------------------------------------------------------------------------
; 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
Attachments
mfunc55.mac
(1.36 KiB) Downloaded 23 times
s2.jpg
s1.jpg
Last edited by suntravel on Thu Jun 23, 2022 10:24 am, edited 3 times in total.
johnballard
Posts: 32
Joined: Wed Feb 19, 2020 11:49 am
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: 0818141095
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Calculate Vfc with M55

Post by johnballard »

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. How does the axis 0 work.

Can you share the code for them? Does the code have to be compiled into the PLC program? Do the macros also work on the real CP (aux1, aux2, etc)?
Lagunmatic 250
rk9268vc
Posts: 267
Joined: Fri Nov 13, 2020 4:12 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Calculate Vfc with M55

Post by rk9268vc »

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.
He posted about it here
https://centroidcncforum.com/viewtopic.php?f=60&t=7356

and maybe in another thread as well, but cant find it
suntravel
Posts: 1982
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: Calculate Vfc with M55

Post by suntravel »

rk9268vc wrote: Wed Jun 22, 2022 9:18 pm
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.
He posted about it here
https://centroidcncforum.com/viewtopic.php?f=60&t=7356

and maybe in another thread as well, but cant find it
The new buttons are in Acorn 4.79 Beta3.
Available as public download, give it a try, lots of good improvements in there :)

Uwe
suntravel
Posts: 1982
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: Calculate Vfc with M55

Post by suntravel »

Message for first and second wrong input in a row :mrgreen:

Uwe
Attachments
E1.jpg
E2.jpg
suntravel
Posts: 1982
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: Calculator on the VCP

Post by suntravel »

Next two calculators and custom VCP

Quite a good training to make such things....

Uwe
Attachments
mfunc57.mac
(780 Bytes) Downloaded 39 times
mfunc56.mac
(819 Bytes) Downloaded 31 times
mfunc55.mac
(1.36 KiB) Downloaded 31 times
c2.jpg
c1.jpg
cnckeith
Posts: 7334
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Calculator on the VCP

Post by cnckeith »

cool! thanks for posting.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
ShaAli
Posts: 40
Joined: Mon Nov 21, 2022 12:51 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Calculator on the VCP

Post by ShaAli »

Hello, sorry for a dump question, how do I change to macro to be in inches?
ShaAli
Posts: 40
Joined: Mon Nov 21, 2022 12:51 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Calculator on the VCP

Post by ShaAli »

mm\nBore Diameter:

change them to in ?

in\nBore Diameter:
suntravel
Posts: 1982
Joined: Thu Sep 23, 2021 3:49 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 6433DB0446C1-08115074
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Germany

Re: Calculator on the VCP

Post by suntravel »

You can edit the macros to your liking.

Uwe
Post Reply