What's new
What's new

Fanuc O M controller on a (SuperMax 2) 3 axis mill, need help with machine offsets & no BT-40 spindle rotation, because hi-speed spindle is mounted


Apr 23, 2011
19970 DE USA
I am trying to get up to speed using a Fanuc O M controller on a SuperMax 2, 3 axis mill. This mill is new to me, so some questions are elementary, so please excuse my ignorance. The part I will be cutting has the same outside shape, but the detail on the inside varies, and very few parts will be the same shape, so only 1 or 2 of the same shape. The material is aluminum and the end mill diameter will be as small, .032" for the fine detail, I have a hi-speed spindle that mounts to the face (removed the toolholder lugs) of the BT-40 spindle, so no mill ATC will be used.

I do not want the BT-40 spindle to run because the other spindle is mounted there, I plan to ruff and then take finish cut with 2 different sized end mills in the hi-speed spindle. What is the best and easy way to not have the BT-40 spindle not move, to know with confidence that it will not turn on, and still easy to program?

I read in this thread: (https://www.practicalmachinist.com/...l-controller-how-to-work-tool-offsets.334093/) where TeachMePlease said this "For the no G1 without an M3... This is gonna sound dumb... But are you trying to move in IPR instead of IPM? Because no Revs = 0 movement in IPR...".
I reference this thread, because I am looking for a good/proper way to not have any BT-40 spindle motion.

My hope it is possible to use the "machine x=0.0, y=0.0" as the starting point every time a part is to be cut? Naturally, every time the power has been off, a "zero return" needs to be been preformed, or will I need to "dial in" the "start point" each time the mill is power up? For example, provide a reamed hole in the sub-plate to be used as the way to set the x & y start point. Set the z axis by "touch off with paper between end mill and work" or use a pre-setter tool (has a pad on top to bring end mill down to move the dial on the indicator: this is link https://www.ebay.com/itm/301203002700) to provide the input value for z axis.

Being that the hi-speed spindle does not have an easy way to locate the end mill to the collet (SRP style) in the z axis, on the few parts that will be cut the same, my thinking is to use a sub-plate (maybe several identical sub-plates) to mount the uncut part to that fit in a mill vise with a stop to locate each part in the vise. So use ruffing end mill to cut all parts that are the same; then use finish end mill for final cut on all the parts.

I have received this suggestion to start the CNC G-code file with something like this:

N10 G90
N20 G10 P1 X-12.5000 Y-8.000 Z-12.0000 (P1 -Set the Datum of G54 )

G54 (G54 work offset active)

Here Your program goes

I am not confident of how to go about tool offset or work offsets. I have a copy of BobCad v29 and have selected a post-processes to match the Fanuc controller, but have not been able to use "start cycle" in "Auto" to have the mill move by command. The sample program is just a few lines to test the ability to upload/download part files. To do "drip feed" need to be in "Tape" mode. I have read about the confusion that the switch labelled Manual/Absolute can introduce, currently this is in the "up position". I have used the MDI mode to start the spindle.

Many thanks, in advance, for any suggestions.
Unless you can insert each new tool into the High Speed Spindle exactly the same each time, you're going to have to re-measure and update the Tool Offset each time you change a tool. Also in this case I would use the same tool offset for each tool. That way you know without thinking about it were to update the offset after every tool change.

To limit the rotation of your Spindle, put it in the low gear range if you have a Reduction Gearbox. You might try strapping your HS Spindle to the spindle housing instead of the Spindle Shaft. That eliminates any chance of of it rotating. And if you don't have a Reduction Gearbox it will rotate. You can try S0 M3 and see if your spindle will run at zero RPM. It might put electrical pressure into the spindle to hold it steady. Not sure if something like that is possible.

You must have at least 6000 rpm. Why not just use the main spindle a take a little more time? If you have dozens to do well maybe not.

I would not use G10P1 for loading Work Offsets at this young stage in your programming career. You should become familiar with loading them manually, as this will give you a better sense of what you're up to. Having some arbitrary number imported into your Z work offset is a road to a crash. Unless you're using a Master System or electronic Tool Height Setter, the Z setting in your Work Offsets (G54 thru G59) will be Z0. most of the time. The Tool Offset Setting will take care of how high or low the tool goes.

You're going to have to learn G-Code. There is no way I would trust a BobCad Post to spit things out exactly right. If you can't read it and understand everything it says you're taking a bigger chance with things then I ever would.

"My hope it is possible to use the "machine x=0.0, y=0.0" as the starting point every time a part is to be cut? Naturally, every time the power has been off, a "zero return" needs to be been preformed, or will I need to "dial in" the "start point" each time the mill is power up?"

When you restart you machine and Zero Return each axis, it will go back to the exact same place it did the day before, unless you have sticky or dirty Deceleration Dogs or an errant chip getting stuck somewhere.

Yes you will use your Machine Zero Points with everything you do. And I mean everything. Every single Tool or Work Offset number you type in will be DIRECTLY RELATED to Machine Zero. If you have your tool or Vise or Fixture set somewhere and you have your tool, pointer, or setting device at the position you'd like to call Home or X0.Y0.(Work) and Z0. (Tool), and you're wondering what numbers to load into your Tool or Work Offset(s), look at your Machine Position Display (look nowhere else) and those are the numbers you want to type in. The most anti-crash worthy thing you can do is for you to completely understand how everything relates to Machine Zero. Work offsets and other things placed in the Work Envelope can also have a relationship to each other in our minds, (like that vise is 4" over in X then this other vise) but more importantly they will have a verifiable "by-the-numbers" relationship to Machine Zero. Ha... I think I've said enough about Machine Zero. :-)

13engines, thank you very much for your thoughts. I am moving from a 2 axis mill, (fixed "z") to this mill. I had a good friend (we had the same vo-tech instructor) that I miss, who I had known since the 1980s, that was my go-to person for this type of question, but pancreas cancer has taken him away late last year. The adapter/mount for the hi-speed spindle has a part that is shaped & bolted to the adapter and engages with one of the counter bored holes, for a socket head cap screw in it, this bolt holds the spindle housing to the casting, not allowing the hi-speed spindle to rotate.​

The shape on the inside that changes often is too complex to develop this g code manually, I will need to trust BobCad. I have cut a few of the parts in the 2 axis mill but considering the programs were 1700 lines long, it was easy to have the tool down when it should have been up. My hope is I would have a template saved with the starting part of code on it or for new part go through the BobCad screens to generate the pocket/profile code and at the end copy and past the "starting sample code" in it or what ever is necessary so the controller understands.

I was aware that every time the end mill is removed that a "touch off" or the "electronic Tool Height Setter (some of these are all manual, no electronic part)" must be used and that this data (from the Tool Height Setter) and the Machine Position Display screen data is used in the Tool or Work Offset(s) screen.

For example, if I moved the vise on the table, I would use the "handle" mode to get the hole (this hole is for setup) dialed in using an indicator, reference the machine position screen for the x and y position data; use this data in the tool/work offset screen. Key in the exact same way in reference to + - symbols, if there was a Tool Height Setter used will need to use the value from this added to the machine position screen to get final settings.

To build confidence, is there a way to know the BT-40 spindle will not come on, by changing a parameter?

Many thanks!
Could always take out the belt for the spindle motor. This is assuming the spindle is not directly driven.

Does your spindle bolt onto the face of your current spindle? Or is it a "tool holder" in your spindle currently?

I would hope that it isn't clamped to the actual rotating part of the spindle, but the spindle housing.

dandrummerman21, thanks. This is going to be a semi-permanent spindle mount, I don't intend to cut anything but this one part. This is a belt driven with encode on the spindle to do ridget tapping, but I don't intend to use that or the tool changer. thanks!​

Edit: I only found this thread just now; [Need Feed w/o Spindle Rotation When Probing on Fanuc OMC] at this link:https://www.practicalmachinist.com/...le-rotation-when-probing-on-fanuc-omc.408962/

As I read, post #17 from 13engines who says post #6 (see below) from Vancbiker was correct:
"I've never used G10 to change that parameter but I don't know any reason why it would not work. I'm not in my shop today so cannot test it.

G10 L50
N0024 Pxxxxxxxx

On the P value, the x's will need to reflect the current state of the bits of 24 and bit 2 will change from 0 to 1 as needed.

The lack of waiting on SAR can cause trouble on a mill is when the spindle accel is slow due to a heavy geared head design or the machine is small and very fast. Many machines have it set to off by default"

Does this mean parameter N0024 P should be all 1s, as in 11111111? I need a second opinion.
Last edited:
My cnc router has an OM controlling it and it is a multispindle machine. I have 8 spindles that can have the same tool in them or different ones for each, depends on what you want to do..
Anyway, one possibility for you would be to mount your high speed spindle to the side of the original BT40 and use the BT40 to rough and the high speed to finish. If you do this you can use the work coordinates to tell the control where your spindles are. That is the way mine is set up to work, it does mean I have to draw my part in CAM in the location on my table I want it to be and then the work coords G54-59 are used to tell it where the spindles are. Kinda weird, but it works well for me and might be a good way for you too.
If you do this, you will have to be very aware of where both spindles are and how long the tools are so you clear any fixtures, clamps, etc. on both.
"Does this mean parameter N0024 P should be all 1s, as in 11111111? I need a second opinion."

Hi Solidworks, No. Look and see what Parameter 24.2 is set at. 00000X00 Where X represents where you should look. All the Zeros you see here are only place holders. If you change the 2nd bit (third from the right) to Zero, make sure you copy everything else in the line just like it is.


Parameter 24 currently reads 11000100
Change to 11000000

Again... as an example. Bits are read right to left. 00000000 reads 76573210

If 24 Bit 2 is already Zero then you're already good to go.

BTW - I never said you should program manually. Only that you should be able to read and understand G- code so you're not simply pushing the Green Button blindly.
Unless you can insert each new tool into the High Speed Spindle exactly the same each time, you're going to have to re-measure and update the Tool Offset each time you change a tool.

just fyi, they make electric cartridge spindles with taper-type tool holders, kind of like a miniature CAT or BT tool holder. I don't know how much they are offhand but they can't be tooo much because the entire machine they go on is only $4,000-ish. Around 2hp, 15,000 and 20,000 rpm, too.

13engines, thank you for the clarification of parameter, 24.2 was the only bit that was set to 1 in that parameter, and now it is set to 0. Is there an easy way to test?​

So I understand the best I can, does this not allow spindle to move under power, just free wheel, like no power, or do I need to make completely shore the g code that is used has no spindle "on" command or code in the program? I may find that both are necessary, the program never requests the spindle & parameter, 24.2 allows table motion w/o spindle moving.​

I need to investigate/try BobCad and see if it is possible to create a program w/o spindle command written in, or if there is a way to not reference the spindle or remove that spindle data. What I recall when running BobCad was that you had the option to pick from the table as to speed & feed, or manually key in feeds & speeds relating to the tool used. This included the type of toolholder was being used.

EmanuelGoldstein, thanks for your suggestions. Do you have a brand name for the machine you suggest, I want to know what I have not seen and is out there?​

Is there a way to know with confidence that the switch labelled Manual/Absolute is in the correct position, currently this is in the "up position"?

Many thanks!
I thought after reading the old Post that was mentioned that you better understood what was trying to be done and why. The only thing that parameter you changed changes, is it tells the machine to NOT WAIT for a Spindle Arrive Signal (SAR) before proceeding with whatever axis move the program block asked the machine to do. It does nothing else. Meaning it doesn't keep the spindle from turning. (Not programming M3 or M4 does that.)
Normal Use Example: SAR on. 24.2 = 1

G1Z0.F20. (This move is not started until the spindle is fully or near fully up to speed) (Wait for SAR satisfied)

Normal Use Example: SAR off. 24.2 = 0

G1Z0.F20. (This move and the next are executed whether the spindle has reach 10k RPM or not) (SAR irrelevant- doesn't care)
Your Use Example: SAR on. 24.2 = 1

G43Z0.1H1 (No spindle speed requested)
G1Z0.F20. (Machine sits and waits for SAR that never comes so never moves) (SAR never satisfied)

Your Use Example: SAR off. 24.2 = 0

G43Z0.1H1(No spindle speed requested)
G1Z0.F20. (Machine moves as requested) (SAR irrelevant- doesn't care)
But again... it doesn't keep the spindle from moving. If for some reason the last example doesn't work for you, I suggest you try S0M3 and see what happens. (with SAR =1 or 0) Especially if you have a Reduction Gear Box. That will make the spindle pretty stiff.

Get used to modifying your post. Removing spindle info is pretty simple stuff. As I imagine you're not controlling the bolt on spindle with the Machine Control but manually or with an outboard spindle control.
I am gonna reiterate what I asked about above in a different way.

You should mount the high speed spindle you have in a way that, if you accidentally turn the spindle on, it won't affect the high speed spindle. Your high speed spindle should not be touching the rotating part of your BT spindle

Then you only need to make sure the machine will feed without the spindle on. It isn't clear to me if you have tried that? Maybe I'm wrong. Most machines will allow you to feed an axis with the spindle off, although it is possible yours will not. Can you confirm that you can't run programs with a bunch of G1 moves without the spindle running? Or are you just not sure how to program this?
Last edited:
Sorry for the misunderstanding, I was talking about changeable toolholders in an electric cartridge spindle, like BT10 size or something, but better than just collets -- not that it mounted in a BT40 normal spindle.
Ah, I misread what you had written.

On the subject of in-spindle speeders, while it sounds like solidworks4u already has a bolt-on spindle, the other option he would have (although he'd have to buy more stuff) are regular ol' "speeders" like nikken or other brands have. I am using a spindle speeder on one machine.

You could use that, likely also with your ATC, and you could have 2 of them in different pockets, AND still have the functionality of ATC and the regular BT spindle for larger slower tools. https://www.nikken-world.co.uk/products/spindle-optimisation/spindle-speeder

13engines, many, many thanks, for the clarification, I am grateful for your help, and now I know with more confidence what needs to happen on the BobCad side. It seems to me that the g-code BobCad creates will need to be edited to remove any reference to the spindle. I pray BobCad has a workaround for this, to help automate this part, for I will only cut a few parts (most likely just 1 good part) from each program, so this may be a pain to deal with each time.​

dandrummerman21 and EmanuelGoldstein, many thanks for your suggestions. I have seen the "speeders" to increase the spindle rpm. It would be sweet to have like a BT10 size toolholder in a "speeders" with an oil cooler to add life and durability to the tool. The budget currently will not support that level of tooling.​

For safety, I plan to remove the "v" belts that drive the spindle, there is no gearbox (some machines had a 2 speed gearbox option), only the belt driven encoder will remain attached to the spindle.

Does anyone know if I were to unplug the spindle cooling fan (this is on top of the spindle motor) has an "arrow" cast in the red plastic cover showing what direction is the correct direction when the 3 phase power cables are first connected, if that would cause an alarm of some kind? It will serve no purpose later and when "zero return" is selected it naturally goes all the way to top of travel and blows all the dirt around, not so much dirt now it's been up and down a lot.

Is there a way to know with confidence that the switch labelled Manual/Absolute is in the correct position, currently this is in the "up position"?
Or does this depend on what style I chose to use in the "work offset" / "tool offset" screens? I know there are a different ways people/companies set up the tool offset, for example 1 that I saw YouTube about a method that allows the tool offset to be set up so that any toolholder with tool, has been "per set" to a certain height, so this toolholder with a tool, can be used in any machine in the shop and work correctly. The downside of this method as I recall the z data was not too useful to look at and know with confidence it will work ok.

dandrummerman21, I really get the approach you suggest. I believe my ruffing end mill will be around .062 dia. with at least 1 finish pass with .032 dia. coated carbide; will use coolant spray mister with air to keep chips under control. If more material was to be removed, I would think a larger tool would suit better.

Many thanks for the help and support.
I reached out to the BobCad forum with the question about "m" command and explained why I needed g-code w/o any m-code commands. Their suggestion was to a different post processor (BC_3x _Mill.BCPst) after refreshing an existing file with new post processor and saving, so I can view it, there are a few "m codes" showing, will try to attach pic.
Any m codes will be a dealbreaker, correct, it only takes 1. Line 26, 27 & 28 show m code.
Many, many thanks for all the help and support!


  • Postprocessor M05.png
    Postprocessor M05.png
    85.1 KB · Views: 6
Hi solidworks, There are a bunch of M codes you might want. M00, M01, M98, M99, M30 are real handy and M30 is kind of a must. M08 and M09 perhaps to start and stop your coolant. Maybe M07 if you have a mist or air blast setup going. M05's don't hurt to make sure that spindle is stopped.

The only ones you need to worry about are:
M06 (Tool Change)
M03 (Start Spindle Clockwise)
M04 (Start Spindle Counterclockwise)
You don't need any S or T calls either as you're doing all that manually, though alone they won't hurt anything.

Your machine file is a Text file. Just do a simple Search and Replace for M03 and M06. You'll likely never see an M4. Either replace them with a Null or nothing, or make them all M5's, which will make damn sure that spindle stays off. That's all you need to do. Note that some processors might make all you M codes look like M3 M4 M6. Meaning leaving out the preceding 0.

Per usual that post is clunky and full of excess junk that makes your files sizes A Lot bigger. You don't need Line Numbers to start. They're basically meaningless in a one man shop. They helped here to bring attention to the blocks you're worried about, but once you're past all that they only eat up space, which is precious on a Fanuc machine.

Most G codes are Modal. Meaning once called they're good until another G code from the same group is called.
Mostly I'm talking about G00, G01, G02 and G03. Having them on every single line is not needed and takes up a lot of room. My BobCad has a button in a setup window or somewhere that you can tell the software that G codes are modal. You might look for that. There should be a No Line Numbers click-box somewhere too.

To get yourself going, I'd stick with the Post you're familiar with, make the Setup tweaks I've suggested and do the Replace routine mentioned. Understand we're talking about less then a minute of work on almost any file length. I bet there are Text Edxitors out there that could be automated to do the whole thing in a click or two.

13engines, many thanks!! I will remember that M06 (Tool Change), M03 (Start Spindle Clockwise), & M04 are the only ones to worry about and remove!!​

Thanks for the great help, I am going to see how I make out.
Many thanks!
The mill has moved by command!! It ran for a while, maybe 10 minutes, before received a Fanuc alarm 008 that says that a M02 M30 or M99 was needed in the program. Apparently too good of a job removing Ms from the program. I did not use the “check” button to run the program on the control, before trying the start cycle button. It would be real convenient to have a way to know or test in BobCad.

Many thanks!