Tutorial: Choosing the Right Algorithm
Decision tree and practical guide for selecting the best production tracking algorithm for your specific manufacturing process.
Overview
Choosing the right algorithm is critical for accurate production tracking. This tutorial provides a clear decision tree, examples, and validation steps to help you select the perfect algorithm for each machine type.
What you'll learn:
- Quick decision tree for algorithm selection
- Detailed comparison of all four algorithms
- How to validate your choice
- When to switch algorithms
Time required: 15-20 minutes to understand, 30 minutes to implement
Quick Decision Tree
Follow this flowchart to choose your algorithm:
START: What device are you using?
│
├─ BeamTracker (laser counter)
│ └─ Use: COUNTER ✓
│ (Only option for BeamTracker)
│
└─ SenseAi / SenseAi Embedded (vibration sensor)
│
└─ Does your machine have consistent, predictable cycle times?
│
├─ YES → Do you want to count every single vibration spike/stroke?
│ │
│ ├─ YES → Use: DISCRETE W/O MERGE ✓
│ │ (Perfect for stamping presses, punch presses)
│ │ + Set device downtime filter
│ │
│ └─ NO → Use: CONTINUOUS ANALYSIS ✓
│ (Perfect for injection molding, consistent stamping)
│ + Set high downtime filter (200%+)
│
└─ NO → Do cycles vary but have clear start/end with idle time?
│
├─ YES → Use: DISCRETE ANALYSIS ✓
│ (Perfect for CNC machines, manual operations)
│
└─ NO → Contact support for guidance
(Unusual case - may need custom configuration)
Algorithm Comparison Matrix
| Factor | Counter | Continuous | Discrete | Discrete w/o Merge |
|---|---|---|---|---|
| Device | BeamTracker only | SenseAi/Embedded | SenseAi/Embedded | SenseAi/Embedded |
| Cycle Consistency | Any | Consistent | Variable | Any |
| Counting Method | Laser breaks | Time division | Pattern detection | Spike detection |
| Handles Variable Cycles | N/A | ❌ No | ✅ Yes | ✅ Yes |
| Ignores Brief Pauses | N/A | ✅ Yes (via filter) | ✅ Yes (via merging) | ⚠️ Manual (device filter) |
| Best For | Conveyors | Injection molding | CNC machines | Stamping presses |
| Complexity | Simple | Medium | Medium | Advanced |
Detailed Algorithm Guides
1. Counter (BeamTracker Only)
When to use:
- You have a BeamTracker laser sensor
- Parts pass through the beam on a conveyor
- You need direct, physical counting
How it works:
- Each laser break = 1 cycle (or more with Quantity Per Cycle)
- Cycle time setting = ideal/target time (for OEE calculation)
- No pattern analysis — pure counting
Setup:
- Mount and align BeamTracker
- Create operation in Parts List
- Select Counter algorithm
- Set ideal cycle time (for goals, not counting)
- Set Quantity Per Cycle if needed
Validation:
- Compare IoTFlows count to manual count for 10 minutes
- Should match ±1-2 parts
Example applications:
- Packaging lines (boxes on conveyor)
- Assembly lines (finished goods passing sensor)
- Sorting systems
See BeamTracker installation guide
2. Continuous Analysis (SenseAi/Embedded)
When to use:
- Consistent, predictable cycle times
- Brief pauses between cycles should be ignored
- High-volume, repetitive operations
How it works:
- Divides runtime by cycle time
- Formula: Parts = Runtime ÷ Cycle Time
- Downtime filter converts short stops to uptime
Setup:
- Measure actual average cycle time (10-20 cycles)
- Create operation with Continuous Analysis
- Enter measured cycle time
- Set downtime filter: 200% (start here)
- Adjust filter based on validation
Validation:
- Run for 1 hour
- Expected: (60 min × 60 sec) ÷ cycle time = parts
- Actual should be within ±5-10%
Recommended downtime filter:
- 200-250%: Most injection molding machines
- 150-200%: Consistent stamping with brief pauses
- 300%+: Very brief pauses (< 2-3 seconds)
Example applications:
- Injection molding (perfect use case)
- High-speed stamping with consistent rhythm
- Thermoforming machines
- Extrusion processes
3. Discrete Analysis (SenseAi/Embedded)
When to use:
- Variable cycle times
- Clear idle time between parts
- Operator-paced or semi-automated processes
How it works:
- Detects individual cycles from vibration patterns
- Merges small pauses into cycles
- Adapts to cycle time variation
- Counts actual detected events
Setup:
- Estimate average cycle time
- Create operation with Discrete Analysis
- Enter estimated cycle time (for goals only)
- Let algorithm detect actual cycles
- Validate over 1-2 shifts
Validation:
- Manually count parts produced in 1 hour
- Compare to IoTFlows count
- Should match ±3-5%
Handles variation well:
- Some parts: 1:50 cycle time
- Other parts: 2:10 cycle time
- Algorithm adapts automatically
Example applications:
- CNC machining (mills, lathes, grinders)
- Manual or semi-automated assembly
- Custom fabrication with variable work
- Operations with natural pauses between parts
4. Discrete w/o Merge (SenseAi/Embedded)
When to use:
- Distinct vibration spikes/strokes to count
- Every event should be counted individually
- Willing to configure device-level downtime filter
How it works:
- Counts every detected vibration spike
- Does NOT merge nearby events
- Requires device downtime filter to clean data
Setup:
- Create operation with Discrete w/o Merge
- Set cycle time (for goals, not counting)
- Navigate to Devices Tab → Select SenseAi
- Set device downtime filter to 10 minutes
- Validate stroke counting accuracy
Critical: Use device-level downtime filter, not Parts List filter
Validation:
- Compare to machine counter (if available)
- Or manually count strokes for 5 minutes
- Should match ±2-3%
Example applications:
- Stamping presses (count every stroke)
- Punch presses
- Any machine with distinct picks/impacts
- High-frequency event counting
Validation Checklist
After configuring your algorithm, validate using this checklist:
Run for baseline period
Let machine run for 1-2 hours (or 1 full shift) normally
Check production count
Go to Production Tab → Shift Production
Compare IoTFlows count to:
- Machine counter (if available)
- Manual count
- Expected count based on runtime and cycle time
Review downtime events
Go to Assets Tab → Downtimes
Verify:
- Real stops are captured
- Brief pauses are NOT cluttering the list
- Downtime reasons make sense
Calculate accuracy
Accuracy % = (IoTFlows Count ÷ Actual Count) × 100
- 95-105%: Excellent ✓
- 90-95% or 105-110%: Acceptable (minor tuning)
- < 90% or > 110%: Needs adjustment
Adjust if needed
- Count too high: Increase downtime filter, verify sensor placement
- Count too low: Decrease downtime filter, check sensor sensitivity
- Way off: Wrong algorithm, verify cycle time
When to Switch Algorithms
Sometimes your initial choice needs adjustment. Here's when to switch:
Switch FROM Continuous TO Discrete:
Symptoms:
- Count is consistently 10-20% too high
- Actual cycle times vary significantly (±20%+)
- Machine has irregular idle periods
Why: Continuous assumes constant cycle time; Discrete adapts to variation
Switch FROM Discrete TO Continuous:
Symptoms:
- Count is too low
- Machine runs very consistently
- Discrete isn't detecting all cycles
Why: Continuous works better for predictable, high-speed operations
Switch FROM Discrete TO Discrete w/o Merge:
Symptoms:
- Missing some strokes/picks
- Machine has rapid-fire events close together
- Need to count every vibration spike
Why: Discrete merges nearby events; w/o Merge counts each individually
Switch FROM Discrete w/o Merge TO Continuous:
Symptoms:
- Count is way too high (2-3× actual)
- Too many false detections
- Sensor detecting multiple vibrations per stroke
Why: Continuous eliminates detection issues by using time-based division
Common Mistakes to Avoid
Need Help Deciding?
Use these resources:
Parts List Documentation
Complete algorithm reference
Contact Support
Get personalized algorithm recommendations
Still unsure which algorithm to use? Email support@iotflows.com with your machine type, cycle time, and operation details for personalized guidance!

