changed to 32 bit registers

This commit is contained in:
RobertJDavis
2025-10-31 14:20:38 -07:00
parent 7ff7a3ae12
commit 4c8425d077
5 changed files with 36 additions and 44 deletions

View File

@@ -1,13 +1,12 @@
# VFD ABB ACH580 RTU # VFD ABB ACH580 RTU
## Brief Introduction ## 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 ## List of Equipment
This configuration has been used for these models: This configuration has been used for these models:
* **ACH580**: 10-23-2025 * **ACH580**: 10-23-2025 (PHX3)
* **Model**: 09-15-23
* **Model**: 09-15-25
## Hardware Prerequisites ## 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 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. 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. 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 ### Standby State
* **Equipment**: Equipment parameters go back to 0 * **Equipment**: Equipment parameters go back to 0

View File

@@ -31,17 +31,17 @@
*/ */
template<> template<>
FailState<ModbusRTU>::FailState(const std::vector<std::string>& activeAlarms) { FailState<ModbusRTU>::FailState(const std::vector<std::string>& 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("Motor Speed Used", new RampStrategy(0.0f, 200.0f, 1000 ));
addStrategy("Speed Feedback", 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 Speed estimated", new RampStrategy(0.0f, 200.0f, 1000 ));
addStrategy("Motor Current", new RampStrategy(0.0f, 20.0f, 1000 )); addStrategy("Motor Current", new RampStrategy(0.0f, 20.0f, 1000 ));
addStrategy("Motor Torque", 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("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 ));
} }
/** /**

View File

@@ -30,17 +30,17 @@
*/ */
template<> template<>
StandbyState<ModbusRTU>::StandbyState() { StandbyState<ModbusRTU>::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("Motor Speed Used", new RampStrategy(0.0f, 200.0f, 1000 ));
addStrategy("Speed Feedback", 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 Speed estimated", new RampStrategy(0.0f, 200.0f, 1000 ));
addStrategy("Motor Current", new RampStrategy(0.0f, 20.0f, 1000 )); addStrategy("Motor Current", new RampStrategy(0.0f, 20.0f, 1000 ));
addStrategy("Motor Torque", 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("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 ));
} }
/** /**

View File

@@ -1,12 +1,12 @@
/** /**
* @file config.h * @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 * @author Robert J Davis
* @date 2025-10-22 * @date 2025-10-22
* *
* This file contains important configurations for the Modbus RTU communication * This file contains important configurations for the Modbus RTU communication
* and the specific register map for the emulated device. * 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. * 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[] = modbusMap mb_map[] =
{ {
{HR, 100, 0, "Motor Speed Used"}, // RJD: 1800 rpm max {HR, 20202, 0, "Motor Speed Used"}, // RJD: 1800 rpm max
{HR, 101, 0, "Motor Speed estimated"}, // RJD: 1800 rpm max {HR, 20204, 0, "Motor Speed estimated"}, // RJD: 1800 rpm max
{HR_10x, 105, 0, "Output Frequency"}, // 60 Hz @100% speed {HR_10x, 20212, 0, "Output Frequency"}, // 60 Hz @100% speed
{HR, 106, 0, "Motor Current"}, // RJD: Changed from HR_10x to HR, 65 FLA {HR, 20214, 0, "Motor Current"}, // RJD: Changed from HR_10x to HR, 65 FLA
{HR_10x, 109, 0, "Motor Torque"}, // % of nominal torque {HR_10x, 20220, 0, "Motor Torque"}, // % of nominal torque
{HR_10x, 110, 0, "DC Voltage"}, // approx 678 VDC @100% speed {HR_10x, 20222, 0, "DC Voltage"}, // approx 678 VDC @100% speed
{HR, 112, 0, "Output Voltage"}, // RJD: 480 VAC {HR, 20226, 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, 20228, 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_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, 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) {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, 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, 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, 21006, 0, "Hours Run"},
{HR, 510, 0, "Inverter Temperature"}, // RJD: Changed from HR_10x to HR, % of fault limit {HR, 21022, 0, "Inverter Temperature"}, // RJD: Changed from HR_10x to HR, % of fault limit
{HR, 521, 0, "HOA Status Word"}, // not used in program {HR, 21244, 0, "HOA Status Word"}, // not used in program
{HR, 410, 0, "Last Fault"}, // not used in program {HR, 20802, 0, "Trip Fault"}, // not used in program
{HR, 411, 0, "2nd to last Fault"}, // not used in program {HR, 20822, 0, "Last Fault"}, // not used in program
{HR, 412, 0, "3rd to last Fault"}, // not used in program {HR, 20824, 0, "2nd to last Fault"}, // not used in program
{HR, 439, 0, "Event Word Param"}, // 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, 21222, 0, "Main Status"}, // not used in program
{HR, 615, 0, "Status Word 2"}, // not used in program {HR, 21232, 0, "Drive Status Word 1"}, // 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
}; };
//Size of modbus map used in FOR cycles, automatically calculated. //Size of modbus map used in FOR cycles, automatically calculated.
/** /**

View File

@@ -1,11 +1,11 @@
/** /**
* @file main.cpp * @file main.cpp
* @brief Main execution program for the Daikin Chiller (RTU) Emulator. * @brief Main execution program for the ABB ACH580 VFD (RTU) Emulator.
* @author Emmanuel Hernandez Cruz * @author Emmanuel Hernandez Cruz, Robert J Davis
* @date 2025-09-02 * @date 2025-09-02
* *
* @details This file contains the main execution program for an Arduino-based * @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. * Modbus RTU protocol over a serial connection.
* *
* The setup() function initializes the following: * The setup() function initializes the following: