Skip to content

Commit

Permalink
Function update
Browse files Browse the repository at this point in the history
  • Loading branch information
akkoyun committed Mar 18, 2024
1 parent 2740ca8 commit 77ae2b6
Show file tree
Hide file tree
Showing 5 changed files with 1,161 additions and 1,383 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "MAX78630",
"version": "4.10.0",
"version": "4.11.0",
"keywords": "MAX78630, Maxim, Silergy, Energy, Electric, Poly, Phase, Metering, Measure, Active, Reactive, Apparent, Voltage, Current, Power Factor, Cos Fi, Temperature, Fundamental, Harmonic, Defect, Alarm, Min, Max",
"description": "The EnergyBoard is an energy measurement module for poly phase power-monitoring systems. It is designed for real-time monitoring for a variety of typical three-phase configurations in industrial applications. The EnergyBoard provides up to six analog inputs for interfacing to voltage and current sensors. Scaled voltages from the sensors are fed to the single converter front-end using a high-resolution delta-sigma converter. Supported current sensors include current transformers (CTs), Rogowski coils, and resistive shunts.",
"authors":
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=MAX78630
version=4.10.0
version=4.11.0
author=Gunce Akkoyun <[email protected]>
maintainer=Gunce Akkoyun <[email protected]>
sentence=Enables reading polyphase energy-monitor parameters of LVX EnergyBoard.
Expand Down
24 changes: 24 additions & 0 deletions src/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,38 +108,62 @@
#ifndef __MAX78630_Monitor_1_Type__
#define __MAX78630_Monitor_1_Type__ (uint8_t)0x30 // 0x30 = VRMS_R
#endif
#ifndef __MAX78630_Monitor_1_Scale__
#define __MAX78630_Monitor_1_Scale__ __MAX78630_Config_VScale__
#endif

// Monitor 2
#ifndef __MAX78630_Monitor_2_Type__
#define __MAX78630_Monitor_2_Type__ (uint8_t)0x31 // 0x31 = VRMS_S
#endif
#ifndef __MAX78630_Monitor_2_Scale__
#define __MAX78630_Monitor_2_Scale__ __MAX78630_Config_VScale__
#endif

// Monitor 3
#ifndef __MAX78630_Monitor_3_Type__
#define __MAX78630_Monitor_3_Type__ (uint8_t)0x32 // 0x32 = VRMS_T
#endif
#ifndef __MAX78630_Monitor_3_Scale__
#define __MAX78630_Monitor_3_Scale__ __MAX78630_Config_VScale__
#endif

// Monitor 4
#ifndef __MAX78630_Monitor_4_Type__
#define __MAX78630_Monitor_4_Type__ (uint8_t)0x47 // 0x47 = IRMS_R
#endif
#ifndef __MAX78630_Monitor_4_Scale__
#define __MAX78630_Monitor_4_Scale__ __MAX78630_Config_IScale__
#endif

// Monitor 5
#ifndef __MAX78630_Monitor_5_Type__
#define __MAX78630_Monitor_5_Type__ (uint8_t)0x48 // 0x48 = IRMS_S
#endif
#ifndef __MAX78630_Monitor_5_Scale__
#define __MAX78630_Monitor_5_Scale__ __MAX78630_Config_IScale__
#endif

// Monitor 6
#ifndef __MAX78630_Monitor_6_Type__
#define __MAX78630_Monitor_6_Type__ (uint8_t)0x49 // 0x49 = IRMS_T
#endif
#ifndef __MAX78630_Monitor_6_Scale__
#define __MAX78630_Monitor_6_Scale__ __MAX78630_Config_IScale__
#endif

// Monitor 7
#ifndef __MAX78630_Monitor_7_Type__
#define __MAX78630_Monitor_7_Type__ (uint8_t)0x7A // 0x7A = PF_T
#endif
#ifndef __MAX78630_Monitor_7_Scale__
#define __MAX78630_Monitor_7_Scale__ (uint16_t)1
#endif

// Monitor 8
#ifndef __MAX78630_Monitor_8_Type__
#define __MAX78630_Monitor_8_Type__ (uint8_t)0x80 // 0x80 = FREQ
#endif
#ifndef __MAX78630_Monitor_8_Scale__
#define __MAX78630_Monitor_8_Scale__ (uint16_t)1
#endif
14 changes: 11 additions & 3 deletions src/Definitions.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Function Definitions
#define __MAX78630_GET__ (bool)true
#define __MAX78630_SET__ (bool)false
#define __MAX78630_CLEAR__ (uint8_t)0
#define __MAX78630_GET__ (uint8_t)1
#define __MAX78630_SET__ (uint8_t)2

// Phase Type
#define __Phase_R__ (uint8_t)1
Expand All @@ -26,7 +27,14 @@
#define __ReActive_Received__ (uint8_t)14
#define __ReActive_Delivered__ (uint8_t)15
#define __Energy_Reset__ (uint8_t)16
#define __Phase_Compensation__ (uint8_t)16
#define __Phase_Compensation__ (uint8_t)17

// Calibration Type
#define __Voltage__ (uint8_t)1
#define __Current__ (uint8_t)2
#define __Temperature__ (uint8_t)3
#define __Active_Power__ (uint8_t)4
#define __ReActive_Power__ (uint8_t)5

// Limit Type
#define __VRMS_MIN__ (uint8_t)1
Expand Down
Loading

0 comments on commit 77ae2b6

Please sign in to comment.