Problems with my Gcode or is this a glitch?

MSM Mill mode support
Post Reply
capnnick
Posts: 7
Joined: Fri Apr 26, 2013 4:44 pm

Problems with my Gcode or is this a glitch?

Post by capnnick »

I haven't been able to do any machining in awhile because I keep running into the same issue and I'm not sure where I'm going wrong. The problem seems like a tool length offset issue that is causing things in the z axis to want to shoot for the sky and trigger my softlimits during the first tool change (I guess it could be happening during all tool changes but I never make it past the first so I couldn't really tell you.)

Here is the run down:

Step 1: Load program (My code is coming straight from hsmexpress which had worked for a couple of programs using the beta release of MSM 2.0.1 but I haven't been able to program anything with it that has worked for me since going to the production release.)

Step 2: Load probe (entering into the MDI "t99m6", Set up with tool 99 defined as the probe and master tool with the following options turned on: TC auto TCP, TC auto TLO, Skip RH tools, Master Tool mode)

Step 3: Probe corner to set zero

Step 4: Hit start and hope that the machine moves to the tool change position without triggering soft limits so that I can remove the probe and load the first tool that is being called. (spoiler alert, it doesn't make it... :? )

below is a sample of the latest code that is giving me issues. Is it something in the code, my procedures, or is this some kind of bug?
(NOVA PEDAL 2)
(BOTTOM)
(T5 D=0.25 CR=0. - ZMIN=-0.378 - FLAT END MILL)
(T6 D=0.125 CR=0. - ZMIN=-0.05 - FLAT END MILL)
(T7 D=0.375 CR=0. TAPER=45DEG - ZMIN=-0.12 - CHAMFER MILL)
(T8 D=2.5 CR=0. - ZMIN=0. - FACE MILL)
(T17 D=0.0625 CR=0. - ZMIN=-0.05 - FLAT END MILL)
G90 G94 G17
G20
G28 G91 Z0.
G90

(FACE3)
M5
M9
T8 M6
S2300 M3
G54
M8
G0 X13.475 Y1.0225
G43 Z0.605 H8
Z0.205
G1 Z0.1 F40.
G18 G3 X13.375 Z0. I-0.1 K0.
G1 X13.25
X-1.25 F80.
G17 G2 Y2.9525 I0. J0.965
G1 X13.25
G18 G2 X13.35 Z0.1 I0. K0.1 F40.
G0 Z0.605
G17
G28 G91 Z0.
G90

(2D ADAPTIVE4)
M5
M9
M1
T5 M6
S2300 M3
M8
G0 X0.2508 Y-0.1885
G43 Z0.605 H5
Z0.205
Z-0.353
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Problems with my Gcode or is this a glitch?

Post by DaveCVI »

Hi,
This sounds like it is a single basic problem: Going to the tool change position triggers the soft limits.

That makes me think that the machine has a limits configuration issue.

1) The first thing to realize is that the MSM tool change position is specified in machine coordinates. Therefore the physical location that is the tool change position is independent of the contents of the gcode program and also independent of where the program (work coordinates) zero point is located.

2) Soft limits are also specified in machine coordinates.

3) Machine coordinates are anchored in physical space by the home switches. When you home an axis, the physical location of the home switch is where axis zero is set.

Question 1: Does the machine have home switches?

Question 2: Are the axes referenced when you try to go to the tool change position?
(A referenced axis is one that has been homed so that the machine knows where machine coordinate 0 is for the axis. A referenced axis is displayed in MSM with a green axis letter, while an unreferenced axis has a yellow axis letter.)

Question 3:
What the the MSM Tool change position set to?

Question 4: What are the Mach Soft Max and Soft Min limits set to?
(this is in mach menus, config then homing/limits.

Compare the info for question 3 to that for question 4 -
I'm guessing that Tool Change Position location is set to a point that is outside the bounds of the soft limits settings.

To get to the TCP, the TCP will need to be both
i) a point that the machine can physically get to in machine coordinates and
ii) it will have to be inside the volume allowed by the soft limits settings.

Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
capnnick
Posts: 7
Joined: Fri Apr 26, 2013 4:44 pm

Re: Problems with my Gcode or is this a glitch?

Post by capnnick »

I wish it were that simple, but I don't think that it is. I have homing switches on my machine and reference all axis before doing any of the steps I listed. They are in fact all green and my tool change position is within the machines limits at: X 0.375, Y -2.9 and Z -0.083 (my Y axis switch is triggered when the table is furthest from the column making all movements negative and z is zeroed at it's highest point so negative is the norm there too.) Any tool change initiated from the MDI goe to the tool change position without issue and the machine automatically measures each tool successfully. Clicking the "go to tcp" button also moves to the tool change position with out any problems. I'm only running into problems running the Gcode without making the Z axis head up past it's limit which is why I had to think that either it's not applying tool length offsets correctly as a result of improper gcode or it's some kind of bug.

