Run Mesa 7i76e + 7i85 with 3 servos and 1 stepper motor

More
4 years 7 months ago #238817 by andypugh
I think that would be a good starting point. Note that that routine has an arm in-out and a locking pin, so your system might end up simpler.

Look at the HAL file too.

github.com/LinuxCNC/linuxcnc/tree/master...smach/VMC_toolchange

toolchange_index.hal is likely to be close.

Please Log in to join the conversation.

More
4 years 7 months ago #238818 by MarcusM
Ok, thank you so much.

In the example toolchange.ngc there has to be set #<tool_in_spindle> and other parameters. I could'nt find, where they has to be/will be defined.

Please Log in to join the conversation.

More
4 years 7 months ago #238820 by andypugh
#<tool_in_spindle> is created by the prolog routine in the tool remap.

This line in the INI file of that sample:
Code:
REMAP= M6 modalgroup=6 prolog=change_prolog ngc=toolchange epilog=change_epilog

Tells the system that when it sees an M6 it should run a (library) routine called "change_prolog", then run the toolchange.ngc file, then the "change_epilog"

Please Log in to join the conversation.

More
4 years 7 months ago #238821 by MarcusM
Got it. Thank you :-)
 

Please Log in to join the conversation.

More
4 years 6 months ago #238939 by MarcusM
Ok. I reviewed all my macros and stuff. The homing is now directly from the carousel component. And seems to work so far.
I also tried to understand the manual pages of the M6 remap with prolog and epilog.

What is not ok in the moment: #<tool_in_spindle> always show -1, even if I run T2M6 for example. The screen also shows T0, so I think, the M6 will not end sucessful.

Please Log in to join the conversation.

More
4 years 6 months ago #238942 by andypugh
What happens if you use M61 to change the tool in spindle without M6?

linuxcnc.org/docs/stable/html/gcode/m-code.html#mcode:m61

Please Log in to join the conversation.

More
4 years 6 months ago #238943 by MarcusM
The tool appears in the screen. M61 Q3 e.g. will correctly show T3 as selected tool.
The parameter tool_in_spindle get the correct value also.

Please Log in to join the conversation.

More
4 years 6 months ago #238951 by andypugh
Then I suspect that somewhere in the remapped G-code routine the (default, un-remapped) M6 is not being run.

Can you trace the programme logic to work out under what circumstances that could happen?

Please Log in to join the conversation.

More
4 years 6 months ago #238954 by MarcusM
I add quick and dirty the M61 command to the toolchange.ngc file. Indeed, in this macro there is no M6 command.

Please Log in to join the conversation.

More
4 years 6 months ago #238955 by andypugh
You can (and probably should) use M6. Remap knows when the remapped code is used in the remap and runs the normal version.

Please Log in to join the conversation.

Time to create page: 0.054 seconds
Powered by Kunena Forum