Skip to main content
IoTFlows - Return to homepage

Command Palette

Search for a command to run...

View as Markdown

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

A SenseAi magnet-mounted on the sheet-metal housing beside the work envelope of a vertical machining centerSenseAi on a machining center, mounted on the spindle housing.
  1. Mount as close as you can get to the spindle, the tool changer or the main motor housing.
  2. 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.
  3. Keep the device out of the coolant spray path. Where coolant is unavoidable, use SenseAi Embedded, which is sealed and mounts at the motor.
  4. Connect power and put the device on Wi-Fi, see Connect a device to Wi-Fi.
  5. 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.

  1. Pick a part you run often.
  2. Time 5 to 10 complete cycles by hand, from part load to part unload.
  3. Average them. For example, 4:15, 4:30, 4:10, 4:25 and 4:20 average to 4:20.
  4. 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

  1. Open Parts List at /production?select=parts_list.
  2. Click + Add Part.
  3. Enter a Part Name, for example Aluminum Bracket. Part Description is optional.
  4. Under Assign Operations, name the first operation OP10 and describe it, for example Rough mill, vertical.
  5. 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.
  6. 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.
  7. Add the machines that run this operation.
  8. Click Add another operation for each further thing the machine does differently, then Add Part.
  9. Back on the Parts List, expand the part, click the operation's Algorithm cell and choose Discrete Analysis. It saves as you pick it.
  10. 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

  1. Open Assets at /assets and click the machine.
  2. Click Auto-Detect to open Select Auto-Detect Operations.
  3. Stay on the Discrete tab. A SenseAi machine shows the Discrete and Continuous tabs only, because Counter is BeamTracker's algorithm.
  4. Check every discrete operation this machine runs. The list is checkboxes, not a single choice.
  5. 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 situationWhat to doWhat it costs
A handful of parts you run repeatedlyCreate an operation for each and assign them allNothing. This is the normal setup
A job shop where every job is newCreate one generic operation, for example CNC-MILL-GENERAL, at an average cycle timeCounts stay accurate. The goal and the parts gauge run against an average, so both are approximate

Validate the count

  1. Let the machine run normally for two to four hours.
  2. Open Shift Production at /production?select=part and read the count for the operation.
  3. Compare it with a hand count over the same window. Twenty parts made should read 20, give or take one or two.
  4. Open Downtimes at /assets?select=downtimes and check that real stops are there while measuring and chip clearing are not filling the list.
  5. 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 runsUptime to expectGoal to set
Manual, operator-intensive40 to 60%45 to 60%
Semi-automatic, operator loads and unloads50 to 70%60 to 75%
Fully automatic75 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.

  1. Create a Setup / Changeover category, see Create a category. Add Tool Change and Tool Breakage while you are there.
  2. Have operators classify the stop at a job change, see Classify a downtime event.
  3. After two to four weeks, read the total off the Pareto chart on the Downtimes report.
  4. 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

SymptomCauseFix
Parts missing from the countShort or gentle cycles the sensor does not separate from idleLower the Running Threshold, or move the sensor closer to the spindle, see Set the running and stopping thresholds
Count runs highTool changes or probe touches read as cyclesRaise the Running Threshold, and recalibrate against full cycles rather than a tool change
Uptime looks wrong while the count is rightThe entered cycle time no longer matches what the machine runsRe-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 stopsMeasuring and chip clearing are reaching the recordSet 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