Adding a 20% feeds button to VCP

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

suntravel
Posts: 1967
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: Adding a 20% feeds button to VCP

Post by suntravel »

Gary Campbell wrote: Fri Jul 15, 2022 8:09 am
. :lol: I am working on Keith right now. I think he is close to caving in.
What can I do to help? I am usually pretty good at convincing a businessman to spend programming dollars to implement a free service that may reduce sales of one of the more popular accessories. :lol:
Choose the easy way and convince his wife that he needs a WMPG to get faster out of the shop to spend more time with her ;)

Uwe
Black Forest
Posts: 345
Joined: Thu Nov 23, 2017 1:39 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: Adding a 20% feeds button to VCP

Post by Black Forest »

suntravel wrote: Fri Jul 15, 2022 8:56 am
Gary Campbell wrote: Fri Jul 15, 2022 8:09 am
. :lol: I am working on Keith right now. I think he is close to caving in.
What can I do to help? I am usually pretty good at convincing a businessman to spend programming dollars to implement a free service that may reduce sales of one of the more popular accessories. :lol:
Choose the easy way and convince his wife that he needs a WMPG to get faster out of the shop to spend more time with her ;)

Uwe
You got that ass backwards Uwe. She would pay extra if I spent less time with her! :D
suntravel
Posts: 1967
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: Adding a 20% feeds button to VCP

Post by suntravel »

Slow Joe with some funny redlight is done.

Copy the files from the ZIP into your \cncm\resources\VCP\Buttons\aux13 folder

Edit acorn_mill_....skin.vcp

Code: Select all

 <button row="10" column="1">cycle_cancel</button>
  <button row="10" column="2">single_block</button>
  <button row="10" column="3">tool_check</button>
  <button row="10" column="4">feed_hold</button>
  <button row="10" column="5">aux13</button>
  <button row="10" column="6">cycle_start</button>
or place the aux13 where you want.

Edit the acorn_mill_plc.src

place these lines

Code: Select all

; Aux13 to SlowJoe----UWE
IF SkinAux13_M THEN KBOverride_W = 20
IF SkinAux13_M || KBOverride_W == 20 THEN (Aux13LED)
Here: (to find the right place)

Code: Select all

;--Feedrate Override Section
;------------------------------------------------------------------------------
; Feedrate override works as follows:
;
; 1. The PLC reads the 8 bit value of the FeedrateKnob_W directly (0-255)
; 2. The PLC scales this value to a 0-200 value (0-200%) by dividing by
;    the knob value by 127.5 and then multiplying the result by 100
; 3. If keyboard jogging is enabled, the PLC
;    determines whether the operator is using the keyboard override or
;    the FeedrateKnob_W to override the feedrate by watching which was changed
;    most recently.  The most recently changed value is saved as
;    "FinalFeedOverride_W"
; 4. Parameter 39 in (From the "params" screen in CNC12 software) stores
;    a value which the PLC program must use to limit the amount
;    of override applied to the programmed feedrate. This value is specified
;    as a percentage.
; 5. The PLC limits the override percentage by reading parameter 39 and, if
;    the feedrate override percentage as read from the knob is greater than
;    parameter 39, it sets the FinalFeedOverride_W value to the value of
;    parameter 39.
; 6. Once the override percentage has been determined and limited (if needed)
;    The PLC send this value up to the CNC12 software by setting
;    SV_PLC_FEEDRATE_KNOB = FinalFeedOverride_W
; 7. CNC12 reads SV_PLC_FEEDRATE_KNOB, factors in its own override based
;    on parameter 78 (see operators manual for more info on parm 78) and then
;    returns an override value to the PLC in the system variable
;    SV_PC_FEEDRATE_PERCENTAGE
; 8. The PLC reads SV_PC_FEEDRATE_PERCENTAGE and (typically) echoes the system
;    variable to SV_PLC_FEEDRATE_OVERRIDE which the MPU11 uses as the final
;    determination of the feedrate override percentage.
;------------------------------------------------------------------------------
; 1. The PLC reads the 8 bit value of the FeedrateKnob_W directly (0-255)
; NOTE: BTW = Bit To Word
; BTW reads the specified number of bits (if none is specified it defaults to 8)
; starting from a bit location and writes them to a word with the starting bit
; location being written to the LSB of the word used.  Below, BTW reads the bit
; values from JpFeedOrKnobBit0 to JpFeedOrKnobBit7 and writes them into to the
; word "FeedrateKnob_W" which sets FeedrateKnob_W to a value of 0-255
;------------------------------------------------------------------------------
IF OnAtPowerUp_M THEN KbOverride_W = 100, FinalFeedOverride_W = 100, SET UsingVirtualOverride_M
;------------------------------------------------------------------------------
; 2. Scale this value to a 0-200 value (0-200%)
;------------------------------------------------------------------------------
IF True THEN SkinFeedOverTimer = 200
IF SkinFeedOverMinus_M THEN (SkinFeedOverMinusPD), SET SkinFeedOverTimer
IF SkinFeedOverPlus_M THEN (SkinFeedOverPlusPD), SET SkinFeedOverTimer

IF !SkinFeedOverPlus_M && !SkinFeedOverMinus_M THEN RST SkinFeedOverTimer

IF !WaitingForSleepTimer_M && ((KbIncFeedOver_M || SkinFeedOverPlusPD) || (SkinFeedOverTimer && SkinFeedOverPlus_M))
  THEN KbOverride_W = KbOverride_W + 1,
       RST UsingFeedrateKnob_M,
       SET WaitingForSleepTimer_M,
       SleepTimer = 30, SET SleepTimer

IF !WaitingForSleepTimer_M && ((KbDecFeedOver_M || SkinFeedOverMinusPD) || (SkinFeedOverTimer && SkinFeedOverMinus_M))
  THEN KbOverride_W = KbOverride_W - 1,
		RST UsingFeedrateKnob_M,
		SET WaitingForSleepTimer_M,
		SleepTimer = 30, SET SleepTimer

IF SleepTimer THEN RST WaitingForSleepTimer_M, RST SleepTimer

; MPGMacro3_M Feed Override 20% MPGMacro4_M Feed Override 100% -UWE

IF MPGMacro3_M THEN KBOverride_W = 20
IF MPGMacro4_M THEN KBOverride_W = 100

; Aux13 to SlowJoe----UWE
IF SkinAux13_M THEN KBOverride_W = 20
IF SkinAux13_M || KBOverride_W == 20 THEN (Aux13LED)
Compile and play :mrgreen:

Uwe
Attachments
SlowJoeVCP.jpg
aux13.zip
(4.76 KiB) Downloaded 22 times
Black Forest
Posts: 345
Joined: Thu Nov 23, 2017 1:39 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: Adding a 20% feeds button to VCP

Post by Black Forest »

I am watching and trying to find videos on how to implement what you given me. I really really don't want to trash my system!
Spartan117
Posts: 101
Joined: Mon Apr 11, 2022 3:37 pm
Acorn CNC Controller: No
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: Adding a 20% feeds button to VCP

Post by Spartan117 »

Just make a copy of your cncm folder before and maybe a fresh report.
The you should be able to restore anything if needed
suntravel
Posts: 1967
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: Adding a 20% feeds button to VCP

Post by suntravel »

If your NP++ is setup like in the TB294, ad the lines and hit F6 to compile.

Restart the CNC and go on.

Uwe
Post Reply