|
@@ -51,6 +51,8 @@ class Atm_AccelStepper: public Machine {
|
|
Atm_AccelStepper& setPosition( long int position);
|
|
Atm_AccelStepper& setPosition( long int position);
|
|
long int getPosition();
|
|
long int getPosition();
|
|
long int distanceToGo();
|
|
long int distanceToGo();
|
|
|
|
+ bool isRunning();
|
|
|
|
+ float getSpeed();
|
|
|
|
|
|
Atm_AccelStepper& move(long int stepRel );
|
|
Atm_AccelStepper& move(long int stepRel );
|
|
Atm_AccelStepper& moveTo(long int stepAbs );
|
|
Atm_AccelStepper& moveTo(long int stepAbs );
|
|
@@ -120,80 +122,80 @@ class Atm_AccelStepper: public Machine {
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|
|
-/*
|
|
|
|
-Automaton::ATML::begin - Automaton Markup Language
|
|
|
|
-
|
|
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
-<machines>
|
|
|
|
- <machine name="Atm_AccelStepper">
|
|
|
|
- <states>
|
|
|
|
- <DISABLED index="0" on_enter="ENT_DISABLED">
|
|
|
|
- <EVT_ENABLE>ENABLED</EVT_ENABLE>
|
|
|
|
- </DISABLED>
|
|
|
|
- <ENABLED index="1" on_enter="ENT_ENABLED">
|
|
|
|
- <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
- <EVT_ENABLED_TIMEOUT>DISABLED</EVT_ENABLED_TIMEOUT>
|
|
|
|
- <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
- <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
- </ENABLED>
|
|
|
|
- <RUNNING index="2" on_loop="LP_RUNNING">
|
|
|
|
- <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
- <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
- <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
- <EVT_ON_LIMIT_LOW>LIMIT_LOW</EVT_ON_LIMIT_LOW>
|
|
|
|
- <EVT_ON_LIMIT_HIGH>LIMIT_HIGH</EVT_ON_LIMIT_HIGH>
|
|
|
|
- <EVT_ON_TARGET>ENABLED</EVT_ON_TARGET>
|
|
|
|
- </RUNNING>
|
|
|
|
- <STOP index="3">
|
|
|
|
- <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
- <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
- <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
- </STOP>
|
|
|
|
- <HOMING_LOW index="4" on_enter="ENT_HOMING_LOW" on_exit="EXT_HOMING_LOW">
|
|
|
|
- <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
- <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
- <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
- <EVT_ON_LIMIT_LOW>ENABLED</EVT_ON_LIMIT_LOW>
|
|
|
|
- </HOMING_LOW>
|
|
|
|
- <HOMING_HIGH index="5" on_enter="ENT_HOMING_HIGH" on_exit="EXT_HOMING_HIGH">
|
|
|
|
- <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
- <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
- <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
- <EVT_ON_LIMIT_HIGH>ENABLED</EVT_ON_LIMIT_HIGH>
|
|
|
|
- </HOMING_HIGH>
|
|
|
|
- <LIMIT_LOW index="6" on_enter="ENT_LIMIT_LOW">
|
|
|
|
- <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
- <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
- <EVT_ON_LIMIT_LOW>LIMIT_LOW</EVT_ON_LIMIT_LOW>
|
|
|
|
- </LIMIT_LOW>
|
|
|
|
- <LIMIT_HIGH index="7" on_enter="ENT_LIMIT_HIGH">
|
|
|
|
- <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
- <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
- <EVT_ON_LIMIT_HIGH>LIMIT_HIGH</EVT_ON_LIMIT_HIGH>
|
|
|
|
- </LIMIT_HIGH>
|
|
|
|
- </states>
|
|
|
|
- <events>
|
|
|
|
- <EVT_DISABLE index="0" access="MIXED"/>
|
|
|
|
- <EVT_ENABLE index="1" access="MIXED"/>
|
|
|
|
- <EVT_ENABLED_TIMEOUT index="2" access="PRIVATE"/>
|
|
|
|
- <EVT_STOP index="3" access="MIXED"/>
|
|
|
|
- <EVT_EMERGENCY_STOP index="4" access="MIXED"/>
|
|
|
|
- <EVT_ON_LIMIT_LOW index="5" access="MIXED"/>
|
|
|
|
- <EVT_ON_LIMIT_HIGH index="6" access="MIXED"/>
|
|
|
|
- <EVT_ON_TARGET index="7" access="MIXED"/>
|
|
|
|
- </events>
|
|
|
|
- <connectors>
|
|
|
|
- <CHANGEPOSITION autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
- <CHANGESTATE autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
- <ONLIMITHIGH autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
- <ONLIMITLOW autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
- <ONTARGET autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
- <STOP autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
- </connectors>
|
|
|
|
- <methods>
|
|
|
|
- </methods>
|
|
|
|
- </machine>
|
|
|
|
-</machines>
|
|
|
|
-
|
|
|
|
-Automaton::ATML::end
|
|
|
|
-*/
|
|
|
|
|
|
+/*
|
|
|
|
+Automaton::ATML::begin - Automaton Markup Language
|
|
|
|
+
|
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
+<machines>
|
|
|
|
+ <machine name="Atm_AccelStepper">
|
|
|
|
+ <states>
|
|
|
|
+ <DISABLED index="0" on_enter="ENT_DISABLED">
|
|
|
|
+ <EVT_ENABLE>ENABLED</EVT_ENABLE>
|
|
|
|
+ </DISABLED>
|
|
|
|
+ <ENABLED index="1" on_enter="ENT_ENABLED">
|
|
|
|
+ <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
+ <EVT_ENABLED_TIMEOUT>DISABLED</EVT_ENABLED_TIMEOUT>
|
|
|
|
+ <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
+ <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
+ </ENABLED>
|
|
|
|
+ <RUNNING index="2" on_loop="LP_RUNNING">
|
|
|
|
+ <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
+ <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
+ <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
+ <EVT_ON_LIMIT_LOW>LIMIT_LOW</EVT_ON_LIMIT_LOW>
|
|
|
|
+ <EVT_ON_LIMIT_HIGH>LIMIT_HIGH</EVT_ON_LIMIT_HIGH>
|
|
|
|
+ <EVT_ON_TARGET>ENABLED</EVT_ON_TARGET>
|
|
|
|
+ </RUNNING>
|
|
|
|
+ <STOP index="3">
|
|
|
|
+ <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
+ <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
+ <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
+ </STOP>
|
|
|
|
+ <HOMING_LOW index="4" on_enter="ENT_HOMING_LOW" on_exit="EXT_HOMING_LOW">
|
|
|
|
+ <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
+ <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
+ <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
+ <EVT_ON_LIMIT_LOW>ENABLED</EVT_ON_LIMIT_LOW>
|
|
|
|
+ </HOMING_LOW>
|
|
|
|
+ <HOMING_HIGH index="5" on_enter="ENT_HOMING_HIGH" on_exit="EXT_HOMING_HIGH">
|
|
|
|
+ <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
|
+ <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
+ <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
+ <EVT_ON_LIMIT_HIGH>ENABLED</EVT_ON_LIMIT_HIGH>
|
|
|
|
+ </HOMING_HIGH>
|
|
|
|
+ <LIMIT_LOW index="6" on_enter="ENT_LIMIT_LOW">
|
|
|
|
+ <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
+ <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
+ <EVT_ON_LIMIT_LOW>LIMIT_LOW</EVT_ON_LIMIT_LOW>
|
|
|
|
+ </LIMIT_LOW>
|
|
|
|
+ <LIMIT_HIGH index="7" on_enter="ENT_LIMIT_HIGH">
|
|
|
|
+ <EVT_STOP>STOP</EVT_STOP>
|
|
|
|
+ <EVT_EMERGENCY_STOP>STOP</EVT_EMERGENCY_STOP>
|
|
|
|
+ <EVT_ON_LIMIT_HIGH>LIMIT_HIGH</EVT_ON_LIMIT_HIGH>
|
|
|
|
+ </LIMIT_HIGH>
|
|
|
|
+ </states>
|
|
|
|
+ <events>
|
|
|
|
+ <EVT_DISABLE index="0" access="MIXED"/>
|
|
|
|
+ <EVT_ENABLE index="1" access="MIXED"/>
|
|
|
|
+ <EVT_ENABLED_TIMEOUT index="2" access="PRIVATE"/>
|
|
|
|
+ <EVT_STOP index="3" access="MIXED"/>
|
|
|
|
+ <EVT_EMERGENCY_STOP index="4" access="MIXED"/>
|
|
|
|
+ <EVT_ON_LIMIT_LOW index="5" access="MIXED"/>
|
|
|
|
+ <EVT_ON_LIMIT_HIGH index="6" access="MIXED"/>
|
|
|
|
+ <EVT_ON_TARGET index="7" access="MIXED"/>
|
|
|
|
+ </events>
|
|
|
|
+ <connectors>
|
|
|
|
+ <CHANGEPOSITION autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
+ <CHANGESTATE autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
+ <ONLIMITHIGH autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
+ <ONLIMITLOW autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
+ <ONTARGET autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
+ <STOP autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
|
+ </connectors>
|
|
|
|
+ <methods>
|
|
|
|
+ </methods>
|
|
|
|
+ </machine>
|
|
|
|
+</machines>
|
|
|
|
+
|
|
|
|
+Automaton::ATML::end
|
|
|
|
+*/
|