![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Windows Workflow Foundation appropriate to use for operate real hardware? I've been looking at various systems, State Machine Compilers, the state Pattern, and Windows Workflow foundation to control some hardware. The hardware consists of some simple robotics, lasers, valves etc. We have already completed a lower level embedded system that actually operates the hardware. But we need to coordinate the system with some sort of state machine. Like Running, Idle, Initializing, Faulted etc. Some individual devices will need sub-state machines as well (like laser will need it's own Initializing, Warming up, Faulted, etc.). I've played with the samples of Windows Workflow. Especially this sample. http://www.odetocode.com/Articles/460.aspx It seems like a good match except that things seem geared towards multiple instances of statemachines. One for each record in a database (for example one for each bug) and being able to serialize and deserialize that state. This is not needed in my case. Allowing the state machine to be built from XML is a plus (possibly a big plus) but not absolutely required. We may have some machine for example with 2 lasers and scientists could consider that without recompiling. The system would only have one instance of the highest level state machine and probably one instance of several sub-state machines. One other concern is performance. I tried firing events that change state quickly at a statemachine. Once I fired states faster than say 1/5th of sec things would start to crash. The speed issue is probably not a problem and might be worked out. One other thing would be memory and objects. I would be having one master state machine and it may loop around in this state machine for days or weeks. I'm just a little concerned if it was designed not to do this sort of thing. I've used the state pattern before and it's horrible to maintain. The statemachine compilers I found are non standard, open source, barely supported. A direct implementation of a statemachine can get messy. It's really nice to get a state machine diagram that I can show scientists using the Workflow stuff. They can mark it up etc. What do you folks think? Thanks |
My System Specs![]() |
| Thread Tools | |
| |