Skip to content

Matlab API LabOne Modules

All LabOne Modules have the same interface. For a detailed introduction into the LabOne Modules take a look at the dedicated documentation section.

The following modules exist for the Matlab API:

  • Sweep Module
  • Device Settings Module
  • PLL Advisor Module, DEPRECATED (use PID Advisor instead)
  • PID Advisor Module
  • AWG Module
  • Impedance Module
  • Scope Module
  • Multi-Device Sync Module
  • Data Acquisition Module
  • Precompensation Advisor Module
  • SW Trigger Module DEPRECATED
  • Spectrum Module DEPRECATED

An instance of a LabOne Module can be create through the ziDAQ interface.

Common LabOne Module interface

listNodes

result = ziDAQ('listNodes', handle, path, flags);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Module parameter path
flags (int64) = Define which module parameters paths should be
        returned, set the following bits to obtain the
        described behaviour:
flags = int64(0) -> ZI_LIST_NODES_ALL 0x00
          The default flag, returning a simple
          listing of the given path
        int64(1) -> ZI_LIST_NODES_RECURSIVE 0x01
          Returns the paths recursively
        int64(2) -> ZI_LIST_NODES_ABSOLUTE 0x02
          Returns absolute paths
        int64(4) -> ZI_LIST_NODES_LEAVESONLY 0x04
          Returns only paths that are leaves,
          which means the they are at the
          outermost level of the tree.
        int64(8) -> ZI_LIST_NODES_SETTINGSONLY 0x08
          Returns only paths which are marked
          as setting
Flags may also be combined, e.g., set flags to bitor(1, 2)
to return paths recursively and printed as absolute paths.

listNodesJSON

result = ziDAQ('listNodesJSON', handle, path, flags);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Module parameter path
flags (int64) = Define which module parameters paths should be
        returned, set the following bits to obtain the
        described behaviour:
flags = int64(0) -> ZI_LIST_NODES_ALL 0x00
          The default flag, returning a simple
          listing of the given path
        int64(1) -> ZI_LIST_NODES_RECURSIVE 0x01
          Returns the paths recursively
        int64(2) -> ZI_LIST_NODES_ABSOLUTE 0x02
          Returns absolute paths
        int64(4) -> ZI_LIST_NODES_LEAVESONLY 0x04
          Returns only paths that are leaves,
          which means the they are at the
          outermost level of the tree.
        int64(8) -> ZI_LIST_NODES_SETTINGSONLY 0x08
          Returns only paths which are marked
          as setting
Returns a list of nodes with description found at the specified
path as a JSON formatted string. Flags may also be combined.

help

ziDAQ('help', handle, [path]);

path (string) = Module parameter path
Returns a formatted description of the nodes in the supplied path.

subscribe

ziDAQ('subscribe', handle, path);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Node path to process data received from the
         device. Use wildcard ('*') to select all.
Subscribe to device nodes. Call multiple times to
subscribe to multiple node paths. After subscription the
processing can be started with the 'execute'
command. During the processing paths can not be
subscribed or unsubscribed.

unsubscribe

ziDAQ('unsubscribe', handle, path);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Node path to process data received from the
         device. Use wildcard ('*') to select all.
Unsubscribe from one or several nodes. During the
processing paths can not be subscribed or
unsubscribed.

getInt

ziDAQ('getInt', handle, path);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Path string of the module parameter. Must
         start with the module name.
Get integer module parameter. Wildcards are not supported.

getDouble

ziDAQ('getDouble', handle, path);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Path string of the module parameter. Must
         start with the module name.
Get floating point double module parameter. Wildcards are not
supported.

getString

ziDAQ('getString', handle, path);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Path string of the module parameter. Must
         start with the module name.
Get string module parameter. Wildcards are not supported.

get

ziDAQ('get', handle, path);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Path string of the module parameter. Must
         start with the module name.
Get module parameters. Wildcards are supported, e.g. 'sweep/*'.

set

ziDAQ('set', handle, path, value);

handle = Matlab handle (reference) specifying an instance of
         the module class.
path (string) = Path string of the module parameter. Must
         start with the module name.
value = The value to set the module parameter to, see the list
         of module parameters for the correct type.
Set the specified module parameter value. Use 'help' to learn more
about available parameters.

execute

ziDAQ('execute', handle);

handle = Matlab handle (reference) specifying an instance of
         the module class.
Start the module thread. Subscription or unsubscription
is not possible until the module is finished.

finished

result = ziDAQ('finished', handle);

handle = Matlab handle (reference) specifying an instance of
         the module class.
Returns 1 if the processing is finished, otherwise 0.

read

result = ziDAQ('read', handle);

handle = Matlab handle (reference) specifying an instance of
         the module class.
Read out the recorded data; transfer the module data to
Matlab.

finish

ziDAQ('finish', handle);

handle = Matlab handle (reference) specifying an instance of
         the module class.
Stop executing. The thread may be restarted by
calling 'execute' again.

progress

result = ziDAQ('progress', handle);

handle = Matlab handle (reference) specifying an instance of
         the module class.
Report the progress of the measurement with a number
between 0 and 1.

clear

ziDAQ('clear', handle);

handle = Matlab handle (reference) specifying an instance of
         the module class.
Stop the module's thread, Release memory and resources. This
command is especially important if modules are created
repetitively in a while or for loop, in order to prevent
excessive memory and resource consumption.