spec

Software for Diffraction

MCS2

SmarAct Modular Control System 2 (MCS2) Devices

DESCRIPTION

spec supports the SmarAct MCS2 controller modules over its ethernet interface. (The USB interface is not supported as Smaract considers the protocol and syntax they use for that proprietary.) See www.smaract.de for details on the hardware.

spec supports the 64-bit position resolution available with this controller.

CONFIGURATION

Choose controller type "SmarAct MCS2 (Socket)" on the Devices screen of the configuration editor. Enter either the IP address or resolvable hostname as DEVICE. The TCP port number may be appended preceded by a colon. If no port number is configured, the default port number 55551 will be used. Choose controller type MCS2_E on the Motor screen for each MCS2 motor to be used in closed-loop mode. (MCS2 will select open-loop mode, which is not yet completely supported.)

The stage resolution for the MCS2 is 1 picometer (1e-12). If the steps/unit value is set to 1000000000 (1e9), spec positions will be millimeters.

The controller default values for both slew rate (velocity) and acceleration are zero, which can be set in the config file. Zero for slew rate disables velocity control, and the closed-loop movement is governed by the maximum drive frequency. Zero for acceleration disables acceleration control. Consult the SmarAct documentation for details. Otherwise, the units for slew rate are picometers per second and the units for acceleration are milliseconds.

PARAMETERS

motor_par(mne, "move_mode" [, "absolute"|"relative"])
With an optional argument, sets the positioning mode to be absolute or relative. Without an argument, returns the current positioning mode. The default mode is absolute.
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, "dump"|"dump2" [, arg])

Displays parameter values for the specified device, module and/or channel associated with motor mne. With "dump2", the output includes the SCPI protocol commands used to read the values. The optional arg can be one of the strings "device", "module" or "channel" to only show parameters associated with that specified level of the controller. Alternatively, arg can be a pattern that matches descriptions when using "dump" or SCPI commands when using "dump2".

The pattern matching is case insensitive. The string may contain the standard "globbing" meta characters: *, ? and []. (A * matches any string, while a ? matches any single character. With the [...] pattern, any string that contains the characters within the square brackets is matched. Two characters separated by a hyphen specify a range of characters that will match. An initial ^ negates the enclosed character set.)

With no arguments to limit the parameters, all the available "properties" documented in version 1.0.12 of the "MCS2 Programmer's Guide" are displayed.

For example, motor_par(0, "dump", "module") produces:

         Power supply enabled:  1
                 Module state:  0x0001
                                0x0001 present (1)
                                0x0002 booster present (0)
                                0x0004 adjustment active (0)
                                0x0008 I/O module present (0)
                                0x0100 comm failure (0)
                                0x1000 high voltage failure (0)
                                0x2000 high voltage overload (0)
                                0x4000 over temperature (0)
Number of bus module channels:  3
       Bus module temperature:  39

The command motor_par(0, "dump", "gain") displays:

Positioner proportional gain:  120
    Positioner integral gain:  0
  Positioner derivative gain:  10

while the command motor_par(0, "dump2", "gain") displays:

Positioner proportional gain:  :CHAN:TUNing:GAIN:P = 120
    Positioner integral gain:  :CHAN:TUNing:GAIN:I = 0
  Positioner derivative gain:  :CHAN:TUNing:GAIN:D = 10
        Positioner PID shift:  :CHAN:TUNing:GAIN:SHIFt = 10

The SCPI commands displayed above can be used with the command pass through options below. The SCPI syntax allows both a short form and long form. spec shows the short form of the command in upper case. The lower case letters complete the long form. The commands themselves are case insensitive.

motor_par(mne, "send", cmd)

Sends the string cmd to the MCS2 channel assigned to motor mne. Note, spec will prepend the SCPI ":channel" prefix and channel number to the command. For example, to set the power save delay to 100 milliseconds one could use:

motor_par(mne, "send", "sensor:delay 100")
motor_par(mne, "read", cmd)

Sends the string cmd to the MCS2 channel assigned to motor mne, and returns the reply. Note, spec will prepend the SCPI ":channel" prefix and channel number to the command, and append the "?" needed for all read commands. For example, the following can be used to read the channel temperature:

p motor_par(sz, "read", "temperature")
motor_par(mne, "usend", cmd)
Sends the string cmd to the MCS2 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 MCS2 controller unit assigned with motor mne, and returns the reply. Use this option for commands that are not associated with a specific channel. Note, spec will and append the "?" needed for all read commands. For example, the following can be used to read the system temperature:

p motor_par(sz, "uread", "module0:temperature")