Siemens LOGO! 8 Fish Sorting: Throughput Calculation, Sensor Setup, and Cycle Time
Sorting fish by sex on a conveyor requires two optical sensors mounted belly-to-back and a controller capable of sampling, ratioing, and triggering a reject actuator within a fraction of the inter-fish period. This reference quantifies the throughput budget for a 200 fish/minute target, maps it to the Siemens LOGO! 8 Basic Module (BM) input and cycle-time specifications, and documents a percentage-based dual-sensor algorithm that tolerates variable fish length and imperfect alignment.
1. Fish Sorting Problem Statement
Two optical through-beam sensors view each fish from belly to back:
- Sensor 1 (reference): views the fish laterally; detects every fish regardless of sex.
- Sensor 2 (discriminator): positioned opposite the belly; the beam passes through translucent female tissue and is blocked by opaque male dorsal tissue.
Because fish vary in length and arrive on the conveyor at random pitch, comparing the absolute on-time of each sensor produces false rejects. The recommended discriminator is the ratio Sensor 2 / Sensor 1 expressed as a percentage. Males produce a low ratio; females produce a high ratio. A threshold trigger compares the ratio against a tunable setpoint to drive a reject diverter downstream of the sensor head.
2. Throughput Budget for 200 Fish per Minute
Convert the throughput target to SI units before selecting hardware:
| Parameter | Symbol | Value | Calculation |
|---|---|---|---|
| Target rate | R | 200 fish/min | given |
| Period per fish | T | 0.300 s | 60 / R = 60 / 200 |
| Required frequency | f | 3.333 Hz | 1 / T = 1 / 0.300 |
| Spare headroom (40 %) | R_max | 280 fish/min | 200 × 1.4 |
| Conveyor pitch @ 1 m/s | p | 300 mm | v × T = 1.0 × 0.300 |
| Conveyor pitch @ 0.5 m/s | p | 150 mm | 0.5 × 0.300 |
The peak input-event rate seen by the PLC is 3.33 Hz plus one discriminator event per fish. The combined event rate is well under 10 Hz, leaving a 100× safety margin against any practical PLC input limit.
3. Siemens LOGO! 8 Digital Input Specifications
The LOGO! 8 Basic Module with 12/24 V supply exposes two input tiers. Selection of the correct catalog number is critical because not every LOGO! 8 variant has the high-speed inputs required for event-driven counting.
| Catalog Number | Description | Input Tier |
|---|---|---|
| 6ED1052-1MD08-0BA1 | LOGO! 8 BM 12/24 V with display | Standard + Fast |
| 6ED1052-2MD08-0BA1 | LOGO! 8 BM 12/24 V without display | Standard + Fast |
| 6ED1052-1CC08-0BA1 | LOGO! 8 BM 24 V with display | Standard only (no fast) |
| 6ED1052-1HB08-0BA1 | LOGO! 8 BM 115/230 V with display | Standard only |
Refer to the LOGO! 8 Manual (Siemens Support entry ID 109741041) and the LOGO! 8 Product Information Sheet for the canonical input ratings. The salient electrical and timing data are:
| Parameter | I1, I2, I7, I8 (Standard) | I3, I4, I5, I6 (Fast, 12/24 V BM only) |
|---|---|---|
| Input voltage range | 0–24 V DC | 0–24 V DC |
| Input current (24 V) | typ. 2.5 mA | typ. 2.5 mA |
| Max counter frequency | 4 Hz | 5 kHz |
| Max frequency counter mode | not supported | 5 kHz |
| High-speed counter mode | not supported | supported (up to 5 kHz) |
| Edge interrupt | no | yes (rising / falling) |
| Usable as HSC A/B | no | yes (I3, I4, I5) |
The standard inputs (I1, I2, I7, I8) are limited to 4 Hz — equivalent to 240 events per minute, or 240 fish per minute if the discriminator uses one transition per fish. For the 200 fish/minute target this looks borderline-sufficient, but LOGO! input debounce filtering combined with the fact that the discriminator fires on both rising and falling edges of an opaque object drops the safe rate to roughly 3 Hz (180 fish/minute) when a 50 % duty cycle is assumed. Using the fast inputs is the correct choice for production.
4. Why Percentage-Based Comparison Wins
Absolute on-time of each sensor scales with fish length. A 250 mm male and a 320 mm male on a 1 m/s belt produce on-times of 250 ms and 320 ms respectively — a 28 % difference at the same sex. A fixed threshold rejects one and accepts the other.
The ratio approach normalizes against length and minor lateral misalignment:
ratio_pct = (T_sensor2 / T_sensor1) × 100
// Threshold tuning range (typical)
THRESHOLD = 55 // % -- < 55 % → male (reject)
// -- > 55 % → female (accept)
Implementation options on LOGO! 8:
- Two threshold triggers on the same input with separate on/off setpoints to generate a windowed pulse. This is the lowest block count and runs entirely in the cyclic scan.
- High-speed counter on I3 clocked at a fixed reference frequency (e.g., 100 Hz from a conveyor encoder) gated by Sensor 1; count between Sensor 1 and Sensor 2 events to derive a duty cycle.
- Analog input (LOGO! AM2 module) for sensors with 0–10 V or 4–20 mA output. The LOGO! AM2 RTD module adds two analog inputs to the 12/24 V BM. Use scaling blocks to compute the ratio in engineering units.
5. Sensor Mounting and Trigger Geometry
Two through-beam photoelectric sensors (or laser triangulation units) are mounted on opposite sides of the conveyor, aligned along the fish long axis. Typical industrial choices:
| Sensor Family | Manufacturer | Use | Output |
|---|---|---|---|
| SICK W4-3 / W9 | SICK AG | Reference (Sensor 1) | PNP NO, 24 V |
| SICK G6 / V18 | SICK AG | Discriminator (Sensor 2) | PNP NO, 24 V |
| Banner QS18 / Q4X | Banner Engineering | Discriminator (diffuse) | PNP NO, 24 V |
| ifm O1D / OGD | ifm Electronic | Laser distance, analog | 4–20 mA / 0–10 V |
Wiring (PNP, sourcing, 24 V DC):
+24 V DC (LOGO! BM terminal) ──> Sensor 1 brown
Sensor 1 black ──> I3 (fast input)
Sensor 1 blue ──> 0 V (M terminal)
+24 V DC ──> Sensor 2 brown
Sensor 2 black ──> I4 (fast input)
Sensor 2 blue ──> 0 V (M terminal)
Light curtain geometry: Sensor 1 placed 50 mm downstream of Sensor 2, with both beams intersecting the fish perpendicular to its long axis. The downstream offset of Sensor 1 ensures that the rising edge of Sensor 1 always coincides with the fish fully entering the discriminator beam path.
6. LOGO! 8 Counter and Threshold Configuration
The fish-sorting program is built in LOGO! Soft Comfort V8.x. The minimum-viable block list:
| Block | Function | Parameter / Setting |
|---|---|---|
| B001 — Threshold Trigger | Detect rising edge of Sensor 1 on I3 | On = 1, Off = 0 |
| B002 — On-Delay | Wait one scan to let both sensor states settle | Ta = 5 ms |
| B003 — Threshold Trigger | Sample Sensor 2 on I4 at the same instant | On = 1, Off = 0 |
| B004 — AND | Qualify the sample window | — |
| B005 — Up/Down Counter | Accumulate male count | Threshold = 1, internal preset 9999 |
| B006 — Wipe Relay (single pulse) | Generate 50 ms reject pulse | TP = 0.05 s |
| B007 — Output Q1 | Reject diverter solenoid | wired to Q1 |
For ratio measurement without analog, use the pulse-width method: clock the high-speed counter on I5 with a 1 kHz internal reference, count pulses for the duration that Sensor 1 is active, then for Sensor 2, and divide. Block count is roughly 25–30 FBD blocks — well under the LOGO! 8 maximum of 400 blocks and yielding the predicted cycle time below 1 ms.
7. Program Cycle and Timing Budget
LOGO! 8 scan time scales with the number of active function blocks per the engineering notes in the LOGO! 8 System Manual:
| Block Count | Typical Cycle Time |
|---|---|
| 50 | < 0.5 ms |
| 200 | ~ 1.5 ms |
| 400 | ~ 2.5 ms |
The fish-sorting program with 30 blocks runs in approximately 0.4 ms per scan. Compared with the 300 ms inter-fish period, the cycle time is 0.13 % of the available budget — a 750× margin. The LOGO! 8 is not the throughput bottleneck; the conveyor and the reject actuator are.
8. Conveyor Synchronization and Reject Timing
Between the sensor head and the reject diverter, the fish travels a known distance d. The PLC must count the elapsed belt distance and fire the diverter at the moment the targeted fish reaches the actuator. The standard approach is:
- Wire a third sensor (or shaft encoder) to I5 or I6 to generate one pulse per fixed belt increment (e.g., 10 mm).
- On Sensor 1 trigger, load the current encoder count into a register (D001) and arm a comparator.
- The comparator fires Q1 (reject solenoid) when the count equals D001 + n, where n = d / 10 mm.
Reject actuator latency is typically 15–30 ms for a pneumatic diverter; size d accordingly so that the diverter's mechanical response window is fully contained within the fish's transit of the rejection zone. At 1 m/s with a 30 mm fish length, the reject zone is 30 ms wide — adequate for a short-stroke pneumatic cylinder with a 4 mm diameter at 6 bar.
9. Commissioning and Verification
Commissioning follows the standard LOGO! 8 bring-up sequence documented in the LOGO! 8 Manual:
- Wire-up test: with the conveyor stopped, trigger each sensor by hand. Verify the corresponding input LED on the BM lights and the LOGO! display shows the input as 1.
- Counter test: feed a known 50-fish batch with the threshold disabled. Confirm the count reads 50 on the LOGO! display after the batch passes.
- Threshold sweep: run three batches of 50 fish at threshold = 45 %, 55 %, and 65 %. Manually verify the reject rate matches the known sex ratio. Choose the threshold that minimises the combined false-accept and false-reject rate.
-
Throughput test: ramp the conveyor from 0.3 m/s to the target 1.0 m/s and monitor the LOGO! 8 diagnostic buffer for
scan overrunorinput event lostflags. - Endurance test: run continuously for 30 minutes at the 200 fish/minute target. Confirm the count and reject count do not drift.
10. Scaling Beyond 200 Fish per Minute
The same hardware supports significantly higher rates. With the fast inputs rated at 5 kHz and the program cycle at 0.4 ms, the LOGO! 8 can theoretically process 2,500 fish/second or 150,000 fish/minute. Real-world ceiling is determined by:
| Constraint | Typical Limit |
|---|---|
| Belt length between sensor and reject | 200 mm @ 2 m/s = 100 ms travel |
| Reject actuator response | 15–30 ms pneumatic |
| Fish pitch on belt | 2× fish length minimum |
| Sensor response time | 0.5–2 ms typical |
Conservative production ceiling is 600–800 fish/minute on a properly tuned conveyor before the reject diverter becomes the bottleneck. If higher rates are required, upgrade to a Siemens S7-1200 (CPU 1211C or higher) with a Signal Board high-speed counter and move the ratio logic into a cyclic OB.
11. Logged Diagnostic Data and Process Visibility
The LOGO! 8 has a built-in data log and 250-byte onboard memory. Use the LOGO! Web Editor (built into V8.2+) to publish the following tags over Modbus TCP or the LOGO! cloud connector:
-
total_fish_count— Up/Down counter (B005) -
male_reject_count— Reject pulse counter -
current_ratio_pct— Most recent Sensor 2 / Sensor 1 ratio -
belt_speed_mps— Derived from encoder on I5 -
scan_time_max_us— LOGO! 8 cycle time diagnostic word
Display these on the LOGO! onboard 6-line display for an operator panel-free line. For an HMI, the LOGO! TDE 6ED1055-4MH08-0BA1 external text display provides 6 lines × 20 characters with three operator keys.
12. Frequently Asked Questions
Can a Siemens LOGO! 8 process 200 fish per minute with two sensors?
Yes. The 12/24 V LOGO! 8 BM (catalog number 6ED1052-1MD08-0BA1) provides fast inputs I3–I6 with a 5 kHz maximum input frequency, and a 30-block program executes in roughly 0.4 ms per scan. The 200 fish/minute target rate is 3.33 Hz — 1,500× below the input frequency limit and 750× below the scan time limit.
Why does my standard digital input miss every third fish on a 200 fish/minute line?
Standard LOGO! 8 inputs I1, I2, I7, and I8 are limited to 4 Hz (240 events/minute) by the input debounce filter. With a 50 % duty cycle from a fish-detection sensor, the safe event rate drops to ~3 Hz. Wire Sensor 1 and Sensor 2 to I3, I4, I5, or I6 on the 12/24 V BM to use the 5 kHz fast inputs.
Should I use absolute sensor on-time or the Sensor 2 / Sensor 1 ratio for sex detection?
Use the ratio. Fish length varies 20–30 % in a typical commercial batch; absolute on-time scales with length and misclassifies longer males and shorter females. The percentage ratio normalises against length and tolerates minor lateral misalignment on the conveyor.
Which LOGO! 8 catalog number is required for high-speed counting?
Use the 12/24 V Basic Module 6ED1052-1MD08-0BA1 (with display) or 6ED1052-2MD08-0BA1 (without display). The 24 V DC-only variants (6ED1052-1CC08-0BA1) and the 115/230 V AC variants (6ED1052-1HB08-0BA1) do not provide the 5 kHz fast inputs.
What is the maximum number of fish the LOGO! 8 can sort per minute in practice?
The controller ceiling exceeds 10,000 fish/minute, but production rate is constrained by belt pitch, reject actuator response, and fish spacing. A realistic production ceiling on a 1 m/s conveyor with a 30 ms pneumatic diverter is 600–800 fish/minute before the reject mechanism becomes the bottleneck. Above that, upgrade to an S7-1200 with a high-speed counter signal board.