Mill atc configuration

More
15 Jul 2023 07:43 - 30 Aug 2023 07:37 #275493 by Artur_1617
I start to add atc for my mill.Setup mesa 5i25 and 7i77 and linuxcnc 2.8.4For now I have two cuestions.1.First need spindle orient. Read some topic with orient i make my setup but when in mdi make M19 past some time and get error spindle dont turn.In halmeter I see orient start. My spindle need one Input for ON  and Fwd/Rev and dont see in halmeter servo on signal when start orient.Encoder working and rigid tapping to.2. For M6 routine  for yesterday  try with only connected Arm out and without connected sensor for arm out The arm going to position and get error (not sensor conected) and abort. And cuestion is the output 5 in my config after abort is still up. Try to press Esc and nothing. Try to press F2 servos stop working but output is still up. The output5 only disconnect when I clouse linuxcnc. Is normall?       

File Attachment:

File Name: toolchange_index.hal
File Size:1 KB

File Attachment:

File Name: toolchange.ngc
File Size:2 KB

File Attachment:

File Name: Fezarka_z_ATC.ini
File Size:6 KB

File Attachment:

File Name: Fezarka_z_ATC.hal
File Size:16 KB
 
Attachments:
Last edit: 30 Aug 2023 07:37 by Artur_1617.

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

More
16 Jul 2023 00:42 - 16 Jul 2023 00:43 #275555 by andypugh
Replied by andypugh on topic Mill atc configuration
I typed a long reply to this, went off to check my facts, and then forgot to post it. Hopefully I can remember most of what I said then.

Spindle orient isn't handled internally by LinuxCNC. All that the M19 G-code does is set the spindle.N.orient-angle and spindle.N.orient pins and then waits for spindle.N.is-oriented to be set to true before continuing.
This image shows a typical configuration:
wiki.linuxcnc.org/uploads/orient.svg

In your case it sounds like you need to turn on the spindle if either spindle.0.on is true, OR spindle.0.orient, and you can do that with a HAL "or2" component.

Is your spindle drive capable of turning slowly enough to orient? That looks like a high-speed spindle?


The motion.digital-out.NN pins are only ever reset when an M65 command is issued.

To recover from the position you were in you should have been able to enter the MDI mode and send "M65 P0" to reset the pin. (Assuming that these are the pins that you are using.)

Your toolchange.ngc file looks very familiar (I wrote the file it is based on) so it does have a timeout for each phase, and is using the (abort, ...) magic comment.
So, it _should_ be calling the "ON_ABORT" routine, and you can use that to reset the HAL pins to a safe state in the event of an error during toolchange.

linuxcnc.org/docs/stable/html/remap/rema...g_dealing_with_abort

Your INI doesn't contain an ON_ABORT but this is where you could put a sequence of M65 (or M64) commands to return the toolchanger to a safe state.

It is possible that the system might need to do different things depending on where in the sequence the problem happens. I think that this is possible, but I would have to think longer on it.
Last edit: 16 Jul 2023 00:43 by andypugh.
The following user(s) said Thank You: Artur_1617

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

More
16 Jul 2023 20:34 #275595 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
M65 P0  working ok
Today try to run orient with several or2 but not lucky...with spindle orient start must start to;
spindle-cw       hm2_5i25.0.7i77.0.0.output-01
net spindle-enable             <=  spindle.0.on
For the tool change connected all today and when start M6 T5 for example;
Z axis go to Z-50
Arm go out
Relase tool
Z axis go to Z0
Arm go in
Carousel start turn going to Index and stop not going to T5 and not give any error
Spindle is 2,2kw ATC water cooled bt30/iso30 with encoder and spin from 100rpm to 12000rpm  is capable to tapping M12 in steel with 100rpm Think to start produc this spindles in this year.


 

File Attachment:

File Name: toolchange...7-16.ngc
File Size:2 KB
 

File Attachment:

File Name: toolchange...7-16.hal
File Size:1 KB


 
Attachments:

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

More
16 Jul 2023 20:42 #275596 by andypugh
Replied by andypugh on topic Mill atc configuration
Looking at the HAL, I don't see the output from mux2.0 going anywhere.

