This commit is contained in:
Emmanuel HC
2025-10-23 14:10:17 -05:00
parent 8ed8091f1d
commit c6aaf5186e
4 changed files with 58 additions and 9 deletions

View File

@@ -11,7 +11,7 @@
[platformio]
default_envs = UPS_Vertiv_APM2_TCP ; Select here the name of the configuration you want to download
default_envs = PDU_Maverick_Power_TCP ; Select here the name of the configuration you want to download
[env]
upload_port = COM50

View File

@@ -36,7 +36,7 @@
* state, such as a PID controller for the 'CW Valve Position' and totalizers
* for the run-hours of each EC fan.
*/
std::string cbs[] = {"CB0", "CB1", "CB2", "CB3", "CB4", "CB5", "CB6", "CB7", "CB8", };
std::string cbs[] = {"CB0", "CB1", "CB2", "CB3", "CB4", "CB5", "CB6", "CB7", "CB8", "CB9"};
template<>
RunningState<ModbusIP>::RunningState() {

View File

@@ -21,11 +21,11 @@
* @{
*/
#include <ModbusIP_ESP8266.h>
const char *ssid = "wifi_ssid"; /**< @brief The SSID of the WiFi network. */
const char *password = "wifi_password"; /**< @brief The password for the WiFi network. */
IPAddress local_IP(192, 168, 1, 178); /**< @brief The static IP address for the device. */
IPAddress gateway(192, 168, 1, 1); /**< @brief The gateway IP address. */
IPAddress subnet(254, 254, 254, 0); /**< @brief The subnet mask. */
const char *ssid = "QTS_CDR_Arduino"; /**< @brief The SSID of the WiFi network. */
const char *password = "123abc456"; /**< @brief The password for the WiFi network. */
IPAddress local_IP(172, 17, 33, 181); /**< @brief The static IP address for the device. */
IPAddress gateway(172, 17, 33, 1); /**< @brief The gateway IP address. */
IPAddress subnet(255, 255, 255, 0); /**< @brief The subnet mask. */
ModbusIP mb;
#else
@@ -75,6 +75,7 @@ modbusMap mb_map[] = {
{HR, 25, 0, "Px_CB6"},
{HR, 26, 0, "Px_CB7"},
{HR, 27, 0, "Px_CB8"},
{HR, 28, 0, "Px_CB9"},
// System Status
{IR_LONG, 0, 0, "CB0_V1N" },
@@ -507,7 +508,55 @@ modbusMap mb_map[] = {
{IR_LONG, 884, 0, "CB8_TotalKVarExport" },
{IR_LONG, 886, 0, "CB8_LN_Avg" },
{IR_LONG, 888, 0, "CB8_LL_Avg" },
{IR_LONG, 999, 0, "CB8_Status" },
{IR_LONG, 899, 0, "CB8_Status" },
// Circuit Breaker 8 (OB08)
{IR_LONG, 900, 0, "CB9_V1N" },
{IR_LONG, 902, 0, "CB9_V2N" },
{IR_LONG, 904, 0, "CB9_V3N" },
{IR_LONG, 906, 0, "CB9_I1" },
{IR_LONG, 908, 0, "CB9_I2" },
{IR_LONG, 910, 0, "CB9_I3" },
{IR_LONG, 912, 0, "CB9_L1KW" },
{IR_LONG, 914, 0, "CB9_L2KW" },
{IR_LONG, 916, 0, "CB9_L3KW" },
{IR_LONG, 918, 0, "CB9_L1KVar" },
{IR_LONG, 920, 0, "CB9_L2KVar" },
{IR_LONG, 922, 0, "CB9_L3KVar" },
{IR_LONG, 924, 0, "CB9_L1KVA" },
{IR_LONG, 926, 0, "CB9_L2KVA" },
{IR_LONG, 928, 0, "CB9_L3KVA" },
{IR_LONG, 930, 0, "CB9_L1PF" },
{IR_LONG, 932, 0, "CB9_L2PF" },
{IR_LONG, 934, 0, "CB9_L3PF" },
{IR_LONG, 936, 0, "CB9_V1THD" },
{IR_LONG, 938, 0, "CB9_V2THD" },
{IR_LONG, 940, 0, "CB9_V3THD" },
{IR_LONG, 942, 0, "CB9_I1THD" },
{IR_LONG, 944, 0, "CB9_I2THD" },
{IR_LONG, 946, 0, "CB9_I3THD" },
{IR_LONG, 948, 0, "CB9_I1Kfactor" },
{IR_LONG, 950, 0, "CB9_I2Kfactor" },
{IR_LONG, 952, 0, "CB9_I3Kfactor" },
{IR_LONG, 954, 0, "CB9_I1TDD" },
{IR_LONG, 956, 0, "CB9_I2TDD" },
{IR_LONG, 958, 0, "CB9_I3TDD" },
{IR_LONG, 960, 0, "CB9_V12" },
{IR_LONG, 962, 0, "CB9_V23" },
{IR_LONG, 964, 0, "CB9_V31" },
{IR_LONG, 966, 0, "CB9_TotalKW" },
{IR_LONG, 968, 0, "CB9_TotalKVar" },
{IR_LONG, 970, 0, "CB9_TotalKVA" },
{IR_LONG, 972, 0, "CB9_TotalPF" },
{IR_LONG, 974, 0, "CB9_TotalPFLag" },
{IR_LONG, 976, 0, "CB9_TotalPFLead" },
{IR_LONG, 978, 0, "CB9_TotalKWImport" },
{IR_LONG, 980, 0, "CB9_TotalKWExport" },
{IR_LONG, 982, 0, "CB9_TotalKVarImport" },
{IR_LONG, 984, 0, "CB9_TotalKVarExport" },
{IR_LONG, 986, 0, "CB9_LN_Avg" },
{IR_LONG, 988, 0, "CB9_LL_Avg" },
{IR_LONG, 999, 0, "CB9_Status" },
};
//Size of modbus map used in FOR cycles, automatically calculated.

View File

@@ -125,7 +125,7 @@ modbusMap mb_map[] =
{IR, 60, 0, "System Output Power"},
{IR, 61, 0, "System Output Apparent Power"},
{IR, 164, 0, "UPS Loading Status"},
{IR_10x, 175, 0, "DC Bus Voltage"},
{IR, 175, 0, "DC Bus Voltage"},
{IR, 180, 0, "Battery Time Remaining"},
{IR, 183, 0, "UPS Battery Status1"},
{IR, 184, 0, "UPS Battery Status2"},