From 8b64f22e883ed7c127bcd17f1523d71087c6a7a9 Mon Sep 17 00:00:00 2001 From: Emmanuel HC Date: Fri, 5 Jun 2026 10:17:43 -0500 Subject: [PATCH] t --- platformio.ini | 2 +- .../VFD/VFD_YASKAWA_HV600_RTU_PHXA7/config.h | 4 +- .../State_Standby.cpp | 46 ++++++++-------- .../GEN/GEN_Kohler_KD2500_RTU_PHXA7/config.h | 54 +++++++++---------- .../Harmonic_Guard_RTU_PHXA7/config.h | 4 +- 5 files changed, 56 insertions(+), 54 deletions(-) diff --git a/platformio.ini b/platformio.ini index c45635d..8d7c4c8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -10,7 +10,7 @@ [platformio] -default_envs = CH_York_YVA_RTU_PHXA7 ; Select here the name of the configuration you want to download +default_envs = GEN_Kohler_KD2500_RTU_PHXA7 ; Select here the name of the configuration you want to download [env] upload_port = COM15 diff --git a/src/BMS/VFD/VFD_YASKAWA_HV600_RTU_PHXA7/config.h b/src/BMS/VFD/VFD_YASKAWA_HV600_RTU_PHXA7/config.h index d4a8a16..a346906 100644 --- a/src/BMS/VFD/VFD_YASKAWA_HV600_RTU_PHXA7/config.h +++ b/src/BMS/VFD/VFD_YASKAWA_HV600_RTU_PHXA7/config.h @@ -40,7 +40,7 @@ const int RX_PIN = 17; /**< @brief The GPIO pin used for receiving data (RX). */ const int TX_PIN = 16; /**< @brief The GPIO pin used for transmitting data (TX). */ const int RST_PIN = 4; /**< @brief The GPIO pin connected to the RS485 driver's DE/RE pins for direction control. */ - const int MODBUS_ID = 106; /**< @brief The unique slave ID for this device on the Modbus bus. */ + const int MODBUS_ID = 111; /**< @brief The unique slave ID for this device on the Modbus bus. */ /** @} */ /** @brief Global instance of the Modbus RTU server. */ @@ -62,6 +62,8 @@ modbusMap mb_map[] = {HR_LONG, 91, 0, "Sts_Energy"}, {HR, 0, 0, "Cmd_Reset"}, {HR, 31, 0, "Alm_NotAuto"}, + {HR, 34691, 0, "VFD_Bypass"}, + }; //Size of modbus map used in FOR cycles, automatically calculated. diff --git a/src/EPMS/GEN/GEN_Kohler_KD2500_RTU_PHXA7/State_Standby.cpp b/src/EPMS/GEN/GEN_Kohler_KD2500_RTU_PHXA7/State_Standby.cpp index baccaa5..9240a29 100644 --- a/src/EPMS/GEN/GEN_Kohler_KD2500_RTU_PHXA7/State_Standby.cpp +++ b/src/EPMS/GEN/GEN_Kohler_KD2500_RTU_PHXA7/State_Standby.cpp @@ -31,29 +31,29 @@ */ template<> StandbyState::StandbyState() { - addStrategy("Avg_Current", new SingleValueStrategy(15000.0f, 500.0f, 1000)); - addStrategy("Batt_V", new SingleValueStrategy(400.0f, 50.0f, 1000)); - addStrategy("Cooling_Tmp", new SingleValueStrategy(15000.0f, 500.0f, 1000)); - addStrategy("Engine_RPM", new SingleValueStrategy(15000.0f, 500.0f, 1000)); - addStrategy("Freq", new SingleValueStrategy(600.0f, 5.0f, 1000)); - addStrategy("Fuel_Rate", new SingleValueStrategy(15000.0f, 500.0f, 1000)); - addStrategy("kVAR_Total", new SingleValueStrategy(15000.0f, 500.0f, 1000)); - addStrategy("kW_Total", new SingleValueStrategy(15000.0f, 500.0f, 1000)); - addStrategy("Manifold_Tmp", new SingleValueStrategy(1750.0f, 50.0f, 1000)); - addStrategy("Oil_Pres", new SingleValueStrategy(1800.0f, 50.0f, 1000)); - addStrategy("Oil_Tmp", new SingleValueStrategy(2300.0f, 50.0f, 1000)); - addStrategy("PF_Total", new SingleValueStrategy(950.0f, 40.0f, 1000)); - addStrategy("VoltageA", new SingleValueStrategy(2400.0f, 50.0f, 1000)); - addStrategy("VoltageB", new SingleValueStrategy(2400.0f, 50.0f, 1000)); - addStrategy("VoltageC", new SingleValueStrategy(2400.0f, 50.0f, 1000)); - addStrategy("Fuel_Percent", new SingleValueStrategy(500.0f, 500.0f, 1000)); - addStrategy("CurrentA", new SingleValueStrategy(1500.0f, 50.0f, 1000)); - addStrategy("CurrentB", new SingleValueStrategy(1500.0f, 50.0f, 1000)); - addStrategy("CurrentC", new SingleValueStrategy(1500.0f, 50.0f, 1000)); - addStrategy("Fuel_Usage", new SingleValueStrategy(800.0f, 50.0f, 1000)); - addStrategy("VoltageAB", new SingleValueStrategy(480.0f, 50.0f, 1000)); - addStrategy("VoltageBC", new SingleValueStrategy(480.0f, 50.0f, 1000)); - addStrategy("VoltageCA", new SingleValueStrategy(480.0f, 50.0f, 1000)); + addStrategy("Avg_Current", new SingleValueStrategy(3750.0f, 5.0f, 1000)); + addStrategy("Batt_V", new SingleValueStrategy(14.0f, 0.5f, 1000)); + addStrategy("Cooling_Tmp", new SingleValueStrategy(90.0f, 3.0f, 1000)); + addStrategy("Engine_RPM", new SingleValueStrategy(1800.0f, 5.0f, 1000)); + addStrategy("Freq", new SingleValueStrategy(60.0f, 1.0f, 1000)); + addStrategy("Fuel_Rate", new SingleValueStrategy(85.0f, 5.0f, 1000)); + addStrategy("kVAR_Total", new SingleValueStrategy(1875.0f, 5.0f, 1000)); + addStrategy("kW_Total", new SingleValueStrategy(2500.0f, 5.0f, 1000)); + addStrategy("Manifold_Tmp", new SingleValueStrategy(70.0f, 5.0f, 1000)); + addStrategy("Oil_Pres", new SingleValueStrategy(50.0f, 5.0f, 1000)); + addStrategy("Oil_Tmp", new SingleValueStrategy(100.0f, 5.0f, 1000)); + addStrategy("PF_Total", new SingleValueStrategy(0.9f, 0.1f, 1000)); + addStrategy("VoltageA", new SingleValueStrategy(240.0f, 2.0f, 1000)); + addStrategy("VoltageB", new SingleValueStrategy(240.0f, 2.0f, 1000)); + addStrategy("VoltageC", new SingleValueStrategy(240.0f, 2.0f, 1000)); + addStrategy("Fuel_Percent", new SingleValueStrategy(75.0f, 2.0f, 1000)); + addStrategy("CurrentA", new SingleValueStrategy(3750.0f, 5.0f, 1000)); + addStrategy("CurrentB", new SingleValueStrategy(3750.0f, 5.0f, 1000)); + addStrategy("CurrentC", new SingleValueStrategy(3750.0f, 5.0f, 1000)); + addStrategy("Fuel_Usage", new SingleValueStrategy(70.0f, 5.0f, 1000)); + addStrategy("VoltageAB", new SingleValueStrategy(480.0f, 5.0f, 1000)); + addStrategy("VoltageBC", new SingleValueStrategy(480.0f, 5.0f, 1000)); + addStrategy("VoltageCA", new SingleValueStrategy(480.0f, 5.0f, 1000)); } /** diff --git a/src/EPMS/GEN/GEN_Kohler_KD2500_RTU_PHXA7/config.h b/src/EPMS/GEN/GEN_Kohler_KD2500_RTU_PHXA7/config.h index 103eef5..e5450a2 100644 --- a/src/EPMS/GEN/GEN_Kohler_KD2500_RTU_PHXA7/config.h +++ b/src/EPMS/GEN/GEN_Kohler_KD2500_RTU_PHXA7/config.h @@ -55,26 +55,26 @@ modbusMap mb_map[] = { {COIL, 23, 0, "Alm_GenFault"}, - {HR_LONG, 668, 0, "Avg_Current"}, - {HR_LONG, 672, 0, "Batt_V"}, - {HR_LONG, 260, 0, "Cooling_Tmp"}, - {HR_LONG, 256, 0, "Engine_RPM"}, - {HR_LONG, 20, 0, "Freq"}, - {HR_LONG, 254, 0, "Fuel_Rate"}, - {HR_LONG, 656, 0, "kVAR_Total"}, - {HR_LONG, 654, 0, "kW_Total"}, - {HR_LONG, 262, 0, "Manifold_Tmp"}, - {HR_LONG, 278, 0, "Oil_Pres"}, - {HR_LONG, 258, 0, "Oil_Tmp"}, - {HR_LONG, 658, 0, "PF_Total"}, - {HR_LONG, 6, 0, "VoltageA"}, - {HR_LONG, 8, 0, "VoltageB"}, - {HR_LONG, 10, 0, "VoltageC"}, + {HR_FLOAT, 668, 0, "Avg_Current"}, + {HR_FLOAT, 672, 0, "Batt_V"}, + {HR_FLOAT, 260, 0, "Cooling_Tmp"}, + {HR_FLOAT, 256, 0, "Engine_RPM"}, + {HR_FLOAT, 20, 0, "Freq"}, + {HR_FLOAT, 254, 0, "Fuel_Rate"}, + {HR_FLOAT, 656, 0, "kVAR_Total"}, + {HR_FLOAT, 654, 0, "kW_Total"}, + {HR_FLOAT, 262, 0, "Manifold_Tmp"}, + {HR_FLOAT, 278, 0, "Oil_Pres"}, + {HR_FLOAT, 258, 0, "Oil_Tmp"}, + {HR_FLOAT, 658, 0, "PF_Total"}, + {HR_FLOAT, 6, 0, "VoltageA"}, + {HR_FLOAT, 8, 0, "VoltageB"}, + {HR_FLOAT, 10, 0, "VoltageC"}, {COIL, 29, 0, "Breaker_Sts"}, {COIL, 30, 0, "Tripped"}, - {HR_LONG, 284, 0, "Fuel_Percent"}, + {HR_FLOAT, 284, 0, "Fuel_Percent"}, {HR, 999, 0, "Engine_Starts"}, - {HR_LONG, 266, 0, "Run_Hrs"}, + {HR_FLOAT, 266, 0, "Run_Hrs"}, {COIL, 218, 0, "Run_Status"}, {COIL, 222, 0, "Charger_AC_Failure"}, {COIL, 12, 0, "Emergency_Stop"}, @@ -111,15 +111,15 @@ modbusMap mb_map[] = {COIL, 267, 0, "Under_Voltage_5"}, {COIL, 268, 0, "Under_Voltage_6"}, {COIL, 209, 0, "Low_Cooling_Tmp"}, - {HR_LONG, 13, 0, "CurrentA"}, - {HR_LONG, 15, 0, "CurrentB"}, - {HR_LONG, 17, 0, "CurrentC"}, - {HR_LONG, 283, 0, "Fuel_Usage"}, - {HR_LONG, 1, 0, "VoltageAB"}, - {HR_LONG, 3, 0, "VoltageBC"}, - {HR_LONG, 5, 0, "VoltageCA"}, - {COIL, 246, 0, "ECU_CommLoss"}, - {HR_LONG, 671, 0, "Controller_Hours"}, + {HR_FLOAT, 12, 0, "CurrentA"}, + {HR_FLOAT, 14, 0, "CurrentB"}, + {HR_FLOAT, 16, 0, "CurrentC"}, + {HR_FLOAT, 282, 0, "Fuel_Usage"}, + {HR_FLOAT, 0, 0, "VoltageAB"}, + {HR_FLOAT, 2, 0, "VoltageBC"}, + {HR_FLOAT, 4, 0, "VoltageCA"}, + {COIL, 1246, 0, "ECU_CommLoss"}, + {HR_FLOAT, 671, 0, "Controller_Hours"}, {COIL, 13, 0, "E_Stop"}, {COIL, 269, 0, "OV_Warning_1"}, {COIL, 270, 0, "OV_Warning_2"}, @@ -146,7 +146,7 @@ modbusMap mb_map[] = {COIL, 250, 0, "RevVAR_Shutdown"}, {COIL, 317, 0, "Sys_NotReady"}, {COIL, 240, 0, "Week_Battery"}, - + {HR_FLOAT, 670, 0, "Controller_Hours"}, }; //Size of modbus map used in FOR cycles, automatically calculated. diff --git a/src/EPMS/Harmonic_Filter/Harmonic_Guard_RTU_PHXA7/config.h b/src/EPMS/Harmonic_Filter/Harmonic_Guard_RTU_PHXA7/config.h index b417c8f..86defb5 100644 --- a/src/EPMS/Harmonic_Filter/Harmonic_Guard_RTU_PHXA7/config.h +++ b/src/EPMS/Harmonic_Filter/Harmonic_Guard_RTU_PHXA7/config.h @@ -36,11 +36,11 @@ * @{ */ #include - const int BAUDRATE = 19200; /**< @brief The serial communication speed in bits per second. */ + const int BAUDRATE = 9600; /**< @brief The serial communication speed in bits per second. */ const int RX_PIN = 17; /**< @brief The GPIO pin used for receiving data (RX). */ const int TX_PIN = 16; /**< @brief The GPIO pin used for transmitting data (TX). */ const int RST_PIN = 4; /**< @brief The GPIO pin connected to the RS485 driver's DE/RE pins for direction control. */ - const int MODBUS_ID = 6; /**< @brief The unique slave ID for this device on the Modbus bus. */ + const int MODBUS_ID = 1; /**< @brief The unique slave ID for this device on the Modbus bus. */ /** @} */ /** @brief Global instance of the Modbus RTU server. */