From 4c8425d077d43731c7188273a0b8e93590ceaf82 Mon Sep 17 00:00:00 2001 From: RobertJDavis Date: Fri, 31 Oct 2025 14:20:38 -0700 Subject: [PATCH] changed to 32 bit registers --- src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/README.md | 8 ++-- .../PHX3_VFD_ABB_ACH580_RTU/State_Fail.cpp | 10 ++-- .../PHX3_VFD_ABB_ACH580_RTU/State_Standby.cpp | 10 ++-- src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/config.h | 46 ++++++++----------- src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/main.cpp | 6 +-- 5 files changed, 36 insertions(+), 44 deletions(-) diff --git a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/README.md b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/README.md index 00f7c40..4a7c8ed 100644 --- a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/README.md +++ b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/README.md @@ -1,13 +1,12 @@ # VFD ABB ACH580 RTU ## Brief Introduction -This is based on a 50hp motor, 480V, 65 FLA, 60Hz, 1800 rpm (PHX3 DC1/2) +This is based on a 50hp motor, 480V, 65 FLA, 60Hz, 1800 rpm (PHX3 DC1/2). +Modbus addresses are based on 32-bit registers. ## List of Equipment This configuration has been used for these models: -* **ACH580**: 10-23-2025 -* **Model**: 09-15-23 -* **Model**: 09-15-25 +* **ACH580**: 10-23-2025 (PHX3) ## Hardware Prerequisites @@ -24,7 +23,6 @@ User needs to set the speed command (HR 150) in RPM from the PLC User needs to set the Start command (HR 151) from the PLC It appears these hard IO registers were arbitrarily chosen for the purpose of this Arduino simulation. The registers selected are based on FS Config file from CDR project. Run Status and Fault Status registers were added for simulation. -Currently there is no connection on Speed Feedback, Run Status, or Fault from Arduino to PICS (work in progress). ### Standby State * **Equipment**: Equipment parameters go back to 0 diff --git a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/State_Fail.cpp b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/State_Fail.cpp index c83a880..d6f1ed8 100644 --- a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/State_Fail.cpp +++ b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/State_Fail.cpp @@ -31,17 +31,17 @@ */ template<> FailState::FailState(const std::vector& activeAlarms) { - addStrategy("Output Frequency", new SingleValueStrategy(0.1f, 0.2f, 1000 )); - addStrategy("Output Voltage", new SingleValueStrategy(0.1f, 0.1f, 1000 )); - addStrategy("DC Voltage", new SingleValueStrategy(0.1f, 0.1f, 1000 )); - addStrategy("Output Power", new SingleValueStrategy(0.1f, 0.1f, 1000 )); - addStrategy("Motor Speed Used", new RampStrategy(0.0f, 200.0f, 1000 )); addStrategy("Speed Feedback", new RampStrategy(0.0f, 200.0f, 1000 )); addStrategy("Motor Speed estimated", new RampStrategy(0.0f, 200.0f, 1000 )); addStrategy("Motor Current", new RampStrategy(0.0f, 20.0f, 1000 )); addStrategy("Motor Torque", new RampStrategy(0.0f, 20.0f, 1000 )); addStrategy("Inverter Temperature", new RampStrategy(0.0f, 1.0f, 1000 )); + + addStrategy("Output Frequency", new SingleValueStrategy(0.1f, 0.2f, 1000 )); + addStrategy("Output Voltage", new SingleValueStrategy(0.1f, 0.1f, 1000 )); + addStrategy("DC Voltage", new SingleValueStrategy(0.1f, 0.1f, 1000 )); + addStrategy("Output Power", new SingleValueStrategy(0.1f, 0.1f, 1000 )); } /** diff --git a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/State_Standby.cpp b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/State_Standby.cpp index 66a244f..01629e0 100644 --- a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/State_Standby.cpp +++ b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/State_Standby.cpp @@ -30,17 +30,17 @@ */ template<> StandbyState::StandbyState() { - addStrategy("Output Frequency", new SingleValueStrategy(0.1f, 0.2f, 1000 )); - addStrategy("Output Voltage", new SingleValueStrategy(0.1f, 0.1f, 1000 )); - addStrategy("DC Voltage", new SingleValueStrategy(0.1f, 0.1f, 1000 )); - addStrategy("Output Power", new SingleValueStrategy(0.1f, 0.1f, 1000 )); - addStrategy("Motor Speed Used", new RampStrategy(0.0f, 200.0f, 1000 )); addStrategy("Speed Feedback", new RampStrategy(0.0f, 200.0f, 1000 )); addStrategy("Motor Speed estimated", new RampStrategy(0.0f, 200.0f, 1000 )); addStrategy("Motor Current", new RampStrategy(0.0f, 20.0f, 1000 )); addStrategy("Motor Torque", new RampStrategy(0.0f, 20.0f, 1000 )); addStrategy("Inverter Temperature", new RampStrategy(0.0f, 1.0f, 1000 )); + + addStrategy("Output Frequency", new SingleValueStrategy(0.1f, 0.2f, 1000 )); + addStrategy("Output Voltage", new SingleValueStrategy(0.1f, 0.1f, 1000 )); + addStrategy("DC Voltage", new SingleValueStrategy(0.1f, 0.1f, 1000 )); + addStrategy("Output Power", new SingleValueStrategy(0.1f, 0.1f, 1000 )); } /** diff --git a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/config.h b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/config.h index fc17309..f383d1f 100644 --- a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/config.h +++ b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/config.h @@ -1,12 +1,12 @@ /** * @file config.h - * @brief Main configuration file for the ABB ACH580 (VFD) emulator. + * @brief Main configuration file for the ABB ACH580 VFD (RTU) emulator. * @author Robert J Davis * @date 2025-10-22 * * This file contains important configurations for the Modbus RTU communication * and the specific register map for the emulated device. - * Received these registers from CDR for their ACH580. + * These are 32-bit modbus registers. * Added "Run Status" and "Fault Status" to simulated hard IO points and send feedback to PLC during simulation. */ @@ -56,15 +56,15 @@ */ modbusMap mb_map[] = { - {HR, 100, 0, "Motor Speed Used"}, // RJD: 1800 rpm max - {HR, 101, 0, "Motor Speed estimated"}, // RJD: 1800 rpm max - {HR_10x, 105, 0, "Output Frequency"}, // 60 Hz @100% speed - {HR, 106, 0, "Motor Current"}, // RJD: Changed from HR_10x to HR, 65 FLA - {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"}, // RJD: 480 VAC - {HR, 113, 0, "Output Power"}, //max 372580 // RJD: Changed from HR_10x to HR, 50 hp ~ 36.77 kW - {HR_10x, 119, 0, "Inverter kWh cnt"}, + {HR, 20202, 0, "Motor Speed Used"}, // RJD: 1800 rpm max + {HR, 20204, 0, "Motor Speed estimated"}, // RJD: 1800 rpm max + {HR_10x, 20212, 0, "Output Frequency"}, // 60 Hz @100% speed + {HR, 20214, 0, "Motor Current"}, // RJD: Changed from HR_10x to HR, 65 FLA + {HR_10x, 20220, 0, "Motor Torque"}, // % of nominal torque + {HR_10x, 20222, 0, "DC Voltage"}, // approx 678 VDC @100% speed + {HR, 20226, 0, "Output Voltage"}, // RJD: 480 VAC + {HR, 20228, 0, "Output Power"}, //max 372580 // RJD: Changed from HR_10x to HR, 50 hp ~ 36.77 kW + {HR_10x, 20240, 0, "Inverter kWh cnt"}, {HR, 149, 1800, "Speed Cmd"}, // arbitrary register number - receive signal from PLC (hardwire IO in field); expecting rpm (1800 rpm max) {HR, 151, 0, "Start/Stop"}, // arbitrary register number - receive signal from PLC (hardwire IO in practice) @@ -73,23 +73,17 @@ modbusMap mb_map[] = {HR, 155, 1, "Fault Status"}, // arbitrary register number - 0:faulted, 1:not faulted (simulated hardwire IO). When = 0, will turn off VFD. {HR, 156, 0, "Speed Feedback"}, // arbitrary register number - send signal to PLC (simulated hardwire IO). Will be equal to Motor Speed Used register - {HR, 502, 0, "Hours Run"}, - {HR, 510, 0, "Inverter Temperature"}, // RJD: Changed from HR_10x to HR, % of fault limit - {HR, 521, 0, "HOA Status Word"}, // not used in program + {HR, 21006, 0, "Hours Run"}, + {HR, 21022, 0, "Inverter Temperature"}, // RJD: Changed from HR_10x to HR, % of fault limit + {HR, 21244, 0, "HOA Status Word"}, // not used in program - {HR, 410, 0, "Last Fault"}, // not used in program - {HR, 411, 0, "2nd to last Fault"}, // not used in program - {HR, 412, 0, "3rd to last Fault"}, // not used in program - {HR, 439, 0, "Event Word Param"}, // not used in program + {HR, 20802, 0, "Trip Fault"}, // not used in program + {HR, 20822, 0, "Last Fault"}, // not used in program + {HR, 20824, 0, "2nd to last Fault"}, // not used in program + {HR, 20826, 0, "3rd to last Fault"}, // not used in program - {HR, 610, 0, "Status Word 1"}, // not used in program - {HR, 615, 0, "Status Word 2"}, // not used in program - {HR, 616, 0, "Status Word 3"}, // not used in program - {HR, 617, 0, "Status Word 4"}, // not used in program - {HR, 618, 0, "Status Word 5"}, // not used in program - {HR, 619, 0, "Status Word 6"}, // not used in program - {HR, 620, 0, "Status Word 7"}, // not used in program - {HR, 621, 0, "Status Word 8"}, // not used in program + {HR, 21222, 0, "Main Status"}, // not used in program + {HR, 21232, 0, "Drive Status Word 1"}, // not used in program }; //Size of modbus map used in FOR cycles, automatically calculated. /** diff --git a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/main.cpp b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/main.cpp index 5dbc9f1..a77f9b2 100644 --- a/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/main.cpp +++ b/src/BMS/VFD/PHX3_VFD_ABB_ACH580_RTU/main.cpp @@ -1,11 +1,11 @@ /** * @file main.cpp - * @brief Main execution program for the Daikin Chiller (RTU) Emulator. - * @author Emmanuel Hernandez Cruz + * @brief Main execution program for the ABB ACH580 VFD (RTU) Emulator. + * @author Emmanuel Hernandez Cruz, Robert J Davis * @date 2025-09-02 * * @details This file contains the main execution program for an Arduino-based - * emulator of a Daikin Chiller unit. The program communicates via the + * emulator of a ABB ACH580 VFD unit. The program communicates via the * Modbus RTU protocol over a serial connection. * * The setup() function initializes the following: