Home > Micro-Manager Device Adapter

Micro-Manager Device Adapter for TOFRA Devices

Installation Instructions

1. The device adapter, which implements software interface to TOFRA devices, is included in the Micro-Manager installation.

2. To create a configuration file you can either use the Micro-Manager GUI, or add the following lines (use as a guideline) to the corresponding sections in the configuration file (.cfg) that you currently use. Change COM3 to the actual COM port used to communicate with the device. In the example below five devices are defined: one Z-drive, two filter wheels, one stage, and one filter cube slider. Any number of devices can be defined in the configuration file in a similar way. Names given to the devices here (TZD, TFW, TFW2, TXY, TCS) must be the same names as used in the scripts, see below.

 

# Reset
Property,Core,Initialize,0
Property,Core,TimeoutMs,60000

# Devices
Device,COM3,SerialManager,COM3
Device,COM4,SerialManager,COM4
Device,TFW,Tofra,TOFRA Filter Wheel
Device,TZD,Tofra,TOFRA Z-Drive
Device,TFW2,Tofra,TOFRA Filter Wheel
Device,TXY,Tofra,TOFRA XYStage
Device,TCS,Tofra,TOFRA Cube Slider
Device,LED,Tofra,TOFRA RGB LED

# Pre-init settings for COM ports
Property,COM3,AnswerTimeout,500.0000
Property,COM3,BaudRate,9600
Property,COM3,DelayBetweenCharsMs,0.0000
Property,COM3,Handshaking,Off
Property,COM3,Parity,None
Property,COM3,StopBits,1

Property,COM4,AnswerTimeout,500.0000
Property,COM4,BaudRate,9600
Property,COM4,DelayBetweenCharsMs,0.0000
Property,COM4,Handshaking,Off
Property,COM4,Parity,None
Property,COM4,StopBits,1

# Pre-init settings for devices
Property,TFW,Port,COM3
Property,TFW,NumPos,10
Property,TFW,ControllerName,1
Property,TFW,HomeOffset,0
Property,TFW,SlewVelocity,5000
Property,TFW,InitVelocity,500
Property,TFW,Acceleration,10
Property,TFW,HoldCurrent,5
Property,TFW,RunCurrent,60

Property,TZD,Port,COM3
Property,TZD,ControllerName,2
Property,TZD,SlewVelocity,50
Property,TZD,InitVelocity,5
Property,TZD,Acceleration,1
Property,TZD,HoldCurrent,5
Property,TZD,RunCurrent,25
Property,TZD,MotorSteps,400
Property,TZD,FullTurnUm,100
Property,TZD,WithLimits,0

Property,TFW2,Port,COM3
Property,TFW2,NumPos,12
Property,TFW2,ControllerName,5
Property,TFW2,HomeOffset,0
Property,TFW2,SlewVelocity,5000
Property,TFW2,InitVelocity,500
Property,TFW2,Acceleration,10
Property,TFW2,HoldCurrent,5
Property,TFW2,RunCurrent,60

Property,TXY,Port,COM3
Property,TXY,ControllerNameX,3
Property,TXY,ControllerNameY,4
Property,TXY,StepDivideX,256
Property,TXY,StepDivideY,256
Property,TXY,SlewVelocityX,10000
Property,TXY,SlewVelocityY,10000
Property,TXY,InitVelocityX,500
Property,TXY,InitVelocityY,500
Property,TXY,AccelerationX,100
Property,TXY,AccelerationY,100
Property,TXY,HoldCurrentX,5
Property,TXY,HoldCurrentY,5
Property,TXY,RunCurrentX,65
Property,TXY,RunCurrentY,65
Property,TXY,MotorStepsX,400
Property,TXY,MotorStepsY,200
Property,TXY,LeadUmX,1000
Property,TXY,LeadUmY,1000
Property,TXY,LimitPolarityX,0
Property,TXY,LimitPolarityY,0

