Computer-controlled test and measurement systems, including resources having multiple states and resources having multiple inputs, are modeled as data flow diagrams of topologically interconnected resources. A set of "tasks" are defined for changing the states of multiple-state resources and causing software resources to produce output data. Methods and apparatus, including internal and external task ordering rules, are provided to automatically interleave such tasks and implement input-ordering restrictions. Thereby, a sequence of tasks is produced to control the systems so as to assure valid data collection and protect physical resources from abuse. Data structures are illustrated for implementing the invention in an object-oriented programming environment.