Eaton ATS fixed

This commit is contained in:
Emmanuel HC
2025-10-02 09:58:40 -05:00
parent 58a82cf135
commit 415194c81f
4 changed files with 17 additions and 17 deletions

View File

@@ -9,7 +9,7 @@
; https://docs.platformio.org/page/projectconf.html
[platformio]
default_envs = ATS_Woodward_DTSC200A_TCP ; Select here the name of the configuration you want to download
default_envs = ATS_Eaton_ATC900_RPD_TCP ; Select here the name of the configuration you want to download
[env]
upload_port = COM15

View File

@@ -41,10 +41,10 @@ RunningState<ModbusIP>::RunningState() {
addStrategy("Source 1 Volts AB", new SingleValueStrategy(0.0F, 0.0f, 1000));
addStrategy("Source 1 Volts BC", new SingleValueStrategy(0.0F, 0.0f, 1000));
addStrategy("Source 1 Volts AC", new SingleValueStrategy(0.0F, 0.0f, 1000));
addStrategy("Source 1 Volts CA", new SingleValueStrategy(0.0F, 0.0f, 1000));
addStrategy("Source 2 Volts AB", new SingleValueStrategy(480.0F, 2.0f, 1000));
addStrategy("Source 2 Volts BC", new SingleValueStrategy(480.0F, 2.0f, 1000));
addStrategy("Source 2 Volts AC", new SingleValueStrategy(480.0F, 2.0f, 1000));
addStrategy("Source 2 Volts CA", new SingleValueStrategy(480.0F, 2.0f, 1000));
addStrategy("Source 1 Frequency", new SingleValueStrategy(0.0f, 0.0f, 1000));
addStrategy("Source 2 Frequency", new SingleValueStrategy(60.0f, 1.0f, 1000));
@@ -83,9 +83,9 @@ State<ModbusIP>* RunningState<ModbusIP>::update(Equipment<ModbusIP>* equipment)
float load = static_cast<float>(I_load);
float rating = static_cast<float>(I_rating);
float real_load = rating * (load/100.0f);
Strategy_Behavior* ampsA_svs = getStrategy("S2 Amps A");
Strategy_Behavior* ampsB_svs = getStrategy("S2 Amps B");
Strategy_Behavior* ampsC_svs = getStrategy("S2 Amps C");
Strategy_Behavior* ampsA_svs = getStrategy("Amps A");
Strategy_Behavior* ampsB_svs = getStrategy("Amps B");
Strategy_Behavior* ampsC_svs = getStrategy("Amps C");
static_cast<SingleValueStrategy*>(ampsA_svs)->setSetpoint(real_load);
static_cast<SingleValueStrategy*>(ampsB_svs)->setSetpoint(real_load);

View File

@@ -40,10 +40,10 @@ StandbyState<ModbusIP>::StandbyState() {
// You can add initialization code here if needed
addStrategy("Source 1 Volts AB", new SingleValueStrategy(480.0F, 2.0f, 1000));
addStrategy("Source 1 Volts BC", new SingleValueStrategy(480.0F, 2.0f, 1000));
addStrategy("Source 1 Volts AC", new SingleValueStrategy(480.0F, 2.0f, 1000));
addStrategy("Source 1 Volts CA", new SingleValueStrategy(480.0F, 2.0f, 1000));
addStrategy("Source 2 Volts AB", new SingleValueStrategy(0.0F, 0.0f, 1000));
addStrategy("Source 2 Volts BC", new SingleValueStrategy(0.0F, 0.0f, 1000));
addStrategy("Source 2 Volts AC", new SingleValueStrategy(0.0F, 0.0f, 1000));
addStrategy("Source 2 Volts CA", new SingleValueStrategy(0.0F, 0.0f, 1000));
addStrategy("Source 1 Frequency", new SingleValueStrategy(60.0f, 1.0f, 1000));
addStrategy("Source 2 Frequency", new SingleValueStrategy(0.0f, 0.0f, 1000));
@@ -78,9 +78,9 @@ State<ModbusIP>* StandbyState<ModbusIP>::update(Equipment<ModbusIP>* equipment)
float load = static_cast<float>(I_load);
float rating = static_cast<float>(I_rating);
float real_load = rating * (load/100.0f);
Strategy_Behavior* ampsA_svs = getStrategy("S1 Amps A");
Strategy_Behavior* ampsB_svs = getStrategy("S1 Amps B");
Strategy_Behavior* ampsC_svs = getStrategy("S1 Amps C");
Strategy_Behavior* ampsA_svs = getStrategy("Amps A");
Strategy_Behavior* ampsB_svs = getStrategy("Amps B");
Strategy_Behavior* ampsC_svs = getStrategy("Amps C");
static_cast<SingleValueStrategy*>(ampsA_svs)->setSetpoint(real_load);
static_cast<SingleValueStrategy*>(ampsB_svs)->setSetpoint(real_load);

View File

@@ -21,10 +21,10 @@
* @{
*/
#include <ModbusIP_ESP8266.h>
const char *ssid = "QTS_CDR_Arduino"; /**< @brief The SSID of the WiFi network. */
const char *password = "123abc456"; /**< @brief The password for the WiFi network. */
IPAddress local_IP(172, 17, 30, 241); /**< @brief The static IP address for the device. */
IPAddress gateway(172, 17, 30, 1); /**< @brief The gateway IP address. */
const char *ssid = "esrlok_portable"; /**< @brief The SSID of the WiFi network. */
const char *password = "m7g6eNMe?cy8S@z"; /**< @brief The password for the WiFi network. */
IPAddress local_IP(192, 168, 1, 15); /**< @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. */
ModbusIP mb;
@@ -62,8 +62,8 @@ modbusMap mb_map[] =
{
{HR, 9, 0, "ATS_Source"}, //Internal to control from Modscan
{HR, 10, 0, "ATS_Load"}, //Internal Fault code from Modscan
{HR, 11, 0, "ATS_Input"}, //Internal Fault code from Modscan
{HR, 12, 0, "ATS_Fault"}, //Internal Fault code from Modscan
{HR, 11, 0, "ATS_Rating"}, //Internal Fault code from Modscan
{HR, 12, 0, "ATS_Input"}, //Internal Fault code from Modscan
{DI, 999, 0, "Source 1 Available"},
{DI, 1000, 0, "Source 2 Available"},
{DI, 1001, 0, "Source 1 Active"},