Skip to content

Zurich Instruments Data Acquisition Test Notebook

The zhinst.ziPython library, which we had been using thus far, is deprecated in favor of zhinst.core which offers many similar functions with some modifications. While migrating the codebase to the new structure, leveraging Zurich's DAQ library for improved timing during data logging is also a good decision to make.

  • We now have to specify the API level for the DAQ Server. From the manual, the available levels are:

    • API Level 1: HF2 support, basic UHF support.
    • API Level 4: UHF support, timestamp support in poll, PWA, name clean-up.
    • API Level 5: Introduction of scope offset for extended (non-hardware) scope inputs (UHF, MF Instruments).
    • API Level 6: Timestamp support in poll for nodes that return a byte array.

    Legacy code performs fine with API level 0 specified, however according to the manual HF2 devices are only supported with API level 1. - Unlike legacy code, instead of "api" I used "daq" to be more in line with the code examples in the manual. It's weird that daq is used to refer to the core module, but there is also the Data Acquisition module which would ostensibly also be labeled "daq

Settings can be passed to the HF2 as a list of (path,value) pairs to apply them all at once. Also, a simpler way to format the string with the device ID instead of calling .format()

Set up the DAQ module to asynchronously capture data from the gyro

  • "type" defines the trigger mode, given below:
    • 0: continuous Continuous acquisition (trigger off).
    • 1: analog_edge_trigger Analog edge trigger.
    • 2: digital_trigger Digital trigger mode (on DIO source).
    • 3: analog_pulse_trigger Analog pulse trigger.
    • 4: analog_tracking_trigger Analog tracking trigger.
    • 5: change_trigger Change trigger.
    • 6: hardware_trigger Hardware trigger (on trigger line source). NOT SUPPORTED ON HF2
    • 7: pulse_tracking_trigger Pulse tracking trigger, see also bandwidth.
    • 8: event_count_trigger Event count trigger (on pulse counter source).
  • "duration" determines how long to acquire for.
  • "endless" determines how many times to trigger (if true, will keep triggering, if false, "count" determines how many times to trigger)

Select some data for the DAQ module to capture. In order: - Drive pick amplitude - Sense X - Sense Y - Sense X standard deviation - Stress sensor amplitude (as calculated by Zurich) - Stress sensor amplitude (as calculated by on board demod) - Active DIO