API Documentation

SFX6XXX

Sfx6xxxDevice

The class Sfx6xxxDeviceBase implements the low level interface of the sensor. The class Sfx6xxxDevice extends the Sfx6xxxDeviceBase. It provides additional functions to ease the use of the sensor.

class sensirion_i2c_sfx6xxx.device.Sfx6xxxDeviceBase(channel)[source]

Low level API implementation of SFX6XXX

__init__(channel)[source]
property channel
read_product_identifier()[source]

Read product identifier and the serial number.

Return product_identifier:

32-bit product and revision number.

Return serial_number:

64-bit unique serial number.

Note

  • This command is only available while no measurement is running

reset_pointer_to_measurement_buffer()[source]

This instruction resets the I2C address pointer to the regular result output buffer such that the measurement data are obtained upon a subsequent read header.

update_setpoint(setpoint)[source]

Set the flow setpoint as a physical value which is used by the flow controller as reference input.

Parameters:

setpoint – The new setpoint. The value has to be given in the regular two’s complement format, which is also used for the flow value output.

Note

  • The setpoint is set to 0 if calibration is changed.

  • You have to call reset_pointer_to_measurement_buffer after updating the setpoint

  • Only applicable for SFC6xxx mass flow controllers.

update_init_step(init_step)[source]

This instruction transmits the InitStep value to the MFC. An MFC variant specific InitStep value is used by default, which will be applied after a hard- or soft-reset of the sensor.

Parameters:

init_step – InitStep value in range [0..1] multiplied by 2^16.

Note

  • Only applicable for SFC6xxx mass flow controllers

  • You have to reset i2c address after updating the init step

update_customer_gain(customer_gain)[source]

This instruction transmits the CustomerGain value to the MFC. A value of 1 is used by default for the CustomerGain, which will be applied after a hard- or soft-reset of the sensor.

Parameters:

customer_gain – CustomerGain value in range [0..4] multiplied by 2^14.

Note

  • Only applicable for SFC6xxx mass flow controllers

  • You have to reset i2c address after updating the init step

start_o2_continuous_measurement()[source]

Start continuous O₂ measurement.

start_air_continuous_measurement()[source]

Start continuous air measurement.

start_co2_continuous_measurement()[source]

Start continuous CO₂ measurement.

start_n2o_continuous_measurement()[source]

Start continuous N₂O measurement.

start_ar_continuous_measurement()[source]

Start continuous Ar measurement.

start_raw_thermal_conductivity_continuous_measurement()[source]

Start measurement for raw thermal conductivity. In this measurement mode the valve remains closed and the flow value is replaced by the raw thermal conductivity value.

start_o2_in_air_continuous_measurement(volume_fraction)[source]

Start continuous measurement for gas mixture of O2 in Air.

Parameters:

volume_fraction – Volume fraction of O2 in Air in per mille (‰).

stop_continuous_measurement()[source]

This transfer stops the continuous measurement and puts the sensor in idle mode.

Note

  • After it receives the stop command, the sensor needs up to 1 ms to power down the heater, enter idle mode and be receptive for a new command.

read_measurement_data()[source]

Read out the data from the sensor.

Return flow:

Calibrated flow signal read from the sensor.

Return reserved:

Reserved value for future use.

Return status_word:

Contains status information about the read data.

read_flow()[source]

Read out the flow only from the sensor.

Return flow:

Calibrated flow signal read from the sensor.

get_raw_temperature()[source]

While the sensor is in continuous measurement mode, the temperature of the bulk silicon in the flow-sensor chip can be read with a special I2C transmission sequence. The sensor must be in continuous measurement mode and the temperature is read without interrupting the running measurement. To this end a transmission sequence consisting of multiple instructions is detailed in this section.

Return temperature:

16-bit temperature

Note

  • The first valid temperature value can be read after about 12 ms (i.e. for simplicity, the temperature shall be read upon the sensor acknowledged a read of the flow value, to make sure that a temperature value is available from the buffer)

  • The update rate for the temperature value is significantly slower than for the flow value. The most up- to-date temperature value is always available from the buffer (the sensor will ACK a corresponding read). Hence, the identical internally acquired temperature value can be read multiple times, which is not the case for the flow value, where the sensor will NACK if no new measurement data is yet available

  • You have to call reset_pointer_to_measurement_buffer after reading out the temperature

  • temperature value has a scaling factor or 1/200

force_open_valve()[source]

Fully opens the valve. The flow value can still be read from the sensor. Call reset_force_open_valve to return to normal valve regulation.

Note

  • Only applicable for SFC6xxx mass flow controllers

  • Command has to be issued while continuous measurement is running

reset_force_open_valve()[source]

Return to normal valve regulation after fully opening the valve.

Note

  • Only applicable for SFC6xxx mass flow controllers

  • Command has to be issued after force_open_valve

force_close_valve()[source]

Fully closes the valve. The flow value can still be read from the sensor. Call reset_force_close_valve to return to normal valve regulation.

Note

  • Only applicable for SFC6xxx mass flow controllers

  • Command has to be issued while continuous measurement is running

