Use per-piece mode
When several workpieces are in one frame at the same time, turn on per-piece mode and step rules are judged and counted separately for each workpiece. This page covers what it is, what you see on the workstation, how to configure it and its current limits.
What it is
Per-piece is a mode. It is not a detection type, and it is not tied to any one scenario. When it is on:
- The system recognizes each workpiece in the frame (by the "anchor class"), numbers it and tracks it as it enters and leaves the work area;
- The step's detection rule is judged separately for each workpiece. The rule can use any type: Inside container, counting, relative position, length ratio, combinations…
- A verdict is given when the workpiece leaves the work area: if the rule was satisfied at some point while it was in the work area = pass, otherwise fail. Each workpiece counts as one piece; failed ones are counted as failed pieces.
What to judge is written entirely in the step rule. The mode itself only decides "what counts as one piece and where it is judged". The same mode can be used for slot checks, driving screws on each piece, labeling each piece and so on; only the rules differ.
What you see on the workstation
- Each workpiece in the view gets a box + number, drawn where it was actually recognized:
- Green = this step is satisfied;
- Yellow = not satisfied yet;
- Cyan = this step has no rule (counting only).
- When a workpiece leaves the work area:
- Pass: counted as 1 piece;
- Fail: counted as 1 piece and as a failed piece, and "Workpiece inspection failed" is reported. The message states which workpiece number and which rule was not satisfied, for example "Workpiece 3: red LED should be in tray sub-zone…; actual: red LED not detected". When the rule is "All of", every unsatisfied condition is listed.
- A step without a detection rule = counting only; every piece passes.
Multi-step operations progress by batch
For example, three steps "Start / Key check / Finish":
- A batch = the workpieces in the work area when step 1 passes (for example, one column of two boards). Workpieces that arrive later belong to the next batch.
- Each step moves on only when every piece in the batch has done it. The step progress on the right lights up one step at a time as usual.
- The upper-left corner of the view shows
Step 2/3 done 1/2: step 2, 1 of the 2 pieces in this batch done. - Steps about the workpiece itself leaving, such as "Object left zone", are complete as soon as the batch leaves the work area. No separate judgment is needed.
- If a piece leaves the work area before it is done: that piece fails and "Step 2 'Key check' · workpiece 2: …" is reported; the rest continue as usual.
- When the whole batch is done, pieces are counted: as many pieces as there are, with problem pieces counted as failed.
- Numbers follow position: top to bottom, left to right, starting again at 1, 2… for each batch.
Draw the work area to hold only one batch
For example, one column of two boards. The previous batch must leave the work area before the next one comes in.
How to configure
Step 1: turn on per-piece mode in ROI zone
In ④ ROI 区域 (ROI zone) › 逐件模式 (Per-piece mode), turn on the switch, then fill in:
- Workpiece (anchor) class: the class that represents one workpiece.
- It must be a class already labeled in the model: the workpiece body, or a tray / carrier fixed to the workpiece.
- Pick the one that is easiest to recognize and least likely to be blocked in the frame.
- Work area: pick a detection zone. Workpieces are judged only inside it; when they leave it, a verdict is given and they are counted. Not selected = the whole frame (leaving means leaving the frame).
- Tracking parameters (usually no need to change):
- Occlusion grace 1500 ms: how long a workpiece can be blocked and keep its number;
- Minimum presence 1000 ms: pieces that stay for less than this are not counted;
- Line speed: leave at 0 to measure automatically.
Step 2: configure step rules as usual
In ⑤ 步骤与检测规则 (Steps & detection rules), configure the step's detection rule as usual. It is automatically judged separately for each workpiece.
- For "parent container / reference object" in the rule, you can select the anchor class directly. It means "this piece itself".
- Conditions that do not belong to a workpiece (the worker's hands, foreign objects in the frame) should have 按整个画面判 (Judge the whole frame) checked; see Use combined conditions.
For a complete configuration example, see scenario 12 (per-piece slot inspection on a two-row line) in Typical scenarios.
Current limits
- Multi-step operations progress by batch, and only one batch can be in the work area at a time. When two batches are in the area at once, the later one waits until the earlier one is done.
- "n / N pieces done" on the step cards on the right is not available yet; check
done x/Nin the upper-left corner of the view for now. - Requires the workstation stable release.
