Next: Linked Lists in Fortran
Up: A Lawyer's View of
Previous: More About the Goodness
Reading Data from Instruments
- A common measurement setup is that a computer
controlling an experiment collects data from an
instrumentation bus for as long as it takes.
- It may not be possible to predict a priori how
much data will be collected. The program must keep allocating
memory dynamically as the data flows in.
- This is very similar to reading data from a file
of no predetermined length. IEEE-488 and other
devices are often
represented by device files in the
/dev directory.
- A program may have to buffer the data and when the
buffers get full, it must release the data onto a file,
clean the buffers, and resume data collection. This
requires sophisticated hand-shaking with the measuring
apparatus.
- The following program illustrates the basic methodologies
employed in such measurements - minus the hand-shaking
bit.
Zdzislaw Meglicki
2001-02-26