Koch Lab:Publications/Drafts/Versatile Feedback/Software/High-Level Program Structure: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
(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 ...)
 
(→‎A Thought Experiment: outlined the rest of this example)
Line 4: Line 4:


==A Thought Experiment==
==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.
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.
 
===Finite State Machines===
These phases can be diagrammed as a finite-state machine (FSM), such as the graph in figure 1.


[[Image:FiniteStateMachine1.png]]
[[Image:FiniteStateMachine1.png]]
Line 13: Line 16:


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.
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.
===Substructure of the Acquisition Phase===
===Our solution: a fixed structure, with the ability to run scripts===
==Hardware Limitations==

Revision as of 23:41, 3 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.

Finite State Machines

These phases can be diagrammed 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.

Substructure of the Acquisition Phase

Our solution: a fixed structure, with the ability to run scripts

Hardware Limitations