Common to All Modules
Devices, experiments and analyzers are different kinds of module (see The three things you build), but they share the same ground: how they are configured, how they log what they do, and the data types they exchange. This chapter covers that shared ground once, so the chapters on each kind of module do not repeat it.
Where each kind of setting goes
A module is configured in three places. Choose the place by asking who the setting belongs to:
The setting belongs to … |
Example |
Goes in |
Explained in |
|---|---|---|---|
this computer or this lab, or is secret |
an instrument’s address, a server’s port, a password |
|
|
the module itself |
motor counts per degree, a hardware speed limit, which devices an experiment uses |
|
|
one measurement |
the wavelengths to scan, the exposure time |
|
Getting this right is what lets the same module run in another lab unchanged:
only .env differs.
In this chapter
Page |
Covers |
|---|---|
settings that differ per computer, and the variables plesty-lib reads by itself |
|
the module’s own |
|
where a module’s log messages go, and how to control them |
|
the data types devices produce, experiments record and analyzers read |