API Documentation

SLF3X

Slf3xDevice

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

class sensirion_i2c_slf3x.device.Slf3xDeviceBase(channel)[source]

Low level API implementation of SLF3X

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

Starts continuous measurement mode using calibration values for H₂O. The sensor measures both the flow rate and the temperature. After the command has been sent, the chip continuously measures and updates the measurement results which can be read with read_measurement_data_raw.

Note

The first measurement result will be available after 12ms. Due to the thermal measurement principle small accuracy deviations (% m.v.) can occur while the sensor warms-up (60ms including the 12 ms for measurement initialization).

start_ipa_continuous_measurement()[source]

Starts continuous measurement mode using calibration values for Isopropyl alcohol. The sensor measures both the flow rate and the temperature. After the command has been sent, the chip continuously measures and updates the measurement results which can be read with read_measurement_data_raw.

Note

The first measurement result will be available after 12ms. Due to the thermal measurement principle small accuracy deviations (% m.v.) can occur while the sensor warms-up (60ms including the 12 ms for measurement initialization).

read_measurement_data_raw()[source]

After the command start_xx_continuous_measurement has been sent, the chip continuously measures and updates the measurement results. New results (flow, temperature, and signaling flags) can be read continuously with this command.

Return raw_flow:

For SLF3C-1300F, SLF3S-1300F convert to ml/min by applying: flow = raw_flow / 500 For SLF3S-4000B convert to ml/min by applying: flow = raw_flow / 32 For SLF3S-0600F convert to μl/min by applying: flow = raw_flow / 10

Return raw_temperature:

Convert to degrees celsius by temperature = raw_temperature / 200

Return signaling_flags:

Gives additional information about the measurement status. Refer to the sensor data sheet for detailed information. Following flags are defined: Air-in-Line flag (Bit 0), High Flow flag (Bit 1), Exponential smoothing active (Bit 5)

Note

The first measurement result will be available 12ms after starting the measurement. Small accuracy deviations (% m.v.) can occur during the first 60ms (including the 12ms initialization)

stop_continuous_measurement()[source]

This command stops the continuous measurement and puts the sensor in idle mode. After it receives the stop command, the sensor needs up to 0.5ms to power down the heater, enter idle mode and be receptive for a new command.

start_single_thermal_conductivity_measurement_sync()[source]

This command starts one thermal conductivity measurement and blocks for 2.3 seconds until the measurement results are ready. After completion of the measurement, the heater is switched off and the sensor enters idle mode and the results can be read anytime with read_thermal_conductivity_measurement_data. The sensor measures the thermal conductivity, the sensor temperature, and the delta-temperature (a measure for the temperature difference between the liquid and the sensor). Supported by products: SLF3C-1300F, SLF3S-4000B

start_single_thermal_conductivity_measurement_async()[source]

This command starts one thermal conductivity measurement and returns immediately. Note that the sensor does not accept any other commands while the measurement is running, which takes approximately 2.3 seconds. After completion of the measurement, the heater is switched off and the sensor enters idle mode and the results can be read anytime with read_thermal_conductivity_measurement_data. The sensor measures the thermal conductivity, the sensor temperature, and the delta-temperature (a measure for the temperature difference between the liquid and the sensor). Supported by products: SLF3C-1300F, SLF3S-4000B

read_thermal_conductivity_measurement_data()[source]

Reads single thermal conductivity measurement after a measurement has been started with start_single_thermal_conductivity_measurement_sync or start_single_thermal_conductivity_measurement_async. Supported by products: SLF3C-1300F, SLF3S-4000B

Return thermal_conductivity:

thermal conductivity

Return raw_temperature:

Convert to degrees celsius by temperature = raw_temperature / 200

Return raw_delta_temperature:

The delta-temperature is a measure for the temperature difference between the liquid and the sensor. Convert to degrees celsius by delta_temperature = raw_delta_temperature / 1000

read_product_identifier_prepare()[source]

Prepare to read the product identifier and the serial number. The command can only be executed from the idle mode, i.e. when the sensor is not performing measurements.

read_product_identifier()[source]

This command allows to read product identifier and the serial number. The command can only be executed from the idle mode, i.e. when the sensor is not performing measurements and read_product_identifier_prepare is called before.

Return product_identifier:

Note that the last 8 bits are the sensor’s revision number and are subject to change in case of an update of the specifications.

Return serial_number_high:

Higher 32-bit of the 64-bit unique serial number

Return serial_number_low:

Lower 32-bit of the 64-bit unique serial number

class sensirion_i2c_slf3x.device.Slf3xDevice(channel)[source]

Driver class implementation of SLF3X

slf3x

Access to base class

__init__(channel)[source]
read_measurement_data(inv_flow_scale_factor)[source]

Reads the raw measurement values and converts them to their physcial units where applicable. For the flow the scaling factor and resulting flow unit depends on the specific sensor. The scaling factor is passed as an argument and the raw flow value is converted by applying: flow = raw_flow / inv_flow_scale_factor The scaling factors for the supported sensor are defined in enum inv_flow_scale_factors

Parameters:

