PHX3 uploading to EPMS devices
Changed "SEL_2440 (MVG)" to "SEL_2440_MVG" so device can load onto Arduino. Uploaded existing EPMS code to PHX3 EPMS Arduinos. Changes to run status bit of UMAS CRAH. Modified a few PHX3 VFD ACH580 registers from HR to HR_10x.
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
*/
|
||||
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)
|
||||
@@ -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, 39, 72, "Local Leaving Temp Setpoint"},
|
||||
|
||||
{HR_10x, 49, 0, "Sys 2 Condenser Temp"},
|
||||
{HR_10x, 140, 0, "Sys 1 Fan KW"},
|
||||
|
||||
@@ -119,29 +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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function is used to update the Control Mode (feedback),
|
||||
* based on the selected BMS Control Source and BMS Enable Source.
|
||||
*
|
||||
* This is a function used in the update() of the Standby, Running, and Fail States.
|
||||
*
|
||||
*/
|
||||
void checkHB(Equipment<ModbusIP>* equipment){
|
||||
Modbus_Point<ModbusIP>* PLC_Heartbeat = equipment -> getModbus_Point ("PLC Heartbeat");
|
||||
int BMS_Control_Source = BMS_Control_Source_Pt ? BMS_Control_Source_Pt->getValue() : 0;
|
||||
int BMS_Enable_Source = BMS_Enable_Source_Pt ? BMS_Enable_Source_Pt->getValue() : 0;
|
||||
int Control_Mode_Selected = Control_Mode_Pt ? Control_Mode_Pt->getValue() : -1;
|
||||
|
||||
if (BMS_Control_Source == 0 && BMS_Enable_Source == 2) {
|
||||
Control_Mode_Selected = 0;
|
||||
} else if (BMS_Control_Source == 1 && BMS_Enable_Source == 2) {
|
||||
Control_Mode_Selected = 1;
|
||||
} else if (BMS_Enable_Source == 0) {
|
||||
Control_Mode_Selected = 2;
|
||||
}
|
||||
equipment->setModbus_Point("Control Mode Selected", Control_Mode_Selected);
|
||||
|
||||
equipment->setModbus_Point("General Alarm", 0);
|
||||
}
|
||||
@@ -116,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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -176,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -201,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,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);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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"},
|
||||
|
||||
@@ -66,12 +66,12 @@ modbusMap mb_map[] =
|
||||
{HR, 100, 0, "Speed Feedback"}, // 1800 rpm max
|
||||
{HR, 105, 0, "Output Frequency"}, // 60 Hz @100% speed
|
||||
{HR, 106, 0, "Motor Current"}, // 65 FLA
|
||||
{HR, 109, 0, "Motor Torque"}, // % of nominal torque
|
||||
{HR, 110, 0, "DC Voltage"}, // approx 678 VDC @100% speed
|
||||
{HR_10x, 109, 0, "Motor Torque"}, // % of nominal torque
|
||||
{HR_10x, 110, 0, "DC Voltage"}, // approx 678 VDC @100% speed
|
||||
{HR, 112, 0, "Output Voltage"}, // 480 VAC
|
||||
{HR, 116, 0, "Motor Shaft Power"}, // 50 hp ~ 36.77 kW
|
||||
{HR_10x, 116, 0, "Motor Shaft Power"}, // 50 hp ~ 36.77 kW
|
||||
{HR, 118, 0, "Inverter MWh counter"},
|
||||
{HR, 119, 0, "Inverter kWh counter"},
|
||||
{HR_10x, 119, 0, "Inverter kWh counter"},
|
||||
{HR, 510, 0, "Inverter Temperature"}, // RJD: Changed from HR_10x to HR, % of fault limit
|
||||
{HR, 519, 0, "Diagnostic Word"}, // not used in program. Bit 9:Drive Over-Temp Alarm
|
||||
|
||||
@@ -83,10 +83,10 @@ modbusMap mb_map[] =
|
||||
{HR, 4600, 0, "Speed Scaling"}, // ADD: 1800 rpm
|
||||
{HR, 4601, 0, "Frequency Scaling"}, // ADD: 60 Hz
|
||||
{HR, 9905, 0, "Nominal Current"}, // ADD: 65 A
|
||||
{HR, 9906, 0, "Nominal Voltage"}, // ADD: 480 V
|
||||
{HR, 9907, 0, "Nominal Frequency"}, // ADD: 60 Hz
|
||||
{HR_10x, 9906, 0, "Nominal Voltage"}, // ADD: 480 V
|
||||
{HR_10x, 9907, 0, "Nominal Frequency"}, // ADD: 60 Hz
|
||||
{HR, 9908, 0, "Nominal Speed"}, // ADD: 1800 rpm
|
||||
{HR, 9909, 0, "Nominal Power"}, // ADD: 50 hp
|
||||
{HR_10x, 9909, 0, "Nominal Power"}, // ADD: 50 hp
|
||||
|
||||
};
|
||||
//Size of modbus map used in FOR cycles, automatically calculated.
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
* @{
|
||||
*/
|
||||
#include <ModbusIP_ESP8266.h>
|
||||
const char *ssid = "QTS_CDR_Arduino"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *ssid = "ArduinoWifiB"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "123abc456"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(172, 17, 33, 173); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(172, 17, 33, 1); /**< @brief The gateway IP address. */
|
||||
IPAddress local_IP(172, 17, 32, 82); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(172, 17, 32, 1); /**< @brief The gateway IP address. */
|
||||
IPAddress subnet(255, 255, 255, 0); /**< @brief The subnet mask. */
|
||||
|
||||
ModbusIP mb;
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
* @{
|
||||
*/
|
||||
#include <ModbusIP_ESP8266.h>
|
||||
const char *ssid = "wifi_name"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "wifi_password"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(172, 17, 22, 152); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(172, 17, 22, 254); /**< @brief The gateway IP address. */
|
||||
const char *ssid = "ArduinoWifiB"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "123abc456"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(172, 17, 32, 90); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(172, 17, 32, 1); /**< @brief The gateway IP address. */
|
||||
IPAddress subnet(255, 255, 255, 0); /**< @brief The subnet mask. */
|
||||
|
||||
ModbusIP mb;
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
* @{
|
||||
*/
|
||||
#include <ModbusIP_ESP8266.h>
|
||||
const char *ssid = "QTS_CDR_Arduino"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *ssid = "ArduinoWifiB"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "123abc456"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(172, 17, 33, 154); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(172, 17, 33, 1); /**< @brief The gateway IP address. */
|
||||
IPAddress local_IP(172, 17, 32, 102); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(172, 17, 32, 1); /**< @brief The gateway IP address. */
|
||||
IPAddress subnet(255, 255, 255, 0); /**< @brief The subnet mask. */
|
||||
|
||||
ModbusIP mb;
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
* @{
|
||||
*/
|
||||
#include <ModbusIP_ESP8266.h>
|
||||
const char *ssid = "wifi_name"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "wifi_password"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(192, 168, 1, 234); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(192, 168, 1, 1); /**< @brief The gateway IP address. */
|
||||
const char *ssid = "ArduinoWifiB"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "123abc456"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(172, 17, 32, 81); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(172, 17, 32, 1); /**< @brief The gateway IP address. */
|
||||
IPAddress subnet(255, 255, 255, 0); /**< @brief The subnet mask. */
|
||||
|
||||
ModbusIP mb;
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
* @{
|
||||
*/
|
||||
#include <ModbusIP_ESP8266.h>
|
||||
const char *ssid = "wifi_name"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "wifi_password"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(192, 168, 1, 234); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(192, 168, 1, 1); /**< @brief The gateway IP address. */
|
||||
const char *ssid = "ArduinoWifiB"; /**< @brief The SSID of the WiFi network. */
|
||||
const char *password = "123abc456"; /**< @brief The password for the WiFi network. */
|
||||
IPAddress local_IP(172, 17, 32, 88); /**< @brief The static IP address for the device. */
|
||||
IPAddress gateway(172, 17, 32, 1); /**< @brief The gateway IP address. */
|
||||
IPAddress subnet(255, 255, 255, 0); /**< @brief The subnet mask. */
|
||||
|
||||
ModbusIP mb;
|
||||
Reference in New Issue
Block a user