Subject:
|
Re: Implementing Finite State Machines
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sat, 11 Dec 1999 03:20:04 GMT
|
Reply-To:
|
tking@together.SPAMLESSnet
|
Viewed:
|
1994 times
|
| |
| |
Vlad, The Finite State Machine is a good subject for
people to consider in robotics, especially in
coding the typical 'looping forever' Rcx applications.
Lots of regular 'C' FSM's are implemented with a State
variable and "switch" statements, or CASE in Pascal. The
PIC microcomputers have a 'computed goto table' approach that
lends itself easily to FSMs.
Long ago, I used some macro libraries to help build FSMs in
'C'. Don't think I still have any of that stuff. I had someone write
a graphically-based system that generated 'C' also, but that must
be buried at my previous employer. Hmmm.. I think the best thing right
now would be some simple examples. Dave, have you thought about this??
I find the classical Finite State Machine definition somewhat inefficient,
as often an action must be taken upon Entering a State. You end up with a lot of
states that are really init sections for other states. I adopted a different
model in which the definition of a state could optionally include an
unconditional action that happened as the state was entered. This created
a few minor religious wars, but worked well in Factory Control systems.
I would like to keep in touch on this subject, with anyone interested. One of
my kids wrote a real time operating system for 8051 that included some kind of
FSM support. I'll have to ask him about it...
Interesting!
--
Regards,
Terry King ...In The Woods In Vermont
|
|
Message has 1 Reply: | | Re: Implementing Finite State Machines
|
| (...) Adding a switch statement to NQC would certainly help make implementation easier...I'll see if I can work it into the next release. Actually, I've been somewhat surprised by the general lack of needing FSMs in my own Mindstorms programming. I (...) (25 years ago, 11-Dec-99, to lugnet.robotics.rcx.nqc)
|
Message is in Reply To:
| | Implementing Finite State Machines
|
| Hi all! I have been struggling with a fairly large FSM implementation in NQC and came to realize that maybe most of the more advanced NQC applications might be actually FSMs (or could become)... Because I think it is a little awkward to handle a FSM (...) (25 years ago, 9-Dec-99, to lugnet.robotics.rcx.nqc)
|
5 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|