Boss Spindle Brake

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Aplus
Posts: 37
Joined: Wed Mar 20, 2019 2:15 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: A900730
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Boss Spindle Brake

Post by Aplus »

I'd like to add a 5 sec delay when the spindle brake comes on after an M5 or spindle stop (red Stop Button on VCP). I have a VFD set to brake to a stop in 5 Sec however the brake comes on as soon as the stop command is sent to PLC. This doesn't sound good and my grey hairs are telling me something (Brake or Motor or Both) isn't going to last long. I have read the PLC programming manual but am still lost. I believe the code will go here along with a timer definition.
;----------------------------------------------------------------
; Auto Spindle Brake Control
;----------------------------------------------------------------
;use the output to release or engage the spindle brake
IF (Aux3Key_I || KbAux3Key_M || SkinAux3_M_SV) THEN (BrakeOneShot_PD)
IF (BrakeOneShot_PD ^ BrakeMode_M) THEN (BrakeMode_M), (Aux3LED_O)
IF SpindleEnableOut_O || (!SpindleEnableOut_O && !BrakeMode_M) THEN SET SpindleBrakeRelease_O
IF (!SpindleEnableOut_O && BrakeMode_M) THEN RST SpindleBrakeRelease_O
Aplus
Posts: 37
Joined: Wed Mar 20, 2019 2:15 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: A900730
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Boss Spindle Brake

Post by Aplus »

I'd like to add a 5 sec delay when the spindle brake comes on after an M5 or spindle stop (red Stop Button on VCP). I have a VFD set to brake to a stop in 5 Sec however the brake comes on as soon as the stop command is sent to PLC. This doesn't sound good and my grey hairs are telling me something (Brake or Motor or Both) isn't going to last long. I have read the PLC programming manual but am still lost. I believe the code will go here along with a timer definition.
;----------------------------------------------------------------
; Auto Spindle Brake Control
;----------------------------------------------------------------
;use the output to release or engage the spindle brake
IF (Aux3Key_I || KbAux3Key_M || SkinAux3_M_SV) THEN (BrakeOneShot_PD)
IF (BrakeOneShot_PD ^ BrakeMode_M) THEN (BrakeMode_M), (Aux3LED_O)
IF SpindleEnableOut_O || (!SpindleEnableOut_O && !BrakeMode_M) THEN SET SpindleBrakeRelease_O
IF (!SpindleEnableOut_O && BrakeMode_M) THEN RST SpindleBrakeRelease_O
Attachments
report_0008DC111213-0311192178_2020-10-13_16-26-52.zip
(5.89 MiB) Downloaded 107 times
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Boss Spindle Brake

Post by cncsnw »

SpindleStopped_T IS T123

IF !SpindleEnableOut_O THEN SpindleStopped_T = 5000, SET SpindleStopped_T
IF SpindleEnableOut_O THEN RST SpindleStopped_T
IF !(BrakeMode_M && SpindleStopped_T) THEN (SpindleBrakeRelease_O)
Aplus
Posts: 37
Joined: Wed Mar 20, 2019 2:15 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: A900730
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Boss Spindle Brake

Post by Aplus »

I get an error message that states too many errors when I try to compile. Here is just the last three.

Error Line 933 Col 37: Constant Integer Expression Label Not Found
SkinCoolMist_M_SV IS SV_SKIN_EVENT_23 ; Row 5 Column 3
^
Error Line 934 Col 37: Constant Integer Expression Label Not Found
SkinAux13_M_SV IS SV_SKIN_EVENT_24 ; Row 5 Column 4
^
Error Line 935 Col 37: Constant Integer Expression Label Not Found
SkinAux14_M_SV IS SV_SKIN_EVENT_25 ; Row 5 Column 5
^
Too many errors
tblough
Posts: 3102
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Boss Spindle Brake

Post by tblough »

It's the first error that's important. Sometimes a missed semicolon or a misspelled keyword can generate a ton of follow on errors.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Boss Spindle Brake

Post by cncsnw »

When I wrote "... IS T123", that was just intended as a place holder. You need to enter any timer number that has not already been used in your particular PLC program.

There are only 64 timers available, so the value you actually use needs to be between T1 and T64.
Aplus
Posts: 37
Joined: Wed Mar 20, 2019 2:15 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: A900730
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Boss Spindle Brake

Post by Aplus »

I changed the Timer to T24 but still get all the ones below. I havn't changed anything in that part of the code.

C:\Program Files (x86)\Notepad++>cd \cncm

C:\cncm>mpucomp.exe "Centroid_Standard-Mill-ALLIN1DC-BP-Boss-r3-with spindle brake timer added-1.src" mpu.plc
MPUCOMP v3.03 Rev 42 MPU11 PLC compiler
$Id: mpucompiler.cpp 1626 2011-01-25 17:25:17Z keith $
Copyright 2001-2010 Centroid Corp.

