diff --git a/platformio.ini b/platformio.ini index baae18e..2cefd69 100644 --- a/platformio.ini +++ b/platformio.ini @@ -9,7 +9,7 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -default_envs = ATS_Woodward_DTSC200A_TCP ; Select here the name of the configuration you want to download +default_envs = ATS_Eaton_ATC900_RPD_TCP ; Select here the name of the configuration you want to download [env] upload_port = COM15 diff --git a/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/State_Running.cpp b/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/State_Running.cpp index 0def2bb..6b6b207 100644 --- a/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/State_Running.cpp +++ b/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/State_Running.cpp @@ -15,6 +15,7 @@ #include "Strategies/Strategy_PID.h" #include "Strategies/Strategy_Ramp.h" #include "Strategies/Strategy_Totalizer.h" +#include "Strategies/Strategy_SingleValue.h" #include "Equipment/Equipment.h" #include "ModbusPoints/Modbus_Point.h" #include "ModbusPoints/Modbus_FloatDecorator.h" @@ -40,6 +41,7 @@ RunningState::RunningState() { addStrategy("Actual Capacity", new PIDStrategy("Active SP", 1000, "Supply Temp")); addStrategy("Comp1 Percent RLA", new RampStrategy(0.0f, 5.0f, 1000)); addStrategy("Comp2 Percent RLA", new RampStrategy(0.0f, 5.0f, 1000)); + addStrategy("Return Temp", new SingleValueStrategy(85,3.0f, 1000)); } /** @@ -70,7 +72,6 @@ State* RunningState::update(Equipment* equipmen static_cast(PID_Strat)->setLimits(0.0f, highCapacityLimit); float currentSP = 50.0f; // Default value int currentMode = getPointValue(equipment, "Chiller Mode Output"); - // Determine the correct setpoint based on the current operating mode. switch(currentMode){ case 1: @@ -119,6 +120,8 @@ State* RunningState::update(Equipment* equipmen setPointValue(equipment, "Chiller Mode Output", 2.0f); } + float SupplyTemp = getPointValue(equipment, "Supply Temp"); + setPointValue(equipment, "Return Temp", SupplyTemp + 14.0f); setPointValue(equipment, "Active SP", currentSP); // Apply any strategies defined for the standby state @@ -137,6 +140,8 @@ void RunningState::enterState(Equipment* equipment) { Serial.println("Enter Running State..."); // You could also update a Modbus register to show the "standby" state setPointValue(equipment, "Run Enabled", 1); + setPointValue(equipment, "Flow Switch", 1); + } /** diff --git a/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/State_Standby.cpp b/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/State_Standby.cpp index 9c820cc..d6e8c75 100644 --- a/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/State_Standby.cpp +++ b/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/State_Standby.cpp @@ -13,6 +13,7 @@ #include "ModbusPoints/Modbus_FloatDecorator.h" #include "Equipment/Equipment.h" #include "Strategies/Strategy_Ramp.h" +#include "Strategies/Strategy_SingleValue.h" #include #include @@ -33,6 +34,7 @@ template<> StandbyState::StandbyState() { addStrategy("Comp1 Percent RLA", new RampStrategy(0,5,1000)); addStrategy("Comp2 Percent RLA", new RampStrategy(0,5,1000)); + addStrategy("Return Temp", new SingleValueStrategy(85,3.0f, 1000)); } /** @@ -75,6 +77,7 @@ void StandbyState::enterState(Equipment* equipment) { // Logic to run when the equipment enters this state Serial.println("Enter Standby State..."); setPointValue(equipment, "Run Enabled", 0); + setPointValue(equipment, "Flow Switch", 0); } /** diff --git a/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/config.h b/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/config.h index 54a889b..3b31f9c 100644 --- a/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/config.h +++ b/src/BMS/CHILLER/CH_Daikin_AWV026B_RTU/config.h @@ -56,7 +56,9 @@ modbusMap mb_map[] = { {HR, 100, 0, "State Control"}, //Internal to control from Modscan {HR, 101, 0, "Fault Code"}, - {HR_FLOAT, 102, 0, "Supply Temp"}, + {HR_FLOAT, 102, 0, "Supply Temp"}, + {HR_FLOAT, 103, 0, "Return Temp"}, //+14 + {HR_FLOAT, 104, 0, "Flow Switch"}, {HR, 0, 0, "Chiller Local-Network"}, {HR, 1, 0, "Chiller Enable Output"}, {HR, 2, 0, "Run Enabled"}, diff --git a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp index 6e5d29d..4fab407 100644 --- a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp +++ b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Running.cpp @@ -41,10 +41,10 @@ RunningState::RunningState() { addStrategy("Source 1 Volts AB", new SingleValueStrategy(0.0F, 0.0f, 1000)); addStrategy("Source 1 Volts BC", new SingleValueStrategy(0.0F, 0.0f, 1000)); - addStrategy("Source 1 Volts AC", new SingleValueStrategy(0.0F, 0.0f, 1000)); + addStrategy("Source 2 Volts CA", new SingleValueStrategy(0.0F, 0.0f, 1000)); addStrategy("Source 2 Volts AB", new SingleValueStrategy(480.0F, 2.0f, 1000)); addStrategy("Source 2 Volts BC", new SingleValueStrategy(480.0F, 2.0f, 1000)); - addStrategy("Source 2 Volts AC", new SingleValueStrategy(480.0F, 2.0f, 1000)); + addStrategy("Source 2 Volts CA", new SingleValueStrategy(480.0F, 2.0f, 1000)); addStrategy("Source 1 Frequency", new SingleValueStrategy(0.0f, 0.0f, 1000)); addStrategy("Source 2 Frequency", new SingleValueStrategy(60.0f, 1.0f, 1000)); @@ -83,9 +83,9 @@ State* RunningState::update(Equipment* equipment) float load = static_cast(I_load); float rating = static_cast(I_rating); float real_load = rating * (load/100.0f); - Strategy_Behavior* ampsA_svs = getStrategy("S2 Amps A"); - Strategy_Behavior* ampsB_svs = getStrategy("S2 Amps B"); - Strategy_Behavior* ampsC_svs = getStrategy("S2 Amps C"); + Strategy_Behavior* ampsA_svs = getStrategy("Amps A"); + Strategy_Behavior* ampsB_svs = getStrategy("Amps B"); + Strategy_Behavior* ampsC_svs = getStrategy("Amps C"); static_cast(ampsA_svs)->setSetpoint(real_load); static_cast(ampsB_svs)->setSetpoint(real_load); diff --git a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp index 4b02da1..be9fef9 100644 --- a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp +++ b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/State_Standby.cpp @@ -40,10 +40,10 @@ StandbyState::StandbyState() { // You can add initialization code here if needed addStrategy("Source 1 Volts AB", new SingleValueStrategy(480.0F, 2.0f, 1000)); addStrategy("Source 1 Volts BC", new SingleValueStrategy(480.0F, 2.0f, 1000)); - addStrategy("Source 1 Volts AC", new SingleValueStrategy(480.0F, 2.0f, 1000)); + addStrategy("Source 1 Volts CA", new SingleValueStrategy(480.0F, 2.0f, 1000)); addStrategy("Source 2 Volts AB", new SingleValueStrategy(0.0F, 0.0f, 1000)); addStrategy("Source 2 Volts BC", new SingleValueStrategy(0.0F, 0.0f, 1000)); - addStrategy("Source 2 Volts AC", new SingleValueStrategy(0.0F, 0.0f, 1000)); + addStrategy("Source 2 Volts CA", new SingleValueStrategy(0.0F, 0.0f, 1000)); addStrategy("Source 1 Frequency", new SingleValueStrategy(60.0f, 1.0f, 1000)); addStrategy("Source 2 Frequency", new SingleValueStrategy(0.0f, 0.0f, 1000)); @@ -78,9 +78,9 @@ State* StandbyState::update(Equipment* equipment) float load = static_cast(I_load); float rating = static_cast(I_rating); float real_load = rating * (load/100.0f); - Strategy_Behavior* ampsA_svs = getStrategy("S1 Amps A"); - Strategy_Behavior* ampsB_svs = getStrategy("S1 Amps B"); - Strategy_Behavior* ampsC_svs = getStrategy("S1 Amps C"); + Strategy_Behavior* ampsA_svs = getStrategy("Amps A"); + Strategy_Behavior* ampsB_svs = getStrategy("Amps B"); + Strategy_Behavior* ampsC_svs = getStrategy("Amps C"); static_cast(ampsA_svs)->setSetpoint(real_load); static_cast(ampsB_svs)->setSetpoint(real_load); diff --git a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h index b75f77b..a54911d 100644 --- a/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h +++ b/src/EPMS/ATS/ATS_Eaton_ATC900_RPD_TCP/config.h @@ -21,10 +21,10 @@ * @{ */ #include - 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, 30, 241); /**< @brief The static IP address for the device. */ - IPAddress gateway(172, 17, 30, 1); /**< @brief The gateway IP address. */ + const char *ssid = "esrlok_portable"; /**< @brief The SSID of the WiFi network. */ + const char *password = "m7g6eNMe?cy8S@z"; /**< @brief The password for the WiFi network. */ + IPAddress local_IP(192, 168, 1, 15); /**< @brief The static IP address for the device. */ + IPAddress gateway(192, 168, 1, 1); /**< @brief The gateway IP address. */ IPAddress subnet(255, 255, 255, 0); /**< @brief The subnet mask. */ ModbusIP mb; @@ -62,8 +62,8 @@ modbusMap mb_map[] = { {HR, 9, 0, "ATS_Source"}, //Internal to control from Modscan {HR, 10, 0, "ATS_Load"}, //Internal Fault code from Modscan - {HR, 11, 0, "ATS_Input"}, //Internal Fault code from Modscan - {HR, 12, 0, "ATS_Fault"}, //Internal Fault code from Modscan + {HR, 11, 0, "ATS_Rating"}, //Internal Fault code from Modscan + {HR, 12, 0, "ATS_Input"}, //Internal Fault code from Modscan {DI, 999, 0, "Source 1 Available"}, {DI, 1000, 0, "Source 2 Available"}, {DI, 1001, 0, "Source 1 Active"},