Plesty Documentation

Build & Run a Device

One instrument, from the hub or from nothing, to a server running on a lab PC and a field test against the real thing.

A device module is the software for one instrument: it knows the instrument's own protocol and offers it as ordinary operations and settings, served over the network so anything can drive it (see Modules). This guide takes one instrument — a Thorlabs PM100D power meter — all the way:

The path: find the instrument on the hub; if it is not there, scaffold a module, write its class, schemas and implementation, serve and test it; then run it on a bench and field-test it.

  1. Find or Scaffold — look on the hub first; plesty init device if it is not there.
  2. Base Class — connect, disconnect, write and query.
  3. Schemas — every setting and operation, with units and limits.
  4. Implementation — the instrument's command language.
  5. Serve It — the device server, and a client that talks to it.
  6. Test It — gate d1, with no hardware attached.
  7. Run It on a Bench — install it in PLESTY Bench, start it, drive it by hand, run several together.
  8. Field-Test It — prove it against the real instrument.

If the hub already has your instrument, steps 2–6 are someone else's work: install it and go straight to step 7.

The reference implementations are the modules listed as current in the hub — plesty-pm100d and plesty-k10cr1 are the two this guide uses.