updates from Schertz site visit
Added 40029, 30100, 40100
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
[platformio]
|
||||
|
||||
|
||||
default_envs = CH_York_YVAA_RTU ; Select here the name of the configuration you want to download
|
||||
default_envs = CRAH_UMAS_TCP ; Select here the name of the configuration you want to download
|
||||
|
||||
[env]
|
||||
upload_port = COM9
|
||||
upload_port = COM11
|
||||
|
||||
[common_env_options]
|
||||
framework = arduino
|
||||
@@ -200,3 +200,10 @@ platform = espressif32
|
||||
board = dfrobot_firebeetle2_esp32e
|
||||
extends = common_env_options
|
||||
build_src_filter = -<*> +<BMS/CHILLER/CH_York_YVAA_RTU>
|
||||
|
||||
[env:CRAH_UMAS_TCP]
|
||||
platform = espressif32
|
||||
board = dfrobot_firebeetle2_esp32e
|
||||
extends = common_env_options
|
||||
build_flags = -D USE_MODBUS_IP
|
||||
build_src_filter = -<*> +<BMS/CRAH/CRAH_UMAS_TCP>
|
||||
@@ -112,7 +112,6 @@ void updateAnalogs(Equipment<ModbusIP>* equipment){
|
||||
else if (equipment->getModbus_Point("RA Temp High Alarm ON")->getValue()==1){
|
||||
equipment->setModbus_Point("Return Air Temp", 104.0f);
|
||||
}
|
||||
else equipment->setModbus_Point("Return Air Temp", 74.0f);
|
||||
|
||||
if (equipment->getModbus_Point("RA Humidity Low Alarm ON")->getValue()==1){
|
||||
equipment->setModbus_Point("Return Air Humidity", 15.0f);
|
||||
@@ -120,5 +119,4 @@ void updateAnalogs(Equipment<ModbusIP>* equipment){
|
||||
else if (equipment->getModbus_Point("RA Humidity High Alarm ON")->getValue()==1){
|
||||
equipment->setModbus_Point("Return Air Humidity", 65.0f);
|
||||
}
|
||||
else equipment->setModbus_Point("Return Air Humidity", 35.0f);
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "Strategies/Strategy_Ramp.h"
|
||||
#include "Strategies/Strategy_SingleValue.h"
|
||||
#include "Strategies/Strategy_PID.h"
|
||||
#include "Strategies/Strategy_Saw.h"
|
||||
#include "States/State_Standby.h"
|
||||
#include "States/State_Running.h"
|
||||
#include "States/State_Fail.h"
|
||||
@@ -39,6 +40,9 @@ FailState<ModbusIP>::FailState(const std::vector<std::string>& activeAlarms) {
|
||||
// Fan speed --> 0, Run Status --> 0, Amps --> 0
|
||||
|
||||
addStrategy("CW Valve Position", new RampStrategy(0.0f, 5.0f, 1000));
|
||||
addStrategy("Supply Air Temp", new SingleValueStrategy(74.0f, 1.0f, 1000));
|
||||
addStrategy("Return Air Temp", new SingleValueStrategy(86.0f, 1.0f, 1000));
|
||||
addStrategy("Return Air Humidity", new SingleValueStrategy(35.0f, 2.0f, 1000));
|
||||
addStrategy("Speed Fan 1", new RampStrategy(0.0f, 10.0f, 1000));
|
||||
addStrategy("Speed Fan 2", new RampStrategy(0.0f, 10.0f, 1000));
|
||||
addStrategy("Speed Fan 3", new RampStrategy(0.0f, 10.0f, 1000));
|
||||
@@ -57,7 +61,7 @@ FailState<ModbusIP>::FailState(const std::vector<std::string>& activeAlarms) {
|
||||
addStrategy("Amps Fan 7", new RampStrategy(0.0f, 4.5f, 1000));
|
||||
addStrategy("Amps Fan 8", new RampStrategy(0.0f, 4.5f, 1000));
|
||||
addStrategy("Amps Fan 9", new RampStrategy(0.0f, 4.5f, 1000));
|
||||
|
||||
addStrategy("CRAH Heartbeat", new SawStrategy(0.0f, 60.0f, 1.0f, 1000));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +116,7 @@ void FailState<ModbusIP>::enterState(Equipment<ModbusIP>* equipment) {
|
||||
for (const auto& desc : motorStatusDescriptions) {
|
||||
Modbus_Point<ModbusIP>* point = equipment->getModbus_Point(desc);
|
||||
if (point) {
|
||||
point->setValue(1);
|
||||
point->setValue(0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -71,11 +71,13 @@ RunningState<ModbusIP>::RunningState() {
|
||||
addStrategy("Operating Hours Fan 7", new TotalizerStrategy(1000));
|
||||
addStrategy("Operating Hours Fan 8", new TotalizerStrategy(1000));
|
||||
addStrategy("Operating Hours Fan 9", new TotalizerStrategy(1000));
|
||||
addStrategy("Supply Air Temp", new SawStrategy(60.0f, 100.0f, 2.0f, 1000)); // Won't initialize at lower bound; always initializes at 0 b/c FLOAT; initialize manually via Modscan
|
||||
addStrategy("Return Air Temp", new SawStrategy(70.0f, 80.0f, 1.0f, 1000));
|
||||
addStrategy("Supply Air Temp", new SawStrategy(60.0f, 100.0f, 2.2f, 1000)); // Won't initialize at lower bound; always initializes at 0 b/c FLOAT; initialize manually via Modscan
|
||||
addStrategy("Return Air Humidity", new SawStrategy(25.0f, 40.0f, 1.1f, 1000));
|
||||
addStrategy("Return Air Temp", new SawStrategy(70.0f, 80.0f, 0.8f, 1000));
|
||||
addStrategy("Filter Differential Pressure", new SawStrategy(0.0f, 5.0f, 0.2f, 1000));
|
||||
addStrategy("CW Valve Position", new PIDStrategy("Supply Air Temp Setpoint", 1000, "Supply Air Temp")); // SAT must be greater than SAT Setpoint for this PID to work.
|
||||
|
||||
addStrategy("CRAH Heartbeat", new SawStrategy(0.0f, 60.0f, 1.0f, 1000));
|
||||
addStrategy("Fan Speed Feedback", new RampStrategy(0.0f, 1.0f, 200));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -141,6 +143,12 @@ State<ModbusIP>* RunningState<ModbusIP>::update(Equipment<ModbusIP>* equipment)
|
||||
}
|
||||
}
|
||||
|
||||
// Fan Speed Feedback dynamically ramp to Fan Speed Setpoint sent to Arduino
|
||||
Strategy_Behavior* speedFeedback = getStrategy("Fan Speed Feedback");
|
||||
if (speedFeedback){
|
||||
static_cast<RampStrategy*>(speedFeedback)->setTarget(BMS_Speed_Setpoint);
|
||||
}
|
||||
|
||||
// Apply any strategies defined for the standby state
|
||||
_applyStrategies(equipment);
|
||||
return nullptr;
|
||||
@@ -168,7 +176,7 @@ void RunningState<ModbusIP>::enterState(Equipment<ModbusIP>* equipment) {
|
||||
for (const auto& desc : motorStatusDescriptions) {
|
||||
Modbus_Point<ModbusIP>* point = equipment->getModbus_Point(desc);
|
||||
if (point) {
|
||||
point->setValue(0);
|
||||
point->setValue(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,7 +201,7 @@ void RunningState<ModbusIP>::exitState(Equipment<ModbusIP>* equipment) {
|
||||
for (const auto& desc : motorStatusDescriptions) {
|
||||
Modbus_Point<ModbusIP>* point = equipment->getModbus_Point(desc);
|
||||
if (point) {
|
||||
point->setValue(1);
|
||||
point->setValue(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -41,8 +41,9 @@ StandbyState<ModbusIP>::StandbyState() {
|
||||
// You can add initialization code here if needed.
|
||||
// These strategies are applied at the end of the update function.
|
||||
addStrategy("CW Valve Position", new RampStrategy(0.0f, 5.0f, 1000));
|
||||
addStrategy("Supply Air Temp", new RampStrategy(74.0f, 1.0f, 1000));
|
||||
addStrategy("Return Air Temp", new RampStrategy(86.0f, 1.0f, 1000));
|
||||
addStrategy("Supply Air Temp", new SingleValueStrategy(74.0f, 1.0f, 1000));
|
||||
addStrategy("Return Air Temp", new SingleValueStrategy(86.0f, 1.0f, 1000));
|
||||
addStrategy("Return Air Humidity", new SingleValueStrategy(35.0f, 2.0f, 1000));
|
||||
addStrategy("Speed Fan 1", new RampStrategy(0.0f, 10.0f, 1000));
|
||||
addStrategy("Speed Fan 2", new RampStrategy(0.0f, 10.0f, 1000));
|
||||
addStrategy("Speed Fan 3", new RampStrategy(0.0f, 10.0f, 1000));
|
||||
@@ -61,7 +62,7 @@ StandbyState<ModbusIP>::StandbyState() {
|
||||
addStrategy("Amps Fan 7", new RampStrategy(0.0f, 4.5f, 1000));
|
||||
addStrategy("Amps Fan 8", new RampStrategy(0.0f, 4.5f, 1000));
|
||||
addStrategy("Amps Fan 9", new RampStrategy(0.0f, 4.5f, 1000));
|
||||
|
||||
addStrategy("CRAH Heartbeat", new SawStrategy(0.0f, 60.0f, 1.0f, 1000));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -125,7 +126,7 @@ void StandbyState<ModbusIP>::enterState(Equipment<ModbusIP>* equipment) {
|
||||
for (const auto& desc : motorStatusDescriptions) {
|
||||
Modbus_Point<ModbusIP>* point = equipment->getModbus_Point(desc);
|
||||
if (point) {
|
||||
point->setValue(1);
|
||||
point->setValue(0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <ModbusIP_ESP8266.h>
|
||||
const char *ssid = "TP-Link_D91A"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "52761492"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(192, 168, 1, 234); /**< @brief The static IP address for the device. */
|
||||
IPAddress local_IP(192, 168, 0, 234); /**< @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. */
|
||||
|
||||
@@ -99,15 +99,15 @@ modbusMap mb_map[] =
|
||||
{IR, 50, 0, "Alarm Fan 7"},
|
||||
{IR, 54, 0, "Alarm Fan 8"},
|
||||
{IR, 58, 0, "Alarm Fan 9"},
|
||||
{IR, 27, 1, "Run Status Fan 1"}, // Send to PLC
|
||||
{IR, 31, 1, "Run Status Fan 2"}, // Send to PLC
|
||||
{IR, 35, 1, "Run Status Fan 3"}, // Send to PLC
|
||||
{IR, 39, 1, "Run Status Fan 4"}, // Send to PLC
|
||||
{IR, 43, 1, "Run Status Fan 5"}, // Send to PLC
|
||||
{IR, 47, 1, "Run Status Fan 6"}, // Send to PLC
|
||||
{IR, 51, 1, "Run Status Fan 7"}, // Send to PLC
|
||||
{IR, 55, 1, "Run Status Fan 8"}, // Send to PLC
|
||||
{IR, 59, 1, "Run Status Fan 9"}, // Send to PLC
|
||||
{IR, 27, 0, "Run Status Fan 1"}, // Send to PLC
|
||||
{IR, 31, 0, "Run Status Fan 2"}, // Send to PLC
|
||||
{IR, 35, 0, "Run Status Fan 3"}, // Send to PLC
|
||||
{IR, 39, 0, "Run Status Fan 4"}, // Send to PLC
|
||||
{IR, 43, 0, "Run Status Fan 5"}, // Send to PLC
|
||||
{IR, 47, 0, "Run Status Fan 6"}, // Send to PLC
|
||||
{IR, 51, 0, "Run Status Fan 7"}, // Send to PLC
|
||||
{IR, 55, 0, "Run Status Fan 8"}, // Send to PLC
|
||||
{IR, 59, 0, "Run Status Fan 9"}, // Send to PLC
|
||||
{IR, 25, 0, "Speed Fan 1"},
|
||||
{IR, 29, 0, "Speed Fan 2"},
|
||||
{IR, 33, 0, "Speed Fan 3"},
|
||||
@@ -136,6 +136,7 @@ modbusMap mb_map[] =
|
||||
{IR_FLOAT, 75, 0, "Amps Fan 7"},
|
||||
{IR_FLOAT, 77, 0, "Amps Fan 8"},
|
||||
{IR_FLOAT, 79, 0, "Amps Fan 9"},
|
||||
{IR_FLOAT, 99, 0, "CRAH Heartbeat"},
|
||||
|
||||
{HR_FLOAT, 13, 0, "Fan Speed Setpoint"}, // Receive signal from PLC
|
||||
{HR_FLOAT, 17, 0, "Supply Air Temp Setpoint"}, // Receive signal from PLC
|
||||
@@ -143,7 +144,8 @@ modbusMap mb_map[] =
|
||||
{HR_FLOAT, 23, 0, "Fan Max Speed"}, // Send to PLC
|
||||
{HR, 25, 0, "BMS Control Source"}, // Receive signal from PLC 0:Speed, 1:Room Temp
|
||||
{HR, 26, 2, "BMS Enable Source"}, // Receive signal from PLC 0:Keypad, 1:DI, 2:BMS
|
||||
{HR, 99, 0, "CRAH Heartbeat"} // Placeholder - we don't have this from UMAS yet. Not used in logic yet.
|
||||
{HR_FLOAT, 28, 0, "Fan Speed Feedback"},
|
||||
{HR_FLOAT, 99, 0, "PLC Heartbeat"}, // This will be seconds from PLC - if doesn't change for 15 seconds set BMS Enable Source to Local (0)
|
||||
|
||||
};
|
||||
//Size of modbus map used in FOR cycles, automatically calculated.
|
||||
|
||||
Reference in New Issue
Block a user