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

More
30 Mar 2022 20:18 #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 or Create an account to join the conversation.

More
30 Mar 2022 20:21 #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 or Create an account to join the conversation.

More
30 Mar 2022 20:32 #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:
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 or Create an account to join the conversation.

More
30 Mar 2022 20:34 #238821 by MarcusM
Got it. Thank you :-)
 

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

More
31 Mar 2022 21:34 #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 or Create an account to join the conversation.

More
31 Mar 2022 21:40 #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 or Create an account to join the conversation.

More
31 Mar 2022 21:44 #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 or Create an account to join the conversation.

More
31 Mar 2022 22:11 #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 or Create an account to join the conversation.

More
31 Mar 2022 22:15 - 31 Mar 2022 22:15 #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.
Last edit: 31 Mar 2022 22:15 by MarcusM.

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

More
31 Mar 2022 22:28 #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.
The following user(s) said Thank You: MarcusM

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

Moderators: PCWjmelson
Time to create page: 0.098 seconds
Powered by Kunena Forum