Property,TCS,Port,COM3
Property,TCS,NumPos,6
Property,TCS,ControllerName,6
Property,TCS,SlewVelocity,400000
Property,TCS,InitVelocity,100000
Property,TCS,Acceleration,1000
Property,TCS,HomeSlewVel,50000
Property,TCS,HomeInitVel,5000
Property,TCS,HomeAccel,100
Property,TCS,HoldCurrent,5
Property,TCS,RunCurrent,70
Property,TCS,HomeOffsetUm,700
Property,TCS,BetweenPosUm,40000
Property,TCS,LeadUm,25400
Property,TCS,MotorSteps,200
Property,TCS,StepDivide,16

Property,LED,Port,COM4

# Initialize
Property,Core,Initialize,1

4. Copy script files in TofraScripts.zip to the \scripts subdirectory under Micro-Manager root.

5. Start Micro-Manager and at startup choose the configuration file with the above changes. When Micro-Manager loads open Tools/Script Panel. Open the script files and run them to get familiar with the operation.

Source code to create mmgr_dal_Tofra.dll is here.

Explanation of properties

1. Filter wheel:

Port - COM port to which the device is connected. All motorized devices are on the same serial line.

NumPos - Number of positions; valid values: 10, 12, 18, 22.

ControllerName - Name (number) of the motor controller on the serial line. This number is set in the controller with a switch and can be changed by the user; usually 1, 5, and greater.

HomeOffset - Number of microsteps from the home switch to position 1. Used for fine-tuning; usually = 0.

SlewVelocity - Slew (maximal) velocity in microsteps/sec. For filter wheels microstep = 1/16 of step. Increase for faster switching, decrease for heavier filters.

InitVelocity - Initial velocity in microsteps/sec. Increase for faster switching, decrease for heavier filters. (For filter wheels microstep = 1/16 of step)

Acceleration - Acceleration in microsteps/sec^2. Increase for faster switching, decrease for heavier filters.

HoldCurrent - Hold current in percent of maximum, which is 2A. Value depends on the motor used in the wheel.

RunCurrent - Run current in percent of maximum, which is 2A. Value depends on the motor used in the wheel.

2. Z-Drive:

Port - COM port to which the device is connected. All motorized devices are on the same serial line.

ControllerName - Name (number) of the motor controller on the serial line. This number is set in the controller with a switch and can be changed by the user; usually 2.

SlewVelocity - Slew (maximal) velocity in microns/sec. For the Z-drive microstep = 1/256 of step. Increase for faster moves, decrease for more torque.

InitVelocity - Initial velocity in microns/sec. Increase for faster moves, decrease for more torque. (For the Z-drive microstep = 1/256 of step)

Acceleration - Acceleration in microns/sec^2. Increase for faster moves, decrease for more torque.

HoldCurrent - Hold current in percent of maximum, which is 2A. Value depends on the motor used in the Z-drive.

RunCurrent - Run current in percent of maximum, which is 2A. Value depends on the motor used in the Z-drive.

MotorSteps - Number of steps in one revolution of the motor, usually 400.

FullTurnUm - Microns of Z-travel per full turn of the fine focus knob.

WithLimits - 1 if Z-drive includes limits, 0 if not.

Position - This property could be set either to a string representing a numeric value of target position, or to one of two reserved strings: ORIGIN and HOME. ORIGIN sets the current position to 0. HOME performs homing.

Speed - Setting this property to a string representing a numeric value sets the axis in motion with the given speed.

Out1, Out2 - Digital outputs; set to 0 or 1.

Execute - Command strings for execution in Z controller, e.g. fast Z-stack acquisition: mmc.setProperty(zdrive,"Execute","gP10240J1M100J0M100G5R"); will repeat 5 times: move Z by 10240 microsteps, set digital output to snap an image.

 

3. XY Stage:

 

Port - COM port to which the device is connected. All motorized devices are on the same serial line.

ControllerNameX - Name (number) of the motor controller on the serial line for X axis. This number is set in the controller with a switch and can be changed by the user; usually 3.

ControllerNameY - Name (number) of the motor controller on the serial line for Y axis. This number is set in the controller with a switch and can be changed by the user; usually 4.

StepDivideX - Number of microsteps in a full motor step for X axis (valid values: 1, 2, 4, 8, 16, 32, 64, 128, 256).

StepDivideY - Number of microsteps in a full motor step for Y axis (valid values: 1, 2, 4, 8, 16, 32, 64, 128, 256).

