The 4MS SMDM. may be used to drive up to four two phase stepping motors and associated limit switches, position sensors and clamps/brakes.

Because the unit employs multiplexing of the power stage, only one motor may be moved at a time. However, the step count for each motor and various other parameters are stored so that continuity of position is maintained, even after a power-down, by the use of battery-backed RAM.

Software control over many of the parameters enables the user to configure the module to the application.

This control can be split into three distinct groups of commands.

1) Operating commands.

2) Calibrating commands.

3) Engineering control commands.

Before the unit can be used, the motor type, limit switch and position sensor configurations along with a clamp or brake applicable to each mechanism require specification. There are commonly two types of mechanism driven by stepping motors within instrumentation :-

1) Linear slide assemblies, usually driven by a ball screw and having distinct limits of travel.

2) Rotary assemblies which may be rotated through more than 360 degrees in either direction and thus have no limits, for example filter wheels.


The standard SMDM. gives the user the choice of I or 3 Amps. per phase, twin phase with a phase rotation or step pattern giving half-step movement.

The unit was primarily designed for use with the SLO-SYN M061-FCO2 and M063-FCO6 motors, having nominal winding voltages of 5.0V and 3.4V respectively.

Because the SMDM. drives the windings from +24V with switchedmode current regulation, it gives good torque and acceleration performance and also eliminates wasted power in the ballast resistor of the conventional L/R drive.

Although nominally rated at 1 or 3 Amps. per phase motors with higher ratings may be successfully driven with some degradation of torque characteristics.

e.g. M093-FCO7 ( 3.5 Amps per phase rated).


The SMDM. has two limit switch inputs for each motor. These limit switches should be normally closed contacts which break when the limit is activated. Internally they are wired in series so that if either switch is operated the power is disconnected from the motor and its associated clamps or brakes.

In the case of a linear slide type assembly, the limits should be positioned at either end of the travel, just beyond the software defined limits of travel, and inside any physical end stops.

The lower limit should be mounted at the end of the mechanism corresponding to the maximum anticlockwise rotation of the motor and the upper limit at the end corresponding to the maximum clockwise rotation of the motor.

Note that the limits must be set relative to the motor's rotation because in the event of a limit being activated and subsequent engineering intervention, the SMDM. will automatically correct any INDEX command.

A mechanism which can be rotated indefinitely in either direction implicitly requires no limit switches. However, software end of travel limits still apply within the SMDM. since the maximum range of travel is 999,999 half steps using the INDEX command.

To overcome this problem and allow indefinite rotation a CYCLE command is included which does not increment the step count displayed in the STATUS and is not limited by an upper step count limit.


# = number of steps, value, motor number (1 to 4), etc
d.p. = double prescision number with a .

The above MOTOR commands are available to the user they cover all of the expected operations that the SMDM. has been designed for. After a reset the system seals the vocabulary and gives access to the user commands only. To gain access to all commands, motor, forth & editor then first UNSEAL after a reset.

The following description of each of the user commands implies no order of preference in their use, although some variables have to be set before access to any move command. These are noted in the text along with the user command in question.

An acknowledgement return is given after each "!" Motor command. These are returned as :- #A line feed, carriage return.or #N0x line feed, carriage return.

Where x is a number between 0 - 6.

0 = mechanism busy.

1 = out of range, value or direction.

2 = invalid motor no. ( not 1 - 4)

3 = motor not initialised.

4 = !+LIMIT is set to zero.

5 = Limit switch activated.

6 = Not set to cycle mode.

!+LIMIT (+limit d.p. ---)

User command requiring a double precision number in full or half steps, this number is checked for < 999,999 and not negative. Will accept zero ( d.p.) for solenoid operations only and defaults to zero after a RESTORE.