As a test I disabled the soft limit to see if the machine really intended to continue moving up before moving over to the tool change position and sure enough it went straight up at full rapid and tried to continue for a couple of inches past it's limit making an awful noise as my steppers stalled. I hit the estop before the machine was satisfied because I cant stand to here her cry so I'm afraid I couldn't tell you if it planned to keep going forever or if it was just moving a particular distance.
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Problems with my Gcode or is this a glitch?

Post by DaveCVI »

OK, if what you've said is correct, then the machine can move to the TCP without triggering the soft limits. Yet, it tries to go out of bounds when running the gcode program.

That implies an offset problem - either work coordinates or tool length offsets.
I'll need the following info to start with:
1) MSM version:
2) mach version:
3) windows version:
4) motion control device (PP, or SS-USB or SS-Enet or ?)

5) I also need to know the exact msm tooling options that are selected when running the program - a screen shot of the tooling page would be very helpful here.

6) use the report button on the tooling page and create a tool table report - that will let me see the TLO values in the tool table.

7) start the program, probe for the corner that you use for part (Work Coordinates) zero. After zero is set, take a screen shot of the work coordinate offsets page so I can see all the coordinate offsets.

From that info, I'll see what we can figure out for you.

Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
capnnick
Posts: 7
Joined: Fri Apr 26, 2013 4:44 pm

Re: Problems with my Gcode or is this a glitch?

Post by capnnick »

Thanks a lot for your help, I really appreciate it. This problem is killing me. My set up is as follows:
Win7 64
Mach3 3.043.066
MachStdMill 2.0.10 Professional
Ethernet Smooth Stepper v10h2d1a

And here is my tool table. https://www.dropbox.com/s/g9xzhceoi6pwr ... Report.txt

Here is a shot of the tooling options being used
https://www.dropbox.com/s/gn9wp70h5ban3 ... 20page.png

Offset page before probing corner to set zero
https://www.dropbox.com/s/ydy5rivpbunys ... eroing.png

Offset page after probing to set zero
https://www.dropbox.com/s/sjb128puawz7h ... eroing.png

Ready to run the program
https://www.dropbox.com/s/xkxdlqs2tufdc ... %20run.png

Cycle start triggers soft limit warning
https://www.dropbox.com/s/fqrqiqrpbjonq ... arning.png

Choosing to continue moves z axis up until exceeding the programed soft limits
https://www.dropbox.com/s/nxumuwas5wiye ... ceeded.png

Pressing cycle start once more will start the prompt for tool change which fails because the machine never moved over to the tool change position, it only moved the z axis upward.
https://www.dropbox.com/s/t9b1y0d61ii6g ... %20TCP.png
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Problems with my Gcode or is this a glitch?

Post by DaveCVI »

FYI - I have not forgotten you.
1) It's just that there is a lot of info to look thru
2) I'm up against a contract deadline at the end of the week.
I'm trying to find time to help on this one, but it may be the weekend before I can get that done.

Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
capnnick
Posts: 7
Joined: Fri Apr 26, 2013 4:44 pm

Re: Problems with my Gcode or is this a glitch?

Post by capnnick »

Thanks for the update. I totally understand. I'm going to try removing and reinstalling everything this week and let you know if that fixes anything.
capnnick
Posts: 7
Joined: Fri Apr 26, 2013 4:44 pm

Re: Problems with my Gcode or is this a glitch?

Post by capnnick »

You were absolutely right. It was the g28 commanding a return to home position that the program was getting stuck on. When you asked me if my home position was within my soft limits I incorrectly assumed that if my limits were 0.000" max and -11.500" min for my Z axis then my home position being at 0.000" would be considered "within" that range. Apparently I was wrong. Mach lets you approach your soft limit values but never actually reach them hence the soft limit warning being triggered after the g28 command. Changing my soft limits to .100" max and -11.500" min makes mach happy again and I can now run my program. I cant explain why mach was only concerned with my Z axis having its home equal to its limit and not the x or y, nor can I explain why it allowed me to use those values successfully in the past, but it's working now so thank you for the help. Good luck with your deadline and have a good week.
User avatar
DaveCVI
Site Admin
Posts: 798
Joined: Mon Feb 04, 2013 3:15 pm
Contact:

Re: Problems with my Gcode or is this a glitch?

Post by DaveCVI »

Thanks for the post, I was just about to wade into the details - now I'll do something else instead. :)
Dave
Productivity Software for Personal CNC Machinists
http://www.CalypsoVentures.com
Post Reply