ATC doesn't work - Error need Tool prepared Txx-for Toolchange

More
03 Jul 2019 00:14 - 03 Jul 2019 00:15 #138470 by BigJohnT
This could be done in ClassicLadder, I have a Lathe Turrent example you might want to look at.
gnipsel.com/files/linuxcnc/configs/cl-turret-sim.zip

Or as I mentioned above use parameters to select the tool.

For example if T6 is issued then iocontrol.0.tool−prep−number has the value of 6 and you can test that 12 times to see what tool to load.

JT
Last edit: 03 Jul 2019 00:15 by BigJohnT.
The following user(s) said Thank You: JB-Motoring

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

More
03 Jul 2019 10:01 #138510 by JB-Motoring
Thank you to again!

Could you give me an example of how it should look like? It's pretty hard to understand, how I need to set it up.

For only one tool would be enough- just to have a line where it has to go.

Thanks guys!

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

More
03 Jul 2019 13:05 #138522 by andypugh
Using a remapped G-code
.... (Whatever preparatory unload code you need)
(The following (DEBUG, are to check if the M6 is good or bad here) 
(DEBUG, before M6 the param is #<_selected_tool>)
M6 (this sets an internal parameter to the required too number) 
(DEBUG, after M6 the param is #<_selected_tool>)
M64 P[ #<_selected_tool> ] (fire the solenoid corresponding to the tool number)
M66 P[#<_selected_tool>)] L1  (wait for the corresponding "loaded success" pin
M65 P(#<_selected_tool>) (retract the changer)
.....

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

More
03 Jul 2019 13:13 #138523 by JB-Motoring
Thank you for the fast answer :-)

So lets say,

Tool 01 = P01
Tool 02 = P02
....
Tool 12= P12

Is that they way I have to set the pins in the postgui?

Thanks all :-)

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

More
03 Jul 2019 13:25 #138525 by andypugh
It doesn't need to be postgui. You can do it any any HAL file after motmod is loaded.

First you need to make sure that you have enough DIO pins:
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html
(note the "num_dio" parameter. You need to change this in the main HAL file, bit that's OK, I think you can accept that you are finished with stepconf / pncconf now.)

Now connect the hardware inputs and outputs for P1 to motion.digital-in-01 / motion.digital-out-01 and so on

Then realise that I messed up, and almost certainly should have used #<_selected_pocket> in the G-code sample :-)

linuxcnc.org/docs/2.7/html/gcode/overvie...ned-named-parameters

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

More
03 Jul 2019 13:30 #138526 by JB-Motoring
Ooookay, I'll give it a try.

I will upload the files after the test, hopefully I understand it all :-D

Sorry for all the questions, but I'm all new to linuxcnc.

Thank you again!

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

More
03 Jul 2019 14:02 #138530 by BigJohnT
Just did a quick test for #<_selected_tool> vs #<_selected_pocket>
When no Tn has been issued 0.0 and -1.0
After a T1 has been issued 1.0 and 1.0

Why use selected pocket for a non random tool changer? But I guess it will always be the correct number... so long as the -1.0 does not cause a problem in the G code.

JT

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

More
03 Jul 2019 18:54 #138561 by BigJohnT
I created a simple subroutine from your steps on page 1, I don't see where the tool number is called? Can you put that in the subroutine? I just opened a show hal configuration watch window and added the digital output pins so I could watch them turn on and off.
o<toolchange> sub
; Where do you change the tool by number???

M64 P0 ;1. Unclamp tool
G4P1 ; Pause

M64 P1 ;2. Move down the tool-basket
G4P1 ; Pause

M64 P2 ;3.Spindle clean with air
G4P1 ; Pause

M64 P3 ;4. Move all tool arms up one output that moves all up at a time
G4P1 ; Pause
; After you move them up do you turn off the output???

S200 M3 ;5 Spindle on at about 200 RPM while inserting a tool
G4P1 ; Pause

M65 P2 ;6.Spindle clean off
G4P1 ; Pause

M65 P0 ;7.Clamp tool
G4P1 ; Pause

M5 ;8. Stop the spindle
G4P1 ; Pause

M65 P1; 9. Move up tool-basket
G4P1 ; Pause

; 10. DONE
o<toolchange> endsub
M2

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

More
10 Jul 2019 21:27 #139024 by JB-Motoring
Hey guys, sorry for the late reply!

What should I say?
Everything works just like it should, i am so happy, that you showed me, that there es another way to do it.

I will upload the subs tomorrow, maybe they can help someone some Day.

Next step is setting up all Switches for override and axis selection.
I will create a New topic for that, it must be done with mux...

Thanks All!

Greetings

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

Time to create page: 0.073 seconds
Powered by Kunena Forum