AR.Iec61850.Control is the typed client-side control-object service for ARIEC61850. It turns a controllable Data Object such as LD0/CSWI1.Pos into a stateful control session. Applications do not assemble an MMS Oper, SBOw, or Cancel structure by hand.
The implementation is supported by source and automated tests, plus limited laboratory evidence. It is not a formal conformance claim, universal interoperability claim, functional-safety assessment, or permission for unrestricted field operation.
IEC 61850 control is a sequence, not a single arbitrary write. The client must discover the live control model and exact server-defined MMS type, preserve sequence identity, and distinguish immediate service acceptance from final command completion.
The public generic-write path therefore blocks these CO members:
OperSBOwCancel
Only the typed control service can write them.
using AR.Iec61850.Control;
var controlService = new Iec61850ControlService();
await using var control = await controlService.OpenAsync(
mmsSession,
"LD0/CSWI1.Pos",
cancellationToken);
var result = await control.OperateAsync(
new Iec61850ControlRequest
{
ControlValue = Iec61850ControlValue.Close(),
Origin = Iec61850Origin.FromText(
"ARIED",
Iec61850OriginCategory.Maintenance),
InterlockCheck = true,
SynchroCheck = true,
Test = false,
AutoSelect = true
},
cancellationToken);OperateAsync is the high-level entry point. It performs Select or SelectWithValue when the discovered ctlModel requires it.
ctlModel |
Sequence | Completion boundary |
|---|---|---|
| Direct normal | Oper |
confirmed MMS service result |
| SBO normal | SBO read, then Oper |
confirmed MMS service result |
| Direct enhanced | Oper, then CommandTermination |
positive or negative termination |
| SBO enhanced | SBOw, then Oper, then CommandTermination |
positive or negative termination |
For enhanced security, successful MMS acceptance is not reported as final completion. Iec61850ControlActionResult keeps RequestAccepted, CommandTerminationReceived, and PositiveTermination separate.
Opening a control session performs live discovery:
- Parse and validate the Data Object root.
- Read
CF/ctlModel. - Retrieve the live
CO/Opervariable-access specification. - Locate
ctlValby component name rather than positional assumption. - Retrieve and compare
SBOwtype information for SBO enhanced. - Retrieve
Canceltype information for SBO models. - Discover
sboTimeout,operTimeout, and a likely process-status reference when exposed. - Reject the descriptor when a typed sequence cannot be formed from the available evidence.
Raw leaves such as ctlModel, ctlVal, Oper, SBOw, or Cancel are rejected as control-object roots.
The command binder maps application intent to the live MMS ctlVal specification:
- SPC: Boolean On/Off.
- DPC: exact two-bit Open/Close representation.
- INC/ISC: signed or unsigned values, including Raise/Lower helpers.
- BSC: named
ValWithTranscomponents. - APC: live integer or floating
AnalogueValuemember. - implementation-specific values: explicit
Iec61850ControlValue.Raw(...), validated against the live specification.
Integer and unsigned values are not treated as interchangeable. A value with the wrong MMS kind is rejected before network transmission.
One sequence context owns:
- bound
ctlVal; - origin category and identifier;
ctlNum;T;- Test;
- interlock-check and synchrocheck bits;
- optional
operTm.
The same values are retained from SBOw through Oper. A caller cannot mutate the command after selection. A mismatched Operate request triggers best-effort Cancel and returns a rejected result.
ctlNum is generated per MMS association and control object. Lock state and counters are attached to association identity to avoid cross-association collision and long-lived static ownership.
- Only one local sequence can own one control object on one association.
- Calls on the same control session are serialized.
- SBO selection timeout is enforced by a local lease.
- Lease expiry performs best-effort
Canceland releases local ownership. - Disposal attempts cancellation when the association remains available.
- Caller cancellation, command timeout, association loss, service rejection, and negative termination remain distinct outcomes.
- Time-activated operations extend the termination wait window by the remaining activation delay.
- InformationReport fan-out keeps command termination separate from the legacy report queue and confirmed-request receive path.
Best-effort cleanup is not a guarantee that a remote IED accepted or completed cleanup. The resulting evidence must remain visible.
The stack subscribes before sending enhanced-security traffic so an immediate asynchronous response is not missed. It decodes:
- positive CommandTermination on the matching
CO/Operreference; - negative CommandTermination and LastApplError;
- control error;
- AddCause values;
- request and response evidence.
An ordinary ST or MX process report cannot complete an enhanced command because positive completion requires the matching Oper reference.
An application should expose a live command only when:
control.Descriptor.IsOperationallyReadyThe descriptor also exposes:
ControlModelCdc- exact
CtlValSpecification StatusReferenceSboTimeoutOperTimeout- time-activated support
- command-termination support
- discovery evidence
IsOperationallyReady means the engine has enough protocol evidence to form a typed request. It does not prove that the connected circuit, interlocking, switching procedure, or equipment is safe.
The application must still require deliberate confirmation after the operator verifies authority, isolation, blocking, test conditions, and independent indications.
SmartControlStackTests covers:
- root validation and exact FC references;
- DPC, SPC, INC/ISC, BSC, APC integer and floating binding;
- constant
ctlNumandTacross SBOw/Oper; - Test, interlock, synchrocheck, UTC time, and binary-time handling;
- direct normal and SBO normal execution;
- direct enhanced positive and negative termination;
- asynchronous SBOw application error;
- SBO enhanced sequence and missing-termination timeout;
- selection mutation cancellation;
- explicit and automatic selection timeout cleanup;
- association loss;
- concurrent clients on one object;
- exact descriptor discovery;
- generic MMS control-write blocking;
- InformationReport subscriber fan-out and association reset behavior.
- DPC Open/Close on all four control models.
- SPC On/Off.
- INC/ISC and BSC implementation variants.
- APC integer and floating variants.
- Test-mode operation with independent verification of no process movement.
- Interlock and synchrocheck rejection evidence.
- Positive and negative CommandTermination evidence.
- SBO expiry and explicit Cancel.
- Association loss during an active sequence.
- Competing-client ownership.
- Process feedback correlation using the discovered status reference.
- Long-duration repeated operation under an approved laboratory procedure.
- Asset-owner and site-specific review for any operational deployment.
Keep product applications read-only when required live type, sequence, authority, or procedure evidence is missing.