SensirionSFM3300

Description

This object was introduced in InCore 2.5.

› Inherits:SensirionHDLC

Properties

baseUnit

This property holds the base unit for temperature or pressure measurements.

› Type:BaseUnit
› Signal:baseUnitChanged()
› Attributes:Readonly

measureContinuously

This property holds whether to configure the sensor such that it measures continuously.

› Type:Boolean
› Default:true
› Signal:measureContinuouslyChanged()
› Attributes:Writable

sensorSerialNumber

This property holds the serial number of the attached sensor.

› Type:UnsignedInteger
› Signal:sensorSerialNumberChanged()
› Attributes:Readonly

siPrefix

This property holds the SI prefix for measurements.

› Type:Measurement.SiPrefix
› Signal:siPrefixChanged()
› Attributes:Readonly

timeBase

This property holds the time base unit for measurements.

› Type:Measurement.Unit
› Signal:timeBaseChanged()
› Attributes:Readonly

unit

This property holds the full unit string based on siPrefix, baseUnit and timeBase.

› Type:String
› Signal:unitChanged()
› Attributes:Readonly

value

This property holds the most recently measured value from the sensor.

› Type:Float
› Signal:valueChanged()
› Attributes:Readonly, Requires Polling

Methods

pollValue()

This method polls the value property. It is called automatically when using a Polling property modifier on this property and usually does not have to be called manually.

Enumerations

BaseUnit

Name Value Description
SensirionSFM3300.NoBaseUnit 0
SensirionSFM3300.NormLiter 1
SensirionSFM3300.StandardLiter 2
SensirionSFM3300.Liter 3
SensirionSFM3300.Gram 4
SensirionSFM3300.Pascal 5
SensirionSFM3300.Bar 6
SensirionSFM3300.MeterOfWater 7
SensirionSFM3300.InchOfWater 8  

Example

import InCore.Foundation 2.5
import InCore.IO 2.5

Application {

    SensirionSFM3300 {
        property real volume: 0
        portName: "ttyUSB0"
        Polling on value { interval: 25 }
        onValueChanged: {
            // integrate volume flow to get the total exhaled volume
            if( value > 0.5 )
            {
                if(timer.msecsElapsed > 0)
                {
                    volume += value * timer.msecsElapsed / 60000;
                }
                timer.restart()
            }
            else if( value < -0.5 && timer.running )
            {
                console.log("Exhaled volume", volume)
                volume = 0
                timer.stop()
            }
        }
    }

    Timer { id: timer }
}