Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Safe Start Fanuc.cps post

Anonymous

Safe Start Fanuc.cps post

Anonymous
Not applicable

Hello,

 

I'm new to Fusion 360 but a very experienced programmer.  I have what I'm hoping is a simple question.

 

I am using the most recent update to the fanuc.cps post and utilizing the "safe start all operations" with the hope of safely starting the program at the control at the beginning of any tool number.

 

Specifically, I expected this check box to add this code to before each tool change:

 

G90 G94 G17 G49 G40 G80
G20
G28 G91 Z0.

 

As is the case at the beginning of the program.  This true "safe start" is to ensure that all modal G codes are neutralized before starting a program either at the beginning or at the start of any tool.

 

The "safe start at all operations" button creates block skips between operations and "G28 G91 Z0" along with the spindle codes, etc.  This is understandable so that an operator can start at any operation, not just in between tools.

 

But is there a way to have a true "safe start" at the beginning of each tool?

 

Current output between tools:

M05
G28 G91 Z0.
G90
G49

M09
M01
T2 M06
T3
S7639 M03

 

Desired output between tools with "safe start":

M05
G28 G91 Z0.
G90
G49

M09

G90 G94 G17 G49 G40 G80
G20
G28 G91 Z0.

T2 M06

M01
T3 (NEXT TOOL)
S7639 M03

 

Can someone assist? I am hoping there is an existing solution but I could not find one after searching the forum.

 

Thank you,

 

0 Likes
Reply
577 Views
1 Reply
Reply (1)

seth.madore
Community Manager
Community Manager

This is going to be a post edit. Edits are done all the time, and most of the time they can be simplem as is the case here. First thing you are going to want to do though is download Visual Studio Code and the HSM Addin

Once you have those, open up your post and, using the add-in, post some test code. When you click on the right hand text (the g-code) it will jump you to the related spot in the post processor. For example, we can click on the initial modal g-code cancels and see the code involved. Then, we can click on the M09 or the return home command and see what code is involved there. A little bit of copy/paste and some trial and error and we should arrive at a solution. However, since it's a modal command and already active, we would need to change the syntax up a bit.

gFormat.format(90), gFormat.format(94), etc etc instead of:

writeBlock(gAbsIncModal.format(90), gFeedModeModal.format(properties.useG95 ? 95 : 94), gPlaneModal.format(17), gFormat.format(49), gFormat.format(40), gFormat.format(80));

 


Seth Madore
Customer Advocacy Manager - Manufacturing
0 Likes