Input file : Centroid_Standard-Mill-ALLIN1DC-BP-Boss-r3-with spindle brake timer added-1.src
Output file: mpu.plc
Error Line 912 Col 37: Constant Integer Expression Label Not Found
SkinSpinOverPlus_M_SV IS SV_SKIN_EVENT_1 ; Row 1 Column 1
^
Error Line 913 Col 37: Constant Integer Expression Label Not Found
SkinSpinAutoMan_M_SV IS SV_SKIN_EVENT_2 ; Row 1 Column 2
^
Error Line 914 Col 37: Constant Integer Expression Label Not Found
SkinAux1_M_SV IS SV_SKIN_EVENT_3 ; Row 1 Column 3
^
Error Line 915 Col 37: Constant Integer Expression Label Not Found
SkinAux2_M_SV IS SV_SKIN_EVENT_4 ; Row 1 Column 4
^
Error Line 916 Col 37: Constant Integer Expression Label Not Found
SkinAux3_M_SV IS SV_SKIN_EVENT_5 ; Row 1 Column 5
^
Error Line 917 Col 37: Constant Integer Expression Label Not Found
SkinSpin100_M_SV IS SV_SKIN_EVENT_6 ; Row 2 Column 1
^
Error Line 918 Col 37: Constant Integer Expression Label Not Found
SkinSpinCW_M_SV IS SV_SKIN_EVENT_7 ; Row 2 Column 2
^
Error Line 919 Col 37: Constant Integer Expression Label Not Found
SkinAux4_M_SV IS SV_SKIN_EVENT_8 ; Row 2 Column 3
^
Error Line 920 Col 37: Constant Integer Expression Label Not Found
SkinAux5_M_SV IS SV_SKIN_EVENT_9 ; Row 2 Column 4
^
Error Line 921 Col 37: Constant Integer Expression Label Not Found
SkinAux6_M_SV IS SV_SKIN_EVENT_10 ; Row 2 Column 5
^
Error Line 922 Col 37: Constant Integer Expression Label Not Found
SkinSpinOverMinus_M_SV IS SV_SKIN_EVENT_11 ; Row 3 Column 1
^
Error Line 923 Col 37: Constant Integer Expression Label Not Found
SkinSpinCCW_M_SV IS SV_SKIN_EVENT_12 ; Row 3 Column 2
^
Error Line 924 Col 37: Constant Integer Expression Label Not Found
SkinAux7_M_SV IS SV_SKIN_EVENT_13 ; Row 3 Column 3
^
Error Line 925 Col 37: Constant Integer Expression Label Not Found
SkinAux8_M_SV IS SV_SKIN_EVENT_14 ; Row 3 Column 4
^
Error Line 926 Col 37: Constant Integer Expression Label Not Found
SkinAux9_M_SV IS SV_SKIN_EVENT_15 ; Row 3 Column 5
^
Error Line 927 Col 37: Constant Integer Expression Label Not Found
SkinSpinStop_M_SV IS SV_SKIN_EVENT_16 ; Row 4 Column 1
^
Error Line 928 Col 37: Constant Integer Expression Label Not Found
SkinSpinStart_M_SV IS SV_SKIN_EVENT_17 ; Row 4 Column 2
^
Error Line 929 Col 37: Constant Integer Expression Label Not Found
SkinAux10_M_SV IS SV_SKIN_EVENT_18 ; Row 4 Column 3
^
Error Line 930 Col 37: Constant Integer Expression Label Not Found
SkinAux11_M_SV IS SV_SKIN_EVENT_19 ; Row 4 Column 4
^
Error Line 931 Col 37: Constant Integer Expression Label Not Found
SkinAux12_M_SV IS SV_SKIN_EVENT_20 ; Row 4 Column 5
^
Error Line 932 Col 37: Constant Integer Expression Label Not Found
SkinCoolAutoMan_M_SV IS SV_SKIN_EVENT_21 ; Row 5 Column 1
^
Error Line 933 Col 37: Constant Integer Expression Label Not Found
SkinCoolFlood_M_SV IS SV_SKIN_EVENT_22 ; Row 5 Column 2
^
Error Line 934 Col 37: Constant Integer Expression Label Not Found
SkinCoolMist_M_SV IS SV_SKIN_EVENT_23 ; Row 5 Column 3
^
Error Line 935 Col 37: Constant Integer Expression Label Not Found
SkinAux13_M_SV IS SV_SKIN_EVENT_24 ; Row 5 Column 4
^
Error Line 936 Col 37: Constant Integer Expression Label Not Found
SkinAux14_M_SV IS SV_SKIN_EVENT_25 ; Row 5 Column 5
^
Error Line 937 Col 37: Constant Integer Expression Label Not Found
SkinIncCont_M_SV IS SV_SKIN_EVENT_26 ; Row 6 Column 1
^
Too many errors
Aplus
Posts: 37
Joined: Wed Mar 20, 2019 2:15 pm
Acorn CNC Controller: No
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: A900730
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: Boss Spindle Brake

Post by Aplus »

So I tried to compile my original SRC file and I am getting all the same errors. How did it work before and not now?
tblough
Posts: 3102
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Boss Spindle Brake

Post by tblough »

You might try the latest mpucomp compiler. You are trying to compile the latest source code and all it's new extensions with a compiler that is 9 years old.

MPUCOMP v4.15 Rev 14 MPU11 PLC compiler
$Id: mpucompiler.cpp 11270 2020-05-29 18:26:20Z keith $
Copyright 2001-2018 Centroid Corp.

If you want to use the latest PLC programs, you need the latest CNC12 as well which will give you the latest PLC compiler.
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
martyscncgarage
Posts: 9914
Joined: Tue Mar 28, 2017 12:01 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Location: Mesa, AZ

Re: Boss Spindle Brake

Post by martyscncgarage »

Aplus wrote: Fri Oct 23, 2020 8:03 am So I tried to compile my original SRC file and I am getting all the same errors. How did it work before and not now?
Hire Marc Leonard (cncsnw) to take care of this for you....your time is worth something.
I asked mark to modify the Spindle Brake PLC to include a user definable timer in parameters.
Traditional knee mills with pneumatically actuated brakes. I did not want the brake to be slammed on after an M5 coming from 4Krpm.
I wanted to give the VFD a chance to brake the spindle and slow it before the brake was applied.

Just my experience. Personally, I think Centroid should make that a stock feature in the spindle brake plc....

Marty
Reminder, for support please follow this post: viewtopic.php?f=20&t=383
We can't "SEE" what you see...
Mesa, AZ
Post Reply