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

More
7 years 4 months ago #138038 by JB-Motoring
Hey folks,

My ATC doesn't work as planned.
I've got the Toolchange file of a user with pretty the same machine and the same mesa cards (7i92 7i77 7i74 7i70 7i71).

But there must be a mistake in my hal or ini file, because it isn't working with the same file- the ios are named the same.

Everytime I try Tool 1-12 (Basket type toolchanger - Chiron FZ12) the error need Tool prepared Txx-for Toolchange occurs.

I've searched for the mistake all day long, without any results.
The whole machine works perfect with the original Siemens 810m, so there can't be a hardware mistake.

Maybe someone can help me with that, that would be reeeeaaaaaaaally awesome! :-)

Thank you guys :-)

Please Log in to join the conversation.

More
7 years 4 months ago #138052 by BigJohnT
You have some M1xx files that may be the issue.

This is the manual tool change hal.
Code:
loadusr -W hal_manualtoolchange net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

So look for iocontrol.0.tool-prepared to make sure it is being set.

Open a terminal and use grep it's your friend.
Code:
grep -irl 'iocontrol.0.tool-prepared' *

JT

Please Log in to join the conversation.

More
7 years 4 months ago #138111 by JB-Motoring
Hey JT,
thanks for the note.

The thing is, the current NGC is running with no problems on another machine, so the file doesn't seem to be the main problem?

I think my hal is incorrect for that.
All the M commands are in the folder also, should I upload these files also?

Thanks guys!

Please Log in to join the conversation.

More
7 years 4 months ago #138129 by pl7i92
did you set the user M_path correct


USER_M_PATH = myfuncs:/tmp/mcodes:experimentalmcodes - Specifies a list of colon (:) separated directories for user defined functions. Directories are specified relative to the current directory for the ini file or as absolute paths. The list must contain no intervening whitespace.

A search is made for each possible user defined function, typically (M100-M199). The search order is:

[DISPLAY]PROGRAM_PREFIX (if specified)

If [DISPLAY]PROGRAM_PREFIX is not specified, search the default location: nc_files

Then search each directory in the list [RS274NGC]USER_M_PATH

The first executable M1xx found in the search is used for each M1xx.

Note
The maximum number of USER_M_PATH directories is defined at compile time (typ: USER_DEFINED_FUNCTION_MAX_DIRS == 5).

Please Log in to join the conversation.

More
7 years 4 months ago #138168 by JB-Motoring
Hey,

the path is set correct.

Each Mcode works, when i type it in MDI.

Please Log in to join the conversation.

More
7 years 4 months ago #138178 by JB-Motoring
So me again :-D

I am going to rewrite the whole Toolchange process, the one I got may be working, but it is hard to understand, what the autor wrote in that script.

So, what will the machine do in an automatic tool change ?

1. Unclamp tool
2. Move down the tool-basket
3.Spindle clean with air
4. Move all tool arms up (12 tools mounted in seperated arms, one output that moves all T's up at a time)
5.S220 M3 (Spindle must stay on at about 200 RPM while inserting a tool- there is a spring that notches in the tool automatically)
6.Spindle clean off
7.Clamp tool
8. M5
9. Move up tool-basket
10. DONE

HOW that has to look like can you see here :



The tool change can be done everywhere in the machine- BUT it needs 90mm to the highest Z where it is changing, because the tool will move 90 mm out of the spindle to get changed.
So the best would be a G53 Z0 to postion the Spindle out of any collision zone.

I would say, that it is not that difficult to write a script, that works correct...But I don't know, how to start.


Maybe someone can give me an example how to do it the easiest way.

Thanks guys !! :-)

Please Log in to join the conversation.

More
7 years 4 months ago #138232 by BigJohnT
You have laid out the steps so you have the first part done. I would next write a G code file to change one tool and work out the details. Use a parameter for the tool number so you can test different tools.

linuxcnc.org/docs/2.7/html/gcode/overvie...ml#_named_parameters

Once that is done you can convert it to a subroutine and call that subroutine in your G code file while passing the tool number to the subroutine.

linuxcnc.org/docs/2.7/html/gcode/o-code.html

To trigger digital outputs from G code you use M62-65.

linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m62-m65

I assume your using version 2.7 so I'm linking those documents.

JT

Please Log in to join the conversation.

More
7 years 4 months ago #138234 by BigJohnT
I need to add that the documents do a poor job of explaining what happens when a Tx is issued.

iocontrol.0.tool−prep−number
(s32, Out) The number of the next tool, from the RS274NGC T-word

iocontrol.0.tool−changed
(Bit, In) Should be driven TRUE when a tool change is completed.

linuxcnc.org/docs/2.7/html/man/man1/iocontrol.1.html

JT

Please Log in to join the conversation.

More
7 years 3 months ago #138437 by JB-Motoring
Hey guys,

something happened,

So I managed to: Open the spindle, flood the spindle, open the spindle, move down the basket, move up all tools -> NEXT STEP would be Insert a tool, so move down one arm with one tool (12 tools eg. 12 arms).

BUT I don't get it done right.

I attached the files for it- M118 is the Tool insert cycle, that isn't working- the 12 outputs are all named like o-tool-xx-down.

How do I set it up?

Thanks for all the help!

Please Log in to join the conversation.

More
7 years 3 months ago #138455 by andypugh
Your M118 would need to poll the inputs (halcmd getp) or it will never see the state change.

I would suggest that the M118 is probably superflous. Set up a G-code digital input for each tool and use M66 wait-on-input in the G-code routine.

Please Log in to join the conversation.

Time to create page: 0.117 seconds
Powered by Kunena Forum