EnergyAddonEN100

Description

The EnergyAddonEN100 object represents an Energy Addon EN100 device on the backplane bus and can be used for retrieving measurements through EnergyAddonChannel objects.

› Inherits:BackplaneBusDevice

Properties

channels

This property holds a list of EnergyAddonChannel objects representing the physically connected input channels.

› Type:List<EnergyAddonChannel>
› Signal:channelsChanged()
› Attributes:Readonly

operatingHours

This property holds the operating hours of the Energy Addon EN100 since the last start. This property does not update automatically but has to be polled actively.

› Type:Double
› Default:0
› Signal:operatingHoursChanged()
› Attributes:Writable

supplyVoltage

This property holds the current supply voltage of the Energy Addon EN100 in V. This property does not update automatically but has to be polled actively.

› Type:Double
› Default:0
› Signal:supplyVoltageChanged()
› Attributes:Writable

temperature

This property holds the current temperature measured inside the Energy Addon EN100 in °C. This property does not update automatically but has to be polled actively.

› Type:SignedInteger
› Default:0
› Signal:temperatureChanged()
› Attributes:Writable

Methods

pollChannels()

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

pollEnabledChannels()

This method queries the device for enabled channels causing the corresponding EnergyAddonChannel.enabled properties to be updated.

pollOperatingHours()

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

pollSupplyVoltage()

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

pollTemperature()

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

Signals

channelsDataChanged(SignedInteger index)

This signal is emitted whenever the List.dataChanged() signal is emitted, i.e. the item at index in the channels list itself emitted the dataChanged() signal.

Example

import InCore.Foundation 2.5
import InCore.IO 2.5

Application {

    BackplaneBus {

        EnergyAddonEN100 {
            address: 1
            Polling on supplyVoltage { interval: 5000 }
            Polling on temperature { interval: 5000 }
            Polling on operatingHours { interval: 5000 }

            onSerialNumberChanged: console.log("HUB-EN100 has serial number:", serialNumber)
            onSupplyVoltageChanged: console.log("Supply voltage:", supplyVoltage)
            onTemperatureChanged: console.log("EN100 temperature:", temperature)
            onOperatingHoursChanged: console.log("Operating hours:", operatingHours)

            Polling on channels { interval: 1000 }

            EnergyAddonChannel {
                id: channel1
                index: 1
                onTimestampChanged: console.log("CH1", timestamp, current, frequency)
            }

            EnergyAddonChannel {
                id: channel2
                index: 2
                onTimestampChanged: console.log("CH2", timestamp, current, frequency)
            }
        }
    }
}