spec

Software for Diffraction

SmarAct

SmarAct GmbH SCU and MCS controllers for micro- and nanopositioning

DESCRIPTION

spec supports the SmarAct SCU and MCS controller modules over serial and socket interfaces. See www.smaract.de for details on the hardware. See the mcs2 help file for the newer SmarAct MCS2 controller.

CONFIGURATION

spec supports the SmarAct SCU and MCS controller in both open-loop and closed-loop modes. The closed-loop mode requires the optional sensor module hardware is installed. Such channels should be configured with controller type SMARACT_E in the configuration editor. The open-loop configuration can be used with or without sensor module hardware and is configured with controller type SMARACT.

When a sensor is installed and detected, the controller requires different commands for rotary versus linear sensors. The controller cannot detect the sensor type, although the sensor type can be saved in non-volatile memory on the controller. The sensor type information can be set in spec's hardware config file. If the sensor type in the config file differs from the sensor type as reported by the controller's non-volatile memory, spec will set the controller to the type in the config file.

One can specify the sensor type in the config file by either of two methods. The first method is to set the standard optional motor parameter "rotary" to a non-zero value to indicate a rotary positioner or zero to indicate a linear positioner. The second method is to create a non-standard optional motor parameter called "sensor_type" and set its value to the sensor type as specified in the SmarAct documentation. spec recognizes the defined codes and will send the commands appropriate to the configured sensor type.

The linear sensors are available in micrometer and nanometer resolution. The rotary sensors have micro-degree resolution. In the spec configuration editor, choose a value for the steps-per-unit parameter as appropriate. For example, if the sensor resolution is in nanometers, a value of 1e6 will allow the positions to be specified in millimeters.

The MCS models allow setting the steady-state rate (speed) parameter. The units are microns per second for linear positioners and microdegrees per second for rotary positioners. The base rate and acceleration parameters are not used with any of the SmarAct controllers.

When operating in open-loop mode, the move commands send a value for the number of steps to take. The steps are conditioned by an amplitude and a step frequency. The amplitude defaults to 50 Volts, but can be set by creating the non-standard optional motor parameter "amplitude" in the config file. The step frequency is the steady-state rate in Hz from the config file.

Also when in open-loop mode, the step commands (MST on the MCS models and U and D commands on the SCU models) limit the move magnitudes to fewer than 30,000 steps. spec will automatically split larger moves into as many smaller moves as needed.

Note, the "non-standard optional" parameters are set in the configuration editor using the p command from the Devices screen for controller parameters or from the Motor screen for motor parameters. "Standard" optional motor parameters are found using the m command once or twice from the Motor screen of the configuration editor.

For actuators that have no sensor, there are no commands available to read the actual position or even the commanded position from the controller. spec will estimate the position during moves based on the configured step frequency (steady-state rate) and the elapsed time. That estimated position will be displayed during updated moves. If a move is aborted, the estimated position at the time of interruption will be used as the current position.

PARAMETERS

motor_par(mne, "sensor_mode")
MCS only. Returns the default value for the power mode of the sensors for the controller associated with motor channel mne. A value of 1 is normal mode. A value of 2 is power-save mode. If unset, normal mode is used. Should only be set in the config file as a non-standard optional parameter associated with the controller entry on the Devices screen. Setting the parameter for an individual motor channel will be ineffective.
motor_par(mne, "sensors" [, arg])
MCS only. Sets or returns the current power mode for the sensors for the controller associated with motor channel mne. If arg is zero or the string "off", disables the sensors. Otherwise, the sensors are enabled using either normal mode or the value contained in the "sensor_mode" parameter if that is set. This parameter should not be set in the config file. Note, the power mode affects all the channels on a controller.
motor_par(mne, "dump")

Displays parameters for channel mne in the following format (for an MCS channel):

SmarAct motor "sx", unit 0 channel 3:
 Emergency stop mode:  normal
         Sensor mode:  enabled
         Sensor type:  linear positioner with nanosensor
            Position:  100.001 mm
     Software limits:  none
   Closed loop speed:  50 um/sec
      Safe direction:  backward (1)
             Voltage:  63.6963 (2609)

If no sensor is detected, fewer parameters are available:

SmarAct motor "m0", unit 0 channel 0:
 Emergency stop mode:  normal
         Sensor mode:  disabled
            Position:  unknown - no sensor detected
             Voltage:  49.9756 (2047)

The display for an SCU channel has much less information.

motor_par(mne, "calibrate_sensor")
Sends a command to run the calibrate sequence for the indicated channel. The wait() command can be used to wait for the sequence to finish.
motor_par(mne, "amplitude" [, arg])
Sets or returns the voltage amplitude for the indicated channel used for moves for channels that lack a position sensor. Such channels are configured as SMARACT rather than SMARACT_E (with encoder). If unset, a value of 50 Volts is used. Allowed values are from 0 to 100 for MCS models and 15 to 100 for SCU models. This parameter will only exist if created as a non-standard optional parameter in the config file.
motor_par(mne, "hold_time" [, arg])
Sets or returns the hold-time parameter for the indicated channel. The units are milliseconds. The parameter defines how long the controller will actively hold the position after reaching the target for sensor-enabled positioners. If unset, a value of zero will be used. See the SmarAct documentation for additional details. This parameter will only exist if created as a non-standard optional parameter in the config file.
motor_par(mne, "rotary")
This standard optional parameter can be set to a non-zero value in the config file to indicate a rotary sensor is in use.
motor_par(mne, "sensor_type")