SlewVelocityX - Slew (maximal) velocity in microns/sec for X axis. Increase for faster moves, decrease for more torque.

SlewVelocityY - Slew (maximal) velocity in microns/sec for Y axis. Increase for faster moves, decrease for more torque.

InitVelocityX - Initial velocity in microns/sec for X axis. Increase for faster moves, decrease for more torque.

InitVelocityY - Initial velocity in microns/sec for Y axis. Increase for faster moves, decrease for more torque.

AccelerationX - Acceleration in microns/sec^2 for X axis. Increase for faster moves, decrease for more torque.

AccelerationY - Acceleration in microns/sec^2 for Y axis. Increase for faster moves, decrease for more torque.

HoldCurrentX - Hold current for X axis in percent of maximum, which is 2A. Value depends on the motor.

HoldCurrentY - Hold current for Y axis in percent of maximum, which is 2A. Value depends on the motor.

RunCurrentX - Run current for X axis in percent of maximum, which is 2A. Value depends on the motor.

RunCurrentY - Run current for Y axis in percent of maximum, which is 2A. Value depends on the motor.

MotorStepsX - Number of steps in one revolution of the X-axis motor, usually 200.

MotorStepsY - Number of steps in one revolution of the Y-axis motor, usually 200.

LeadUmX - Lead of the X-axis ballscrew, i.e., distance by which the stage moves in X when the X-motor makes a full turn.

LeadUmY - Lead of the Y-axis ballscrew, i.e., distance by which the stage moves in Y when the Y-motor makes a full turn.

LimitPolarity - 0 - if limit switches are normally closed, 1 - if normally open.

PositionX, PositionY - These properties could be set either to a string representing a numeric value of target position, or to one of two reserved strings: ORIGIN and HOME. ORIGIN sets the current position to 0. HOME performs homing.

SpeedX, SpeedY - Setting these properties to a string representing a numeric value sets the axis in motion with the given speed.

Out1X, Out1Y, Out2X, Out2Y - Digital outputs; set to 0 or 1.

ExecuteX, ExecuteY - Command strings for execution in X or Y controller, e.g.: mmc.setProperty(stage,"ExecuteX","gP50000J1M100J0G5R"); will repeat 5 times: move in X by 50000 microsteps and set digital output to snap an image.

 

4. Cube Slider:

 

Port - COM port to which the device is connected. All motorized devices are on the same serial line.

NumPos - Number of positions; valid value: 6.

ControllerName - Name (number) of the motor controller on the serial line. This number is set in the controller with a switch and can be changed by the user; usually 6.

SlewVelocity - Slew (maximal) velocity in microns/sec. Increase for faster moves, decrease for more torque.

InitVelocity - Initial velocity in microns/sec. Increase for faster moves, decrease for more torque.

Acceleration - Acceleration in microns/sec^2. Increase for faster moves, decrease for more torque.

HomeSlewVel - Slew velocity for homing in microns/sec. Increase for faster moves, decrease for more torque.

HomeInitVel - Initial velocity for homing in microns/sec. Increase for faster moves, decrease for more torque.

HomeAccel - Acceleration for homing in microns/sec^2. Increase for faster moves, decrease for more torque.

HoldCurrent - Hold current in percent of maximum, which is 2A. Value depends on the motor.

RunCurrent - Run current in percent of maximum, which is 2A. Value depends on the motor .

MotorSteps - Number of steps in one revolution of the motor, usually 200.

StepDivide - Number of microsteps in one full step.

LeadUm - Lead of the leadscrew, i.e., distance by which the slider moves when the motor makes a full turn.

BetweenPosUm - Distance between the adjacent filter cube positions in microns

HomeOffsetUm - Offset from the limit switch to the first filter cube position in microns.

 

5. RGB LED Illuminator:

 

Channel1Intensity, Channel2Intensity, Channel3Intensity, Channel4Intensity - These properties can be set to a string representing relative intensity in the given channel with the range 0 to 1. 0 - is turned off. 1 is full intensity. In addition, the illuminator can be controlled by setting state, which is full intensity in one channel.

 

Home > Micro-Manager Device Adapter