Simple ATC help

More
03 Jul 2024 19:15 #304338 by tomala89
Simple ATC help was created by tomala89
Hello, I'm trying to configure ATC, currently I have a manual tool change with sensor approach.
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
FEATURES=30
SUBROUTINE_PATH =  macros
REMAP=M6    modalgroup=6 ngc=tool-change

How can I configure LinuxCNC so that before measuring the tool, Linux moves over the selected tool.
Tools in a linear warehouse. I don't know what to add to the RS274NGC section. 

Thank you for every helping hand :)

Please Log in or Create an account to join the conversation.

More
05 Jul 2024 12:52 #304463 by B.Reilly01
Replied by B.Reilly01 on topic Simple ATC help
Have you written your new M6 code yet? I think what you're trying to accomplish is taken care of by change_prolog and code you write into M6.

If I understand correctly, you have a rack toolchanger. To do a tool change, you naturally have to

1.) Move over the tool 2.) Lower over the tool 3.)clamp the tool.

There are a few more steps to a robust, successful M6, like checking for tool in spindle, etc.

I suggest reading up  HERE .  It feels like a lot (and it is), but it can be done.  I have an example of a carousel style changer that works (almost entirely), if you want to look at that.  

You will need to include stdglue.py if you want to use the standard prolog and epilog.  The Prolog prepares the tool number info I think.

Let me know if I'm off base.

Please Log in or Create an account to join the conversation.

More
13 Jul 2024 18:41 - 13 Jul 2024 18:42 #305101 by tomala89
Replied by tomala89 on topic Simple ATC help
Hey, this is my code.
O<simple_atc_tk> sub

  #<_tool_number> = #<_selected_tool>
  #<_Y_POS> = 0

  #<_T1_X> = 10
  #<_T2_X> = 60
  #<_T3_X> = 120
  
  #<_depot_z> = -15
  #<_depot_z_ass> = -25
  #<_depot_z_back> = #<_depot_z> 
  #<_depot_feed> = 1500
  #<_depot_spindle_speed> = 1000
  
  F[#<_depot_feed>]    

  O100 if [#<_tool_number> EQ 1]
    
    G53 G0 G90 X[#<_T1_X>] Y[#<_Y_POS>] (Move to position for T1)                                                            

 
    M04 S#<_depot_spindle_speed>     [b]<-- from this point on the code doesn't work, linux does not respond to turning on the spindle
    M05                             
    G53 G0  Z[#<_depot_z_back>]   
    G53 G90 G0 Z0
    
  O100 endif
  O101 if [#<_tool_number> EQ 2]
    G53 G0 X[#<_T2_X>] Y[#<_Y_POS>] (Move to position for T2)
  O101 endif
  O102 if [#<_tool_number> EQ 3]
    G53 G0 X[#<_T3_X>] Y[#<_Y_POS>] (Move to position for T3)
  O102 endif

O<simple_atc_tk> endsub
M2


Thanks[/b]
Last edit: 13 Jul 2024 18:42 by tomala89.

Please Log in or Create an account to join the conversation.

More
14 Jul 2024 08:41 - 14 Jul 2024 08:42 #305127 by Aciera
Replied by Aciera on topic Simple ATC help
The likely issue here is that you turn the spindle on and in the next line you turn it off. The interpreter does not wait for the spindle to spin up to the commanded speed but moves on to the next line and the spindle is immediately turned off again.

Maybe try something like this (Note the 2 second delay before turning the spindle off)
    M04 S#<_depot_spindle_speed>
G04 P2
    M05   

I have no idea how long you need the spindle to turn so you will likely need to adjust the P word in the G04 command.
Last edit: 14 Jul 2024 08:42 by Aciera.
The following user(s) said Thank You: tomala89

Please Log in or Create an account to join the conversation.

Time to create page: 0.078 seconds
Powered by Kunena Forum