Configure tracking for CNC mills and lathes
Count parts on a machine whose cycle time changes with the job.
A CNC mill, lathe, grinder or machining center runs a different cycle for every part, anywhere from 30 seconds to 30 minutes. Discrete Analysis is the algorithm for that case: it counts the cycles it detects rather than dividing running time by a fixed number, so one operation stays accurate when the part changes. Allow 30 to 45 minutes for the first machine.
Before you start
- A SenseAi or SenseAi Embedded tied to the machine. Contact IoTFlows to tie your sensors to an asset, see Get support.
- Sign in as an Organization Owner or Organization Administrator, see Roles reference.
Why Discrete Analysis fits a CNC
Four things about machining point at the same algorithm.
- Cycle times vary with the part. Discrete Analysis counts detected cycles, so it never assumes they are equal.
- The machine idles between parts. Loading, inspection and tool changes drop the trace back to the stopped level, and that fall is what ends a cycle.
- Cutting has a vibration signature. The algorithm reads the shape of the burst instead of the clock.
- Operators pace the work. Short pauses inside a cycle merge back into it rather than splitting one part into two.
You do not need a second sensor to count parts. SenseAi derives part counts and cycle times from the same vibration trace that produces the running and stopped state.
Choose Continuous Analysis instead when the trace never falls back to the stopped level between parts. A bar-fed lathe running one job unattended sits closer to that case than to a machining center that stops for every load.
Mount the sensor on the machine
SenseAi on a machining center, mounted on the spindle housing.
- Mount as close as you can get to the spindle, the tool changer or the main motor housing.
- Pick flat ferrous metal mechanically tied to the parts that move. A guard door holds the magnet and passes on its own ringing rather than the driveline's, see Choose a mounting location.
- Keep the device out of the coolant spray path. Where coolant is unavoidable, use SenseAi Embedded, which is sealed and mounts at the motor.
- Connect power and put the device on Wi-Fi, see Connect a device to Wi-Fi.
- Run 5 to 10 complete machining cycles while you calibrate, so the thresholds are set against real cutting rather than a spindle warm-up, see Calibrate SenseAi and SenseAi Embedded.
Verify the mount rather than judging it by eye. Run the machine cutting, then let it idle, and confirm the two read differently.
Measure a typical cycle time
Discrete Analysis adapts to variation, and you still enter a cycle time. The algorithm does not read it to count. The shift goal and the parts gauge do, see Set cycle times and downtime filters.
- Pick a part you run often.
- Time 5 to 10 complete cycles by hand, from part load to part unload.
- Average them. For example, 4:15, 4:30, 4:10, 4:25 and 4:20 average to 4:20.
- Note the range as well as the average. Simple parts at 2 to 3 minutes and complex ones at 10 to 15 minutes on the same machine are normal, and Discrete Analysis handles the spread.
Create the part and its operations
- Open Parts List at
/production?select=parts_list. - Click + Add Part.
- Enter a Part Name, for example
Aluminum Bracket. Part Description is optional. - Under Assign Operations, name the first operation
OP10and describe it, for exampleRough mill, vertical. - Enter Operation Cycle Time in the h, m and s boxes. For the 4:20 average, that is 4 in the m box and 20 in the s box.
- Enter a standard deviation in the boxes beside it. Leaving either at zero blocks the part with Cycle time and standard deviation must be greater than zero.
- Add the machines that run this operation.
- Click Add another operation for each further thing the machine does differently, then Add Part.
- Back on the Parts List, expand the part, click the operation's Algorithm cell and choose Discrete Analysis. It saves as you pick it.
- Set QTY/OP to the parts one cycle makes. One is usual on a CNC. Raise it only when the setup runs several identical parts at once.
Create one operation per thing the machine does differently, not one per step on the router, see Create parts and operations. The table shows no Downtime Filter column here: that column belongs to Continuous Analysis alone, so a Discrete operation has nothing to leave blank.
Assign the operations to the machine
- Open Assets at
/assetsand click the machine. - Click Auto-Detect to open Select Auto-Detect Operations.
- Stay on the Discrete tab. A SenseAi machine shows the Discrete and Continuous tabs only, because Counter is BeamTracker's algorithm.
- Check every discrete operation this machine runs. The list is checkboxes, not a single choice.
- Click Auto-Detect. The dashboard confirms with Discrete Auto-classification Set.
Selecting discrete operations clears any continuous operation the machine was set to, and the modal says so above the list. The full flow, including detected cycle times and the Parts List entry point, is on Detect operations automatically.
Run more than one part on the same machine
Because the Discrete tab is multi-select, assign every part the machine runs at once and leave them assigned. Nobody touches the dashboard at a changeover, and each part's output is reported separately, see Compare production over weeks and months.
| Your situation | What to do | What it costs |
|---|---|---|
| A handful of parts you run repeatedly | Create an operation for each and assign them all | Nothing. This is the normal setup |
| A job shop where every job is new | Create one generic operation, for example CNC-MILL-GENERAL, at an average cycle time | Counts stay accurate. The goal and the parts gauge run against an average, so both are approximate |
Validate the count
- Let the machine run normally for two to four hours.
- Open Shift Production at
/production?select=partand read the count for the operation. - Compare it with a hand count over the same window. Twenty parts made should read 20, give or take one or two.
- Open Downtimes at
/assets?select=downtimesand check that real stops are there while measuring and chip clearing are not filling the list. - Change to a part with a different cycle time and confirm the count stays right.
Accuracy bands and what to do at each one are on Choose a production tracking algorithm.
What to expect from a CNC
Uptime is availability: the share of the window the machine spent running, see Uptime. How much of the cycle an operator carries sets the ceiling, so a manual machine and a lights-out cell are not comparable.
| How the machine runs | Uptime to expect | Goal to set |
|---|---|---|
| Manual, operator-intensive | 40 to 60% | 45 to 60% |
| Semi-automatic, operator loads and unloads | 50 to 70% | 60 to 75% |
| Fully automatic | 75 to 85% | 75 to 85% |
| Lights-out with automation | — | 85 to 90% |
Set the goal on Set OEE and utilization goals. Start from your own baseline plus 5 to 10%, not from the table. A goal the machine has never met teaches operators to ignore the number.
Track setup and changeover
Setup is usually the largest single loss on a CNC, and it is invisible until stops carry reasons.
- Create a Setup / Changeover category, see Create a category. Add Tool Change and Tool Breakage while you are there.
- Have operators classify the stop at a job change, see Classify a downtime event.
- After two to four weeks, read the total off the Pareto chart on the Downtimes report.
- Work the setup time down, then watch the same chart month over month.
You do not need operators to classify every stop. Set the short-stop cutoff first so measuring and chip clearing never reach the list, and what is left is worth someone's attention, see Handle short stops.
Troubleshoot a CNC
| Symptom | Cause | Fix |
|---|---|---|
| Parts missing from the count | Short or gentle cycles the sensor does not separate from idle | Lower the Running Threshold, or move the sensor closer to the spindle, see Set the running and stopping thresholds |
| Count runs high | Tool changes or probe touches read as cycles | Raise the Running Threshold, and recalibrate against full cycles rather than a tool change |
| Uptime looks wrong while the count is right | The entered cycle time no longer matches what the machine runs | Re-time the current parts and update Ideal Operation Cycle Time. Discrete Analysis reads it for goals, not for counting |
| The downtime list fills with one-minute stops | Measuring and chip clearing are reaching the record | Set Downtime Threshold with Treat short downtimes as uptime on, see Handle short stops |
Counts that are wrong in a way no threshold fixes are on Troubleshoot inaccurate part counts.
See also
Every operation row in the Parts List at /production?select=parts_list ends in two cells: what a run of the operation takes off the shelf, and what it puts back. A binding is a rule, not a transaction. It says how much of an item a given amount of work turns into, so a work order raised against the operation stages its own materials at its own quantity. Closing that work order is what moves stock, and the created side is what the scheduler's capacity lane projects output from. Editing the bindings needs Organization Owner or Administrator; every other member sees the same list read-only.
Set up part counting on an injection molding machine, whose shot cycle repeats to the second. Mount the SenseAi on the injection unit or near the hydraulic power unit, time 10 to 20 shots by hand, create the part with one operation per mold, set the operation's algorithm to Continuous Analysis, set QTY/OP to the cavity count, and set the Downtime Filter so brief mold-open pauses do not read as stops. The filter takes 0 to 200%. The Continuous tab of the Auto-Detect modal is single choice, so the machine carries one operation at a time and you re-pick it at every mold change.

