- Posts: 1947
- Thank you received: 338
[REMAP FOR M6] Why does linuxcnc run the .ngc file on startup?
- bevins
- Offline
- Platinum Member
-
Less
More
5 years 2 months ago - 5 years 2 months ago #219006
by bevins
Replied by bevins on topic [REMAP FOR M6] Why does linuxcnc run the .ngc file on startup?
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.
- mugurlu
- Offline
- New Member
-
Less
More
- Posts: 12
- Thank you received: 1
5 years 2 months ago #219007
by mugurlu
Replied by mugurlu on topic [REMAP FOR M6] Why does linuxcnc run the .ngc file on startup?
Hi,
but i use to .ngc file...
Where should I add the part you mentioned?
but i use to .ngc file...
Code:
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=tool_change epilog=change_epilog
Code:
if self.task==0:
return INTERP_OK
Please Log in or Create an account to join the conversation.
- bevins
- Offline
- Platinum Member
-
Less
More
- Posts: 1947
- Thank you received: 338
5 years 2 months ago - 5 years 2 months ago #219009
by bevins
Replied by bevins on topic [REMAP FOR M6] Why does linuxcnc run the .ngc file on startup?
/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.
- Aciera
- Offline
- Administrator
-
Less
More
- Posts: 4819
- Thank you received: 2177
5 years 2 months ago - 5 years 2 months ago #219010
by Aciera
Replied by Aciera on topic [REMAP FOR M6] Why does linuxcnc run the .ngc file on startup?
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
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.
- bevins
- Offline
- Platinum Member
-
Less
More
- Posts: 1947
- Thank you received: 338
5 years 2 months ago #219011
by bevins
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).
Replied by bevins on topic [REMAP FOR M6] Why does linuxcnc run the .ngc file on startup?
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 theHi,
but i use to .ngc file...[/code]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:
#<_task>
Please Log in or Create an account to join the conversation.
- bevins
- Offline
- Platinum Member
-
Less
More
- Posts: 1947
- Thank you received: 338
5 years 2 months ago - 5 years 2 months ago #219012
by bevins
Replied by bevins on topic [REMAP FOR M6] Why does linuxcnc run the .ngc file on startup?
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.
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