Denford Triac Carousel ATC

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

cncsnw
Community Expert
Posts: 4541
Joined: Wed Mar 24, 2010 5:48 pm

Re: Denford Triac Carousel ATC

Post by cncsnw »

For each numeric value you want to substitute (each variable following the quoted string), you need to include a "%f" token in the quoted string. The "%f" gets replaced with the numeric value.

Code: Select all

#155 = FIX[6*9/13]*10+[6*9]%13
#100 = 0
M225 #100 "The calculated value in 155 is %f" #155


Chaz
Posts: 705
Joined: Thu Feb 08, 2018 7:57 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Denford Triac Carousel ATC

Post by Chaz »

cncsnw wrote: Mon Jun 24, 2024 11:28 pm For each numeric value you want to substitute (each variable following the quoted string), you need to include a "%f" token in the quoted string. The "%f" gets replaced with the numeric value.

Code: Select all

#155 = FIX[6*9/13]*10+[6*9]%13
#100 = 0
M225 #100 "The calculated value in 155 is %f" #155
Thanks. I saw similar but couldnt work out the format.

In terms of the Macro, it now basically works for FWD. I had to get the tool count / geneva wheel debounce timing spot on.

I still don't know how to use the Eth1616 outputs via a Macro and frankly, I regret suggesting Centroid for this retrofit as its taken me longer to get the ATC working than doing the rest of the retrofit and now we have a board basically not being used (I had assumed we needed more inputs / outputs) and it might be useful for other purposes (probes etc) but a waste.

Ill paste the code when done so others can a)use it if needed and b)take a laugh at the ghetto method of doing it.


suntravel
Community Expert
Posts: 3538
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: Denford Triac Carousel ATC

Post by suntravel »

;ETH1616 OUTPUTS 1-16
IF M94M95111_SV THEN (M94M95111)
IF M94M95112_SV THEN (M94M95112)
IF M94M95113_SV THEN (M94M95113)
.....

M94 /111 turns Output 1 on the 1616 on, M95 /111 off ect...

Uwe


Chaz
Posts: 705
Joined: Thu Feb 08, 2018 7:57 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Denford Triac Carousel ATC

Post by Chaz »

suntravel wrote: Tue Jun 25, 2024 5:48 am ;ETH1616 OUTPUTS 1-16
IF M94M95111_SV THEN (M94M95111)
IF M94M95112_SV THEN (M94M95112)
IF M94M95113_SV THEN (M94M95113)
.....

M94 /111 turns Output 1 on the 1616 on, M95 /111 off ect...

Uwe
Thanks. That gets defined in the .src or M6 Macro file itself?


suntravel
Community Expert
Posts: 3538
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: Denford Triac Carousel ATC

Post by suntravel »

First part is from your PLC, the 1616 is there already defined.

M94 /111 will work in MDI or in a macro.

Uwe


Chaz
Posts: 705
Joined: Thu Feb 08, 2018 7:57 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Denford Triac Carousel ATC

Post by Chaz »

suntravel wrote: Tue Jun 25, 2024 8:22 am First part is from your PLC, the 1616 is there already defined.

M94 /111 will work in MDI or in a macro.

Uwe
Thanks. Ill try that again. Im sure I had tried it before and didnt get output.


Chaz
Posts: 705
Joined: Thu Feb 08, 2018 7:57 am
Acorn CNC Controller: No
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Denford Triac Carousel ATC

Post by Chaz »

suntravel wrote: Tue Jun 25, 2024 8:22 am First part is from your PLC, the 1616 is there already defined.

M94 /111 will work in MDI or in a macro.

Uwe
Hi, tried this. No outputs turn on. Any ideas?


cncsnw
Community Expert
Posts: 4541
Joined: Wed Mar 24, 2010 5:48 pm

Re: Denford Triac Carousel ATC

Post by cncsnw »

Impossible to say without seeing your current Report.


Greg
Posts: 37
Joined: Wed Feb 03, 2021 11: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: Denford Triac Carousel ATC

Post by Greg »

I use only the outputs from my 1616 and none off the acorn. Here is my mfunc6 and wizard list. Example M94 /62 turns on output2 (not to be confused with OUT2)

Code: Select all

