SolidCam error in output gcode for thread milling.
- Sekai
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
02 Aug 2025 19:44 - 02 Aug 2025 19:53 #332691
by Sekai
SolidCam error in output gcode for thread milling. was created by Sekai
Hi .
I'm trying to output an operation with thread milling but the gcode output for z position is static.
Code:
(THM_DRILL.NGC)
( 2-AUG-2025)
N1
N2 #12=1
N3 #13=0
N4
N5 #14=1
N6 #15=0
N7 G21 G49 G0 G54 ( ABS mm clr_Z_offset rapid_motion )
(MSG, Óñòàíîâè T1.
N8 M9 (turn all coolant off)
o106 repeat [#14]
o105 repeat [#12]
S3500 M3
G0 X0. Y0. Z25.
N9 M98 P2
N10 g0 x0 y0
N11 g92 x-#13
N12 o105 endrepeat
N13 g92.1
N14 g90
N15 g92 y-#15
N16 o106 endrepeat
N17 g92.1
N18 g90
N19 M30
O2
N20 (
)
N21 (THM-DRILL - THREAD)
N22 (
)
N23 G0 X0. Y0. Z25.
N24 M98 P3
N25 G0 X0. Y0. Z25.
N26 M99
O3
N27 G91 G0 Z-23.
N28 G1 Z-12. F300
N29 G41 G1 X7.379 Y-1.516 F800
N30 G3 X0.286 Y8.692 Z0.12 R6.15
N31 Z1. I-7.665 J-7.176
N32 Z1. I-7.665 J-7.176
N33 Z1. I-7.665 J-7.176
N34 Z1. I-7.665 J-7.176
N35 Z1. I-7.665 J-7.176
N36 Z1. I-7.665 J-7.176
N37 Z1. I-7.665 J-7.176
N38 Z1. I-7.665 J-7.176
N39 Z1. I-7.665 J-7.176
N40 X2.835 Y-7.176 Z0.88 R-10.5
N41 X-6.15 Y6.15 Z0.12 R6.15
N42 G40 G1 X-4.35 Y-6.15
N43 G0 Z24.88
N44 G90 M99
The Z axis stays at 1 mm.
I did discover if you open the machine editor of youre machine and go to Working Style => General and you put Software Transform to YES , the gcode output gives the corect z output:
Code:
N16 (
)
N17 (THM-DRILL - THREAD)
N18 (
)
N19 X0. Y0. Z25.
N20 Z2.
N21
N22 G1 Z-10. F300
N23 G41
N24 G1 X7.379 Y-1.516 F800
N25 G3 X7.665 Y7.176 Z-9.88 R6.15
N26 Z-8.88 I-7.665 J-7.176
N27 Z-7.88 I-7.665 J-7.176
N28 Z-6.88 I-7.665 J-7.176
N29 Z-5.88 I-7.665 J-7.176
N30 Z-4.88 I-7.665 J-7.176
N31 Z-3.88 I-7.665 J-7.176
N32 Z-2.88 I-7.665 J-7.176
N33 Z-1.88 I-7.665 J-7.176
N34 Z-0.88 I-7.665 J-7.176
N35 X10.5 Y0. Z0. R-10.5
N36 X4.35 Y6.15 Z0.12 R6.15
N37 G40
N38 G1 X0. Y0.
N39
N40 G0 Z25.
The problem is there is no more subroutines, the o call does not exist anymore so is M98 , M99.
The post processor is from here: github.com/G-S-E/SolidCAM-postprocessor-for-LinuxCNC
Thanks
I'm trying to output an operation with thread milling but the gcode output for z position is static.
Code:
(THM_DRILL.NGC)
( 2-AUG-2025)
N1
N2 #12=1
N3 #13=0
N4
N5 #14=1
N6 #15=0
N7 G21 G49 G0 G54 ( ABS mm clr_Z_offset rapid_motion )
(MSG, Óñòàíîâè T1.
N8 M9 (turn all coolant off)
o106 repeat [#14]
o105 repeat [#12]
S3500 M3
G0 X0. Y0. Z25.
N9 M98 P2
N10 g0 x0 y0
N11 g92 x-#13
N12 o105 endrepeat
N13 g92.1
N14 g90
N15 g92 y-#15
N16 o106 endrepeat
N17 g92.1
N18 g90
N19 M30
O2
N20 (
)
N21 (THM-DRILL - THREAD)
N22 (
)
N23 G0 X0. Y0. Z25.
N24 M98 P3
N25 G0 X0. Y0. Z25.
N26 M99
O3
N27 G91 G0 Z-23.
N28 G1 Z-12. F300
N29 G41 G1 X7.379 Y-1.516 F800
N30 G3 X0.286 Y8.692 Z0.12 R6.15
N31 Z1. I-7.665 J-7.176
N32 Z1. I-7.665 J-7.176
N33 Z1. I-7.665 J-7.176
N34 Z1. I-7.665 J-7.176
N35 Z1. I-7.665 J-7.176
N36 Z1. I-7.665 J-7.176
N37 Z1. I-7.665 J-7.176
N38 Z1. I-7.665 J-7.176
N39 Z1. I-7.665 J-7.176
N40 X2.835 Y-7.176 Z0.88 R-10.5
N41 X-6.15 Y6.15 Z0.12 R6.15
N42 G40 G1 X-4.35 Y-6.15
N43 G0 Z24.88
N44 G90 M99
The Z axis stays at 1 mm.
I did discover if you open the machine editor of youre machine and go to Working Style => General and you put Software Transform to YES , the gcode output gives the corect z output:
Code:
N16 (
)
N17 (THM-DRILL - THREAD)
N18 (
)
N19 X0. Y0. Z25.
N20 Z2.
N21
N22 G1 Z-10. F300
N23 G41
N24 G1 X7.379 Y-1.516 F800
N25 G3 X7.665 Y7.176 Z-9.88 R6.15
N26 Z-8.88 I-7.665 J-7.176
N27 Z-7.88 I-7.665 J-7.176
N28 Z-6.88 I-7.665 J-7.176
N29 Z-5.88 I-7.665 J-7.176
N30 Z-4.88 I-7.665 J-7.176
N31 Z-3.88 I-7.665 J-7.176
N32 Z-2.88 I-7.665 J-7.176
N33 Z-1.88 I-7.665 J-7.176
N34 Z-0.88 I-7.665 J-7.176
N35 X10.5 Y0. Z0. R-10.5
N36 X4.35 Y6.15 Z0.12 R6.15
N37 G40
N38 G1 X0. Y0.
N39
N40 G0 Z25.
The problem is there is no more subroutines, the o call does not exist anymore so is M98 , M99.
The post processor is from here: github.com/G-S-E/SolidCAM-postprocessor-for-LinuxCNC
Thanks
Last edit: 02 Aug 2025 19:53 by Sekai.
Please Log in or Create an account to join the conversation.
- MaHa
- Offline
- Platinum Member
-
Less
More
- Posts: 434
- Thank you received: 182
02 Aug 2025 20:11 #332693
by MaHa
Replied by MaHa on topic SolidCam error in output gcode for thread milling.
N25 G0 X0. Y0. Z25.
N26 M99
O3
N27 G91 G0 Z-23.
N28 G1 Z-12. F300
When i Look at this lines, there is incremental rapid from Z25 to Z2 and feed move incremental to -10
The moves with G3 are all incremental G91, so a pitch of 1, with lead in and out exactly to Z0
Line 44 switch back to abs G90
N26 M99
O3
N27 G91 G0 Z-23.
N28 G1 Z-12. F300
When i Look at this lines, there is incremental rapid from Z25 to Z2 and feed move incremental to -10
The moves with G3 are all incremental G91, so a pitch of 1, with lead in and out exactly to Z0
Line 44 switch back to abs G90
Please Log in or Create an account to join the conversation.
- Sekai
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
03 Aug 2025 04:05 #332705
by Sekai
Replied by Sekai on topic SolidCam error in output gcode for thread milling.
If i leave G91 and g90
It gives me an error:
Bug: Reached convert_stop() from M99 as subprogram return
Btw I'm on Debian 10 with linuxcnc 2.8.4
It gives me an error:
Bug: Reached convert_stop() from M99 as subprogram return
Btw I'm on Debian 10 with linuxcnc 2.8.4
Please Log in or Create an account to join the conversation.
- Sekai
- Offline
- New Member
-
Less
More
- Posts: 7
- Thank you received: 0
03 Aug 2025 06:56 #332708
by Sekai
Replied by Sekai on topic SolidCam error in output gcode for thread milling.
I have found the problem to the error
It should be like this:
N44 G90
M99
not like this:
N44 G90 M99
It does not like to be on the same line
It should be like this:
N44 G90
M99
not like this:
N44 G90 M99
It does not like to be on the same line
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds