|
@@ -1,5 +1,7 @@
|
|
|
#pragma once
|
|
|
|
|
|
+#if defined(__MK20DX128__) || defined(__MK20DX256__) || defined(__MK64FX512__) || defined(__MK66FX1M0__)
|
|
|
+
|
|
|
#include <Automaton.h>
|
|
|
#include <TeensyStep.h>
|
|
|
|
|
@@ -86,72 +88,74 @@ class Atm_Teenstep: public Machine {
|
|
|
void updateLimitSwitch();
|
|
|
};
|
|
|
|
|
|
-/*
|
|
|
-Automaton::ATML::begin - Automaton Markup Language
|
|
|
-
|
|
|
-<?xml version="1.0" encoding="UTF-8"?>
|
|
|
-<machines>
|
|
|
- <machine name="Atm_Teenstep">
|
|
|
- <states>
|
|
|
- <DISABLED index="0" on_enter="ENT_DISABLED">
|
|
|
- <EVT_ENABLE>ENABLED</EVT_ENABLE>
|
|
|
- </DISABLED>
|
|
|
- <ENABLED index="1" on_enter="ENT_ENABLED">
|
|
|
- <EVT_MOVE>RUNNING</EVT_MOVE>
|
|
|
- <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
- </ENABLED>
|
|
|
- <RUNNING index="2" on_enter="ENT_RUNNING" on_loop="LP_RUNNING">
|
|
|
- <EVT_LIMIT_HIGH>EMERGENCY_STOP</EVT_LIMIT_HIGH>
|
|
|
- <EVT_LIMIT_LOW>EMERGENCY_STOP</EVT_LIMIT_LOW>
|
|
|
- <EVT_EMERGENCYSTOP>EMERGENCY_STOP</EVT_EMERGENCYSTOP>
|
|
|
- <EVT_STOP>STOPPING</EVT_STOP>
|
|
|
- <EVT_ONTARGET>ENABLED</EVT_ONTARGET>
|
|
|
- <EVT_MOVE>RUNNING</EVT_MOVE>
|
|
|
- </RUNNING>
|
|
|
- <STOPPING index="3" on_enter="ENT_STOPPING">
|
|
|
- <EVT_LIMIT_HIGH>EMERGENCY_STOP</EVT_LIMIT_HIGH>
|
|
|
- <EVT_LIMIT_LOW>EMERGENCY_STOP</EVT_LIMIT_LOW>
|
|
|
- <EVT_EMERGENCYSTOP>EMERGENCY_STOP</EVT_EMERGENCYSTOP>
|
|
|
- <EVT_MOVE>RUNNING</EVT_MOVE>
|
|
|
- </STOPPING>
|
|
|
- <EMERGENCY_STOP index="4" on_enter="ENT_EMERGENCY_STOP">
|
|
|
- <EVT_MOVE>RUNNING</EVT_MOVE>
|
|
|
- <EVT_ENABLE>ENABLED</EVT_ENABLE>
|
|
|
- </EMERGENCY_STOP>
|
|
|
- <HOMING_HIGH index="5" on_enter="ENT_HOMING_HIGH" on_exit="EXT_HOMING_HIGH">
|
|
|
- <EVT_LIMIT_HIGH>ENABLED</EVT_LIMIT_HIGH>
|
|
|
- <EVT_LIMIT_LOW>EMERGENCY_STOP</EVT_LIMIT_LOW>
|
|
|
- <EVT_EMERGENCYSTOP>EMERGENCY_STOP</EVT_EMERGENCYSTOP>
|
|
|
- <EVT_STOP>STOPPING</EVT_STOP>
|
|
|
- </HOMING_HIGH>
|
|
|
- <HOMING_LOW index="6" on_enter="ENT_HOMING_LOW" on_exit="EXT_HOMING_LOW">
|
|
|
- <EVT_LIMIT_HIGH>EMERGENCY_STOP</EVT_LIMIT_HIGH>
|
|
|
- <EVT_LIMIT_LOW>ENABLED</EVT_LIMIT_LOW>
|
|
|
- <EVT_EMERGENCYSTOP>EMERGENCY_STOP</EVT_EMERGENCYSTOP>
|
|
|
- <EVT_STOP>STOPPING</EVT_STOP>
|
|
|
- </HOMING_LOW>
|
|
|
- </states>
|
|
|
- <events>
|
|
|
- <EVT_MOVE_TIMEOUT index="0" access="MIXED"/>
|
|
|
- <EVT_LIMIT_HIGH index="1" access="MIXED"/>
|
|
|
- <EVT_LIMIT_LOW index="2" access="MIXED"/>
|
|
|
- <EVT_EMERGENCYSTOP index="3" access="MIXED"/>
|
|
|
- <EVT_STOP index="4" access="MIXED"/>
|
|
|
- <EVT_ONTARGET index="5" access="MIXED"/>
|
|
|
- <EVT_MOVE index="6" access="MIXED"/>
|
|
|
- <EVT_DISABLE index="7" access="MIXED"/>
|
|
|
- <EVT_ENABLE index="8" access="MIXED"/>
|
|
|
- </events>
|
|
|
- <connectors>
|
|
|
- <CHANGE autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
- <CHANGEPOSITION autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
- <LIMITHIGH autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
- <LIMITLOW autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
- </connectors>
|
|
|
- <methods>
|
|
|
- </methods>
|
|
|
- </machine>
|
|
|
-</machines>
|
|
|
-
|
|
|
-Automaton::ATML::end
|
|
|
-*/
|
|
|
+#endif
|
|
|
+
|
|
|
+/*
|
|
|
+Automaton::ATML::begin - Automaton Markup Language
|
|
|
+
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<machines>
|
|
|
+ <machine name="Atm_Teenstep">
|
|
|
+ <states>
|
|
|
+ <DISABLED index="0" on_enter="ENT_DISABLED">
|
|
|
+ <EVT_ENABLE>ENABLED</EVT_ENABLE>
|
|
|
+ </DISABLED>
|
|
|
+ <ENABLED index="1" on_enter="ENT_ENABLED">
|
|
|
+ <EVT_MOVE>RUNNING</EVT_MOVE>
|
|
|
+ <EVT_DISABLE>DISABLED</EVT_DISABLE>
|
|
|
+ </ENABLED>
|
|
|
+ <RUNNING index="2" on_enter="ENT_RUNNING" on_loop="LP_RUNNING">
|
|
|
+ <EVT_LIMIT_HIGH>EMERGENCY_STOP</EVT_LIMIT_HIGH>
|
|
|
+ <EVT_LIMIT_LOW>EMERGENCY_STOP</EVT_LIMIT_LOW>
|
|
|
+ <EVT_EMERGENCYSTOP>EMERGENCY_STOP</EVT_EMERGENCYSTOP>
|
|
|
+ <EVT_STOP>STOPPING</EVT_STOP>
|
|
|
+ <EVT_ONTARGET>ENABLED</EVT_ONTARGET>
|
|
|
+ <EVT_MOVE>RUNNING</EVT_MOVE>
|
|
|
+ </RUNNING>
|
|
|
+ <STOPPING index="3" on_enter="ENT_STOPPING">
|
|
|
+ <EVT_LIMIT_HIGH>EMERGENCY_STOP</EVT_LIMIT_HIGH>
|
|
|
+ <EVT_LIMIT_LOW>EMERGENCY_STOP</EVT_LIMIT_LOW>
|
|
|
+ <EVT_EMERGENCYSTOP>EMERGENCY_STOP</EVT_EMERGENCYSTOP>
|
|
|
+ <EVT_MOVE>RUNNING</EVT_MOVE>
|
|
|
+ </STOPPING>
|
|
|
+ <EMERGENCY_STOP index="4" on_enter="ENT_EMERGENCY_STOP">
|
|
|
+ <EVT_MOVE>RUNNING</EVT_MOVE>
|
|
|
+ <EVT_ENABLE>ENABLED</EVT_ENABLE>
|
|
|
+ </EMERGENCY_STOP>
|
|
|
+ <HOMING_HIGH index="5" on_enter="ENT_HOMING_HIGH" on_exit="EXT_HOMING_HIGH">
|
|
|
+ <EVT_LIMIT_HIGH>ENABLED</EVT_LIMIT_HIGH>
|
|
|
+ <EVT_LIMIT_LOW>EMERGENCY_STOP</EVT_LIMIT_LOW>
|
|
|
+ <EVT_EMERGENCYSTOP>EMERGENCY_STOP</EVT_EMERGENCYSTOP>
|
|
|
+ <EVT_STOP>STOPPING</EVT_STOP>
|
|
|
+ </HOMING_HIGH>
|
|
|
+ <HOMING_LOW index="6" on_enter="ENT_HOMING_LOW" on_exit="EXT_HOMING_LOW">
|
|
|
+ <EVT_LIMIT_HIGH>EMERGENCY_STOP</EVT_LIMIT_HIGH>
|
|
|
+ <EVT_LIMIT_LOW>ENABLED</EVT_LIMIT_LOW>
|
|
|
+ <EVT_EMERGENCYSTOP>EMERGENCY_STOP</EVT_EMERGENCYSTOP>
|
|
|
+ <EVT_STOP>STOPPING</EVT_STOP>
|
|
|
+ </HOMING_LOW>
|
|
|
+ </states>
|
|
|
+ <events>
|
|
|
+ <EVT_MOVE_TIMEOUT index="0" access="MIXED"/>
|
|
|
+ <EVT_LIMIT_HIGH index="1" access="MIXED"/>
|
|
|
+ <EVT_LIMIT_LOW index="2" access="MIXED"/>
|
|
|
+ <EVT_EMERGENCYSTOP index="3" access="MIXED"/>
|
|
|
+ <EVT_STOP index="4" access="MIXED"/>
|
|
|
+ <EVT_ONTARGET index="5" access="MIXED"/>
|
|
|
+ <EVT_MOVE index="6" access="MIXED"/>
|
|
|
+ <EVT_DISABLE index="7" access="MIXED"/>
|
|
|
+ <EVT_ENABLE index="8" access="MIXED"/>
|
|
|
+ </events>
|
|
|
+ <connectors>
|
|
|
+ <CHANGE autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
+ <CHANGEPOSITION autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
+ <LIMITHIGH autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
+ <LIMITLOW autostore="0" broadcast="0" dir="PUSH" slots="1"/>
|
|
|
+ </connectors>
|
|
|
+ <methods>
|
|
|
+ </methods>
|
|
|
+ </machine>
|
|
|
+</machines>
|
|
|
+
|
|
|
+Automaton::ATML::end
|
|
|
+*/
|