Resume not working after M0

More
24 Jun 2024 16:36 #303702 by cncbeagle
I occasionally mill circuit boards with my CNC router. I recently moved from a Mint19 2.8 base to Debian 12 and 2.9.2. I use the Axis GUI. I have milled a few projects since the move to 2.9.2 without any difficulty. This is the first circuit board I have tried to mill since the change. When I try to execute the same pcb gcode file that worked under the old 2.8 setup with the new 2.9.2 it will not execute. The code below is the beginning of the file. Starting the file it goes to the M0 line and waits for the resume command. When I click on the pause/resume icon it executes the next line (G0 Z1.5) then stops. Nothing I try moves the execution past that point. There are no errors reported. I have stopped the program and tried executing from the next line (G1 X-3.7164 Y0.306 F35) but nothing happens. No movement or errors. Once the program is stopped all movement returns to normal.

Any suggestions?
(This GCode script was designed to adjust the Z height of a CNC machine according)
(to the minute variations in the surface height in order to achieve a better result in the milling/etching process)
(This script is the output of AutoLevellerAE, 0.9.5u2 Changeset: ...2d0387 @ http://autoleveller.co.uk)
(Author: James Hawthorne PhD. File creation date: 24-06-2023 16:13)
(This program and any of its output is licensed under GPLv2 and as such...)
(AutoLevellerAE comes with ABSOLUTELY NO WARRANTY; for details, see sections 11 and 12 of the GPLv2 @ http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)

(The following is a checklist which can be used before the probe routine starts)
(The checklist may not be entirely correct given your machine, therefore you should make your own adaptations as appropriate)
(1. Make sure wires/clips are attached and the probe is working correctly)
(Test probe connections within control software before starting)
(2. Home all axis)
(3. Load GCode file that contains the probe routine into your software controller)
(4. Jog tool tip close to surface and touch off Z)
(5. Jog Z up a fraction to make sure surface is cleared)
(6. Jog to and touch off X and Y at the desired bottom left corner of the probe area)
(Note: The first probe will touch off Z to 0.0 when it first touches to the surface,)
(all other probe values are relative to this first point)

G90 G20 S20000 G17

M0 (Attach probe wires and clips that need attaching)
(Initialize probe routine)
G0 Z1.5 (Move clear of the board first)
G1 X-3.7164 Y0.306 F35 (Move to bottom left corner)
G0 Z0.08 (Quick move to probe clearance height)
G38.2 Z-0.0625 F5 (Probe to a maximum of the specified probe height at the specified feed rate)
G92 Z0 (Touch off Z to 0 once contact is made)
G0 Z0.08 (Move Z to above the contact point)
G38.2 Z-0.0625 F2.5 (Repeat at a more accurate slower rate)
G92 Z0
G0 Z0.08

 

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

More
24 Jun 2024 17:00 #303704 by Aciera
Replied by Aciera on topic Resume not working after M0
Seems to work for me on 2.9.2.
Note, the signal 'spindle.0.at-speed' usually needs to be TRUE for any non-rapid move to be executed.

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

More
24 Jun 2024 17:23 #303707 by cncbeagle
Since this part of the file is just probing to develop a map of Z offsets the spindle is not running. I'll try setting the spindle speed to zero to make that signal true. Earlier I also changed to a true spindle with an inverter connected by RS485. So now the system knows if the spindle is at speed. I have made several pcbs since the spindle upgrade but that was with Linuxcnc 2.8. Still seems like a change in behavior for this signal between 2.8 and 2.9.2.

Thanks for the spindle speed info.

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

More
26 Jun 2024 20:36 #303846 by cncbeagle
Following up on the spindle-at-speed idea I created a pyvcp checkbox to bypass this function. I created an or2 of the bypass and the spindle at speed signal from the VFD output to the spindle-at-speed signal. Unfortunately, it looks like Linuxcnc is using the spindle.0.at-speed pin to inhibit non-rapid moves. I haven't figured out how the bypass that pin.

If I start axis with the VFD unpowered I can continue probing using non-rapid moves forever. Then after probing the grid I power the VFD and mill the pcb. A kludge but it works.

Curiously, my touch-to-zero routine works every time regardless of VFD power state. It has non-rapid moves. Other similar touch off routines also work. Is there different intended behavior vs the spindle at speed function for routines vs gcode programs?
(touch_2_zero.ngc)

O <touch_2_zero> sub 
G91 (switch to relative coordinates)
G38.2 Z-0.75 F5 (down fast to get approximate)
G92 Z0.0
F10 G1 Z.06 (up .06)
G38.2 Z-0.1 F1 (down slow to get exact)

(Version 3)
G90
G92 Z0.0
G0 Z0.25

O <touch_2_zero> endsub
M2

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

More
26 Jun 2024 20:44 #303847 by Aciera
Replied by Aciera on topic Resume not working after M0

G90 G20 S20000 G17

Have you tried removing the 'S20000' from your preamble?

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

More
27 Jun 2024 18:51 #303923 by cncbeagle
Just tried your suggestion of removing S20000 from the preamble. It appears to have worked. The reason I say "appears" is because it was not a straight forward test as I had already probed the board with the VFD off. Then I needed to warm up the VFD/spindle after which I ran the file from beginning to end. The probe section worked as expected as did the actual milling.

Thanks again for the suggestions.

I have been using Linuxcnc for a few years and I have learned enough to understand how little I really know about its inner workings. I started with a parallel port eventually moving to a mesa 7i76E. The machine started with 3/8-16 screws and skate bearings and now has ballscrews and linear rails. I enjoy modifying the machine as much as using it.

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

Time to create page: 0.087 seconds
Powered by Kunena Forum