Comment on 3/2014: trail sensor state machine
Verfasst: 29 Sep 2014, 11:33
Hi All,
With great interest I read in 3-2014 the article about the "TrailSensor" state machine.
This also because I publish several years ago a state machine description for the trail sensor.
This for the fischertechnik trail sensor (2 binary sensors) but also including the active/deactive state.
See also: http://web.inter.nl.net/users/Ussel-Int ... Sensor.htm
What I am missing in the article is a detail description of the transitions between the states and what conclusions are related with these transitions.
What to do when a certain state transition arise.
The required action does not depends on the state but on the transition.
In my opinion the names for your states are wrong:
Z0= both sensor on the line,
Z1= left off line, right on line,
Z2= left on line, right off line,
Z3= both off line ( and not "Suche" because Z1 and Z2 also mean "Suche")
For example:
a) when the line has been lost by the transitions Z0 to Z1 and Z1 to Z3: you know that the line is at the right side.
b) when the line has been lost by the transition Z0 to Z3: you know only that the line has been lost.
In case a)
the algorithm for finding back the line is much easier than in case b).
In fact in case b)
you don't have any information about where to look for a line. You can use a search strategy but when you find a line, you never be sure that is the right line.
It is also valuable to take action in case of transition Z0 to Z1 or Z0 to Z2, and try to return directly on the line.
In fact you the state transitions are very useful for event driven programming.
But maybe I am overlook something because of my lack in knowledge of the German language.
With great interest I read in 3-2014 the article about the "TrailSensor" state machine.
This also because I publish several years ago a state machine description for the trail sensor.
This for the fischertechnik trail sensor (2 binary sensors) but also including the active/deactive state.
See also: http://web.inter.nl.net/users/Ussel-Int ... Sensor.htm
What I am missing in the article is a detail description of the transitions between the states and what conclusions are related with these transitions.
What to do when a certain state transition arise.
The required action does not depends on the state but on the transition.
In my opinion the names for your states are wrong:
Z0= both sensor on the line,
Z1= left off line, right on line,
Z2= left on line, right off line,
Z3= both off line ( and not "Suche" because Z1 and Z2 also mean "Suche")
For example:
a) when the line has been lost by the transitions Z0 to Z1 and Z1 to Z3: you know that the line is at the right side.
b) when the line has been lost by the transition Z0 to Z3: you know only that the line has been lost.
In case a)
the algorithm for finding back the line is much easier than in case b).
In fact in case b)
you don't have any information about where to look for a line. You can use a search strategy but when you find a line, you never be sure that is the right line.
It is also valuable to take action in case of transition Z0 to Z1 or Z0 to Z2, and try to return directly on the line.
In fact you the state transitions are very useful for event driven programming.
But maybe I am overlook something because of my lack in knowledge of the German language.