OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Python API referencev12.0

IoSnapshot

class optris_sdk.pif.IoSnapshot

Every input and output, read in one pass.

One call rather than a getter per line, for the reason regions.states() exists: a getter per channel takes the lock per channel, so the answers can straddle two reads.

  • Attribute analog_inputs — each input in its channel's own unit: the SDK's temperature unit on a temperature channel (see PifChannelConfig). A channel with no configuration over it has no unit of its own and reads in volts, the same unit as raw_analog_inputs.
  • Attribute raw_analog_inputs — the same inputs as they are on the wire, in volts, before any channel decode -- what a multimeter on the pin would show, in either temperature unit. A readout wants the decoded value and commissioning wants this one, and in earlier releases a configured channel could give only the first. The two are transaction-consistent and cost no extra device traffic.
  • Attribute analog_inputs_clamped — whether each input's decoded value is being held at one of its configured bounds -- the answer to "is my sensor saturated, or is my slope wrong?". False for a channel with no bounds set, for an unconfigured channel, and while inputs_known is false.
  • Attribute inputs_known — whether the inputs in here were actually read. False means the device has not answered yet, and the values are placeholders rather than measurements -- the analog entries are then NaN.
  • Attribute analog_outputs — each analog output as it is on the wire, in the unit Pif.read_analog_output answers in: volts or milliamperes, the same numbers in Celsius and in Fahrenheit, even on a temperature channel. What the SDK drove, not a measurement -- no process interface reports its own outputs back -- so unlike the inputs these are valid whether or not inputs_known.
  • Attribute fail_safe_level — the level on the dedicated fail-safe terminals, as a DIGITAL_* value. DIGITAL_UNKNOWN when nothing has driven them: no fail-safe configured, one configured onto an ordinary output instead, or one armed whose first heartbeat has not arrived. The dedicated line has no index and appears in neither digital_outputs nor Pif.read_digital_output, so this is its only readback. For the line's health, read Pif.fail_safe_health instead -- the level alternates by design, so it flickers on a perfectly healthy system.

IoSnapshot — methods

__repr__()