Take turns ROUND ROBIN

Picks the next ready slot after the last one picked.

TagAfter two scans
DockEN 1 SEL 2 VAL 1 ERR 0 RES 0

How it works

A true rung picks. A false rung picks nothing, but new requests still join the line and .SEL is 0.

How it's used

Use it to share work evenly, so each waiting place gets a turn. It moves on every scan the rung is true, so pulse it with an ONS to pick once.

TagValue
Bay1Call1
Bay2Call1
Bay3Call1
Pick1
DockEN 1 SEL 2 VAL 1 ERR 0 RES 0
NextBay2

All three bays are calling and Pick has been on for two scans. Each scan picks the next bay in turn: Bay1, then Bay2.

In practice

Take turns: picks the next requested, available slot after the last one picked.

Configuration

  • One rung per bay writes Dock.Bay1.REQ, and Dock.Bay1.RDY where the bay can take work; then XIC Dock.VAL with MOVE Dock.SEL to the destination.

Limits and status

  • .SEL is the 1-based candidate; 0 means none. .ERR holds the reason code.
  • Renaming a candidate renames its members everywhere.
  • Renaming the tag or changing its candidates starts the selection over.
  • Algorithms instructions are learning aids for deterministic selection. They are not safety-rated or certified, and they do not plan paths, avoid collisions or control motion. This is not a safety function.

Operands

OperandData typeRead or write
TagALGORITHMReads and writes

Common mistakes

  • Assuming Selected is zero-basedSelected is a 1-based slot, or 0 for none. Use Valid before moving it to a destination.