04-24-2025 09:37 PM - edited 04-24-2025 09:51 PM
@Kevin_Price wrote:
Deal.
I've *thought* that I had at least moderate familiarity with the state model for some time and have used it in a
few apps when I knew I'd want to stop and restart quickly. Things I'd read either in the help or on this site
suggested that by committing a task before starting it, a subsequent stop and re-start would require less
work by the task state machine than if I started the task without an explicit "commit." I don't recall whether
I ever tested the turnaround speed in different cases or whether I took it on faith.
I had been under the impression that on a "stop" action, the task state machine would revert back to the
last state explicitly set by the developer prior to the "start" action. Thus, when states are not commanded
explicitly, the task would revert all the back to "unverified." But if a commit action preceded the start, then
a stop would merely revert back to committed.
Judging by the diagram, this impression isn't quite right. It now appears that a "stop" can *only* revert backto the "committed" state. It is also unclear to me what would constitute an "abort" action -- I presume this
would be things like internal errors and that an explicit "abort" is not directly available? Further, it's unclear
exactly what path a "DAQmx Clear" would take through the state model if issued to a running task.
Finally, and getting back to the original point of curiousity, why not allow the ability to simply query a state
considering that the much more intrusive ability to SET a state *is* being allowed? It seems awfully
counter-intuitive.
-Kevin P
I agree. The other confusing part is that there appears to be no way to go back to the unverified state in order to change timing settings. The control VI's only allow the user to go back to the verified state by using the 'unreserve' task control value.
The use case would be to update timing "on the fly" to go from "On Demand" to "Finite Samples" back to "On Demand". This is currently not possible without completely clearing the task, which is sort of crazy.