;------------------------------------------------------------------------------
; Filename: mfunc6.mac
; Description: Tool Change Macro
; Notes:
; Requires: CNC12 V5.04
; Revision Date: 14 JUN 2023
; Please see TB300 or the following link for tips on writing custom macros.
; https://www.centroidcnc.com/centroid_diy/downloads/acorn_documentation/centroid_cnc_macro_programming.pdf
;------------------------------------------------------------------------------
; Parameters:
; #9011 = Probe Input
; #9044 = TT Input
; #9160 = Enhanced ATC Features (Bins)
; #9161 = Maximum Tool Bins
; #9431 = 0 : Hole Style Holder
;         1 : Fork Style Holder
; #9432 = 0 : Fixed TT Position
;         1 : Surface Plate
;         2 : Tool Library
; #9433 = Surface Plate WCS Part 0
; #9830 = ATC Type, 0 = None, 1 = Carousel, 7 = RackMount
;
; System Variables:
; #4003 = Positioning Mode (G90/G91)
; #4120 = Requested Tool
;
; PLC Variables:
; ToolUnclampedState_M IS MEM12 (#70012)
; SpindleOrientedState_M IS MEM13 (#70013)
; SpindleZeroSpeedState_M IS MEM14 (#70014)
; AirPressureLow_M IS MEM15 (#70015)
; ToolChangeComplete_M IS MEM52 (#70052)
; AtPutbackLocation_M IS MEM59 (#70059)
; AtRequestedToolLocation_M IS MEM64 (#70064)
; CarouselInState_M IS MEM74 (#70074)
; CarouselOutState_M IS MEM75 (#70075)
; PutBackPosition_W IS W50 (#96050)
;
; User Variables:
; #101 = Saved Positioning Mode (G90/G91)
; #106 = Tool Touch Height
; #107 = New Tool Request Bin Location
;
; Return Points:
; G28 = Used For ToolCheck Position / M25 Home Positions
; G30 = Used for Z Height Flyover
; G30 P3 = X,Y,Z TT Location
;
; tt_check_configuration.cnc:
; #33001 = Tool Touch Input (Value from P11 or P44)
; #33002 = Fast Probe Rate
; #33003 = Slow Probe Rate
;------------------------------------------------------------------------------
IF #50001                        ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching
IF #9006 == 0 THEN GOTO 950      ;Perform Default Macro if ATC not Installed
IF #9830 == 1 THEN GOTO 600      ;Jump to Carousel Section of Macro
IF #4120 == #9976 THEN GOTO 1000 ;Skip macro if requested tool is in spindle

IF #9160 > 0 THEN #107 = #[#4120 + 17000] ELSE #107 = #4120

IF #107 > #9161 THEN GOTO 800    ;Error Tool Change on Invalid Tool

;==============================================================================

;==============================================================================
; Carousel Tool Change Program Starts
;==============================================================================
N600
#101 = #4003                     ;Save Positioning Mode
M109 /1/2                        ;Disable Overrides
M5                               ;Disable Spindle
M9                               ;Disable Coolant
M107                             ;Send PLC Tool Number
G4 P.25

G30 G91 Z0                       ;Move Z to tool change position
G90
M94 /7                           ;Request Tool Change

M101 /70014                      ;Ensure Spindle at Zero Speed

;IF !#70013 THEN M19              ;Orient Spindle
;M101 /70013                      ;Confirm Spindle Oriented

M101 /50037                     ;Drawbar air pressure above 120psi

IF #96050 == 0 THEN GOTO 650     ;Skip putback
;------------------------------------------------------------------------------
; Carousel Tool Putback Section
;------------------------------------------------------------------------------
;M101 /70013                      ;Confirm Spindle Oriented
M101 /70059                      ;Wait for carousel at Putback Position
G4 P.25

;Move Carousel in and Unclamp Tool
M101 /70059                      ;Ensure carousel at Putback Position
M94 /62                          ;Request Carousel in
M100 /70074                      ;Wait for Carousel In
G4 P.5                           ;Carousel debounce
M100 /70074                      ;Wait for Carousel In
G4 P1.5
M101 /50037                      ;Drawbar air pressure above 120psi
M15                              ;Unclamp Tool
M101 / 50044                     ;Check if drawbar is unclamped
;------------------------------------------------------------------------------
; Carousel Tool New Tool Section
;------------------------------------------------------------------------------
N650
M101 /50037                      ;Drawbar air pressure above 120psi
G4 P1
G53 Z0                           ;Raise head to Clearance
M94 /40                          ;Set PutBackComplete
M101 /70064                      ;Wait for carousel at Requested Tool Position
M95 /40                          

;IF !#70012 THEN M101 /70013      ;Confirm Spindle Oriented if not Unclamped

M94 /62                          ;Request Carousel in
M100 /70074                      ;Wait for Carousel in
G4 P.5                           ;Carousel debounce
M100 /70074                      ;Wait for Carousel in

IF !#70012 THEN M15              ;Request Unclamp if not already
M101 /50044                      ;Check if drawbar is unclamped
M94 /61                          ;Airblast on
M101 /50037                      ;Drawbar air pressure above 120psi
G30 G91 Z0 L30                   ;Move Z to tool change Position
G90
M95 /61                          ;Airblast off
M16                              ;Clamp Tool
M100 /50044                             ;Check if drawbar is clamped
;M5                               ;Turn off spindle and orient request

;------------------------------------------------------------------------------
; Carousel Finish Section
;------------------------------------------------------------------------------
M95 /62                          ;Request Carousel Out
M100 /70075                      ;Wait for Carousel Out
G4 P.5                           ;Carousel debounce
M100 /70075                      ;Wait for Carousel Out
M101 /70052                      ;Wait for Tool Change Complete
M95 /7                           ;Reset Tool Change Request

M108 /1/2                        ;Enable Overrides

GOTO 900

N800 ;Errors
M225 #100 "Invalid Tool Requested\nCycle Cancel to Abort"
GOTO 800

N900 ;Restore Modes
G#101 ;Restore Positioning Mode

GOTO 1000

N950
M6

N1000                            ;End of Macro
Image
Last edited by Greg on Sun Jun 30, 2024 10:54 pm, edited 1 time in total.


cncsnw
Community Expert
Posts: 4541
Joined: Wed Mar 24, 2010 5:48 pm

Re: Denford Triac Carousel ATC

Post by cncsnw »

Greg, what tells you his outputs are already mapped?

I have not seen a report from him since June 19th, at which time he did not have any of the "M94M951xx" tokens assigned to any of the outputs.


Post Reply