1
General Mach Discussion / Tormach / Mach3 / Sprutcam code failure
« on: July 31, 2008, 12:30:56 PM »
I've just attempted to run my first personally generated G-code program using Solidworks to Sprutcam for a Tormach PCNC110.
When I run the code it starts off OK, i.e. moves to a tool change position, requests tool change then moves Z towards the workpiece. However the spindle does not get turned on and an error box pops up saying
Error on line:2 - Unspecified error
Meanwhile the G-code program continues running, generating machine motion ( but no spindle rotation)
Clicking OK to the first error message brings up another window - M5 - Mach3 VB Script Editor with the code DoSpinStop()
Funny thing is there isn't an M5 command issued from my code. ( Is the M5 part of the M998 instruction ? )
Any ideas why this is happening ?
[Program sample below]
%
OProject
N10 G90 G17 G40 G80 G49
(Pocketing)
N20 M998
N30 T12 G43 H12 M6
(Cylindrical mill L21, D12)
N40 G0 X160.315 Y32.987 Z25. S1600 M3
N50 G0 Z21.
N60 G1 Z16. F100 M8
N70 G3 X160.315 Y32.987 Z16. I-0.316 J-2.9837
N80 X159.724 Y33.234 Z16. I-1.4125 J-2.544
N90 X159.018 Y33.359 Z16. I-0.9163 J-3.113
N100 X156.876 Y28.425 Z16. I0.9815 J-3.3579 F200
When I run the code it starts off OK, i.e. moves to a tool change position, requests tool change then moves Z towards the workpiece. However the spindle does not get turned on and an error box pops up saying
Error on line:2 - Unspecified error
Meanwhile the G-code program continues running, generating machine motion ( but no spindle rotation)
Clicking OK to the first error message brings up another window - M5 - Mach3 VB Script Editor with the code DoSpinStop()
Funny thing is there isn't an M5 command issued from my code. ( Is the M5 part of the M998 instruction ? )
Any ideas why this is happening ?
[Program sample below]
%
OProject
N10 G90 G17 G40 G80 G49
(Pocketing)
N20 M998
N30 T12 G43 H12 M6
(Cylindrical mill L21, D12)
N40 G0 X160.315 Y32.987 Z25. S1600 M3
N50 G0 Z21.
N60 G1 Z16. F100 M8
N70 G3 X160.315 Y32.987 Z16. I-0.316 J-2.9837
N80 X159.724 Y33.234 Z16. I-1.4125 J-2.544
N90 X159.018 Y33.359 Z16. I-0.9163 J-3.113
N100 X156.876 Y28.425 Z16. I0.9815 J-3.3579 F200