Quote:
Originally Posted by Ether
That goes to the heart of what I was asking. What you've described sounds like you have to write a state machine if you want time delays and/or wait for events like limit switches etc
|
The scheduler handles some of that for you. You can register a command to run at an event for a button or switch (eg when pressed, when released, while held), and the scheduler will poll it for you and trigger the command. You can also run several commands consecutively, or in parallel by defining a Command Group. However, if you want to do something complex, you would have to implement your own state machine.
I've been playing with the command based system, and our 2012 robot which was implemented in a huge, overly complicated, state machine in LabVIEW was able to be reduced to about 20 fairly simple commands without the need for additional state machines.
Quote:
Originally Posted by Ether
I think you meant abort the first and go? Otherwise, you could get some pretty funky behavior when returning from the interrupt.
|
You are correct that it would be more proper to call it an abort. However, interrupted is the term that the command based library uses. There is an optional method for a command to define that allows it to clean up before it is interrupted.