Component: Current Sensor (ILA260) (Electrical): Difference between revisions
Appearance
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;"" to "width="10%" align="center" class="mtx-class-macrohead"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 69: | Line 69: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''CheckAlert''' | ||
|- | |- | ||
| colspan="2" | Checks to see if a conversion is ready or if a limit has been hit. Returns 1 for a conversion ready. | | colspan="2" | Checks to see if a conversion is ready or if a limit has been hit. Returns 1 for a conversion ready. | ||
| Line 83: | Line 83: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Initialise''' | ||
|- | |- | ||
| colspan="2" | Sets up the I2C ready for operation and initialises the sensor with the default settings. Returns 1 if the device is correctly identified. | | colspan="2" | Sets up the I2C ready for operation and initialises the sensor with the default settings. Returns 1 if the device is correctly identified. | ||
| Line 97: | Line 97: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadCurrent''' | ||
|- | |- | ||
| colspan="2" | Reads the current as a floating point value in mA. | | colspan="2" | Reads the current as a floating point value in mA. | ||
| Line 111: | Line 111: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadPower''' | ||
|- | |- | ||
| colspan="2" | Reads the power as a floating point value in mW. | | colspan="2" | Reads the power as a floating point value in mW. | ||
| Line 125: | Line 125: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''ReadVoltage''' | ||
|- | |- | ||
| colspan="2" | Reads the voltage as a floating point value in mV. | | colspan="2" | Reads the voltage as a floating point value in mV. | ||
| Line 139: | Line 139: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetAlertLimit''' | ||
|- | |- | ||
| colspan="2" | Sets the Alert limit in the format required. | | colspan="2" | Sets the Alert limit in the format required. | ||
| Line 163: | Line 163: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetAveragingCount''' | ||
|- | |- | ||
| colspan="2" | Sets the number of samples for each averaged sample. | | colspan="2" | Sets the number of samples for each averaged sample. | ||
| Line 182: | Line 182: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetConversionTime''' | ||
|- | |- | ||
| colspan="2" | Sets the amount of time required for each conversion. | | colspan="2" | Sets the amount of time required for each conversion. | ||
| Line 201: | Line 201: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetMaskedAlerts''' | ||
|- | |- | ||
| colspan="2" | Sets the alert conditions that will be shown on the alert pin | | colspan="2" | Sets the alert conditions that will be shown on the alert pin | ||
| Line 220: | Line 220: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''SetMode''' | ||
|- | |- | ||
| colspan="2" | Sets the mode of the sensor and therefore the amount of power consumed by the sensor. | | colspan="2" | Sets the mode of the sensor and therefore the amount of power consumed by the sensor. | ||
| Line 240: | Line 240: | ||
|- | |- | ||
| width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-macrohead" | '''Properties''' | ||
|- | |- | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
|- | |- | ||
| Line 277: | Line 277: | ||
| colspan="2" | Baud rate to be used | | colspan="2" | Baud rate to be used | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Settings | ||
|- | |- | ||
|- | |- | ||
| Line 316: | Line 316: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Masked Alerts | ||
|- | |- | ||
|- | |- | ||
| Line 335: | Line 335: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" | | width="90%" class="mtx-class-propfolder" | Simulation | ||
|- | |- | ||
|- | |- | ||
Latest revision as of 14:36, 13 July 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | Electrical |
Current Sensor (ILA260) component
The INA260 provides voltage current and power monitoring via a digital I2C interface.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
CheckAlert
| CheckAlert | |
| Checks to see if a conversion is ready or if a limit has been hit. Returns 1 for a conversion ready. | |
| Return | |
Initialise
| Initialise | |
| Sets up the I2C ready for operation and initialises the sensor with the default settings. Returns 1 if the device is correctly identified. | |
| Return | |
ReadCurrent
| ReadCurrent | |
| Reads the current as a floating point value in mA. | |
| Return | |
ReadPower
| ReadPower | |
| Reads the power as a floating point value in mW. | |
| Return | |
ReadVoltage
| ReadVoltage | |
| Reads the voltage as a floating point value in mV. | |
| Return | |
SetAlertLimit
| SetAlertLimit | |
| Sets the Alert limit in the format required. | |
| Limit | |
| Limit in mA, mV or mW | |
| Units | |
| 0=mA, 1=mV, 2=mW | |
| Return | |
SetAveragingCount
| SetAveragingCount | |
| Sets the number of samples for each averaged sample. | |
| Count | |
| Range: 0-7 - 0=1, 1=4, 2=16, 3=64, 4=128, 5=256, 6=512, 7=1024 | |
| Return | |
SetConversionTime
| SetConversionTime | |
| Sets the amount of time required for each conversion. | |
| Time | |
| Range: 0-7 - 0=140uS, 1=204uS, 2=332uS, 3=588uS, 4=1.1mS, 5=2.116ms, 6=4.156mS, 7=8.244mS | |
| Return | |
SetMaskedAlerts
| SetMaskedAlerts | |
| Sets the alert conditions that will be shown on the alert pin | |
| AlertMask | |
| 0=None, bit0=ConversionReady, bit1=OverP, bit2=UnderV, bit3=OverV, bit4=UnderI, bit5=OverI | |
| Return | |
SetMode
| SetMode | |
| Sets the mode of the sensor and therefore the amount of power consumed by the sensor. | |
| Mode | |
| 0=Shutdown, 3=Triggered, 7=Continuous | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Current_and_Power_Sensor_INA260.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Current_and_Power_Sensor_INA260.fcfx