Sets or returns the configured sensor type according to these values from the SmarAct documentation. For MCS models, the types are:

1 - Linear with nanosensor, ref mark
2 - Rotary with nanosensor, ref mark
4 - Rotary with microsensor, ref mark
5 - Linear with nanosensor, ref mark, large actuator
6 - Linear with nanosensor, ref marks
7 - Rotary with microsensor, ref mark
8 - Rotary with nanosensor, ref mark
9 - Linear with microsensor, end stops
10 - Rotary with microsensor, end stops
11 - Goniometer with 60.5mm radius, end stops
12 - Goniometer with 77.5mm radius, end stops
13 - Rotary with absolute sensors, end stops
14 - Rotary with microsensor, end stops
15 - Rotary with microsensor
16 - Goniometer with nanosensor, 60.5mm radius, ref mark
17 - Goniometer with nanosensor, 77.5mm or 70.5mm radius, ref mark
18 - Linear positioner with nanosensor, ref marks
19 - Goniometer with nanosensor, 95.5mm radius, ref mark
20 - Rotary with nanosensor, ref mark
21 - Linear with nanosensor, extended scanning range, ref mark
22 - Rotary with microsensor, ref mark
23 - Rotary with nanosensor for high applied masses, ref mark
24 - Linear with nanosensor, large actuator, ref marks
25 - Rotary with nanosensor, ref marks
26 - Rotary
27 - Rotary with end stops
28 - Rotary
29 - Rotary with end stops
30 - Goniometer with nanosensor, 104.5mm radius, ref mark
31 - Goniometer with nanosensor, 139.5mm radius, ref mark
32 - Linear positioner with large actuator, end stops
33 - Goniometer with microsensor, 93.5mm radius, end stops
34 - High load vertical positioner, ref mark
35 - Linear with nanosensor, larger actuator, ref marks
36 - Rotary with nanosensor, larger actuator, ref mark
37 - Large rotary positioner, ref mark
38 - Linear with microsensor, ref marks
39 - Rotary with microsensor, ref mark
40 - Linear with microsensor, large actuator, ref marks
41 - Linear with microsensor, ref mark
42 - Linear with microsensor, large actuator, ref mark
43 - Linear with microsensor, end stops
44 - Linear with microsensor, large actuator, end stops
45 - Goniometer with microsensor, 60.5mm radius, large actuator, end stops
46 - Goniometer with microsensor, 77.5mm radius, large actuator, end stops
47 - Goniometer with nanosensor, 93.5mm radius, ref mark
48 - Goniometer with nanosensor, 60.5mm radius, large actuator, ref mark
49 - Goniometer with nanosensor, 77.5mm radius, large actuator, ref mark

For SCU models, the types are:

1 - Linear with microsensor, end stops
4 - Rotary with microsensor, end stops
5 - Rotary with 60.5mm radius, end stops
6 - Rotary with 77.5mm radius, end stops
7 - Rotary with absolute sensor
8 - Rotary with microsensor, end stops
9 - Rotary with microsensor
10 - Rotary
11 - Rotary with end stops
12 - Rotary
13 - Rotary with end stops
14 - Linear with magnetic encoder, end stops
15 - Rotary with 93.5mm radius, end stops
16 - Linear with microsensor, double piezo, end stops
17 - Tip tilt positioner with 25.4mm diameter
18 - Linear with microsensor, ref marks
19 - Rotary with microsensor, ref mark
20 - Linear with microsensor, ref marks, large actuator
21 - linear with microsensor, ref mark
22 - Linear with microsensor, ref mark, large actuator
23 - linear with microsensor, end stops
24 - Linear with microsensor, end stops

The sensor type can be used instead of the "rotary" parameter to differentiate a linear stage from a rotary stage. This parameter will only exist if created as a non-standard optional parameter in the config file.

motor_par(mne, "safe_direction" [, arg])
For actuators without a physical reference mark, sets the safe direction for performing a limit search. Zero is forward and one is backward. This parameter will only exist if created as a non-standard optional parameter in the config file.
motor_par(mne, "send", cmd)

Sends the string cmd to the SmarAct channel assigned to motor mne. Note, spec will add the motor number and other command delimiters as needed, although for certain commands on the SCU, use a zero as a place holder for the channel number. For example, to set the positioner alignment parameters for a motor on an SCU controller, one could use:

motor_par(mne, "send", "SPA0A1F200B150")

The first zero after SPA will be replaced with the motor channel. To set the closed-loop maximum frequency with the MCS controller, the following would work:

motor_par(mne, "send", "SCLF,3000")

spec will automatically insert the channel number before the comma.

motor_par(mne, "read", cmd)

Sends the string cmd to the SmarAct channel assigned to motor mne, and returns the reply. Note, spec will add the motor number to the command. For example, the following can be used to read the closed-loop maximum frequency for a particular channel:

p motor_par(sz, "read", "GCLF")
motor_par(mne, "usend", cmd)
Sends the string cmd to the SmarAct controller unit associated with motor mne. Use this option for commands that are not associated with a specific channel.
motor_par(mne, "uread", cmd)

Sends the string cmd to the SmarAct controller unit assigned with motor mne, and returns the reply. Use this option for commands that are not associated with a specific channel. For example, the following can be used to read the system ID number on an MCS controller:

p motor_par(sz, "uread", "GSI")