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

More
5 years 2 months ago - 5 years 2 months ago #219006 by bevins
You have to test for milltask mode in ypur remap and return if it is not so it doesnt run the remap and move the machine. When Lcnc loads a file it is in preview mode. Thats the best way I can explain it. Maybe someone can chime in.
Code:
if self.task==0:      return INTERP_OK
Last edit: 5 years 2 months ago by bevins.

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

More
5 years 2 months ago #219007 by mugurlu
Hi,
but i use to .ngc file...
Code:
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=tool_change epilog=change_epilog
Where should I add the part you mentioned?
Code:
if self.task==0:      return INTERP_OK

 

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

More
5 years 2 months ago - 5 years 2 months ago #219009 by bevins
/Edit   Sorry I didnt see that. Your remap line up farther didnt show it.
Last edit: 5 years 2 months ago by bevins.

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

More
5 years 2 months ago - 5 years 2 months ago #219010 by Aciera
Unrelated:  Note that the FEATURES tag in the [RS274NGC] Section does no longer work in Version 2.8 and up.
linuxcnc.org/docs/html/config/ini-config...l#gcode:ini-features
Last edit: 5 years 2 months ago by Aciera.

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

More
5 years 2 months ago #219011 by bevins

Hi,
but i use to .ngc file...
Code:
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=tool_change epilog=change_epilogWhere should I add the part you mentioned? [code]if self.task==0:      return INTERP_OK  
[/code]
The way to address this issue is to test in your procedure whether it executes in preview or execution mode. This can be checked for by testing the 
Code:
#<_task>
  predefined named parameter  - it will be 1 during actual execution and 0 during preview. See configs/sim/axis/remap/manual-toolchange-with-tool-length-switch/nc_subroutines/manual_change.ngc for a complete usage example.Within Embedded Python, the task instance can be checked for by testing self.task - this will be 1 in the milltask instance, and 0 in the preview instance(s).

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

More
5 years 2 months ago - 5 years 2 months ago #219012 by bevins
if [[#<_task> GT 0]

This should be true if it is in milltask. Maybe check if it is less than 1 (preview mode), then exit. I think thats how its done in ngc remap.
Something like that. Not 100% sure as I have not done an NGC remap, I only have done python remaps.
Last edit: 5 years 2 months ago by bevins.
The following user(s) said Thank You: Aciera, mugurlu

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

Time to create page: 0.302 seconds
Powered by Kunena Forum