Quickstart

This page walks you through a minimal example using PIEC’s virtual instrument mode — no real hardware required. You can run this example immediately after installing PIEC.

Note

Virtual mode is built into every PIEC driver. It simulates instrument responses so you can test and develop measurement workflows without physical hardware. See Connecting to the Instrument for details on virtual mode.

Running a virtual hysteresis measurement

from piec.drivers.awg.virtual_awg import VirtualAwg
from piec.drivers.oscilloscope.virtual_oscilloscope import VirtualScope
from piec.measurement.discrete_waveform import HysteresisLoop

awg = VirtualAwg()
osc = VirtualScope()
experiment = HysteresisLoop(awg, osc, save_dir='.')
experiment.run_experiment()  # configures, captures, saves, and analyzes

run_experiment() executes the full workflow: it configures both instruments, generates a triangle waveform, triggers acquisition, saves the raw data to CSV, and runs the hysteresis analysis automatically.

Swap VirtualAwg / VirtualScope for real drivers (or use autodetect) and the same code runs on hardware:

from piec.drivers.autodetect import autodetect

awg   = autodetect('awg')
scope = autodetect('scope')

Next steps