OptrisOptrisDocumentation

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

pif — functions

The Process Interface: declare what a channel is for, then use it.

A PIF is a box of digital and analog lines bolted to the camera. The thing to understand before anything else is that a channel carries no meaning until it has been given one. An analog input is a voltage; whether that voltage is an emissivity, an ambient temperature or nothing at all is a statement you make with Pif.configure, and until you make it nothing is decoded from that channel.

That is why every example configures a table first and reads second.

Identity and capability are separate questions

Pif.identity is who is attached and Pif.hardware_info is what it can do. They are separate because on some cameras the firmware cannot answer the first one at all -- PifIdentity.detection says whether the SDK detected the device or was merely told about it, and a declared identity is a claim rather than an observation.

Reading, writing and polling

Pif.snapshot reads every input in one call, which is what a display wants: one pass, one consistent set of values. Pif.poll is what advances the controller -- it reads the inputs, decodes them and dispatches Pif.on_input. The call rate is the process's choice.

Polling deliberately does not touch the fail-safe line. That is driven by the fail-safe watchdog, on frames arriving and the pipeline finishing them, so that it means "the camera is healthy" rather than "this loop is still running".

digital_state_name(state)

'HIGH', 'LOW' or 'UNKNOWN'.

UNKNOWN is a real answer, not a failure: a line that has not been read yet, or one on a device that is no longer attached.

channel_kind_name(kind)

What a channel has been declared to be for.

device_kind_name(kind)

What sort of interface a device kind names.

autonomy_name(autonomy)

How much the camera firmware can drive unattended.

trim_source_name(source)

Where a channel trim's gain and offset came from.

'unknown' and 'none' both mean the gain and offset are the identity and describe nothing the device does. Read this before believing them.

fail_safe_health_name(health)

What the fail-safe line is doing.

'beating' is the only value that says the signal is reaching the interface fast enough to keep its relay energised.