Koch Lab:Publications/Drafts/Versatile Feedback/Software/High-Level Program Structure: Difference between revisions
(New page: ==Abstract== I will explain how we designed the data acquisition/feedback control software, by making an analogy to the functions of a digital camera. ==A Thought Experiment== How would ...) |
(No difference)
|
Revision as of 23:47, 1 March 2008
Abstract
I will explain how we designed the data acquisition/feedback control software, by making an analogy to the functions of a digital camera.
A Thought Experiment
How would you design a user interface for a digital camera? Using a camera has parallels in running an experiment: there is a set-up phase, where you compose the subject or scene and adjust the camera settings to obtain the desired effect, and then a data-acquisition phase, where the camera records the image. In computer terms, we represent this as a finite-state machine (FSM), such as the graph in figure 1.
Some cameras have multiple set-up phases: one for advanced settings (which cannot be interrupted for acquisition) and one for oft-changed settings (which can). Compare figure 2:
LabVIEW programmers implement finite state machines by putting a Case structure inside a While Loop (or For Loop). At each iteration of the loop, some selector value determines the state (case) to run.