<< Click to Display Table of Contents > 

SAMLight Manual > Motion Control Settings > Step & direction motion controller > Type 8 - Generic stepper controller

Type 8 - Generic stepper controller
Previous pageReturn to chapter overviewNext page

Key features

Available for USC and RTC controller cards

Up to 7 axes can be controlled

Axes move one after another

The IOs of the scanner controller card are used to control the stepper

Control the motor via step and direction signal

The maximum possible frequency of the step signals is 10kHz using OPTO_IOs, 25kHz (USC-1: 12.5kHz) using other possible outputs (Stepper, Digi_IOs, 8bit)

Output freq. lower than expected

oPeriod = Period_expected + Dead_time

oDead_time: USC-1 = 60us, USC-2/-3: 20us

Homing procedures available

Required settings

Set 'Type=8' in sc_motion_settings.txt in <SCAPS>\system\

Define sc_motion_stepper_settings.txt in <SCAPS>\system\ as described below

Enable 'Motion Control' in SAMLight (Settings→System→Extras).

How to create the settings file

The file 'sc_motion_stepper_settings.txt' is a plain text file that contains different configuration parameters.

A line which begins with a # sign is interpreted as a comment and will be ignored.

All parameters have to start exactly at the beginning of a line.

Global parameters have to be specified only once at the head of the settings file.

Axis-specific parameters have to be defined for all axes separately.

The axis-specific (and the optional) parameters have to be arranged in one block of parameters per axis. Each block begins with the parameter 'axis'.

The optional parameters do not have to be specified if you do not want to use them.

A parameter gets defined by typing <parameter>=<value>, parameter and values are described below,
e.g. 'axis=0' defines the parameter 'axis' with the value '0'

 

Global parameters (type 8): These parameters have to be defined once at the head of the settings file.

 

Debug

Enables the debug log.

Value

Function

0

Disable debug mode

1

Enable debug mode

Enable debug mode to log debug information in '<SCAPS>\system\sc_motion_stepper_debuglog.txt'. Only enable this option if you need it, because there can be huge amounts of data that are logged into this file.

 

DisableHomingDuringStartUp

No homing on startup.

Value

Function

0

Enable homing on startup of SAMLight

1

Disable homing on startup of SAMLight

If set to '1', homing is just performed when pressing 'Control→Home' and not when software is started.

 

Axis parameters (type 8): All of the following parameters has to be defined for each axis after the global parameters in the settings file. Each of these axes can be configured differently.

 

axis

Sets the number of axis.

Value

Function

0...6

Index of axis

Zero based index of up to 7 axes. Defines the order of axis movement and display order in 'SAMLight→Control'. This parameter has to be at the beginning of each axis specific parameter block.

 

dname

Sets the name of axis.

Value

Function

a...Z

Name of axis

Only the first character is used as axis-name in 'SAMLight→Control'.

 

mode

Sets the type of the axis.

Value

Function

POSITION

Defines a straight axis [mm].

ANGLE

Defines a rotational axis [°].

Depending on the mode of the axis several parameters has to be adjusted (factor, incperrot, sfactor, defspeed, see below).

 

incperrot

Converts degrees into steps for ANGLE mode.

Unit: steps/360°

This value defines how many increments are needed for a whole rotation. 'factor' and 'sfactor' have to be equal to
(1/360)*'incperrot'. This parameter is only used in ANGLE mode.

 

factor

Converts mm (or °) into steps.

POSITION mode, unit: steps/mm

ANGLE mode, unit: steps/°

Value has to be equal to
(1/360)*'incperrot'

This value defines how many increments are needed for 1mm (or 1°). Depending on the factor of the axis several parameters has to be adjusted (incperrot, sfactor, llimit, hlimit, hslimit, accel, decel, refspeed, refspeed2, refpos see below).

 

sfactor

Sets speed factor.

POSITION mode, unit: steps/mm

ANGLE mode, unit: steps/°

