Mill head goes to table on start

Mill head goes to table on start

stu9354
Participant Participant
527 Views
4 Replies
Message 1 of 5

Mill head goes to table on start

stu9354
Participant
Participant

I am new to CNC so forgive my lack of knowledge!

 

I have created a CAM job in HSM (2016). When I run the G-Code on a simulator like CNCSimulator I see the milling head go to the table (Z=0) at the start and then drag across the table to the stock's origin. Obviously the head should be above the stock when it moves. I see this at the top of the generated G-Code:

 

G28 G91 Z0.

 

which is why this happens. I can't find and settings in the job setup that would make sure the head was above the stock before the initial move.

I must be missing something obvious. When I run the HSM simulator on my job everything else works fine so it's not like I have the WCS in the wrong place. Any help would be appreciated.

 

0 Likes
528 Views
4 Replies
Replies (4)
Message 2 of 5

Steinwerks
Mentor
Mentor
G28 G91 Z0 puts the spindle at the home position for the machine. Alternatively G53 Z0 does the same thing on many controls. A backplot doesn't know where home is though, so it just assumes Z0 is where you've set it in the CAM with regards to the toolpath.

What machine are you programming for?
Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes
Message 3 of 5

stu9354
Participant
Participant

I am programming for one of those Chinese 3040T machines through an Arduino controller so it uses generic G-Code. Is the home Z position the same Z as I set up for the WCS? What I see in the simulator is the head moving down to the table when it is in the back right corner. My stock and WCS origin is the front left corner so when my first contour command is executed the head, left at Z0 from the homing command, moves to the WCS origin which would collide with my stock. Since I defined my stock height in the setup, I don't know when the head doesn't move above the stock before it goes to the WCS origin.

 

Sorry if my terminology is unclear - I don't yet know the vocabulary for CNC.

 

Here is a snippet of the HSM generated G-Code:

 

%
(1001)
(T1 D=0.1 CR=0 - ZMIN=0 - flat end mill)
G90 G94
G17
G20
G28 G91 Z0
G90

(2D Contour2)
M9
T1 M6
S1000 M3
G54
M9
G0 X1.67 Y1.99    <--- this move is with Z=0, which is the table surface which would collide with the stock.
Z0.5
Z0.3

...

 

Maybe you are trying to tell me that the home position for my machine in reality would be above the table in Z but the simulator is not showing how this Chinese machine would really work (I don't have the machine yet).

 

I really appreciate your help!

 

0 Likes
Message 4 of 5

Laurens-3DTechDraw
Mentor
Mentor

Your Z0 "should" be on the high end of the Z-axis but you never know with chinese machines.

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
René for Legend.


Message 5 of 5

stu9354
Participant
Participant

I think I am understanding better the interaction between the HSM commands and the CNC controller (in my case GRBL). The controller is responsible for positioning the head on the home command and to do that the controller needs to store the X, Y, and Z values for the home position.

 

Is there a relationship between the WCS in HSM and the actual home position on the machine? If the Z=0 of WCS is on the table top but the Z=0 of the home position is above the table top for the machine, how are these two reconciled? I don't know how much of the machine knowlege is built into the post processor code in HSM or if that's where it gets reconciled.

 

 

0 Likes