Merge pull request #47 from emmanuelsrlok/rdavis/York_Chiller_RTU

Rdavis/york chiller rtu
This commit is contained in:
Emmanuel HC
2026-05-21 09:18:13 -05:00
committed by GitHub
4 changed files with 68 additions and 69 deletions

View File

@@ -37,28 +37,28 @@
*/
template<>
FailState<ModbusRTU>::FailState(const std::vector<std::string>& activeFaults) {
addStrategy("Supply Temp", new SingleValueStrategy(80.0f, 1.0f, 1000));
addStrategy("Return Temp", new SingleValueStrategy(80.0f, 1.0f, 1000));
addStrategy("Ambient Temp", new SingleValueStrategy(100.0f, 1.0f, 1000));
addStrategy("Supply Temp", new SingleValueStrategy(80.0f, 1.0f, 10000));
addStrategy("Return Temp", new SingleValueStrategy(80.0f, 1.0f, 10000));
addStrategy("Ambient Temp", new SingleValueStrategy(100.0f, 1.0f, 10000));
addStrategy("System CHW Out", new SingleValueStrategy(80.0f, 1.0f, 1000));
addStrategy("System CHW In", new SingleValueStrategy(80.0f, 1.0f, 1000));
addStrategy("Sys 1 Condenser Temp", new SingleValueStrategy(124.0f, 1.0f, 1000));
addStrategy("Sys 2 Condenser Temp", new SingleValueStrategy(124.0f, 1.0f, 1000));
addStrategy("Sys 1 Oil Pressure", new SingleValueStrategy(420.0f, 1.0f, 1000));
addStrategy("Sys 2 Oil Pressure", new SingleValueStrategy(420.0f, 1.0f, 1000));
addStrategy("Sys 1 Suction Pressure", new SingleValueStrategy(70.0f, 1.0f, 1000));
addStrategy("Sys 2 Suction Pressure", new SingleValueStrategy(70.0f, 1.0f, 1000));
addStrategy("Sys 1 Discharge Pressure", new SingleValueStrategy(70.0f, 1.0f, 1000));
addStrategy("Sys 2 Discharge Pressure", new SingleValueStrategy(70.0f, 1.0f, 1000));
addStrategy("Sys 1 Compressor Pct FLA", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 2 Compressor Pct FLA", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Local Leaving Temp Setpoint", new SingleValueStrategy(70.0f, 0.0f, 1000));
addStrategy("VSD Output Frequency", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 1 Fan KW", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 2 Fan KW", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 1 Compressor KW", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 2 Compressor KW", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("System CHW Out", new SingleValueStrategy(80.0f, 1.0f, 10000));
addStrategy("System CHW In", new SingleValueStrategy(80.0f, 1.0f, 10000));
addStrategy("Sys 1 Condenser Temp", new SingleValueStrategy(124.0f, 1.0f, 10000));
addStrategy("Sys 2 Condenser Temp", new SingleValueStrategy(124.0f, 1.0f, 10000));
addStrategy("Sys 1 Oil Pressure", new SingleValueStrategy(420.0f, 1.0f, 10000));
addStrategy("Sys 2 Oil Pressure", new SingleValueStrategy(420.0f, 1.0f, 10000));
addStrategy("Sys 1 Suction Pressure", new SingleValueStrategy(70.0f, 1.0f, 10000));
addStrategy("Sys 2 Suction Pressure", new SingleValueStrategy(70.0f, 1.0f, 10000));
addStrategy("Sys 1 Discharge Pressure", new SingleValueStrategy(70.0f, 1.0f, 10000));
addStrategy("Sys 2 Discharge Pressure", new SingleValueStrategy(70.0f, 1.0f, 10000));
addStrategy("Sys 1 Compressor Pct FLA", new SingleValueStrategy(0.0f, 0.0f, 10000));
addStrategy("Sys 2 Compressor Pct FLA", new SingleValueStrategy(0.0f, 0.0f, 10000));
addStrategy("Local Leaving Temp Setpoint", new SingleValueStrategy(70.0f, 0.0f, 10000));
addStrategy("VSD Output Frequency", new SingleValueStrategy(0.0f, 0.0f, 10000));
addStrategy("Sys 1 Fan KW", new SingleValueStrategy(0.0f, 0.0f, 10000));
addStrategy("Sys 2 Fan KW", new SingleValueStrategy(0.0f, 0.0f, 10000));
addStrategy("Sys 1 Compressor KW", new SingleValueStrategy(0.0f, 0.0f, 10000));
addStrategy("Sys 2 Compressor KW", new SingleValueStrategy(0.0f, 0.0f, 10000));
}
/**

View File

@@ -41,30 +41,30 @@
*/
template<>
RunningState<ModbusRTU>::RunningState() {
addStrategy("Supply Temp", new RampStrategy(67.0f, 1.0f, 1000));
addStrategy("Return Temp", new SawStrategy(79.0f, 83.0f, 1.0f, 1000));
addStrategy("Ambient Temp", new SingleValueStrategy(100.0f, 1.0f, 1000));
addStrategy("Supply Temp", new RampStrategy(67.0f, 1.0f, 3000));
addStrategy("Return Temp", new SawStrategy(79.0f, 83.0f, 1.0f, 4000));
addStrategy("Ambient Temp", new SingleValueStrategy(100.0f, 1.0f, 5000));
addStrategy("System CHW Out", new RampStrategy(67.0f, 1.0f, 1000));
addStrategy("System CHW In", new RampStrategy(81.0f, 1.0f, 1000));
addStrategy("Sys 1 Condenser Temp", new SingleValueStrategy(125.0f, 5.0f, 1000));
addStrategy("Sys 2 Condenser Temp", new SingleValueStrategy(125.0f, 5.0f, 1000));
addStrategy("Sys 1 Oil Pressure", new SingleValueStrategy(450.0f, 5.0f, 1000));
addStrategy("Sys 2 Oil Pressure", new SingleValueStrategy(450.0f, 5.0f, 1000));
addStrategy("Sys 1 Suction Pressure", new SingleValueStrategy(70.0f, 2.0f, 1000));
addStrategy("Sys 2 Suction Pressure", new SingleValueStrategy(70.0f, 2.0f, 1000));
addStrategy("Sys 1 Discharge Pressure", new SingleValueStrategy(375.0f, 4.0f, 1000));
addStrategy("Sys 2 Discharge Pressure", new SingleValueStrategy(375.0f, 4.0f, 1000));
addStrategy("Sys 1 Compressor Pct FLA", new SingleValueStrategy(93.0f, 2.0f, 1000));
addStrategy("Sys 2 Compressor Pct FLA", new SingleValueStrategy(93.0f, 2.0f, 1000));
addStrategy("Sys 1 Run Hours", new TotalizerStrategy(1000));
addStrategy("Sys 2 Run Hours", new TotalizerStrategy(1000));
addStrategy("Local Leaving Temp Setpoint", new SingleValueStrategy(70.0f, 0.0f, 1000));
addStrategy("VSD Output Frequency", new SingleValueStrategy(59.0f, 1.0f, 1000));
addStrategy("Sys 1 Fan KW", new SingleValueStrategy(35.0f, 2.0f, 1000));
addStrategy("Sys 2 Fan KW", new SingleValueStrategy(23.0f, 2.0f, 1000));
addStrategy("Sys 1 Compressor KW", new SingleValueStrategy(304.0f, 5.0f, 1000));
addStrategy("Sys 2 Compressor KW", new SingleValueStrategy(198.0f, 5.0f, 1000));
addStrategy("System CHW Out", new RampStrategy(67.0f, 1.0f, 3000));
addStrategy("System CHW In", new RampStrategy(81.0f, 1.0f, 4000));
addStrategy("Sys 1 Condenser Temp", new SingleValueStrategy(125.0f, 5.0f, 5000));
addStrategy("Sys 2 Condenser Temp", new SingleValueStrategy(125.0f, 5.0f, 5000));
addStrategy("Sys 1 Oil Pressure", new SingleValueStrategy(450.0f, 5.0f, 5000));
addStrategy("Sys 2 Oil Pressure", new SingleValueStrategy(450.0f, 5.0f, 5000));
addStrategy("Sys 1 Suction Pressure", new SingleValueStrategy(70.0f, 2.0f, 5000));
addStrategy("Sys 2 Suction Pressure", new SingleValueStrategy(70.0f, 2.0f, 5000));
addStrategy("Sys 1 Discharge Pressure", new SingleValueStrategy(375.0f, 4.0f, 5000));
addStrategy("Sys 2 Discharge Pressure", new SingleValueStrategy(375.0f, 4.0f, 5000));
addStrategy("Sys 1 Compressor Pct FLA", new SingleValueStrategy(93.0f, 2.0f, 5000));
addStrategy("Sys 2 Compressor Pct FLA", new SingleValueStrategy(93.0f, 2.0f, 5000));
addStrategy("Sys 1 Run Hours", new TotalizerStrategy(5000));
addStrategy("Sys 2 Run Hours", new TotalizerStrategy(5000));
addStrategy("Local Leaving Temp Setpoint", new SingleValueStrategy(70.0f, 0.0f, 10000));
addStrategy("VSD Output Frequency", new SingleValueStrategy(59.0f, 1.0f, 10000));
addStrategy("Sys 1 Fan KW", new SingleValueStrategy(35.0f, 2.0f, 10000));
addStrategy("Sys 2 Fan KW", new SingleValueStrategy(23.0f, 2.0f, 10000));
addStrategy("Sys 1 Compressor KW", new SingleValueStrategy(304.0f, 5.0f, 10000));
addStrategy("Sys 2 Compressor KW", new SingleValueStrategy(198.0f, 5.0f, 10000));
}
/**

View File

@@ -38,28 +38,27 @@
*/
template<>
StandbyState<ModbusRTU>::StandbyState() {
addStrategy("Supply Temp", new SingleValueStrategy(80.0f, 1.0f, 1000));
addStrategy("Return Temp", new SingleValueStrategy(80.0f, 1.0f, 1000));
addStrategy("Ambient Temp", new SingleValueStrategy(100.0f, 1.0f, 1000));
addStrategy("Supply Temp", new SingleValueStrategy(80.0f, 1.0f, 3000));
addStrategy("Return Temp", new SingleValueStrategy(80.0f, 1.0f, 3000));
addStrategy("Ambient Temp", new SingleValueStrategy(100.0f, 1.0f, 4000));
addStrategy("System CHW Out", new SingleValueStrategy(80.0f, 1.0f, 1000));
addStrategy("System CHW In", new SingleValueStrategy(80.0f, 1.0f, 1000));
addStrategy("Sys 1 Condenser Temp", new SingleValueStrategy(124.0f, 1.0f, 1000));
addStrategy("Sys 2 Condenser Temp", new SingleValueStrategy(124.0f, 1.0f, 1000));
addStrategy("Sys 1 Oil Pressure", new SingleValueStrategy(420.0f, 1.0f, 1000));
addStrategy("Sys 2 Oil Pressure", new SingleValueStrategy(420.0f, 1.0f, 1000));
addStrategy("Sys 1 Suction Pressure", new SingleValueStrategy(70.0f, 1.0f, 1000));
addStrategy("Sys 2 Suction Pressure", new SingleValueStrategy(70.0f, 1.0f, 1000));
addStrategy("Sys 1 Discharge Pressure", new SingleValueStrategy(70.0f, 1.0f, 1000));
addStrategy("Sys 2 Discharge Pressure", new SingleValueStrategy(70.0f, 1.0f, 1000));
addStrategy("Sys 1 Compressor Pct FLA", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 2 Compressor Pct FLA", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Local Leaving Temp Setpoint", new SingleValueStrategy(70.0f, 0.0f, 1000));
addStrategy("VSD Output Frequency", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 1 Fan KW", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 2 Fan KW", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 1 Compressor KW", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Sys 2 Compressor KW", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("System CHW Out", new SingleValueStrategy(80.0f, 1.0f, 3000));
addStrategy("System CHW In", new SingleValueStrategy(80.0f, 1.0f, 3000));
addStrategy("Sys 1 Condenser Temp", new SingleValueStrategy(124.0f, 1.0f, 5000));
addStrategy("Sys 2 Condenser Temp", new SingleValueStrategy(124.0f, 1.0f, 5000));
addStrategy("Sys 1 Oil Pressure", new SingleValueStrategy(420.0f, 1.0f, 5000));
addStrategy("Sys 2 Oil Pressure", new SingleValueStrategy(420.0f, 1.0f, 5000));
addStrategy("Sys 1 Suction Pressure", new SingleValueStrategy(70.0f, 1.0f, 5000));
addStrategy("Sys 2 Suction Pressure", new SingleValueStrategy(70.0f, 1.0f, 5000));
addStrategy("Sys 1 Discharge Pressure", new SingleValueStrategy(70.0f, 1.0f, 5000));
addStrategy("Sys 2 Discharge Pressure", new SingleValueStrategy(70.0f, 1.0f, 5000));
addStrategy("Sys 1 Compressor Pct FLA", new SingleValueStrategy(0.0f, 0.0f, 5000));
addStrategy("Sys 2 Compressor Pct FLA", new SingleValueStrategy(0.0f, 0.0f, 5000));
addStrategy("VSD Output Frequency", new SingleValueStrategy(0.0f, 0.0f, 5000));
addStrategy("Sys 1 Fan KW", new SingleValueStrategy(0.0f, 0.0f, 5000));
addStrategy("Sys 2 Fan KW", new SingleValueStrategy(0.0f, 0.0f, 5000));
addStrategy("Sys 1 Compressor KW", new SingleValueStrategy(0.0f, 0.0f, 5000));
addStrategy("Sys 2 Compressor KW", new SingleValueStrategy(0.0f, 0.0f, 5000));
}

View File

@@ -69,12 +69,12 @@ modbusMap mb_map[] =
{IR, 165, 0, "Free Cooling Valve"},
{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, 1, 60, "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, Used for Arduino simulation only
{HR, 3, 0, "Return Temp"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only
{HR, 4, 70, "System CHW Out"},
{HR, 5, 70, "System CHW In"},
{HR_10x, 4, 700, "System CHW Out"},
{HR_10x, 5, 700, "System CHW In"},
{HR_10x, 7, 0, "Sys 1 Condenser Temp"},
{HR_10x, 9, 0, "Ambient Temp"},
@@ -99,7 +99,7 @@ modbusMap mb_map[] =
{HR, 31, 77, "Sys 2 Operational Code"}, // 77:not running, 78:running, 82:free cooling
{HR, 32, 0, "Sys 2 Fault Code"}, // 56:condenser fan VSD warning
{HR, 39, 72, "Local Leaving Temp Setpoint"},
{HR_10x, 39, 710, "Local Leaving Temp Setpoint"}, // just an assumption
{HR_10x, 49, 0, "Sys 2 Condenser Temp"},
{HR_10x, 140, 0, "Sys 1 Fan KW"},