Page 1 of 1

Magnaturn South Bend Lathe-Acorn

Posted: Sun Aug 01, 2021 12:49 pm
by tmday7
Hello,
I have started retrofitting my SBL to acorn. Already did a retrofit with another controller and was not pleased with how it works as a lathe so most of the wiring will work with Acorn setup.
So far Acorn is much easier to set up and configure and the software/conversational side is what iam looking for. :D

Currently wiring up I/Os and have a question on hot keys.
Is there a hot key for the work light?
Can more hot keys be added for the VCP buttons?

What iam currently using the work light output for is Enabling the main machine contactor/relay. As i need the relay to stay on until CNC12 closes, this is
the only output i have found that will stay ON when an Estop condition happens. But it can easily be shut off with same button.
Other than adding a latching relay, is there another way to do this with software?

Thanks for any info,
Troy

Re: Magnaturn South Bend Lathe-Acorn

Posted: Sun Aug 01, 2021 1:45 pm
by cnckeith
see vcp documentation for how to add and modify VCP buttons.
viewtopic.php?f=60&t=3397

Re: Magnaturn South Bend Lathe-Acorn

Posted: Tue Aug 03, 2021 10:05 pm
by tmday7
I read this manual and did not see anything about hot keys. I did try copying the code that is in the Work Light button into the Aux9 button but the Aux9 button still would not turn on Work Light output. Can it work like this or did i miss something?
Troy

Re: Magnaturn South Bend Lathe-Acorn

Posted: Wed Aug 04, 2021 9:04 am
by martyscncgarage
tmday7 wrote: Sun Aug 01, 2021 12:49 pm Hello,
I have started retrofitting my SBL to acorn. Already did a retrofit with another controller and was not pleased with how it works as a lathe so most of the wiring will work with Acorn setup.
So far Acorn is much easier to set up and configure and the software/conversational side is what iam looking for. :D

Currently wiring up I/Os and have a question on hot keys.
Is there a hot key for the work light?
Can more hot keys be added for the VCP buttons?

What iam currently using the work light output for is Enabling the main machine contactor/relay. As i need the relay to stay on until CNC12 closes, this is
the only output i have found that will stay ON when an Estop condition happens. But it can easily be shut off with same button.
Other than adding a latching relay, is there another way to do this with software?

Thanks for any info,
Troy
You should be using the NoFault output to enable the contactor on the machine. CNC12 will drop the NoFault output when it closes, when it detects a fault or you hit the Estop button.

Take a look at the Acorn System schematic.

Re: Magnaturn South Bend Lathe-Acorn

Posted: Wed Aug 04, 2021 5:10 pm
by tmday7
...CNC12 will drop the NoFault output when it closes, when it detects a fault or you hit the Estop button.
This is what i dont want it to do. As i stated before i need the main machine contactor/relay to stay on when an estop condition happens.

But, been rethinking this whole machine power enabling, and i think i will just use a latching relay circuit and eliminate the software side of controlling it.
This way i dont have to worry about me fat fingering and disabling power by accident.

Thanks,
Troy

Axis Driven Turret Toolchanger

Posted: Sun Nov 07, 2021 3:13 pm
by tmday7
Iam now working on the tool turret for my lathe now.
Also attached is my Report file.

Using a hybrid stepper motor from Automation Technologies Inc.
Turret is Bi-Directional.
Uses hydraulics to move turret off of locking ring gear. See pics.

I have followed the instructions for Acorn CNC12 v4.6 ATC programs and instructions found here...
https://www.centroidcnc.com/centroid_di ... ograms.zip
Using the Acorn Axis Driven Turret Instructions.

Bench testing with stepper disconnected from turret.
Currently after a Tool change is executed the stepper motor will rotate in CW direction(viewed from shaft end) stop,reverse,stop,turn CW and stop.
(EDIT)When using MDI for tool change to T202, A axis DRO shows a move to 2.5 then back to 1.5 and stops.
Is this something by design or do i have something configured wrong?

Thanks,
Troy

Re: Magnaturn South Bend Lathe-Acorn

Posted: Sun Nov 07, 2021 4:22 pm
by tmday7
Ok...found it.
I needed to change the cnctch.mac file. Changed this .....
G53 A[#102 + 0.5]
G53 A[#102 - 0.5]

to this...

G53 A[#102]

Now i need macro to reverse the turret when a tool is closer, like from tool 1 to tool 8.

Re: Magnaturn South Bend Lathe-Acorn

Posted: Mon Nov 08, 2021 8:55 am
by frijoli
I found making the turret reverse doesn't make it much faster. I'd like to see your code when you're done. Mine is a little buggy sometimes.

Re: Magnaturn South Bend Lathe-Acorn

Posted: Mon Nov 08, 2021 5:37 pm
by tmday7
frijoli wrote: Mon Nov 08, 2021 8:55 am I found making the turret reverse doesn't make it much faster. I'd like to see your code when you're done. Mine is a little buggy sometimes.
I copied some code from another persons macro. Have only done some bench testing.Macro works, but not exactly what i want. Issue i have now is that
a tool change from T1 to T8 cause turret to rotate the long way around to T8. Same thing when doing a tool change from T8 to T1.

Anyone no what i need to change? I dont know to much after English and Gcode language ;)

Here is code so far...

Code: Select all

;------------------------------------------------------------------------------
; Filename: cnctch.mac
; Description: Tool change request macro
; Notes:
; Requires:ACORN CNC12 v4.49 Beta REV 4.4+
;
; Variables from PLC:
; #96052 = CurrentTurretPosition_W
; #9830 = #96028 = ATCType_W
;
; System Variables Used:
; #4120 = requested tool
; #20601-#20604 = Counts per unit for axes1-4
; #5021-#5024 is the current machine position for axes 1(#5021) through 4(#5024)
;
; Parameters:
; #9161 = Number turret positions (Parameter 161)
;
; User Variables:

#100 = #96007
#100 = #96007
#101 = #9161 ;Parameter 161 to #101 Max Tools in Turret

#102 = ABS[#4120 - #100] ;Calculated Distance
#103 = #101 / 2 ;HalfPoint for the Turret
;------------------------------------------------------------------------------
IF #50001                        		;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 		;Skip macro if graphing or searching
IF #4120 == #96052 THEN GOTO 1000		;Skip macro if at requested tool position

#100 = 0								;Ensure M225 Messages appear for indefinite time

;---------------------------------------------------------------------------------
;		Determine Correct Tool Change Sequence
;---------------------------------------------------------------------------------


IF #9830 == 6 THEN GOTO 300 ;Axis Tool Changer
;---------------------------------------------------------------------------------

;---------------------------------------------------------------------------------
;		Axis Driven Turret Section
;---------------------------------------------------------------------------------
N300

#101 = #5024 % #9161						;Get Current Turret Location

;Check to ensure turret is not at requested position, if so then skip tool change.
IF [ABS[#4120-#101] < .002] THEN GOTO 1000

;If tool requested is not a valid tool, Skip macro and send message to operator.
IF #4120 < 1 || #4120 > #9161 THEN GOTO 500

;Calculate Requested Position to move Turret to.

IF [[#4120 > #100] && [#102 <= #103] || [#4120 < #100] && [#102 > #103]] 
G53 A[#102]


IF #50001                        				;Prevent lookahead from parsing past here
G10 P1976 R[#4120]  							;Set parameter 976 to tool number

GOTO 1000

N500
M225 #100 "Invalid Tool Number Requested!\nPress Cycle Start to Skip Tool Change.\nPress Cycle Cancel to abort Program"

N1000                            		;End of Macro