Component: Current Sensor (ILA260) (Electrical)
From Flowcode Help
(Redirected from Component: ID 09d2a023 0199 4c73 a737 14228973ddc5)
Jump to navigationJump to search| Author | Matrix TSL | 
| Version | 1.0 | 
| Category | Electrical | 
Contents
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. | |
|  - BOOL | 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. | |
|  - BOOL | Return | 
ReadCurrent
|   | ReadCurrent | 
| Reads the current as a floating point value in mA. | |
|  - FLOAT | Return | 
ReadPower
|   | ReadPower | 
| Reads the power as a floating point value in mW. | |
|  - FLOAT | Return | 
ReadVoltage
|   | ReadVoltage | 
| Reads the voltage as a floating point value in mV. | |
|  - FLOAT | Return | 
SetAlertLimit
|   | SetAlertLimit | 
| Sets the Alert limit in the format required. | |
|  - FLOAT | Limit | 
| Limit in mA, mV or mW | |
|  - BYTE | Units | 
| 0=mA, 1=mV, 2=mW | |
|  - VOID | Return | 
SetAveragingCount
|   | SetAveragingCount | 
| Sets the number of samples for each averaged sample. | |
|  - BYTE | Count | 
| Range: 0-7 - 0=1, 1=4, 2=16, 3=64, 4=128, 5=256, 6=512, 7=1024 | |
|  - VOID | Return | 
SetConversionTime
|   | SetConversionTime | 
| Sets the amount of time required for each conversion. | |
|  - BYTE | Time | 
| Range: 0-7 - 0=140uS, 1=204uS, 2=332uS, 3=588uS, 4=1.1mS, 5=2.116ms, 6=4.156mS, 7=8.244mS | |
|  - VOID | Return | 
SetMaskedAlerts
|   | SetMaskedAlerts | 
| Sets the alert conditions that will be shown on the alert pin | |
|  - BYTE | AlertMask | 
| 0=None, bit0=ConversionReady, bit1=OverP, bit2=UnderV, bit3=OverV, bit4=UnderI, bit5=OverI | |
|  - VOID | Return | 
SetMode
|   | SetMode | 
| Sets the mode of the sensor and therefore the amount of power consumed by the sensor. | |
|  - BYTE | Mode | 
| 0=Shutdown, 3=Triggered, 7=Continuous | |
|  - VOID | 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







