Need non-negative Q-word to specify tool number with M61/Clears with G0?
- yeltrow
- Offline
- Senior Member
Less
More
- Posts: 71
- Thank you received: 3
15 Mar 2022 16:27 - 15 Mar 2022 16:52 #237344
by yeltrow
Need non-negative Q-word to specify tool number with M61/Clears with G0? was created by yeltrow
When I use NCAM and toggle the "delete block" button I have been getting an error I was unable to clear without exiting linuxcnc. I did see it just clear with a G0 move. I'm running LinuxCNC 2.8.2-1-g6a3d0a434.
I've never had issues using nativecam in the past. I pulled it in as a deb and used dpkg -i to install it. I ran the install with
nativecam -i mymill.ini -c mill (something like that).
I tried running my program without the block delete, got the reminder, and then I keep getting the non-negative Q-word error.
Turning off the auto-load of ncam.ngc and loading another known working program doesn't clear it. Every program loaded afterwards pulls up the same error, just a different filename.
It appears that by doing a G0 G53 X14 the error cleared. I thought I was stuck with the error forever, but it seemed somehow the G0 "kicked" something.
Thank you!
I've never had issues using nativecam in the past. I pulled it in as a deb and used dpkg -i to install it. I ran the install with
nativecam -i mymill.ini -c mill (something like that).
I tried running my program without the block delete, got the reminder, and then I keep getting the non-negative Q-word error.
Turning off the auto-load of ncam.ngc and loading another known working program doesn't clear it. Every program loaded afterwards pulls up the same error, just a different filename.
It appears that by doing a G0 G53 X14 the error cleared. I thought I was stuck with the error forever, but it seemed somehow the G0 "kicked" something.
Thank you!
Last edit: 15 Mar 2022 16:52 by yeltrow. Reason: New information
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
15 Mar 2022 18:28 #237355
by andypugh
Replied by andypugh on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
Does the indicated .ngc file contain a G61? If so, is it obvious how the Q could be negative?
Please Log in or Create an account to join the conversation.
- yeltrow
- Offline
- Senior Member
Less
More
- Posts: 71
- Thank you received: 3
17 Mar 2022 01:50 #237514
by yeltrow
Replied by yeltrow on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
That's the kicker -- The indicated file doesn't have an M61. It's as if the interpreter has some stale state or code stuck in it after the error is triggered. If I figure out a way to force it to happen, I'll post the info for debugging. ANY program I attempt to load that has worked previously fails with the same error on "line 0". Even ones without an M61 line. Maybe I'll have to set up obs or something to record the screen so I can figure out what has caused it. Once I did the G0 move or restarted linuxcnc everything is fine until something bad happens in nativecam.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
22 Mar 2022 14:06 #238011
by andypugh
Replied by andypugh on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
I had a look and couldn't find an M61 in the NativeCAM repository either.
I would be tempted to search the entire linuxcnc folder for M61. Geany (the default text editor on the LiveCD) has a "find in files" option. (which just runs grep in the background). Have a look to see if you can find it anywhere.
I would be tempted to search the entire linuxcnc folder for M61. Geany (the default text editor on the LiveCD) has a "find in files" option. (which just runs grep in the background). Have a look to see if you can find it anywhere.
Please Log in or Create an account to join the conversation.
- yeltrow
- Offline
- Senior Member
Less
More
- Posts: 71
- Thank you received: 3
23 Mar 2022 03:26 #238071
by yeltrow
Replied by yeltrow on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
Andy -- Thank you for looking into this more.
The only occurrences of M61 in my stuff are below.
my_LinuxCNC_machine2.ini:MDI_COMMAND = M66 E0 M61 Q[#5399] G43
I use M61 in my manual tool change button pyvcp. When I push the manual button it takes the results from M66 and passes them to M61 to change the tool to the number I put in my spinbox. I've used it for years and it only has positive values ever.
I also have a script that I run to adjust my fixture offsets. But clearly, it passes Q0 to change to tool 0. I have been using G38.2 seeks to probe recently which I think is irrelevant. Making brackets for my prox switches is why I was using NCAM and found this weird behavior.
store_home_adjust_g54.sh:axis-remote --mdi "M61 Q0"
store_home_adjust_g54.sh:axis-remote --mdi "M61 Q0"
The only occurrences of M61 in my stuff are below.
my_LinuxCNC_machine2.ini:MDI_COMMAND = M66 E0 M61 Q[#5399] G43
I use M61 in my manual tool change button pyvcp. When I push the manual button it takes the results from M66 and passes them to M61 to change the tool to the number I put in my spinbox. I've used it for years and it only has positive values ever.
I also have a script that I run to adjust my fixture offsets. But clearly, it passes Q0 to change to tool 0. I have been using G38.2 seeks to probe recently which I think is irrelevant. Making brackets for my prox switches is why I was using NCAM and found this weird behavior.
store_home_adjust_g54.sh:axis-remote --mdi "M61 Q0"
store_home_adjust_g54.sh:axis-remote --mdi "M61 Q0"
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
23 Mar 2022 10:03 #238090
by andypugh
I think it could easily be this. I don't think that M66 is queued, so it might well run the M61 before the result is back from the M66.
A more robust way to do this might be to call a G-code sub
This would be set up to wait until the pyvcp button is released before running the M61. (the M66 L2)
Replied by andypugh on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
my_LinuxCNC_machine2.ini:MDI_COMMAND = M66 E0 M61 Q[#5399] G43
I think it could easily be this. I don't think that M66 is queued, so it might well run the M61 before the result is back from the M66.
A more robust way to do this might be to call a G-code sub
O<manual_tool> SUB
M66 E0
M66 P0 L2
M61 Q[#5399] G43
O<manual_tool> ENDSUB
This would be set up to wait until the pyvcp button is released before running the M61. (the M66 L2)
Please Log in or Create an account to join the conversation.
- yeltrow
- Offline
- Senior Member
Less
More
- Posts: 71
- Thank you received: 3
24 Mar 2022 03:45 #238187
by yeltrow
Replied by yeltrow on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
Thanks, Andy. I'll give that a try. I had dismissed this as being a potential source of the problem because it only fires off with the button press. I particularly like the guarantee of order of operations.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
24 Mar 2022 13:40 #238220
by andypugh
Replied by andypugh on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
I was wondering if it was firing randomly and briefly due to electrical noise. But that could only happen if it is a physical button rather than VCP GUI.
Please Log in or Create an account to join the conversation.
- safarir
- Offline
- New Member
Less
More
- Posts: 5
- Thank you received: 2
09 Jun 2023 15:11 - 09 Jun 2023 15:12 #273241
by safarir
Replied by safarir on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
I know this is a older post, but I am experimenting a really similar issue.
In my case, I get this when I manually use use a M61 via MDI before loading a file. The file preview fail to be generated but the file load correctly. The error is generated when I load any file until I do a M6 tool change via MDI.
The g-code I load does not contain any M61. The message I get is:
In my case, I get this when I manually use use a M61 via MDI before loading a file. The file preview fail to be generated but the file load correctly. The error is generated when I load any file until I do a M6 tool change via MDI.
The g-code I load does not contain any M61. The message I get is:
Near line 1 of ...
Need non-negative Q-word to specify tool number with M61
Last edit: 09 Jun 2023 15:12 by safarir.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23310
- Thank you received: 4858
10 Jun 2023 18:32 #273282
by andypugh
Replied by andypugh on topic Need non-negative Q-word to specify tool number with M61/Clears with G0?
Do you have any tool change remap or similar active? Can you tell us more about your system?
What are the actual first few lines of the G-code?
What are the actual first few lines of the G-code?
Please Log in or Create an account to join the conversation.
Time to create page: 0.069 seconds