The step count entered must be adequate for the mechanism to move its full travel inside any physical end stops or final limit switches. This variable must be set before INITIALISE, INDEX & +/-JOG. It is automatically placed in an array dependant on the channel number ( MUX selected, the array being retained in the battery backed ram.

INITIALISE (motor #)

User command to find and set datum.

This important command turns the motor in an anticlockwise direction after first releasing any mechanism clamps set in !MOTSOL until the datum sensor(s) have been reached. The velocity is set by !ENG-VEL until the switch is located whereupon the direction is changed clockwise to step the mechanism clear of the switch in 25 step steps. If still in the switch then the motor is moved a further 25 steps & tested again. This test is repeated a maximum of 60 times.

Once clear of the switch the motor is moved anticlockwise once again to find the true switching edge of the switch. The speed this is done is at 50s/sec. for a maximum of 800 steps continuously checking the switch edge in multiple reads to ensure that any interference spike is not read as the switch edge. If this sequence is successful then the INITIALISE flag in the status will be set for that particular channel & the system will return an #A Lf.Cr acknowledgement.

The clamps are applied and the motor power switched off. The step count shown will be that set in !DATUM.
But if unsuccessful then the flag is not set in the status and the system returns a #N03 Lf.Cr acknowledgement.

!DATUM (datum-position d.p. ---)

User command which expects a double precision number and is checked against !+LIMIT for range.

System defaults to zero on RESTORE.

!DELAY ( # )

User command which holds a delay value for the selected motor of

1.25mS setup + 0.4 mS. per loop approx.

This delay is used to allow solenoid action in a clamp mechanism to complete its action before motor power is applied.

System defaults to 120 on RESTORE which = 50 mS. approx.


User command which selects either four or eight step mode. The initialised flag will be reset as the step count will be incorrect. Returns #A Lf.Cr.

System defaults to 8STEP table on RESTORE,

MUX (motor #)

User command to multiplex system to required channel.

Cheeks number to be in range but will not allow it to be changed whilst any task is active. Applies mechanism clamps by switching off solenoids as set in !MOTSOL. Returns #A Lf.Cr.

Two error messages :- #N00 Lf.Cr. = mechanisms busy.

or #N02 Lf.Cr. = out of range.

System defaults to 1 MUX on RESTORE.

!ENG-VEL (# steps/sec)

User command to store the engineering velocity. Expects number of full or half steps. Cheeks range to be within 200-3000 full or half steps/sec..

Used during INITIALISE as the set velocity to locate the datum switch, and when in Engineering Control.


User command to turn on or off the solenoids associated with the MUXed channel where

1 = Turns solenoid A on/off.

2 = Turns solenoid B on/off.

3 = Turns both solenoids on/off.

These commands are not to be confused with the !MOTSOL facility, they give individual control by the user over a particular solenoid set, & are switched off when MUXing to another channel.

!INIT-POSITION (position d.p ---)

User command to use with mechanisms with a position transducer. Expects d.p. number which is loaded into the motor's step count provided it is < !+LIMIT and not negative. Sets status to initialised.

Always call +/-JOG after, to reconfirm position as physical and electrical positions may not have been aligned.

INDEX (# steps d.p., motor # )

User command to move motor.

Only allows user to move motor if background tasks are idle and not moving. Checks motor ( MUX number is within range. The number of steps is in half or full steps dependent on mode set with 4/8STEP.

Once !+LIMIT has been set then each channel can be INDEXed without the need to MUX first.

?STATUS or ???

User command to display the current status of all 4 channels. If tasks are idle & both solenoids off then it updates all of
the status otherwise only the muxed section is updated. It outputs status bytes and step count for each motor. Zeroes the reset flag after the first status read.

The status returned is in the following format.



NAMEX a name to identify the box.

It is suggested the name is made up of the utility network instrument controller name plus a number 0-F

eg. ISIS2

R the RESET flag only set on first status read after a reset, zeroed thereafter.

M the MOTOR which is currently selected 1 - 4.

S the status of the solenoids associated with that

A bit 0= initialised, bit 1=moving, bit 2 = lower limit, bit 3 = upper limit

B bits 0-3 corresponds to position switches 1-4.

C bit 0 = Engineers Control asserted.

X decimal digit of the six digit step count.

!MAX-VEL (# steps/sec ---)

User command which stores the MAXimum VELocity. Range checked 200 < > 4000.

Defaults to 200 steps/sec on RESTORE.

PARK ( motor #)

User command which returns the selected motor to the datum position + 10 steps allowing quick initialisation on
subsequent power up. MUX no. checked to be within range.

!MOTSOL ( # )

User command to designate the solenoids used automatically during an INDEX. Where n = 0 - 4.

0 = both OFF,

1= A on,

2 = B on,

3 = both ON

4 = allows MUXed channel to operate in CYCLE mode.

Here the use of automatic solenoid operation in either CYCLE or INDEX is prohibited whilst 4 is set in !MOTSOL.

CYCLE ( # steps/sec. d.p., motor # )

User command which allows continuous motor rotation without incrementing the step count which is kept at zero. Checks that, all tasks are idle, 4 is stored in !MOTSOL, MUX no. and the steps/sec. are within range. i.e. 200 < > 4000 s/sec. No automatic solenoid operation is available but solenoids can be accessed using ONSOL or OFFSOL.

A negative steps/sec. number will rotate the motor anticlockwise. i.e. -1542. 2 CYCLE

This will rotate motor 2 shaft anticlockwise at 1542 steps/sec. !DATUM is set to zero. Three possible negative acknowledgements will be returned dependant on the fault.

#N00 Lf.Cr. = mechanism busy.

#N01 Lf.Cr. = out of range.

#N02 Lf.Cr. = invalid motor no. not 1 - 4.

#N06 Lf.Cr. = not set to CYCLE mode i.e. not 4 !MOTSOL.


User command which will STOP the motor immediately. Only acts if a move is in progress, by removing the power & applying clamps. Updates status to not moving and not initialised.

Returns #A Lf.Cr.

!NAME ( ---n1 - n5 ***)

User command which stores the name of the module. Must be 5 characters. As an example, the name of the instrument controller (4 chars. ) plus the box number ( 0 - F )  ie  ISIS2. Defaults to 5 spaces on RESTORE.


User command which stores current rating of each motor per channel.

Checks range between 0 or 1. Where 0 = 1 amp. 1 = 3 amp.

Defaults to 1 amp. upon a RESTORE.


User commands which give access to Engineer's Control.

Functions on MUXed motor only by finishing any move that is in progress & releasing solenoids.

Updates status to not moving and not initialised.

Sets Engineer's Control bit in status.

Sets speed to engineering velocity & enables character echo to vdu. Returns #A Lf.Cr.

These commands allow an engineer to operate a mechanism at different velocities without disturbing the normal operation command velocity, they can be used in the course of diagnostic work on a particular mechanism.


User command to release vocabulary to all commands, MOTOR, FORTH and editor.

SEAL returns access to user commands only. The system powers up in the SEALed condition upon a reset, but not changed on RESTORE.


User command to store the number of reference sensors that are to be used during initialise. Checks range 1 or 2.

Defaults to 1 sensor on RESTORE.


User command which sets system to default settings and initialises working variables,


User command to bring a mechanism to a controlled halt which is not immediate stop as in the use of STOP.

Can be used in both CYCLE & INDEX modes and employs the use of the ramp to bring the mechanism to a gentle halt by ramping down until the motor speed is 200 steps/sec. and then the motor is stopped.

When used with INDEX the final step count shown in the status is the number of steps finally travelled including the ramp down, not the number of steps first requested.

This command was primarily intended to be used with CYCLE.

!SLOPE  ( # )

Stores slope rate to be used during acceleration and deceleration. Range checked 1 < > 50. Defaults to minimum ramp rate after a RESTORE.

+JOG or -JOG

Single step JOG in the positive or negative direction on last used motor.

!+LIMIT must first have been set.