API Reference v9.2.0
DeviceStorageclass
Module: zaber_motion.ascii
Class providing access to device storage.
Requires at least Firmware 7.30.
The following example illustrates how you can obtain an instance of this type:
from zaber_motion.ascii import Connection
connection = Connection.open_serial_port('COM3')
device = connection.get_device(1)
device_storage = device.storageIndex
Methods
m
m
m
m
device_storage.get_string(key, decode = False)Gets the device value stored with the provided key.
Arguments
| Name | Type | Description |
|---|---|---|
| key | str | Key to read the value of. |
| decode | bool | Whether the stored value should be decoded. Only use this when reading values set by storage.set with "encode" true. |
Return Value
str Stored value.m
m
m
m
m
device_storage.set_string(key, value, encode = False)Sets the device value stored at the provided key.
Arguments
| Name | Type | Description |
|---|---|---|
| key | str | Key to set the value at. |
| value | str | Value to set. |
| encode | bool | Whether the stored value should be base64 encoded before being stored. This makes the string unreadable to humans using the ASCII protocol, however, values stored this way can be of any length and use non-ASCII and protocol reserved characters. |