inv_flow_scale_factor – used to convert raw flow value

Return a_flow:

As the flow scaling differs for specific sensor types the scaling factor must be passed as an argument. See the enum inv_flow_scale_factors for scaling factors of supported sensors. The raw value is converted by: flow = raw_flow / inv_flow_scale_factor Resulting unit depends on your specific sensor type.

Return a_temperature:

temperature in degree celsius

Return a_signaling_flags:

read_thermal_conductivity_measurement_data()[source]

Reads single thermal conductivity measurement after a measurement has been started with start_single_thermal_conductivity_measurement. Supported by products: SLF3C-1300F, SLF3S-4000B

Return a_thermal_conductivity:

thermal conductivity in arbitary unit

Return a_temperature:

temperature in degree celsius

Return a_delta_temperature:

delta temperature in degree celsius

read_product_identifier()[source]

Read product identifier and the serial number. The command can only be executed from the idle mode, i.e. when the sensor is not performing measurements.

Return product_identifier:

Return serial_number:

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_slf3x.commands.InvFlowScaleFactors(value)[source]
SLF3C_1300F = 500
SLF3S_1300F = 500
SLF3S_4000B = 32
SLF3S_0600F = 10
class sensirion_i2c_slf3x.commands.SignalingFlagsT(int_value: int = 0, **kwargs)[source]
air_in_line_flag = (0, 1)
high_flow_flag = (1, 1)
unused = (2, 3)
exp_smoothing_active = (5, 1)
class sensirion_i2c_slf3x.commands.StartH2oContinuousMeasurement[source]

Starts continuous measurement mode using calibration values for H₂O. The sensor measures both the flow rate and the temperature. After the command has been sent, the chip continuously measures and updates the measurement results which can be read with read_measurement_data_raw.

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

Starts continuous measurement mode using calibration values for Isopropyl alcohol. The sensor measures both the flow rate and the temperature. After the command has been sent, the chip continuously measures and updates the measurement results which can be read with read_measurement_data_raw.

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

After the command start_xx_continuous_measurement has been sent, the chip continuously measures and updates the measurement results. New results (flow, temperature, and signaling flags) can be read continuously with this command.

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

This command stops the continuous measurement and puts the sensor in idle mode. After it receives the stop command, the sensor needs up to 0.5ms to power down the heater, enter idle mode and be receptive for a new command.

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

This command starts one thermal conductivity measurement and blocks for 2.3 seconds until the measurement results are ready. After completion of the measurement, the heater is switched off and the sensor enters idle mode and the results can be read anytime with read_thermal_conductivity_measurement_data. The sensor measures the thermal conductivity, the sensor temperature, and the delta-temperature (a measure for the temperature difference between the liquid and the sensor). Supported by products: SLF3C-1300F, SLF3S-4000B

CMD_ID = 13894
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_slf3x.commands.StartSingleThermalConductivityMeasurementAsync[source]

This command starts one thermal conductivity measurement and returns immediately. Note that the sensor does not accept any other commands while the measurement is running, which takes approximately 2.3 seconds. After completion of the measurement, the heater is switched off and the sensor enters idle mode and the results can be read anytime with read_thermal_conductivity_measurement_data. The sensor measures the thermal conductivity, the sensor temperature, and the delta-temperature (a measure for the temperature difference between the liquid and the sensor). Supported by products: SLF3C-1300F, SLF3S-4000B

CMD_ID = 13894
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_slf3x.commands.ReadThermalConductivityMeasurementData[source]

Reads single thermal conductivity measurement after a measurement has been started with start_single_thermal_conductivity_measurement_sync or start_single_thermal_conductivity_measurement_async. Supported by products: SLF3C-1300F, SLF3S-4000B

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

Prepare to read the product identifier and the serial number. The command can only be executed from the idle mode, i.e. when the sensor is not performing measurements.

CMD_ID = 13948
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
class sensirion_i2c_slf3x.commands.ReadProductIdentifier[source]

This command allows to read product identifier and the serial number. The command can only be executed from the idle mode, i.e. when the sensor is not performing measurements and read_product_identifier_prepare is called before.

CMD_ID = 57602
pack()[source]
tx = <sensirion_driver_adapters.rx_tx_data.TxData object>
rx = <sensirion_driver_adapters.rx_tx_data.RxData 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_slf3x.result_types.SignalFlow(raw_flow, inv_flow_scale_factor)[source]

As the flow scaling differs for specific sensor types the scaling factor must be passed as an argument. See the enum inv_flow_scale_factors for scaling factors of supported sensors. The raw value is converted by: flow = raw_flow / inv_flow_scale_factor Resulting unit depends on your specific sensor type.

property value
class sensirion_i2c_slf3x.result_types.SignalTemperature(raw_temperature)[source]

temperature in degree celsius

property value
class sensirion_i2c_slf3x.result_types.SignalDeltaTemperature(raw_delta_temperature)[source]

delta temperature in degree celsius

property value
class sensirion_i2c_slf3x.result_types.SignalThermalConductivity(raw_thermal_conductivity)[source]

thermal conductivity in arbitary unit

property value