local testing adjustments

This commit is contained in:
RobertJDavis
2025-12-10 16:34:29 -06:00
parent 94dbd4c5c0
commit 72feb87603
5 changed files with 71 additions and 72 deletions

View File

@@ -14,7 +14,7 @@
default_envs = CH_York_YVAA_RTU ; Select here the name of the configuration you want to download
[env]
upload_port = COM9
upload_port = COM11
[common_env_options]
framework = arduino

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

@@ -54,10 +54,10 @@
*/
modbusMap mb_map[] =
{
{COIL, 0, 0, "Chiller Start Command"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only. Signal should come from PLC.
{COIL, 0, 1, "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 (assumption)
{COIL, 2, 0, "Sys 2 Alarm"}, // Use in Modscan - Hard IO in SCP, Used for Arduino simulation only --> INDICATION ONLY (assumption)
{COIL, 3, 0, "Sys 1 Fan Fault ON"}, // Use in Modscan - Used for Arduino simulation only --> FAILSTATE (assumption)
{COIL, 3, 1, "Sys 1 Fan Fault ON"}, // Use in Modscan - Used for Arduino simulation only --> FAILSTATE (assumption)
{COIL, 4, 0, "Sys 2 Fan Fault ON"}, // Use in Modscan - Used for Arduino simulation only --> FAILSTATE (assumption)
{COIL, 5, 0, "Free Cooling Mode ON"}, // Use in Modscan - Used for Arduino simulation only
@@ -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, 0, "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"},