Value has to be equal to 'factor' for POSITION and ANGLE mode.

 

llimit

Sets the lower limit.

Unit: steps

No movement below this limit will be possible. Minimum value for llimit is '-1E13'. To get the 'llimit' in steps like it is required here the value in mm (or °) has to be multiplied by the 'factor'.

 

hlimit

Sets the upper limit.

Unit: steps

No movement above this limit will be possible. Maximum value for hlimit is '1E13'. To get the 'hlimit' in steps like it is required here the value in mm (or °) has to be multiplied by the 'factor'.

 

hslimit

Sets the upper speed limit.

Unit: steps/s

No speed above this speed limit will be possible. To get the 'hslimit' in steps/s like it is required here the value in mm/s (or °/s) has to be multiplied by the 'factor'.

 

defspeed

Sets default speed displayed in SAMLight user interface.

POSITION mode, unit: mm/s

ANGLE mode, unit: °/s

This value has to be smaller or equal than 'hslimit'/'sfactor'.

 

accel

Sets increase of speed (in steps per second) per step.

Unit: steps/s
per step

A value of '-1' or '0' disables acceleration. In this case the step frequency corresponds to the applied speed in SAMLight. This is not recommended because of possible hardware damage and miscalibration. Please consider the unit which leads to an exponential acceleration.

 

decel

Sets decrease of speed (in steps per second) per step.

Unit: steps/s
per step

A value of '-1' or '0' disables deceleration. In this case the step frequency just stops when the in SAMLight applied position has been reached. This is not recommended because of possible hardware damage and miscalibration. Please use only positive values for this parameter. Please consider the unit which leads to an exponential deceleration.

 

accStartSpeed

Sets start speed.

POSITION mode, unit: mm/s

ANGLE mode, unit: °/s

This value has to be positive and smaller or equal than 'hslimit'/'factor'. If the in SAMLight demanded speed is smaller than the value for this parameter the axis will move with the lower speed without acceleration.

 

decStopSpeed

Sets stop speed.

POSITION mode, unit: mm/s

ANGLE mode, unit: °/s

This value has to be positive and smaller or equal than 'hslimit'/'factor'. If the in SAMLight demanded speed is smaller than the value for this parameter the axis will move with the lower speed without deceleration.

 

stepIO

Sets output bit of the scanner controller card for the step signal.

Value: refer to Stepper I/O parameters

 

dirIO

Sets output bit of the scanner controller card for the direction signal.

Value: refer to Stepper I/O parameters

Since all axes move successively the 'dirIO' bit can be the same for all axes. Although the parameter 'dirIO' has the same value for multiple axes it still has to be defined for every axis.

 

dirvalue

Sets the polarity of the 'dirIO' signal for positive movement.

Value

Function

0

low active

1

high active

 

DelayAfterDir

Sets a delay which is executed after change of the direction.

This command is used to specify a delay in us to be waited between a change in direction and the first step in the new direction.

 

refIO

Sets input bit of the scanner controller card for the reference signal.

Value

Function

Stepper
I/O
parameters

Default homing, 'refmode=(1..6)': In type 8 reference movements are software controlled and (due to the limitations of the pc) the maximum speed is much lower and the signal is noisy (jitter).

1

(ext. stop)

Fast homing (USC only): If this value is used together with 'refvalue=1' and 'refmode=(1 or 4)' the movement to the reference switch is performed with normal speed. This value is recommended only if you use just one axis.

20

No homing: Use this value and 'refmode=0' if no reference switch is used.

 

refvalue

Sets the polarity of the 'refIO' signal.

Value

Function

0

low active

1

high active

 

refmode

Sets the behavior of homing movement.

Value

Function

Common reference modes:

0

No homing movement, current position is set to 'refpos'

1

Go to switch in neg. dir. and leave it in pos. dir.

4

Go to switch in pos. dir. and leave it in neg. dir.

Uncommon reference modes:

