OptrisOptrisDocumentation

Documentation/OTC SDK/Optris.Sdk — C# API referencev12.0

AlarmCondition

public readonly record struct AlarmCondition : IEquatable<AlarmCondition>

When a rule fires: the alarm band, an optional warning band, and the temporal shaping applied to both.

AlarmCondition: properties

public AlarmLimits Alarm { get; init; }

The alarm band.

public AlarmCompare Compare { get; init; }

How the value is compared against the limits.

public bool IsLatching { get; init; }

Stay active until acknowledged, even once the value comes back.

Acknowledging a condition that still holds does not silence it: see ThermalCamera.AcknowledgeAlarm(…).

public TimeSpan OffDelay { get; init; }

How long it must stop holding before the state falls.

Set independently of AlarmCondition.OnDelay, so an alarm can be slow to raise and quick to clear, or the reverse. Replaced OffDelayFrames; see AlarmCondition.OnDelay.

public TimeSpan OnDelay { get; init; }

How long the condition must hold before the state rises. TimeSpan.Zero reacts on the first observation.

This replaced OnDelayFrames, a count of frames. A frame count only meant a duration in combination with a frame rate, and the frame rate is a property of the operation mode, which an operator can change at any time from the same application. Sixteen frames was half a second on a 32 Hz camera and a full second on a 16 Hz one; the same alarm copied between a 27 Hz PI and a 50 Hz Xi debounced for different lengths of time while reading identically on screen.

The camera converts this to a count of frames from the interval it is actually producing, so a mode change re-derives it with no work on your side. A delay shorter than one frame interval debounces one frame, not zero.

Rounded to whole milliseconds, and never down to zero: any delay above TimeSpan.Zero is carried as at least one millisecond, so it still debounces. Only TimeSpan.Zero itself reacts on the first observation.

public Nullable<AlarmLimits> Warning { get; init; }

The pre-alarm band, or null for none.

Evaluated with the same AlarmCondition.Compare. An alarm always overrides a warning.

AlarmCondition: methods

public static AlarmCondition Above(float threshold, float hysteresis = 0)

A plain "above this value" condition.

  • threshold: The limit, in the input's own unit: on a temperature, the SDK's temperature unit (Celsius unless Sdk.TemperatureUnit chose Fahrenheit). See AlarmLimits.
  • hysteresis: How far below the limit the value must return before the alarm clears, a difference in the same unit. Zero lets it chatter.

Returns: The condition.

public static AlarmCondition Below(float threshold, float hysteresis = 0)

A plain "below this value" condition.

  • threshold: The limit, in the input's own unit, as for AlarmCondition.Above(…).
  • hysteresis: How far above the limit the value must return before the alarm clears, a difference in the same unit.

Returns: The condition.

public static AlarmCondition Outside(float low, float high, float hysteresis = 0)

Fires while the value leaves a band.

  • low: The band's lower edge, in the input's own unit, as for AlarmCondition.Above(…).
  • high: The band's upper edge, in the same unit.
  • hysteresis: The release deadband, a difference in the same unit.

Returns: The condition.