Added Speed Feedback (hard IO)
This commit is contained in:
@@ -37,6 +37,7 @@ FailState<ModbusRTU>::FailState(const std::vector<std::string>& activeAlarms) {
|
|||||||
addStrategy("Output Power", 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("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 ));
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
template<>
|
template<>
|
||||||
RunningState<ModbusRTU>::RunningState() {
|
RunningState<ModbusRTU>::RunningState() {
|
||||||
addStrategy("Motor Speed Used", new RampStrategy(1800.0f, 100.0f, 1000));
|
addStrategy("Motor Speed Used", new RampStrategy(1800.0f, 100.0f, 1000));
|
||||||
|
addStrategy("Speed Feedback", new RampStrategy(1800.0f, 100.0f, 1000));
|
||||||
addStrategy("Motor Speed estimated", new RampStrategy(1800.0f, 100.0f, 1000));
|
addStrategy("Motor Speed estimated", new RampStrategy(1800.0f, 100.0f, 1000));
|
||||||
addStrategy("Motor Current", new RampStrategy(65.0f, 7.0f, 1000));
|
addStrategy("Motor Current", new RampStrategy(65.0f, 7.0f, 1000));
|
||||||
addStrategy("Motor Torque", new RampStrategy(90.0f, 10.0f, 1000));
|
addStrategy("Motor Torque", new RampStrategy(90.0f, 10.0f, 1000));
|
||||||
@@ -100,6 +101,11 @@ State<ModbusRTU>* RunningState<ModbusRTU>::update(Equipment<ModbusRTU>* equipmen
|
|||||||
static_cast<RampStrategy*>(motorSpeedUsed)->setTarget(currentSP);
|
static_cast<RampStrategy*>(motorSpeedUsed)->setTarget(currentSP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Strategy_Behavior* speedFeedback = getStrategy("Speed Feedback");
|
||||||
|
if (speedFeedback) {
|
||||||
|
static_cast<RampStrategy*>(speedFeedback)->setTarget(currentSP);
|
||||||
|
}
|
||||||
|
|
||||||
// To have Motor Speed estimated slightly different - for purposes of differentiating in Ignition
|
// To have Motor Speed estimated slightly different - for purposes of differentiating in Ignition
|
||||||
float rpm_est = currentSP * 0.98f;
|
float rpm_est = currentSP * 0.98f;
|
||||||
Strategy_Behavior* motorSpeedEst = getStrategy("Motor Speed estimated");
|
Strategy_Behavior* motorSpeedEst = getStrategy("Motor Speed estimated");
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ StandbyState<ModbusRTU>::StandbyState() {
|
|||||||
addStrategy("Output Power", 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("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 ));
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ modbusMap mb_map[] =
|
|||||||
{HR, 152, 0, "HOA Command"}, // arbitrary register number - not used in program
|
{HR, 152, 0, "HOA Command"}, // arbitrary register number - not used in program
|
||||||
{HR, 154, 0, "Run Status"}, // arbitrary register number - 0:off, 1:on (simulated hardwire IO) sending feedback to PLC during simulation.
|
{HR, 154, 0, "Run Status"}, // arbitrary register number - 0:off, 1:on (simulated hardwire IO) sending feedback to PLC during simulation.
|
||||||
{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, 502, 0, "Hours Run"},
|
{HR, 502, 0, "Hours Run"},
|
||||||
{HR, 510, 0, "Inverter Temperature"}, // RJD: Changed from HR_10x to HR, % of fault limit
|
{HR, 510, 0, "Inverter Temperature"}, // RJD: Changed from HR_10x to HR, % of fault limit
|
||||||
|
|||||||
Reference in New Issue
Block a user