UPM

The UPM API is a high level sensor library for IoT devices using MRAA. See examples here. Back to index page.
SparkFun sensor images provided under CC BY-NC-SA-3.0.

E50HX Class

Module: e50hx

This module implements support for the Veris E50H2 and E50H5 BACnet Energy Meters.
From the datasheet: The E50H5 BACnet MS/TP DIN Rail Meter with Data Logging combines exceptional performance and easy installation to deliver a cost-effective solution for power monitoring applications. Native serial communication via BACnet MS/TP provides complete accessibility of all measurements to your Building Automation System The data logging capability protects data in the event of a power failure. The E50H5 can be easily installed on standard DIN rail, surface mounted or contained in an optional NEMA 4 enclosure, as needed. The front-panel LCD display makes device installation and setup easy and provides local access to the full set of detailed measurements.
This module was developed using the upm::BACNETMSTP module, based on libbacnet-stack 0.8.3. Both libbacnet 0.8.3 and the upm::BACNETMSTP libraries must be present in order to build this module. This driver was developed on the E50H5. The Trend Log functionality is not currently supported.
The Binary Input Objects are also not supported as these are only used for the Alarm bits which are already available from Analog Input Object 52 as an alarm bitfield incorporating all of the supported alarm indicators.
It was connected using an RS232->RS485 interface. You cannot use the built in MCU TTL UART pins for accessing this device b you must use a full Serial RS232->RS485 or USB-RS485 interface connected via USB.

Item Index

Methods

E50HX

(
  • targetDeviceObjectID
)
Number

E50HX constructor

Parameters:

  • targetDeviceObjectID Number

    the unique Instance ID of the Device Object. This number is used to uniquely identify devices on the BACnet network, and ranges from 1 to 4194302. This is not the device's MAC address, though on some devices, the MAC address may be used as part of this number. On the E50HX , this number is randomly generated per device, and you can see this number (or change it) on the BACnet config screens on the LCD .

Returns:

Number:

writeConfig

(
  • config
)

Write one of several 'magic' numbers to the configuration object (AV1). This is used to clear certain counters, reset the accumulated Energy consumption values, etc. This method will throw on error.

Parameters:

  • config CFG_VALUES_T

    One of the CFG_VALUES_T values

writeSystemType

(
  • systype
)

Set the System Type of the device. This defines the voltage lines you have connected. This method will throw on error.

Parameters:

  • systype SYSTEM_TYPES_T

    One of the SYSTEM_TYPES_T values.

writeCTRatioPrimary

(
  • ctRatio
)

Set the Primary CT ratio. See the datasheet for details. This method will throw on error.

Parameters:

  • ctRatio Number

    A floating point value between 5-32000

writeCTRatioSecondary

(
  • ctRatio
)

Set the Secondary CT ratio. See the datasheet for details. This method will throw on error.

Parameters:

  • ctRatio CT_SECONDARY_T

    One of the CT_SECONDARY_T values.

writePTRatio

(
  • ptRatio
)

Set the PT ratio. See the datasheet for details. This method will throw on error.

Parameters:

  • ptRatio Number

    A floating point value between 0.01-320.0

writeSystemVoltage

(
  • sysVolts
)

Set the System Voltage parmeter. See the datasheet for details. This method will throw on error.

Parameters:

  • sysVolts Number

    A floating point value between 82.0-32000.0

writeDisplayUnits

(
  • dispUnits
)

Set the LCD Display Units in IEC or IEEE format. This method will throw on error.

Parameters:

  • dispUnits DISP_UNITS_T

    One of the DISP_UNITS_T values.

writePhaseLossVT

(
  • phaseLoss
)

Set the Phase Loss Voltage Threshold. See the datasheet for details. This method will throw on error.

Parameters:

  • phaseLoss Number

    A floating point value between 1.0-99.0

writePhaseLossIT

(
  • phaseLoss
)

Set the Phase Loss Imbalance Threshold. See the datasheet for details. This method will throw on error.

Parameters:

  • phaseLoss Number

    A floating point value between 1.0-99.0

getAlarmBits

() Number

Query the AI52 Object and return a bitmask of current Alarms. Compare against ALARM_BITS_T to determine what conditions are signaling an alarm. Alarm conditions will clear on their own as soon as the cause is rectified. This method will throw on error.

Returns:

Number:

A bitmask of values from ALARM_BITS_T indicating current alarm conditions.

Properties

AV_Config

Enum ANALOG_VALUES_T

AV_System_Type

Enum ANALOG_VALUES_T

AV_CT_Ratio_Primary

Enum ANALOG_VALUES_T

AV_CT_Ratio_Secondary

Enum ANALOG_VALUES_T

AV_PT_Ratio

Enum ANALOG_VALUES_T

AV_System_Voltage

Enum ANALOG_VALUES_T

AV_Display_Units

Enum ANALOG_VALUES_T

AV_Phase_Loss_Voltage_Threshold

Enum ANALOG_VALUES_T

AV_Phase_Loss_Imbalance_Threshold

Enum ANALOG_VALUES_T

AV_Subintervals

Enum ANALOG_VALUES_T

AV_Subinterval_Length

Enum ANALOG_VALUES_T

AI_Energy

Enum ANALOG_INPUTS_T

AI_kW_Total

Enum ANALOG_INPUTS_T

