Hello Guest it is March 28, 2024, 08:04:05 AM

Author Topic: Flute/Tooth count  (Read 659 times)

0 Members and 1 Guest are viewing this topic.

Flute/Tooth count
« on: June 05, 2022, 05:40:46 PM »
I am evaluating Mach 4 prior to purchase. So far I am pretty excited that I can edit the screen, which I want to optimize for touch. I have had a couple of wins already: changing the screen ratio so it doesn't stretch in 1920x1080, and turning off the menu bar.

For milling, I want to display feed per tooth (AKA Chip Load) in a DRO when running a program. Does Mach4 support flute count in its tool library? If not directly, are there unused tool variables available?

Similarly, I want to display the surface speed of the cutter in a DRO. Is this an existing feature in Mach 4?

Haas NGC users would be familiar with what I'm looking for, since they are all standard features. It requires populating the tool offsets library more than most folks do, though; by scrolling right a LOT more information pops up.

Re: Flute/Tooth count
« Reply #1 on: June 06, 2022, 12:04:05 PM »
I actually made something like this quite a while ago for the same reason, I liked the display on our NGC.
I'll have to find it again. 
Chad Byrd
Re: Flute/Tooth count
« Reply #2 on: June 06, 2022, 03:53:33 PM »
Alrighty,
Here is what to do; there are a few steps to take to get this working. 
1.  Add a Flute Count field to the Tool Offsets Table.
Go to View, tool table.  Then Edit, Table Fields.  Then under the user fields tab; add a field called Flute Count and set it to integer.
2.  Add a DRO to the screen wherever you want to see the Chip Load.   I have it set up to justify left so you can see it better and have it reading to 4 decimals.  Notice the "Format" under the properties.  Set it like I have it in the attached picture.  Add a static text box for a label if you'd like.  You'll see I've done that in the picture.
3.  Set that DRO to a #VARS.  You set it in the DRO properties in the screen editor.  See attached picture.  If you don't use any System Variables just set it to 500 like I have in the example. 
4.  Add the following script to the PLC Script.  I add my custom stuff at the bottom above the section that says "this is the last thing".
I have attached a second picture to show you how to get to the PLC Script.  Select the screen in the screen tree manager.  It is the top item.  Then the Second option under properties, the lightning icon, and then the 3 dots at the end of the PLC Script line.  That will open up the Script. 

------------------------------------------------------------------
--Chip Load Calculator
local FluteCount = mc.mcToolGetDataExDbl(inst, 1, "Flute Count")
local RPM = mc.mcCntlGetPoundVar(inst, 1242)
local Feedrate = mc.mcCntlGetPoundVar(inst, 1244)
local ChipLoad = ((Feedrate/RPM)/FluteCount)
mc.mcCntlSetPoundVar(inst, 500, ChipLoad)
------------------------------------------------------------------   

This should get you going.
« Last Edit: June 06, 2022, 03:57:54 PM by Cbyrdtopper »
Chad Byrd
Re: Flute/Tooth count
« Reply #3 on: June 06, 2022, 11:11:46 PM »
 :)

This is exactly what I was after. Thanks!

Mach 4 is now at the top of my list of contenders. It really helps that I can explore the software fully before committing, which is unique among its peers.

I see a lot of potential, and I'm going to work a bunch more on screen editing. Fortunately it isn't the UI horrorshow that its predecessor was, but it's also not quite there yet out of the box.
Re: Flute/Tooth count
« Reply #4 on: June 07, 2022, 08:42:07 AM »
We used Mach3 for years and switched to Mach4 hoping it would be more stable.  Thankfully it was!  It is also very flexible; like you are wanting; you can add as much to it as you want.
I've got a couple machines here in the shop just running the stock profile. 
We have cylindrical grinders here at work to grind bearing surfaces.  I made a completely custom screen that makes it conversational.  I wrote the g code (one big macro program) that will read inputs, DRO's, turn on outputs, auto measure, and all kinds of stuff.  Mach4 is very powerful; it has a learning curve, but it is very powerful.
Chad Byrd