Welcome | spec | C-PLOT | Support | Users | Contact
 



Motors
Counters
MCA
Interfaces

    Hardware reference : Motors : Oregon Motor Controller

Oregon Motor Controller



Interface:
  • ISA, PCI, VME

Manufacturer:


config file

PC_OMS = device_name number_of_motors INTR|POLL
PC_OMSP = base_address number_of_motors POLL
PC_OMSP58 = base_address memory_address number_of_motors POLL
PC_OMSV = VME_address number_of_motors IRQ_number INTR|POLL
PC_OMSV58 = VME_address number_of_motors IRQ_number INTR|POLL

edconf:   DEVICES screen
MOTORS        DEVICE   ADDR  <>MODE  NUM                                <>TYPE 
   YES    /dev/oms00           INTR    4        Oregon Micro Systems PCX/38/39 
   YES                0x330    POLL    4 Oregon Micro Systems PCX/38/39 polled 
   YES        0xe000  0x300    POLL    4      Oregon Micro Systems PC58 polled 
   YES               0xfc00    IRQ5    8             Oregon Micro Systems VME8 
   YES               0xf000    POLL    8            Oregon Micro Systems VME58 
      
spec currently supports PC board and VME module Oregon Micro Systems motor controllers.

For the PC versions of spec, the PCX, PC38 or PC39 models may be used in two, four, six or eight motor configurations. (Note, the newer PC34 and PC48 models should be used with the PCX/38/39 configuration.) spec can operate with a CSS-supplied driver (on certain platforms) or completely from user level using I/O port polling. The driver does require a dedicated PC interrupt, and at present, is limited to support of only one board. If I/O port polling is used, spec allows use of multiple boards.

The driver is contained in the file oms.c in the drivers subdirectory of the spec distribution. See the README file in the that directory for instructions on installing the driver into the UNIX kernel.

There is no driver for the PC58 board. It is only supported in polled mode.

For VME, the VME8, VME44 and VME58 models are supported. The VME8 operates eight motors, while the VME44 operates four motors with encoders, although software options for encoders are not currently implemented in spec . Multiple OMS VME motor controllers can be used simultaneously and are generally operated in polled mode. Interrupt-driven mode is currently only supported with the National Instruments MXI-VXI controllers.

OMS motor controllers can have from two to eight motors. spec numbers the motors the OMS manuals designate X, Y, Z, T, U, V, R and S as 0 through 7, in that order.

The first example above selects the PC board with the driver node /dev/oms00. The driver may be used in either interrupt or polled mode. Interrupt mode means the spec program will be interrupted when motors complete their motions or hit a limit. In polled mode, the wait() function must be called repeatedly to check the status of the motor. Interrupt mode generally gives better performance, although in earlier versions of spec , software problems could be overcome by using polled mode. A PC interrupt is always required when the driver is used, even when polled mode is selected.

The second example selects the PC board with I/O port polling, with the board's base address at 0x330 , and with four motors on the board.

The third example selects the PC58 board at I/O port 0x300 . The PC58 also require 4,096 bytes of low memory. The example configuration with the address entered as 0xE000 in the DEVICE column selects a real memory address of 0xE0000 , as the value in the configuration is multiplied by 16.

The fourth example selects the VME8 and VME44 modules, with the board's A16 base address jumpered at 0xFC00 and with the VME interrupt request jumpered for IRQ5 . Any of the VME IRQ vectors may be selected as can be polled mode. If more than one VME OMS controller is being used, all must be in polled mode or all must use interrupts. Different boards may use the same interrupt, though.

The last example selects the VME58 model. Note, this model requires 4096 bytes of A16 address space, so valid addresses have one hexadecimal digit followed by three zeroes.

On the motor screen (M) of the configuration editor, all of the OMS controllers use the symbol OMS or OMS_E in the controller field of the screen. The latter indicates the motor is being used with an encoder.

 

Function Reference:

The following special commands are available through the motor_par() function. The two letter commands are direct implementations of commands described in the OMS manual. Refer to that manual for more information. Not all commands are available on all versions of the OMS controllers or on all firmware versions for a particular controller.

motor_par(motor, "PA", mode)
If mode is 1, the controller turns motor power on before each move and off after the move (assuming motor power is controlled by the auxiliary output pins). If mode is 0, motor power stays on.
motor_par(motor, "SE", msec)
Sets the settling time in milliseconds to be used before the power is reduced in PA mode.
motor_par(motor, "AF")
Turns auxiliary power off.
motor_par(motor, "AN")
Turns auxiliary power on.
motor_par(motor, "BH", mask)
Sets general purpose output pins high, according to which of bits 0-13 in mask are set.
motor_par(motor, "BL", mask)
Sets general purpose output pins low, according to which of bits 0-13 in mask are set.
motor_par(motor, "BX")
Returns the state of the general purpose input pins. A one in a binary position in the value returned indicates that the corresponding pin is low.
motor_par(motor, "RB")
Returns the direction of the general purpose I/O lines. Output bits return a one, while input bits return a zero.
Commands Pass Through
motor_par(motor, "send", cmd_string)
Sends the string cmd_string to the OMS channel associated with motor . For example, set cmd_string to "LF" to disable hardware limits on the associated motor.
motor_par(motor, "read", cmd_string)
Sends the string cmd_string to the OMS channel associated with motor , as above, and returns a string containing the response. For example,
    1.FOURC> print motor_par(tth, "read", "RP")
    240000

1.FOURC>
Results in the string " AX RP\n " being sent to the controller.
Asynchronous Surface Scanning The following commands implement a special asynchronous, two-dimensional scanning mode available with newer versions of the OMS firmware. The scan is in the form of a repeating square wave, as illustrated below.

     -----   -----   ----- 
     |   |   |   |   |   | 
    d|   |   |   |   |   | 
    y|   |   |   |   |   | 
     |   |   |   |   |   | 
     o   -----   -----   ---> dx

The scan starts at the point o , as specified with the commands below, and continues in the x and y directions in the range as specified with the commands below. At the end of the range, the motors are returned to the starting position and the scan is repeated.

Two motors must be configured with the mnemonics dx and dy in order for the asynchronous scanning mode to be available. When not in scanning mode, these motors may be moved normally.

Once started, the scanning will continue until explicitly stopped either with the "stop_scan" command (shown below), with a ^C typed at the keyboard or with a sync command (which aborts the motors, but doesn't update spec 's positions). While scanning, the wait() function will not indicate these motors are moving. The getangles command will, however, return the current positions of these motors.

When the dx and dy motors are scanning, the remaining motors may be moved independently.

motor_par(motor, "x_start", value)
Sets the starting position for the dx motor.
motor_par(motor, "x_range", value)
Sets the extent fo the motion in the x direction.
motor_par(motor, "x_stepsize", value)
Sets the size of each step in x. The number of steps is determined by dividing this number into the range for x.
motor_par(motor, "y_start", value)
Sets the starting position for the dy motor.
motor_par(motor, "y_range", value)
Sets the extent fo the motion in the y direction.
motor_par(motor, "start_scan", value)
Starts the asynchronous scan.
motor_par(motor, "stop_scan", value)
Stops the asynchronous scan.

Top