...
The LSC interface currently uses three dimensions (X, Y, and Z) for input and output of position values. Some devices may only control one or two dimensions. In this case, your subclass will need to initialize the properties numDeviceDimensions
and external2DeviceDimIdx
lsc2DeviceDims
, which specifies the number of dimensions controlled by your device and the mapping between those dimensions and the three-dimensional space used by LSC.
...
In particular, what units of length are used for values of position, velocity, and acceleration (as applicable)?
When creating a subclass of LSC, you must decide on the system of units that will be used when interacting with your subclass. These units will be used when getting or specifying values for position, velocity, or acceleration. The natural unit of time will likely be seconds, so in practice you only have to decide on a unit of length. Usually, it is easiest to use whatever units are used in your device's computer interface, so that no conversion needs to be done when going between your subclass and the device.
LSC contains two unit systems. The first set of units, positionDeviceUnits
, velocityDeviceUnits
, and accelerationDeviceUnits
, the device unit system, is intended for you, the class writer. You are free to specify any units you like for these properties, so long as you then provide the "raw" device quantities/properties in those units. For example, you must implement positionAbsoluteRaw
to report its values in positionDeviceUnits
. Typically, you would set the device unit system to agree with the unit system used by the device hardware.
The second unit system is intended for the class user, who is interacting with an instance of your class to control a particular stage. This set of units is represented by You should specify what units your subclass uses via the properties positionUnits
, velocityUnits
, and accelerationUnits
. The user can set these units as is convenient for his or her application. For example, ScanImage works in units of microns; when ScanImage uses LSC objects, it makes sure to have positionUnits
set to be 1e-6
, and so on.
Important: Since LSC performs unit conversion when setting/reporting quantities like position
or velocity
, failure to properly specify the device unit system Important: Since ScanImage uses microns (1e-6 m) for its unit of length, it performs unit conversion when talking to an LSC using its positionUnits
, etc. Failing to properly specify units in your LSC and then using it with ScanImage could lead to wild/unpredictable stage moves.
...