API Reference v9.2.0
AxisStorageclass
Module: zaber_motion.ascii
Class providing access to axis 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)
axis = device.get_axis(1)
axis_storage = axis.storageIndex
Methods
m
m
m
m
axis_storage.get_string(key, decode = False)Gets the axis 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
axis_storage.set_string(key, value, encode = False)Sets the axis 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. |