Part Counting
If a machine's part count looks wrong — stuck at zero, lower than what you ran, higher than what you ran, or just off from what you expect — this guide helps you find the cause.
The most important first step is knowing how the machine sends its part count to MachineMetrics, because the fix is different for each method.
If several machines started counting wrong at the same time, that is usually a connectivity problem rather than a part-counting one. See Machine Not Reporting.
Step 1: Find How the Machine Counts Parts
Machines report part counts in one of these ways:
- Machine control counter — the control's own part counter, read via MTConnect or FANUC FOCAS.
- Script reading a control value — a script reads a register, tag, or node via OPC-UA, EtherNet/IP, or Modbus to a PLC.
- I/O sensor — a sensor wired into an I/O device (LabJack, Sealevel, Adam, or Wise) detects each finished part.
- Program macro — a macro in the machine program increments the count.
If you are not sure which applies, check the machine's connection settings in MachineMetrics or contact support@machinemetrics.com and we can confirm.
"Modbus" can refer to either a PLC (a script method) or an I/O module like Sealevel, Adam, or Wise (a sensor method). Confirm which one you have before proceeding.
If the Count Comes From the Machine Control
Check whether the control's own part counter increments by exactly one for each finished part.
- Control counter is wrong — the problem is on the machine or control side (the counting M-code, macro, or a control setting). Correct it at the machine.
- Control counter is correct, but MachineMetrics is wrong — the fix is in your MachineMetrics setup:
- Verify which data item is selected as the part count metric in Data Rules.
- On multi-path machines, count from the single path that increments once per finished part.
If the Count Comes From a Script (OPC-UA, EtherNet/IP, Modbus to a PLC)
The count is read from a register, tag, or node on the control. Work through these checks:
- Confirm the value is present and increasing on the control.
- If the value is not changing, the issue is on the control or program side.
- If the value is changing correctly but MachineMetrics is off, the script or its mapping needs attention. Contact support@machinemetrics.com for help with the script.
If the Count Comes From a Sensor (LabJack, Sealevel, Adam, Wise)
A sensor detects each finished part and sends a pulse into an I/O device. Work through these in order:
- Confirm the adapter script is in place. Without the script that reads the I/O device, nothing will count.
- Confirm the sensor is installed and wired. Verify the sensor the script expects is actually present and connected.
- View the raw signal on the machine timeline. In MachineMetrics, the raw input display works like an oscilloscope — watch whether the signal pulses once for each finished part.
If you do not see a pulse:
- Check the sensor, its wiring and placement, and the input channel or register.
If the pulse is there but the count is wrong:
- The signal is arriving; the issue is in how it is mapped to part count.
- A double count often means the sensor is bouncing or more than one path is counting.
- A count that is slightly off can be a debounce or units setting.
Use the wiring guide for your specific device. See Digital I/O Connectivity for device-specific wiring guides.
If the Count Comes From a Program Macro
Confirm two things:
- The macro increments by exactly one for each finished part.
- MachineMetrics is reading that value as the part count.
If the macro logic is correct but MachineMetrics still shows the wrong count, check the Data Rules setting to confirm the right metric is selected.
Confirm the Fix
After making a change, verify the count is correct:
- Cycles Report — compare the reported count to the number of cycles visible.
- Machine Timeline — compare the timeline to how long each part should take. A cycle that is too short or too long often reveals a counting problem.
- Setup and warm-up — confirm the machine is not counting while in setup or warm-up mode.
Confirm the count source before making any changes to wiring, scripts, or Data Rules. A fix applied to the wrong source may not resolve the issue and can create new problems. Always use the wiring guide that matches your specific device.
Related Resources
- Data Rules — Part Count Metric
- Digital I/O Connectivity
- Machine Connectivity Overview — protocol how-tos for FANUC, MTConnect, OPC-UA, and more
- Connectivity Validation Guide
Need further assistance? Contact support@machinemetrics.com and include the machine name, a description of what the count is doing, and which method you believe the machine uses to count parts.