Device Settings Module

The Device Settings Module provides functionality for saving and loading device settings to and from file. The file is saved in XML format.

In general, users are recommended to use the utility functions provided by the APIs instead of using the Device Settings module directly. The Matlab API provides ziSaveSettings() and ziLoadSettings() and the Python API provides zhinst.utils.save_settings() and zhinst.utils.load_settings. These are convenient wrappers to the Device Settings module for loading settings synchronously, i.e., these functions block until loading or saving has completed, the desired behavior in most cases. Advanced users can use the Device Settings module directly if they need to implement loading or saving asynchronously (non-blocking).

See Table 1 for the input parameters to configure the Device Settings Module.

Table 1. Device Settings Input Parameters
Setting/Path Type Description

device

string

The device ID to save the settings for, e.g., dev123 (compulsory parameter).

command

string

The command to issue: "load" (load settings from file); "save" (read device settings and save to file) or "read" (just read the device settings) (compulsory parameter).

filename

string

The name of the file to load or save to.

path

string

The path containing the file to load from or save to.

Table 2. Device Settings Parameters reserved for use by the LabOne Web Server.
Setting/Path Type Description

throwonerror

uint64

Throw an exception is there was error executing the command.

errortext

string

The error text used in error messages.

finished

uint64

The status of the command (read-only).