Also, I don't see anything telling the carousel component which pocket to go to (carousel.0.pocket-number )

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

More
17 Jul 2023 21:33 #275684 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Carousel start working and make all sequence but.
If in tool.tbl tools start from T1 P1 get message on start "negative tool id used" but linuxcnc start

Other problem is with bad asignations of pockets
tool-tbl on start
T1 P1
T2 P2
T3 P3

After first change and no tool in spindle making "M6 T6" in tool-tbl apeard "T6 P0" and desapeard P6 from tool-tbl file...

Making second change "M6 T10"  tool T6 back to P6 pocket and from pocket P10 T10 going to spindle in tool-tbl apeard "T10 P0" but in P10
apeard tool T6!!!  

Making Third change "M6 T2"  tool T10 back to P10 pocket and from pocket P2 T2 going to spindle in tool-tbl still is "T6 P10" and apeard "T10
P2" but P2 is empty!!!
And if want back tool from spindle back to pocket M6 T0 get error T0 not exist. After thre change still P6 is missing.

Try to start tool-tbl with T0 P0  and not message "negative tool id used" on start
After first change and no tool in spindle making "M6 T6"  T6 go to spindle and in tool-tbl apeard "T6 P0" and "T0 P6" this is ok

Making second change "M6 T10"  T6 back to P6 pocket and from pocket P10 T10 going to spindle in tool-tbl apeard "T10 P0" but in P10 apeard
tool T6 and In pocket P6 is still T0

And if want back tool from spindle back to pocket M6 T0 tool from the spindle go to last pocket is ok but after that start another exchange
and get error arm out.
 

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

More
17 Jul 2023 22:29 #275687 by andypugh
Replied by andypugh on topic Mill atc configuration
Is this a random toolchanger? It sounds like it is configured as random, but might not actually be?

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

More
18 Jul 2023 08:14 #275721 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
After change to Random_toolchanger = 0 in ini Now after change tool in tool-tbl nothing change and is ok.
But make M6 T0 tool from spindle back to last pocket, Z axis go to up and starting another cycle with error why? After this spindle is in Z-50  and when try to make another change M6 T1 Z axis dont go to up and arm with tool T1 crash spindle.

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

More
18 Jul 2023 11:16 - 18 Jul 2023 11:17 #275731 by andypugh
Replied by andypugh on topic Mill atc configuration

But make M6 T0 tool from spindle back to last pocket, Z axis go to up and starting another cycle with error why?


What error? Is it an error from LinuxCNC or an error from your toolchnage routine?
M6 T0 should unload the tool, but maybe your toolchanger routine needs to ignre a lack of a tool-clamped signal in that case?

After this spindle is in Z-50  and when try to make another change M6 T1 Z axis dont go to up and arm with tool T1 crash spindle.


After an error, you need an ON_ABORT routine to put the changer in a safe state, or you need to put it in a safe state yourself. Or possibly your tool change routine could detect the state and do the right thing. Unfortunately there is such a wide range of toolchangers that a safe generic behaviour is almost impossible to build-inn to the controller.
Last edit: 18 Jul 2023 11:17 by andypugh.

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

More
18 Jul 2023 11:42 #275732 by Artur_1617
Replied by Artur_1617 on topic Mill atc configuration
Making M6 T0 start unload tool from the spindle to last pocket and finish the tool is in the pocket and spindle is empty Z go to Z -5 all correct how should be. After this and dont taching anything start other routine (dont now why)  Z axis going to down (make all like for load the tool to spindle empty) go to Z-50 and give error "Failed to move arm out" 

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

More
18 Jul 2023 20:09 #275764 by andypugh
Replied by andypugh on topic Mill atc configuration
There are two "failed to move arm out" lines, and I think you need to work out which one is the problem.

I would suggest modifying the text (possibly adding the line number) to see where the problem is.

I would also add some lines like (DEBUG, The selected too is #<selected_tool> ) to check that the input data is correct (tool and pocket especially)

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

Time to create page: 0.184 seconds
Powered by Kunena Forum