13. ATC Management
When the CNC has an ATC System the Control Software can help the phase of Tools Setup through a dedicated user panel, the ATC Management.
The ATC Management panel is available and enabled in “Functions –> ATC Management” menu only if following requirements are satified:
- The CNC has the tool change macro (tool_change.ngc) and “Tool Change Type” parameter is set to Macro.
- The “Enable Slot Id” parameter is checked.
In the Tool Setup Commands panel there are six action buttons:
- Clear Selected Slot
- Clear All Slots
- Manual Release
- Open/Close Cart
- Pick & Place Tool
- Preset Tools
13.1 Set Loaded Tool Macro
Default skeleton Macro sample:
; ; RosettaCNC (c) 2016-2020 ; ; Name : atcm_set_loaded_tool ; Sub UID : 1 ; Version : 1 ; Description : set loaded tool action ; Note : use M99 as macro exit call ; : TAKE CARE: following is only a skeleton macro sample ; ; Inputs: ; ; Parameter Description ; ========= =========== ; #<atcm.tool_id> tool id to set as loaded in the spindle ; O1 ; !!! REMOVE BELOW SKELETON MACRO SAMPLE & PLACE YOUR ACTION CODE HERE !!! ; notices PLC about spindle loaded tool id M61 Q#<atcm.tool_id> ; shows HUD (Heads-Up Display) message for a while M109 P"ATCM - Set Loaded Tool in the Spindle: #<atcm.tool_id>..." Q4 G4 P2 M99
13.2 Manual Release Macro
Default skeleton Macro sample:
; ; RosettaCNC (c) 2016-2020 ; ; Name : atcm_manual_release ; Sub UID : 1 ; Version : 1 ; Description : manual release action ; Note : use M99 as macro exit call ; : TAKE CARE: following is only a skeleton macro sample ; O1 ; !!! REMOVE BELOW SKELETON MACRO SAMPLE & PLACE YOUR ACTION CODE HERE !!! ; notices PLC about spindle with none tool loaded because was released M61 Q0 ; shows HUD (Heads-Up Display) message for a while M109 P"ATCM - Manual Release..." Q4 G4 P2 M99
13.3 Open/Close Cart Macro
Default skeleton Macro sample:
; ; RosettaCNC (c) 2016-2020 ; ; Name : atcm_open_close_cart ; Sub UID : 1 ; Version : 1 ; Description : open/close action ; Note : use M99 as macro exit call ; : TAKE CARE: following is only a skeleton macro sample ; O1 ; !!! REMOVE BELOW SKELETON MACRO SAMPLE & PLACE YOUR ACTION CODE HERE !!! ; shows HUD (Heads-Up Display) message for a while M109 P"ATCM - Open/Close Cart..." Q4 G4 P2 M99
13.4 Pick & Place Tool Macro
The Pick/Place action can be used to:
- Pick: pick a tool from the selected slot.
- Place: place the loaded tool in the related slot.
- Place & Pick: place the loaded tool in the related slot and Pick the loaded tool from the selected slot.
The action button is enabled if:
- Connection with CNC is active.
- CNC is in IDLE state.
- One slot is checked and none tool is loaded (Pick action).
- One slot is checked and is the same assigned to loaded tool (Place action).
- None slot is checked and the loaded tool has an assigned slot (Place action).
The Pick/Place action can be executed clicking Pick/Place button or pressing F9 key.
The Pick/Place action call the external macro atc_pick_place.ngc
which implements required G-code program.
The inputs of macro are:
#<atc.pick_place.mode> ; contains the pick/place mode: 0 = pick, 1 = place ; in case of a place mode ; #<atc.pick_place.tool_id>=3 ; contains pick/place tool ID to pick #<atc.pick.place_slot_id>=1 ; contains pick/place slot ID to pick ; in case of a pick mode #<atc.pick_place.tool_id>=3 ; contains pick/place tool ID to place #<atc.pick.palce.slot_id>=1 ; contains pick/place slot ID to place
Default skeleton Macro sample:
; ; RosettaCNC (c) 2016-2020 ; ; Name : atcm_pick_place_tool ; Sub UID : 1 ; Version : 1 ; Description : pick/place tool action ; Note : use M99 as macro exit call ; : TAKE CARE: following is only a skeleton macro sample ; ; Inputs: ; ; Parameter Description ; ========= =========== ; #<atcm.pick_place.mode> pick & place mode: ; #<pick_place.mode_pick> = pick tool action ; #<pick_place.mode_place> = place tool action ; #<pick_place.mode_place_pick> = place/pick tool action ; #<atcm.pick.slot_id> slot id to pick ; #<atcm.pick.slot_id> tool id to pick ; #<atcm.place.tool_id> slot id to place ; #<atcm.place.slot_id> tool id to place ; O1 ; !!! REMOVE BELOW SKELETON MACRO SAMPLE & PLACE YOUR ACTION CODE HERE !!! ; checks if request a pick action IF [#<atcm.pick_place.mode> EQ #<pick_place.mode_pick>] THEN01 ; shows pick action parameters M109 P"<B>ATCM - Pick/Place</B><BR><BR>Mode = Pick Tool<BR>Slot ID = #<atcm.pick.slot_id><BR>Tool ID = #<atcm.pick.slot_id>" Q2 M99 END01 ; checks if request a place action IF [#<atcm.pick_place.mode> EQ #<pick_place.mode_place>] THEN01 ; shows place action parameters M109 P"<B>ATCM - Pick/Place</B><BR><BR>Mode = Place Tool<BR>Slot ID = #<atcm.place.tool_id><BR>Tool ID = #<atcm.place.slot_id>" Q2 M99 END01 ; checks if request a pick/place action IF [#<atcm.pick_place.mode> EQ #<pick_place.mode_place_pick>] THEN01 ; shows pick/place action parameters M109 P"<B>ATCM - Pick/Place</B><BR><BR>Mode = Pick/Place Tool<BR>Place: Slot ID = #<atcm.place.tool_id>, Tool ID = #<atcm.place.slot_id><BR>Pick: Slot ID = #<atcm.pick.slot_id>, Tool ID = #<atcm.pick.slot_id>" Q2 M99 END01 ; notices wrong pick/place mode M109 P"<B>ATC Pick/Place</B><BR><BR>Mode = #<atcm.pick_place.mode><BR><BR><B>Unsupported Mode</B>" Q2 M99
13.5 Preset Tools Macro
Default skeleton Macro sample:
; ; RosettaCNC (c) 2016-2020 ; ; Name : atcm_preset_tools ; Sub UID : 1 ; Version : 1 ; Description : preset tools action ; Note : use M99 as macro exit call ; : TAKE CARE: following is only a skeleton macro sample ; ; Inputs: ; ; Parameter Description ; ========= =========== ; #<atcm.preset_tools.count> number of selected tools to preset ; #<atcm.preset_tools.slot_id[n]> array with slot id of selected tool to preset ([n] = 1..#<atcm.preset_tools.count>) ; #<atcm.preset_tools.tool_id[n]> array with tool id of selected tool to preset ([n] = 1..#<atcm.preset_tools.count>) ; #<atcm.preset_tools.loaded.slot_id> slot id of loaded tool to preset (0 = no loaded tool in the spindle) ; #<atcm.preset_tools.loaded.tool_id> tool id of loaded tool to preset (0 = no loaded tool in the spindle) ; O1 ; !!! REMOVE BELOW SKELETON MACRO SAMPLE & PLACE YOUR ACTION CODE HERE !!! M109 P"ATCM - Preset of Tools" Q4 ; checks if there is a loaded tool in the spindle IF [#<atcm.preset_tools.loaded.tool_id> NE 0] THEN01 #<_slot_> = #<atcm.preset_tools.loaded.slot_id> #<_tool_> = #<atcm.preset_tools.loaded.tool_id> ; shows loaded tool to preset info M109 P"<B>ATCM - Preset Loaded Tool</B><BR><BR>Slot ID = #<_slot_><BR>ToolID = #<_tool_>" Q2 ; place here code for preset loaded tool ; Xxx END01 ; parses tools to do a preset and shows related infos #<_i_> = 1 WHILE [#<_i_> LE #<atcm.preset_tools.count>] DO01 #<_slot_> = #<atcm.preset_tools.slot_id[#<_i_>]> #<_tool_> = #<atcm.preset_tools.tool_id[#<_i_>]> ; checks if selected tool is not the loaded tool already presetted IF [#<_tool_> NE #<atcm.preset_tools.loaded.tool_id>] THEN02 ; shows tool to preset info M109 P"<B>ATCM - Preset Selected Tool</B><BR><BR>Slot ID = #<_slot_><BR>ToolID = #<_tool_>" Q2 ; place here code for preset tool ; Xxx END02 #<_i_> = [#<_i_> + 1] END01 M99