AI_kVAR_Total

Enum ANALOG_INPUTS_T

AI_kVA_Total

Enum ANALOG_INPUTS_T

AI_PF_Total

Enum ANALOG_INPUTS_T

AI_Volts_LL_Avg

Enum ANALOG_INPUTS_T

AI_Volts_LN_Avg

Enum ANALOG_INPUTS_T

AI_Current_Avg

Enum ANALOG_INPUTS_T

AI_kW_A

Enum ANALOG_INPUTS_T

AI_kW_B

Enum ANALOG_INPUTS_T

AI_kW_C

Enum ANALOG_INPUTS_T

AI_PF_A

Enum ANALOG_INPUTS_T

AI_PF_B

Enum ANALOG_INPUTS_T

AI_PF_C

Enum ANALOG_INPUTS_T

AI_Volts_AB

Enum ANALOG_INPUTS_T

AI_Volts_BC

Enum ANALOG_INPUTS_T

AI_Volts_AC

Enum ANALOG_INPUTS_T

AI_Volts_AN

Enum ANALOG_INPUTS_T

AI_Volts_BN

Enum ANALOG_INPUTS_T

AI_Volts_CN

Enum ANALOG_INPUTS_T

AI_Current_A

Enum ANALOG_INPUTS_T

AI_Current_B

Enum ANALOG_INPUTS_T

AI_Current_C

Enum ANALOG_INPUTS_T

AI_Frequency

Enum ANALOG_INPUTS_T

AI_kVAh

Enum ANALOG_INPUTS_T

AI_kVARh

Enum ANALOG_INPUTS_T

AI_kVA_A

Enum ANALOG_INPUTS_T

AI_kVA_B

Enum ANALOG_INPUTS_T

AI_kVA_C

Enum ANALOG_INPUTS_T

AI_kVAR_A

Enum ANALOG_INPUTS_T

AI_kVAR_B

Enum ANALOG_INPUTS_T

AI_kVAR_C

Enum ANALOG_INPUTS_T

AI_KW_Present_Demand

Enum ANALOG_INPUTS_T

AI_KVAR_Present_Demand

Enum ANALOG_INPUTS_T

AI_KWA_Present_Demand

Enum ANALOG_INPUTS_T

AI_KW_Max_Demand

Enum ANALOG_INPUTS_T

AI_KVAR_Max_Demand

Enum ANALOG_INPUTS_T

AI_KVA_Max_Demand

Enum ANALOG_INPUTS_T

AI_Pulse_Count_1

Enum ANALOG_INPUTS_T

AI_Pulse_Count_2

Enum ANALOG_INPUTS_T

AI_KWH_A

Enum ANALOG_INPUTS_T

AI_KWH_B

Enum ANALOG_INPUTS_T

AI_KWH_C

Enum ANALOG_INPUTS_T

AI_Max_Power

Enum ANALOG_INPUTS_T

AI_Energy_Resets

Enum ANALOG_INPUTS_T

AI_Power_Up_Count

Enum ANALOG_INPUTS_T

AI_Output_Config

Enum ANALOG_INPUTS_T

AI_Alarm_Bitmap

Enum ANALOG_INPUTS_T

ALARM_Volts_Error_A

Enum ALARM_BITS_T

ALARM_Volts_Error_B

Enum ALARM_BITS_T

ALARM_Volts_Error_C

Enum ALARM_BITS_T

ALARM_Current_Error_A

Enum ALARM_BITS_T

ALARM_Current_Error_B

Enum ALARM_BITS_T

ALARM_Current_Error_C

Enum ALARM_BITS_T

ALARM_Frequency_Error

Enum ALARM_BITS_T

ALARM_Reserved_0

Enum ALARM_BITS_T

ALARM_Phase_Loss_A

Enum ALARM_BITS_T

ALARM_Phase_Loss_B

Enum ALARM_BITS_T

ALARM_Phase_Loss_C

Enum ALARM_BITS_T

ALARM_Power_Factor_A

Enum ALARM_BITS_T

ALARM_Power_Factor_B

Enum ALARM_BITS_T

ALARM_Power_Factor_C

Enum ALARM_BITS_T

ALARM_RTC_RESET

Enum ALARM_BITS_T

CFG_CLR_ENERGY_ACCUM

Enum CFG_VALUES_T

CFG_NEW_DSI

Enum CFG_VALUES_T

CFG_RESET_MAX_TO_PRESENT

Enum CFG_VALUES_T

CFG_CLEAR_PULSE_COUNTERS

Enum CFG_VALUES_T

SYSTYPE_SINGLE_PHASE_AN

Enum SYSTEM_TYPES_T

SYSTYPE_SINGLE_PHASE_AB

Enum SYSTEM_TYPES_T

SYSTYPE_SPLIT_PHASE_ABN

Enum SYSTEM_TYPES_T

SYSTYPE_3PHASE_ABC

Enum SYSTEM_TYPES_T

SYSTYPE_3PHASE_ABCN

Enum SYSTEM_TYPES_T

CT_RATIO_SECONDARY_1

Enum CT_SECONDARY_T

CT_RATIO_SECONDARY_3

Enum CT_SECONDARY_T

DISP_UNITS_IEC

Enum DISP_UNITS_T

DISP_UNITS_IEEE

Enum DISP_UNITS_T