reset_force_close_valve()[source]

Return to normal valve regulation after force closing the valve.

Note

  • Only applicable for SFC6xxx mass flow controllers

  • Command has to be issued after force_close_valve

update_gas_concentration(volume_fraction)[source]

Update the concentration of a binary gas mixture dynamically.

Parameters:

volume_fraction – New O₂ volume fraction in Air

Note

  • You have to call reset_pointer_to_measurement_buffer after updating gas concentration

  • The concentration value must not be updated more than once per millisecond

prepare_read_gas_calibration(measurement_command)[source]

This command prepares read out of gas calibration.

Parameters:

measurement_command – The continuous measurement command, that will be used.

Note

  • This command has to be sent before read_gas_calibration

read_gas_calibration()[source]

Read the flow scale, offset and unit, full-scale flow and unique gas-ID for one of the calibrated gases.

Return flow_scale_factor:

Scale factor used by the sensor.

Return flow_offset:

Offset used by the sensor.

Return flow_unit:

Applicable flow unit.

Return full_scale_flow:

The full-scale flow value as a two’s complement.

Return gas_id:

The unique gas-ID represents the code assigned to a gas by the SEMI standards.

Note

  • This command is only valid after prepare_read_gas_calibration

enable_raw_flow_values()[source]

There might be special cases where it is beneficial to read the uncalibrated raw flow value from the sensor. To this end a dedicated command can be issued requesting the sensor to return the uncalibrated raw flow values as opposed to the default linearized flow values.

Note

  • This command has to be issued while a continuous measurement is running

disable_raw_flow_values()[source]

Causes the sensor to switch back to normalized flow values.

Note

  • This command has to be issued while a continuous measurement is running

  • Use this command to return to regular normalized flow values after enabling raw flow values

class sensirion_i2c_sfx6xxx.device.Sfx6xxxDevice(channel)[source]

Driver class implementation of SFX6XXX

sfx6xxx

Access to base class

__init__(channel)[source]
get_gas_calibration(measurement_command)[source]

Read the flow scale, offset and unit, full-scale flow and unique gas-ID for one of the calibrated gases.

Parameters:

measurement_command – The continuous measurement command, that will be used.

Return flow_scale_factor:

Scale factor used by the sensor.

Return flow_offset:

Offset used by the sensor.

Return flow_unit:

Applicable flow unit.

Return full_scale_flow:

The full-scale flow value as a two’s complement.

Return gas_id:

The unique gas-ID represents the code assigned to a gas by the SEMI standards.

start_o2_continuous_measurement()[source]

Start O2 measurement and readout the corresponding scale factor from the sensor

start_air_continuous_measurement()[source]

Start Air measurement and readout the corresponding scale factor from the sensor

start_co2_continuous_measurement()[source]

Start CO2 measurement and readout the corresponding scale factor from the sensor

start_n2o_continuous_measurement()[source]

Start N2O measurement and readout the corresponding scale factor from the sensor

start_ar_continuous_measurement()[source]

Start Ar measurement and readout the corresponding scale factor from the sensor

start_o2_in_air_continuous_measurement(volume_fraction)[source]

Start O2 in air measurement and readout the corresponding scale factor from the sensor

Parameters:

volume_fraction – Volume fraction of O2 in Air in per mille (‰).

start_raw_thermal_conductivity_continuous_measurement()[source]

Start thermal conductivity measurement and readout the corresponding scale factor from the sensor

read_measurement_data_raw()[source]

Read raw flow value

Return arg_0:

Return a_status_word:

read_measurement_data()[source]

Read measured data with scaling applied

Return a_flow:

This signal represents the measured flow. It is scaled with the corresponding scaling factor and offset

Return a_status_word:

read_flow_raw()[source]

Read raw flow value in ticks.

Return arg_0:

read_flow()[source]

Read scaled flow value in standard liter per minute.

Return a_flow:

This signal represents the measured flow. It is scaled with the corresponding scaling factor and offset

read_raw_temperature()[source]

Read temperature in degrees celsius.

Return arg_0:

read_temperature()[source]

Read temperature in degrees celsius.

Return a_temperature:

Measured temperature in degrees celsius. The raw value is scaled appropriately.

update_setpoint(flow)[source]

Update the setpoint during active measurement.

Parameters:

flow – Setpoint in slm

Note

  • Only applicable for SFC6xxx mass flow controllers.

Commands

The transfer classes specify the data that is transferred between host and sensor. The generated transfer classes are used by the driver class and not intended for direct use.