2

Go to switch in neg. dir. and leave it in neg. dir.

3

Go to switch in neg. dir. and stay there

5

Go to switch in pos. dir. and leave it in pos. dir.

6

Go to switch in pos. dir. and stay there

 

refspeed

Sets the speed of the homing movement.

Unit: steps/s

This value defines how fast the motor moves in case of a homing movement to find the reference switch. Reference movements are software controlled and have due to limitations of the PC a much lower maximum speed. To get the 'refspeed' in steps/s like it is required here the value in mm/s (or °/s) has to be multiplied by the 'factor'.

 

refspeed2

Sets the speed while leaving the reference switch.

Unit: steps/s

If refspeed2 is '-1', 'refspeed'/4 is used. To get the 'refspeed2' in steps/s like it is required here the value in mm/s (or °/s) has to be multiplied by the 'factor'.

 

refpos

Sets the home position of the axis.

Unit: steps

This value will be set after SAMLight startup and after a homing movement. refpos should be outside the position limits 'llimit' and 'hlimit' to avoid that the reference switch is activated during normal movement. To get the 'refpos' in steps like it is required here the value in mm (or °) has to be multiplied by the 'factor'.

 

Optional axis parameters (type 8): All of the following optional parameters can be defined for each axis. Each axis can be configured differently. If no parameter is specified the corresponding feature will not be used.

 

SignalAxisMoving

Sets an output bit during an axis movement.

Value

Function

0

inactive

1

active

 

SignalAxisMovingStateBitPosition

Sets output bit of the scanner controller card for the 'SignalAxisMoving' signal.

Value: refer to Stepper I/O parameters

 

SignalAxisMovingState

Sets the polarity of the 'SignalAxisMoving' signal.

Value

Function

0

low active

1

high active

 

SignalAxisMovingStatePreDelay

Delays the start of the motion.

Unit: ms

Use SignalAxisMovingStatePreDelay to add a delay before the start of the motion.

 

MoveThisAxisFirst

Sets homing priority of this axis.

Value

Function

0

disable homing priority

1

enable homing priority

This parameter can only be used for one axis. If it is defined for more than one axis the parameter will be ignored for all axis.

 

corr1    0.0      0.0

corr2  500.0 100000.0

corr3 1000.0 200000.0

corr4 1500.0 300000.0

corr5 2000.0 400000.0

 

<corr#>      <mm#>       <steps#>

Correction table instead of parameter 'factor' for POSITION mode.

This parameter is defined without '=' sign in the form <corr#> <mm> <steps>.

This correction table can be used to compensate nonlinearities of a straight axis. If 'factor' is defined, the correction table is ignored. Use for corr1 the same step value as for 'llimit' and for corr5 the same step value as for 'hlimit'.

 

Example sc_motion_stepper_settings.txt file for 1 straight and 1 rotational axis for 'Type=8':

# Global parameters:

Debug=0

DisableHomingDuringStartUp=1

 

# Z-axis parameters:

axis=0

dname=Z

mode=POSITION

 

factor=200.0

sfactor=200.0

llimit=-400000

hlimit=400000

hslimit=6000

defspeed=20.0

accel=50

decel=50

accStartSpeed=5.0

decStopSpeed=5.0

 

stepIO=1

dirIO=3

dirvalue=0

 

refIO=2

refvalue=1

refmode=0

refspeed=2000.0

refspeed2=500.0

refpos=0.0

 

# R-axis parameters:

axis=1

dname=R

mode=ANGLE

 

factor=10.0

incperrot=3600

sfactor=10.0

llimit=-1E13

hlimit=1E13

hslimit=6000

defspeed=400.0

accel=50

decel=50

accStartSpeed=5.0

decStopSpeed=5.0

 

stepIO=4

dirIO=5

dirvalue=0

 

refIO=3

refvalue=1

refmode=0

refspeed=2000.0

refspeed2=500.0

refpos=0.0