|
|
| (10 intermediate revisions by 2 users not shown) |
| Line 22: |
Line 22: |
|
| |
|
| ==Detailed description== | | ==Detailed description== |
| | |
| | |
|
| |
|
|
| |
|
| Line 67: |
Line 69: |
|
| |
|
|
| |
|
| ''<span style="color:red;">No additional examples</span>''
| |
|
| |
|
| ==Macro reference==
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPressureFloat'''
| |
| |-
| |
| | colspan="2" | Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| | ''<span style="color:red;">No additional examples</span>'' |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reset'''
| |
| |-
| |
| | colspan="2" | Resets the device
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Read_Register'''
| |
| |-
| |
| | colspan="2" | Reads a byte value from a register on the device
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTemperatureFloat'''
| |
| |-
| |
| | colspan="2" | Reads the temperature as a floating point value in °C. Resultion sets the return bit value and conversion time. Calls the ReadTemperatureRaw function and then converts to a meaningful value.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Altitude'''
| |
| |-
| |
| | colspan="2" | Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forced_Read'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ==Macro reference== |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Write_Register'''
| |
| |-
| |
| | colspan="2" | Writes a byte value to a register on the device
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Starts up the I2C bus and initialises the pressure sensor ready for use. Returns 1 for a sucessful startup. Returns 0 for a failed startup or no device detected.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| | | ===Altitude=== |
| | | {| class="mtx-class-macrotable wikitable" |
| | |
| ==Property reference== | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | I2C Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Slave Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel selection
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | SDA
| |
| |-
| |
| | colspan="2" | Pin used for SDA (data signal)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | SCL
| |
| |-
| |
| | colspan="2" | Pin used for SCL (clock signal)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Baud Select
| |
| |- | | |- |
| | colspan="2" | Baud rate option selector
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| |-
| | | width="90%" class="mtx-class-macrohead" | '''Altitude''' |
| | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
| | width="90%" | Baud Rate
| |
| |-
| |
| | colspan="2" | Baud rate to be used
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Stop Delay
| |
| |-
| |
| | colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Sensor Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Compensation
| |
| |-
| |
| | colspan="2" | Compensation formulas in double precision floating point or 32 bit fixed point
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Humidity Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Pressure Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Temperature Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Mode
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Standby Normal Mode (ms)
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Filter Coefficient
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Simulate Comms
| |
| |-
| |
| | colspan="2" | Allows the simulation data to come from the panel GUI or relayed via an injector component.
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPressureFloat'''
| |
| |-
| |
| | colspan="2" | Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reset''' | |
| |-
| |
| | colspan="2" | Resets the device
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Read_Register'''
| |
| |-
| |
| | colspan="2" | Reads a byte value from a register on the device
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTemperatureFloat'''
| |
| |-
| |
| | colspan="2" | Reads the temperature as a floating point value in °C. Resultion sets the return bit value and conversion time. Calls the ReadTemperatureRaw function and then converts to a meaningful value.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Altitude'''
| |
| |- | | |- |
| | colspan="2" | Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa. | | | colspan="2" | Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa. |
| Line 358: |
Line 99: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Forced_Read=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forced_Read''' | | | width="90%" class="mtx-class-macrohead" | '''Forced_Read''' |
| |- | | |- |
| | colspan="2" | | | | colspan="2" | |
| Line 371: |
Line 113: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===I2C_Read_Register=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Write_Register''' | |
| |-
| |
| | colspan="2" | Writes a byte value to a register on the device
| |
| |- | | |- |
| |-
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| | | width="90%" class="mtx-class-macrohead" | '''I2C_Read_Register''' |
| | width="90%" | Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Starts up the I2C bus and initialises the pressure sensor ready for use. Returns 1 for a sucessful startup. Returns 0 for a failed startup or no device detected.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| | |
| | |
| ==Property reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | I2C Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Slave Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel selection
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | SDA
| |
| |-
| |
| | colspan="2" | Pin used for SDA (data signal)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | SCL
| |
| |-
| |
| | colspan="2" | Pin used for SCL (clock signal)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Baud Select
| |
| |-
| |
| | colspan="2" | Baud rate option selector
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
| | width="90%" | Baud Rate
| |
| |-
| |
| | colspan="2" | Baud rate to be used
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Stop Delay
| |
| |-
| |
| | colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Sensor Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Compensation
| |
| |-
| |
| | colspan="2" | Compensation formulas in double precision floating point or 32 bit fixed point
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Humidity Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Pressure Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Temperature Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Mode
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Standby Normal Mode (ms)
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Filter Coefficient
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Simulate Comms
| |
| |-
| |
| | colspan="2" | Allows the simulation data to come from the panel GUI or relayed via an injector component.
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPressureFloat''' | |
| |-
| |
| | colspan="2" | Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reset'''
| |
| |-
| |
| | colspan="2" | Resets the device
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Read_Register'''
| |
| |- | | |- |
| | colspan="2" | Reads a byte value from a register on the device | | | colspan="2" | Reads a byte value from a register on the device |
| Line 549: |
Line 132: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===I2C_Write_Register=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTemperatureFloat''' | |
| |- | | |- |
| | colspan="2" | Reads the temperature as a floating point value in °C. Resultion sets the return bit value and conversion time. Calls the ReadTemperatureRaw function and then converts to a meaningful value.
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| |-
| | | width="90%" class="mtx-class-macrohead" | '''I2C_Write_Register''' |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Altitude''' | |
| |-
| |
| | colspan="2" | Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forced_Read'''
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Write_Register'''
| |
| |- | | |- |
| | colspan="2" | Writes a byte value to a register on the device | | | colspan="2" | Writes a byte value to a register on the device |
| Line 611: |
Line 156: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Initialise=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | | | width="90%" class="mtx-class-macrohead" | '''Initialise''' |
| |- | | |- |
| | colspan="2" | Starts up the I2C bus and initialises the pressure sensor ready for use. Returns 1 for a sucessful startup. Returns 0 for a failed startup or no device detected. | | | colspan="2" | Starts up the I2C bus and initialises the pressure sensor ready for use. Returns 1 for a sucessful startup. Returns 0 for a failed startup or no device detected. |
| Line 624: |
Line 170: |
|
| |
|
|
| |
|
| | | ===ReadPressureFloat=== |
| | | {| class="mtx-class-macrotable wikitable" |
| ==Property reference== | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | I2C Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Slave Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Channel
| |
| |-
| |
| | colspan="2" | Channel selection
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | SDA
| |
| |-
| |
| | colspan="2" | Pin used for SDA (data signal)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-5-icon.png]]
| |
| | width="90%" | SCL
| |
| |-
| |
| | colspan="2" | Pin used for SCL (clock signal)
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Baud Select
| |
| |-
| |
| | colspan="2" | Baud rate option selector
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-14-icon.png]]
| |
| | width="90%" | Baud Rate
| |
| |-
| |
| | colspan="2" | Baud rate to be used
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Stop Delay
| |
| |-
| |
| | colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications.
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Sensor Properties
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Compensation
| |
| |-
| |
| | colspan="2" | Compensation formulas in double precision floating point or 32 bit fixed point
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Humidity Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Pressure Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Temperature Oversampling
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Mode
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Standby Normal Mode (ms)
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
| |
| | width="90%" | Filter Coefficient
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
| |
| | width="90%" | Simulate Comms
| |
| |-
| |
| | colspan="2" | Allows the simulation data to come from the panel GUI or relayed via an injector component.
| |
| |}==Macro reference==
| |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadPressureFloat''' | | | width="90%" class="mtx-class-macrohead" | '''ReadPressureFloat''' |
| |- | | |- |
| | colspan="2" | Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value. | | | colspan="2" | Reads the pressure as a floating point value in Bars. Calls the ReadPressureRaw function and then converts to a meaningful value. |
| Line 735: |
Line 184: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| | ===ReadTemperatureFloat=== |
| |-
| | {| class="mtx-class-macrotable wikitable" |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Reset''' | |
| |- | | |- |
| | colspan="2" | Resets the device
| | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| |-
| | | width="90%" class="mtx-class-macrohead" | '''ReadTemperatureFloat''' |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Read_Register''' | |
| |-
| |
| | colspan="2" | Reads a byte value from a register on the device
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadTemperatureFloat'''
| |
| |- | | |- |
| | colspan="2" | Reads the temperature as a floating point value in °C. Resultion sets the return bit value and conversion time. Calls the ReadTemperatureRaw function and then converts to a meaningful value. | | | colspan="2" | Reads the temperature as a floating point value in °C. Resultion sets the return bit value and conversion time. Calls the ReadTemperatureRaw function and then converts to a meaningful value. |
| Line 779: |
Line 198: |
|
| |
|
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | ===Reset=== |
| | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Altitude''' | | | width="90%" class="mtx-class-macrohead" | '''Reset''' |
| |- | | |- |
| | colspan="2" | Calculates the altitude based on difference between actual pressure and the pressure at the sea level P0=1013.25 hPa. | | | colspan="2" | Resets the device |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-f32-icon.png]] - FLOAT
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
| | |
| | |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Forced_Read'''
| |
| |-
| |
| | colspan="2" |
| |
| |- | | |- |
| |- | | |- |
| Line 803: |
Line 210: |
| | width="90%" style="border-top: 2px solid #000;" | ''Return'' | | | width="90%" style="border-top: 2px solid #000;" | ''Return'' |
| |} | | |} |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''I2C_Write_Register'''
| |
| |-
| |
| | colspan="2" | Writes a byte value to a register on the device
| |
| |-
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Address
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" | Value
| |
| |-
| |
| | colspan="2" |
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;"
| |
| |-
| |
| | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
| |
| |-
| |
| | colspan="2" | Starts up the I2C bus and initialises the pressure sensor ready for use. Returns 1 for a sucessful startup. Returns 0 for a failed startup or no device detected.
| |
| |-
| |
| |-
| |
| | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| |
| | width="90%" style="border-top: 2px solid #000;" | ''Return''
| |
| |}
| |
|
| |
|
| |
|
| |
|
|
| |
|
| ==Property reference== | | ==Property reference== |
|
| |
|
| {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | | {| class="mtx-class-macrotable wikitable" |
| |- | | |- |
| | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] |
| | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | | width="90%" class="mtx-class-macrohead" | '''Properties''' |
| |- | | |- |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | I2C Properties | | | width="90%" class="mtx-class-propfolder" | I2C Properties |
| |- | | |- |
| |- | | |- |
| Line 890: |
Line 259: |
| | colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications. | | | colspan="2" | On older microcontroller devices there is a potential for the I2C hardware channel to lock up if there is not a 10ms delay between an I2C stop event and the next I2C start event. Most modern microcontrollers will not have a problem so this property can be disabled to speed up the I2C communications. |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Sensor Properties | | | width="90%" class="mtx-class-propfolder" | Sensor Properties |
| |- | | |- |
| |- | | |- |
| Line 929: |
Line 298: |
| | colspan="2" | | | | colspan="2" | |
| |- | | |- |
| | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] |
| | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation | | | width="90%" class="mtx-class-propfolder" | Simulation |
| |- | | |- |
| |- | | |- |