1. A node in a graphical program, wherein the graphical program is executable to perform a measurement task using a task state model, and wherein the task state model comprises a sequence of task states, each task state corresponding to a status of the measurement task; and wherein the node is executable in the graphical program to perform a measurement task operation, wherein the operation requires the measurement task to be in a first task state; wherein the node is further executable in the graphical program to: determine one or more task state transitions for transitioning the measurement task from a current task state in the sequence of task states to the first task state in the sequence of task states; perform the one or more task state transitions after said determining, wherein after said performing, the measurement task is in the first task state; and perform the measurement task operation.