class sensirion_i2c_sfx6xxx.commands.StatusWordT(int_value: int = 0)[source]
gas_conc = BitField(offset=0, width=10)
pressure_controller_functionality = BitField(offset=10, width=1)
flow_controller_functionality = BitField(offset=11, width=1)
command_code = BitField(offset=12, width=4)
class sensirion_i2c_sfx6xxx.commands.FlowUnitT(int_value: int = 0)[source]
prefix = BitField(offset=0, width=4)
time_base = BitField(offset=4, width=4)
unit = BitField(offset=8, width=5)
class sensirion_i2c_sfx6xxx.commands.ErrorCodeT(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
I2C_ERROR = 0
TIMEOUT = 1
class sensirion_i2c_sfx6xxx.commands.ReadProductIdentifier[source]

Read product identifier and the serial number.

CMD_ID = 57602
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sfx6xxx.commands.ResetPointerToMeasurementBuffer[source]

This instruction resets the I2C address pointer to the regular result output buffer such that the measurement data are obtained upon a subsequent read header.

CMD_ID = 57344
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.UpdateSetpoint(setpoint)[source]

Set the flow setpoint as a physical value which is used by the flow controller as reference input.

CMD_ID = 61524
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.UpdateInitStep(init_step)[source]

This instruction transmits the InitStep value to the MFC. An MFC variant specific InitStep value is used by default, which will be applied after a hard- or soft-reset of the sensor.

CMD_ID = 57785
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.UpdateCustomerGain(customer_gain)[source]

This instruction transmits the CustomerGain value to the MFC. A value of 1 is used by default for the CustomerGain, which will be applied after a hard- or soft-reset of the sensor.

CMD_ID = 57778
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.StartO2ContinuousMeasurement[source]

Start continuous O₂ measurement.

CMD_ID = 13827
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.StartAirContinuousMeasurement[source]

Start continuous air measurement.

CMD_ID = 13832
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.StartCo2ContinuousMeasurement[source]

Start continuous CO₂ measurement.

CMD_ID = 13845
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.StartN2oContinuousMeasurement[source]

Start continuous N₂O measurement.

CMD_ID = 13854
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.StartArContinuousMeasurement[source]

Start continuous Ar measurement.

CMD_ID = 13860
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.StartRawThermalConductivityContinuousMeasurement[source]

Start measurement for raw thermal conductivity. In this measurement mode the valve remains closed and the flow value is replaced by the raw thermal conductivity value.

CMD_ID = 13860
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.StartO2InAirContinuousMeasurement(volume_fraction)[source]

Start continuous measurement for gas mixture of O2 in Air.

CMD_ID = 13904
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.StopContinuousMeasurement[source]

This transfer stops the continuous measurement and puts the sensor in idle mode.

CMD_ID = 16377
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.ReadMeasurementData[source]

Read out the data from the sensor.

pack()[source]
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sfx6xxx.commands.ReadFlow[source]

Read out the flow only from the sensor.

pack()[source]
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sfx6xxx.commands.GetRawTemperature[source]

While the sensor is in continuous measurement mode, the temperature of the bulk silicon in the flow-sensor chip can be read with a special I2C transmission sequence. The sensor must be in continuous measurement mode and the temperature is read without interrupting the running measurement. To this end a transmission sequence consisting of multiple instructions is detailed in this section.

CMD_ID = 57602
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sfx6xxx.commands.ForceOpenValve[source]

Fully opens the valve. The flow value can still be read from the sensor. Call reset_force_open_valve to return to normal valve regulation.

CMD_ID = 16356
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.ResetForceOpenValve[source]

Return to normal valve regulation after fully opening the valve.

CMD_ID = 16229
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.ForceCloseValve[source]

Fully closes the valve. The flow value can still be read from the sensor. Call reset_force_close_valve to return to normal valve regulation.

CMD_ID = 16367
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.ResetForceCloseValve[source]

Return to normal valve regulation after force closing the valve.

CMD_ID = 16238
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.UpdateGasConcentration(volume_fraction)[source]

Update the concentration of a binary gas mixture dynamically.

CMD_ID = 57725
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.PrepareReadGasCalibration(measurement_command)[source]

This command prepares read out of gas calibration.

CMD_ID = 13921
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.ReadGasCalibration[source]

Read the flow scale, offset and unit, full-scale flow and unique gas-ID for one of the calibrated gases.

CMD_ID = 57681
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData object>
class sensirion_i2c_sfx6xxx.commands.EnableRawFlowValues[source]

There might be special cases where it is beneficial to read the uncalibrated raw flow value from the sensor. To this end a dedicated command can be issued requesting the sensor to return the uncalibrated raw flow values as opposed to the default linearized flow values.

CMD_ID = 16350
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_sfx6xxx.commands.DisableRawFlowValues[source]

Causes the sensor to switch back to normalized flow values.

CMD_ID = 16223
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>

Result Types

The signal classes specify transformations of the raw sensor signals into a meaningful units. The generated signal types are used by the driver class and not intended for direct use.

class sensirion_i2c_sfx6xxx.result_types.SignalTemperature(temperature_raw)[source]

Measured temperature in degrees celsius. The raw value is scaled appropriately.

property value
class sensirion_i2c_sfx6xxx.result_types.SignalFlow(flow_raw, flow_scale_factor, flow_offset)[source]

This signal represents the measured flow. It is scaled with the corresponding scaling factor and offset

property value
class sensirion_i2c_sfx6xxx.result_types.SignalRawFlow(flow, flow_scale_factor, flow_offset)[source]

This signal converts a user flow input from float into the twos-complement representation

property value