Jump to content

Component: Current Sensor (ILA260) (Electrical): Difference between revisions

From Flowcode Help
m Text replacement - "width="90%" style="background-color:#D8C9D8; color:#4B008D;"" to "width="90%" class="mtx-class-macrohead""
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder""
Line 244: Line 244:
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections
| width="90%" class="mtx-class-propfolder" | Connections
|-
|-
|-
|-
Line 278: Line 278:
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Settings
| width="90%" class="mtx-class-propfolder" | Settings
|-
|-
|-
|-
Line 317: Line 317:
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Masked Alerts
| width="90%" class="mtx-class-propfolder" | Masked Alerts
|-
|-
|-
|-
Line 336: Line 336:
|-
|-
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
| width="90%" class="mtx-class-propfolder" | Simulation
|-
|-
|-
|-

Revision as of 14:35, 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. 
- 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

Properties
Connections
Channel
Channel selection 
SDA
Pin used for SDA (data signal) 
SCL
Pin used for SCL (clock signal) 
Stop Delay
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.  
Baud Select
Baud rate option selector 
Baud Rate
Baud rate to be used 
Settings
Address A0
 
Address A1
 
Default Mode
Sets the default mode of the sensor on initialise. Can be overridden using the SetMode macro. 
Conversion Time
Sets the default conversion time set during initialise. Can be overridden using the SetConversionTime macro. 
Averaging Count
Sets the number of samples used for each averaging period. Can be overridden using the SetAveragingCount macro. 
Alert Polarity
 
Alert Latch
 
Masked Alerts
Conversion Ready
 
Alert Limit
 
Alert Value
 
Simulation
Scope Traces
Selects if the component pin connections are automatically generated on the data recorder window or not. Yes: Automatically add the component pins to a group on the data recorder which will reflect the sim data during simultion. No: Do not show the pin signals on the data recorder window. 
Console Data
Selects if the console data is automatically generated or not 
API
Specifies the API component on the panel to interact with to provide comms simulation. 

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