Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Moving spindle stop to Z retract line Doosan VMC post

Message 1 of 6
174 Views, 5 Replies

Moving spindle stop to Z retract line Doosan VMC post



I've recently switched my Machine shop from using Edgecam to Fusion360 and I'm currently adjusting posts to get programs formatted in a way that is somewhat similar to the rest of our NC programs. We run mainly Doosan machine tools with Fanuc Controllers.


One thing I've noticed in the programs that Fusion outputs, is that code is separated into a lot of different lines when the machines would run more efficiently if they were compressed, I need some advice on modifying my post processor on how to overcome this.


The current issue I have is I want the machine spindle to be turned off on the Z retract line e.g.


Like this



This will stop the machine having to Wait for the spindle to slow down as it should do most of it during the retract, it would also be helpful to get the M9  onto the same line.


Below is a picture of the Post Script. Thanks


M5 Positioning.png



Message 2 of 6
in reply to: infoTS4YA

Click on line 49 in that debuggedfile.NC. It will show you which line of code from the post generated that block sequence. If the code does not seem relevant, click again to cycle through function calls.
Once you figure out where the code to go home on Z is generated add there a call to stop the spindle. I.e. the code that generated the 53 line from that file.

Once you have that done and tested you can figure out how to put the M05 in the same block instead of a separate one if you really want that.

Message 3 of 6
in reply to: ltomuta

Thanks for your reply ltomuta,


"you can figure out how to put the M05 in the same block instead of a separate one" This is what I don't know how to do, how do you get the code to output on the same line?


Moving the section of "spindle off" code up on the same line as the G28/G30 line in the post doesn't move it in the posted NC file.



Message 4 of 6
in reply to: infoTS4YA

Without having your actual file to quote exactly, what you are looking for is a writeBlock() function which it turn has several parameters that generate the G0 if needed, the G91, ... 

Something like


writeBlock(gMotionModal.format(0), gFormat.format(91), gFormat.format(28),  zFormat.format(0) );


To put an M05 there the simple answer is that you add another parameter


 writeBlock(gMotionModal.format(0), gFormat.format(91), gFormat.format(28),  zFormat.format(0), mFormat.format(5) );



The complicated answer is that the new parameters should be more like


 mFormat.format(getCode("STOP_SPINDLE", SPINDLE_MAIN))


To complicate it further, you should stop the active spindle, whichever it may be so ...

Now, once you figure out which M command you give and you put it on the correct line you are still left with a problem. Previously the spindle stop was done by calling






Now you will have to cancel that call, since the spindle is already stopped, but you will have to do everything that function call used to do aside from issuing the M0x, i.e .you also have to do something like


machineState.mainSpindleIsActive = false;


Or maybe you can still let the onCommand call in place, just make sure it does not output anything, just sets the machine state.


Message 5 of 6
in reply to: ltomuta

OK I got it, I have to put the code to stop the spindle in the "safe retract" sub section of the post and not the "tool call" sub section for it to output on the same line.


I think I'll leave it as it as as to not end up with conflicts down the road. Thanks for you help.

Message 6 of 6
in reply to: infoTS4YA

Hi, looking to implement this in our post. What would be the correct way to go about this? Cheers

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report