[REMAP FOR M6] Why does linuxcnc run the .ngc file on startup?

More
5 years 2 months ago - 5 years 2 months ago #219013 by Aciera
Ok, I can confirm on a simulation config that the code in a M6 ngc remap is executed at start up.


[edit] Just learned something. Thanks bevins.

o<tool_change > sub

o100 if [#<_task> GT 0]
         ; code here
o100 endif

o<tool_change> endsub
m2
Last edit: 5 years 2 months ago by Aciera.
The following user(s) said Thank You: bevins, ehb

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

More
5 years 2 months ago #219014 by mugurlu
this is how it works, we now prevent it from running directly on boot
thank you  bevins  
Code:
o<tool_change> sub O300 if [#<_task> EQ 0] O300 else     (print, rack_change: loaded tool=#<_current_tool> current pocket: #<_current_pocket>)     (print, rack_change: selected tool=#<_selected_tool> selected pocket: #<_selected_pocket>)     M68 E0 Q#<_selected_tool> ;Set target tool number     M64 P0 ;Enable tool changer          G4 P0.5          M66 P0 L3 Q10; wait for carousel-locked = false         o202 if [#5399 EQ 0]             M65 P0 ;Disable tool changer             (abort, carousel still locked hello)         o202 endif              M65 P0 ;Disable tool changer          G43 H#<_selected_tool>          (print,mcode end) O300 endif o<tool_change> endsub [1] M2
The following user(s) said Thank You: bevins

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

More
5 years 2 months ago #219020 by bevins
I really need to challenge my fear of an ngc remap and just do one....

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

Time to create page: 0.145 seconds
Powered by Kunena Forum