From 8157deaae7abfe5448de14a3fa9fa1363dd6fe78 Mon Sep 17 00:00:00 2001 From: RobertJDavis Date: Thu, 30 Oct 2025 12:32:28 -0700 Subject: [PATCH] Added General Alarm, VSD Output Freq Added General Alarm, VSD Output Frequency registers. Updated modbus register to actual instead of test registers. --- .../CHILLER/CH_York_YVAA_RTU/StateUtils.cpp | 8 +++ src/BMS/CHILLER/CH_York_YVAA_RTU/config.h | 51 ++++++++++--------- 2 files changed, 36 insertions(+), 23 deletions(-) diff --git a/src/BMS/CHILLER/CH_York_YVAA_RTU/StateUtils.cpp b/src/BMS/CHILLER/CH_York_YVAA_RTU/StateUtils.cpp index 696d09a..f695598 100644 --- a/src/BMS/CHILLER/CH_York_YVAA_RTU/StateUtils.cpp +++ b/src/BMS/CHILLER/CH_York_YVAA_RTU/StateUtils.cpp @@ -41,8 +41,10 @@ void updateAlarms(Equipment* equipment){ Modbus_Point* Sys1FanAlarmCommand = equipment->getModbus_Point("Sys 1 Fan Fault ON"); Modbus_Point* Sys2FanAlarmCommand = equipment->getModbus_Point("Sys 2 Fan Fault ON"); + Modbus_Point* GeneralAlarmCommand = equipment->getModbus_Point("General Alarm ON"); Modbus_Point* Sys1FanAlarm = equipment->getModbus_Point("Sys 1 Fan Fault Alarm"); Modbus_Point* Sys2FanAlarm = equipment->getModbus_Point("Sys 2 Fan Fault Alarm"); + Modbus_Point* GeneralAlarm = equipment->getModbus_Point("General Alarm"); if (Sys1FanAlarmCommand) { Sys1FanAlarm->setValue(Sys1FanAlarmCommand->getValue()); if (Sys1FanAlarmCommand->getValue() == 1){ @@ -57,6 +59,8 @@ void updateAlarms(Equipment* equipment){ } else equipment->setModbus_Point("Sys 2 Fault Code", 0); } + GeneralAlarm->setValue(GeneralAlarmCommand->getValue()); + } /** @@ -74,6 +78,9 @@ void updateFreeCooling(Equipment* equipment){ Modbus_Point* FreeCoolingCommand = equipment->getModbus_Point("Free Cooling Mode ON"); Modbus_Point* FreeCoolingMode = equipment->getModbus_Point("Free Cooling Mode"); Modbus_Point* FreeCoolingValve = equipment->getModbus_Point("Free Cooling Valve"); + FreeCoolingMode->setValue(FreeCoolingCommand->getValue()); + FreeCoolingValve->setValue(FreeCoolingCommand->getValue()); + /** if (FreeCoolingCommand->getValue() == 1) { FreeCoolingMode->setValue(1); FreeCoolingValve->setValue(1); @@ -82,4 +89,5 @@ void updateFreeCooling(Equipment* equipment){ FreeCoolingMode->setValue(0); FreeCoolingValve->setValue(0); } + */ } \ No newline at end of file diff --git a/src/BMS/CHILLER/CH_York_YVAA_RTU/config.h b/src/BMS/CHILLER/CH_York_YVAA_RTU/config.h index fbd900f..16eb93f 100644 --- a/src/BMS/CHILLER/CH_York_YVAA_RTU/config.h +++ b/src/BMS/CHILLER/CH_York_YVAA_RTU/config.h @@ -54,25 +54,30 @@ */ modbusMap mb_map[] = { - {COIL, 0, 0, "Chiller Start Command"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only - {COIL, 1, 0, "Sys 1 Alarm"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only - {COIL, 2, 0, "Sys 2 Alarm"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only - {COIL, 3, 0, "Sys 1 Fan Fault ON"}, // Use in Modscan - Used for Arduino simulation only - {COIL, 4, 0, "Sys 2 Fan Fault ON"}, // Use in Modscan - Used for Arduino simulation only - {COIL, 5, 0, "Free Cooling Mode ON"}, // Use in Modscan - Used for Arduino simulation only + {COIL, 0, 0, "Chiller Start Command"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only. Signal should come from PLC. + {COIL, 1, 0, "Sys 1 Alarm"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only --> INDICATION ONLY + {COIL, 2, 0, "Sys 2 Alarm"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only --> INDICATION ONLY + {COIL, 3, 0, "Sys 1 Fan Fault ON"}, // Use in Modscan - Used for Arduino simulation only --> FAILSTATE + {COIL, 4, 0, "Sys 2 Fan Fault ON"}, // Use in Modscan - Used for Arduino simulation only --> FAILSTATE + {COIL, 5, 0, "Free Cooling Mode ON"}, // Use in Modscan - Used for Arduino simulation only + {COIL, 6, 0, "General Alarm ON"}, // Use in Modscan - Used for Arduino simulation only - {DI, 0, 0, "Sys 1 Fan Fault Alarm"}, - {DI, 1, 0, "Sys 2 Fan Fault Alarm"}, + {DI, 65, 0, "General Alarm"}, // part of Modbus map, but not included in code --> INDICATION ONLY + {DI, 174, 0, "Sys 1 Fan Fault Alarm"}, + {DI, 175, 0, "Sys 2 Fan Fault Alarm"}, - {HR, 0, 0, "Chiller Status"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only - {HR, 1, 0, "Chiller Temp Setpoint"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only - {HR, 2, 0, "Supply Temp"}, // Use in Modscan - Hard IO in SCP (PICS?), Used for Arduino simulation only - {HR, 3, 0, "Return Temp"}, // Use in Modscan - Hard IO in SCP (PICS?), Used for Arduino simulation only + {IR, 130, 0, "Free Cooling Mode"}, + {IR, 165, 0, "Free Cooling Valve"}, - {HR, 4, 70, "System CHW Out"}, - {HR, 5, 70, "System CHW In"}, - {HR, 7, 0, "Sys 1 Condenser Temp"}, - {HR, 9, 0, "Ambient Temp"}, + {HR, 0, 0, "Chiller Status"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only + {HR, 1, 0, "Chiller Temp Setpoint"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only + {HR, 2, 0, "Supply Temp"}, // Use in Modscan - Hard IO in SCP (PICS?), Used for Arduino simulation only + {HR, 3, 0, "Return Temp"}, // Use in Modscan - Hard IO in SCP (PICS?), Used for Arduino simulation only + + {HR, 4, 70, "System CHW Out"}, + {HR, 5, 70, "System CHW In"}, + {HR, 7, 0, "Sys 1 Condenser Temp"}, + {HR, 9, 0, "Ambient Temp"}, {HR, 11, 0, "Sys 1 Oil Pressure"}, {HR, 12, 0, "Sys 1 Suction Pressure"}, @@ -88,6 +93,8 @@ modbusMap mb_map[] = {HR, 24, 0, "Sys 2 Run Hours"}, {HR, 25, 0, "Sys 2 Starts"}, + {HR, 26, 0, "VSD Output Frequency"}, // part of Modbus map, but not included in code + {HR, 29, 77, "Sys 1 Operational Code"}, {HR, 30, 0, "Sys 1 Fault Code"}, {HR, 31, 77, "Sys 2 Operational Code"}, @@ -95,13 +102,11 @@ modbusMap mb_map[] = {HR, 39, 0, "Local Leaving Temp Setpoint"}, - {HR, 40, 0, "Sys 1 Fan KW"}, - {HR, 41, 0, "Sys 1 Compressor KW"}, - {HR, 42, 0, "Sys 2 Fan KW"}, - {HR, 43, 0, "Sys 2 Compressor KW"}, - {HR, 49, 0, "Sys 2 Condenser Temp"}, - {HR, 50, 0, "Free Cooling Mode"}, - {HR, 51, 0, "Free Cooling Valve"}, + {HR, 49, 0, "Sys 2 Condenser Temp"}, + {HR, 140, 0, "Sys 1 Fan KW"}, + {HR, 141, 0, "Sys 1 Compressor KW"}, + {HR, 142, 0, "Sys 2 Fan KW"}, + {HR, 143, 0, "Sys 2 Compressor KW"}, }; //Size of modbus map used in FOR cycles, automatically calculated.