[Guide 02] DSD Equipment Diagnostics & Sensor/Interlock Rules
DSD & Sensor Guide (
ds2 v2;)See how DSD spots subtle actuator slowdowns from machine logs before an alarm stops the line, and how to separate sequence arrows from
when,while, andinterlockconditions.
1. Catching Drift Before Breakdowns with DSD
Step · What DSD Does · Shop-Floor Benefit
1. Sequence Recovery · Decodes raw discrete sensor and actuator logs into clean ds2 v2; sequence drafts for DS Pilot Equipment Doctor. {{Details::Math-Backed Recovery & Scope: Applies Omega conservation laws and dynamic tier weighting to infer real causality from discrete and runtime logs (DS Pilot: CONCEPT_AND_SCOPED_DELIVERY, physicalAcceptance = NOT_RUN).}} · Reconstructs undocumented machines without stopping production.
2. Micro-Drift Alerts · Tracks baseline step durations and Soft-Omega health per cycle. {{Details::Early Indicators: Computes Soft-Omega entropy, silent defect risk, and Remaining Useful Cycles (RUC).}} · Spots air leaks or seal wear tens of milliseconds before a timeout fault.
3. Sensorless Quality Traceability · Correlates station cycle durations with inline quality results to pinpoint slow upstream actuators. {{Details::Time-Gauge Alerts: Trends upstream cylinder timing to raise pre-defect warnings and flag preceding parts for quarantine.}} · Stops defects from spreading without adding analog sensors.
2. Arrows vs. Guard Conditions (when · while · interlock)
Rule · Syntax · Behavior
Step Order · [[op:baton]] => · [[op:term]] **`=\ · >`** · Advances to the next step after the preceding work or api finishes.
Sensor Exposure · observe Name = Flow.Work; · Exposes read-only completion state to parent controllers.
Start Condition · when (expr); · Checks sensors/variables right before starting ({{ST Expression Syntax::Standard IEC 61131-3 ST operators (=, <>, <, <=, >, >=, AND, OR, NOT, MOD); ds2 v2; requires explicit comparison on typed input signals.}}).
Run-Time Hold · while (expr); · Monitors during auto execution; pauses (Hold) if expr drops false.
Full-Mode Operating Condition · interlock (expr) "reason"; · Blocks unsafe motion across Auto, Manual Jog, and Homing and shows "reason" on the HMI. {{Details::Recovery Preservation & Heartbeat: Recovery STOP/HOMING halts Going motion while preserving Finish-waiting steps and in-flight WIP tokens; client UI drives 200ms HMI_HEARTBEAT_IN pulses against the 500ms watchdog (HMI_CFG_HEADLESS_BYPASS isolated for batch replay), jog tags bind by Work.Id (EXPORT-E500), and faults require authentic HMI_SYS_STATE recovery.}}
Opposing Motion · Shared Zone · **`<\ · > · zone_mutex`** · Uses `<\ · > (MutexSafe) to block opposing strokes and zone_mutex (ZoneSafe) to cap shared-zone entries across both Auto and Manual Jog. {{Details::Call Sensing Bounds & Cross-Target Parity: Scopes Call sensing/action lifting strictly to subordinate plant Cut(G, A), warns DS2-W002 on unconsumed non-virtual Work sensing, and aligns MutexSafe/ZoneSafe/interlock across ST/LD, 7 PLCs, HMI, IR, RT, and VerifyST`.}}
Model Bypass · skip when (expr); · Bypasses the work in 0ms when the unified token expression (token.model = 2) is true.
3. Sensor & Interlock Example (ds2 v2;)
ds2 v2;
project SensorGuardStation {
active StationControl;
system PartSensor {
flow Sense {
work Detected finished { duration 50ms; }
}
observe IsPresent = Sense.Detected;
}
system LightCurtain {
flow Monitor {
work Clear finished { duration 50ms; }
}
observe IsSafe = Monitor.Clear;
}
system ClampActuator {
flow Motion {
work Clamp { duration 250ms; }
work Unclamp finished { duration 200ms; }
Clamp <|> Unclamp;
}
api Clamp = Motion.Clamp;
api Unclamp = Motion.Unclamp;
}
system StationControl {
origin flow HomeFlow {
work HomeUnclamp {
interlock (LightCurtain.IsSafe) "Light curtain interrupted";
ClampActuator.Unclamp reuse completed;
}
}
flow MainFlow {
work ClampWorkpiece {
when (PartSensor.IsPresent AND LightCurtain.IsSafe);
interlock (LightCurtain.IsSafe) "Safety curtain breached during clamp";
ClampActuator.Clamp;
}
work InspectWorkpiece {
while (LightCurtain.IsSafe);
duration 400ms;
}
work ReleaseWorkpiece {
interlock (LightCurtain.IsSafe) "Safety curtain breached during release";
ClampActuator.Unclamp;
}
ClampWorkpiece => InspectWorkpiece =|> ReleaseWorkpiece;
}
}
}