The Newport MM4000 and MM4005 (referred together as MM4000 in this document) are intelligent motor controllers which can control 4 (MM4000) or 8 (MM4005) motors. They can control any mix of stepping motors and DC motors, with encoders. The controllers have a front panel for user control and communicate to a host via IEEE-488 (GPIB) or RS-232.
This MM4000 device package is written to provide full implementation of the features of the motor record. The VME crate communicates with the MM4000 either via GPIB (using any supported GPIB driver, e.g. National Instruments 1014 or Hideos GPIB) or via Hideos RS-232.
The communications settings of the MM4000 must be configured using the front panel menus. If GPIB is selected then the device address (range 1-31) must be entered. This device address must agree with that specified in the vxWorks startup script (see below). If RS-232 is selected then the baud rate, parity and stop bits and terminator must be selected. The baud rate, parity and stop bits must agree with those specified in the vxWorks startup script (see below). The terminator must be set to <CR> only.
It is important to set correctly the software limits of each motor using the front panel. If the software limits are correctly set then the motor will never hit a hardware limit. It is important to do this, because if a motor does hit a software limit the MM4000 turns off the motor power to all motors, which can be very annoying.
MM4000Setup(int numCards, int maxAxes)
numCards is the maximum number of MM4000 controllers
to be used. The
default value is 4 and the memory usage for unused controllers is very small.
If the default values of both numCards is
acceptable then MM4000Setup does not have to
be called from the vxWorks startup script.
MM4000Config(int controller, int portType, int addr1, int addr2)
This function must be called for each MM4000 controller to configure it.
card is the number of the controller being configured,
in the range 0 to numCards-1.
devMM4000.c and
drvMM4000.c.
devMM4000.c
contains the device support. These functions have knowledge of
the motor record and of how to call the routines in drvMM4000.c
They have no knowledge of the details of how the MM4000 works.
drvMM4000.c is true EPICS driver, with
init() and report() functions. However, its init() function does not do the
real initialization, since it needs the GPIB driver which may not have been
intialized before the MM4000 init() function is called. Thus, the real
initialization in drvMM4000 is done from a call from the device support init()
routine, which is called after all drivers have been initialized.
These files can all be
obtained in a
compressed tar file. This file should be untarred in a
<top>/xxxApp/ directory.