Module Owners: | Oleg Makarov and Sergey Stepanov, Argonne National Laboratory Nick Rees, Diamond Light Source |
This page is the home of tpmac. The most recent version of it can be found at www.gmca.aps.anl.gov/TPMAC2/. There is also a plan to setup a development system at sourceforge.net/projects/epics.
tpmac supports Turbo PMAC2-VME Ultralite by Delta Tau which is a programmable 32-axis motion controller. Some features of it are:
The module consists of:
A schematic of operating PMAC controller with EPICS DPRAM driver and databases is shown on Fig.2.
The final goal is to execute PMAC motion program on a coordinate system (see the examples of motion programs in pmc/3_motion-prg/). Several motion programs (Slew, Position and Backlash) are provided with this distribution and more can be added. Each motion program takes its parameters (like motors destinations and assembly acceleration time) from the Q70-Q80 variables that are available in PMAC for every coordinate system. In the their turn Q-variables are mapped to a global set of M-variables that point to the locations of PMAC DPRAM accessible by EPICS databases via the DPRAM driver (see the files 2_m3300_xxx.pmc and 3_q70_xxx.pmc in the pmc/2_ioc-specific/xxx directories).
On the EPICS side, the requested motors positions and other motion parameters are copied to the DPRAM with the help of Ram_nnn.db databases (see the pmacApp/Db/pmacDb/ directory) using the DPRAM driver in their device support. In the inverse direction the motors encoders data reported by PMAC are read with the help of mtrdat.db that contains status records with the DPRAM driver in their DTYP field.
PMAC controllers communicate motors data in raw units like steps or encoder pulses. Therefore, on top of "motors" databases another EPICS database layer is built called "drives". The positions of "drives" are in engineering units and typical relations between motors and drives are:
d = m * scale + offset
NOTE: Newer generation of PMAC controllers like Turbo PMAC2 provide a way to hide the "motors" level. i.e. to communicate with PMAC in engineering unit. In that case "scale" and "offset" become PMAC I-variables. The current set of databases is not designed to support this feature, but it could be done in the future. At present the decision to exclude "motors" from EPICS databases is not yet taken because in some cases it is convenient to communicate with motors in raw units.
If a PMAC coordinate system provides any combined motion (e.g. a slit size being determined by a combined motion of two jaws), then one more level is added called "axes". Both "drives" and "axes" are all soft databases and they are linked to each other and "motors" with the help of tsub records. The relation between "drives" and "axes" is specific for an assembly and requires a custom database and MEDM screen. If there are no combined motions, then "axes" DB is not loaded and the database remains two-level as distinct from the three-level one for combined motions. Both of these cases are illustrated on Fig.2.
Fig.3 shows the MEDM screen for XY-positioner coordinate system which is a two-level DB. Here "X1" and "Y1" are drives and "mtr x1" and "mtr y1" are motors. Fig.4 presents the MEDM screen for a slit which is a three-level database. Here "Z-center" and "Z-size" are axes (combined motions), "Z-top" and "Z-bottom" are drives, and "top" and "btm" are motors.
The coordinate system specific databases in pmacApp/Db/csDb, hsDb, mdDb, miDb, moDb, tbDb, xyDb consist of the following parts:
Those databases must be designed for any new type of motors assembly.
You can download the software from the links in the table below:
Module Version | Release Date | Filename | Notes |
The main motivation for this release is the addition of new IP driver produced by Pete Leicester and Nick Reese at the DIAMOND Light Source. This driver should allow communicating with Ethernet based Delta Tau controllers. See Release Notes for details. | |||
Fixed a long-standing bug from the initial 1996 implementation. The bug related to improper mutexing was causing pmacMbox task to crash occasionally, especially under high IOC load. Respectively, the only updated directory in this release compared to 3-3 is pmacApp/src. | |||
Switched to EPICS asyn driver for communicating with PMAC and replaced PMAC Mailbox communications by PMAC DPRAM ASCII communications. The new driver is mostly due to Nick Reese at the DIAMOND Light Source. Also, added the support for PMAC ADC/DAC (ACC-59E) and Digital IO (ACC-65E), revised some DBs, Tcl/Tk menus and MEDM screens. | |||
Added DB and tsub support for non-integer counts produced by encoder interpolator. | |||
Converted the driver to work with EPICS-3.14. | |||
The first release supporting Turbo PMAC2 Ultralite (as distinct from PMAC1 supported by initial driver written by Tom Coleman) |
Module Version | Requires module | Release needed | Required for |
---|---|---|---|
3-5 | EPICS base | 3.14.8 and up, asyn 4.9 and up, Tornado 2.0 or 2.2 | Base support |
3-3, 3-4 | EPICS base | 3.14.8 and asyn 4.6 | Base support |
2-3 | EPICS base | 3.14.4 - 3.14.8 | Base support |
2-2 | EPICS base | 3.14.4 | Base support |
2-0 | EPICS base | 3.13.7 | Base support |
After obtaining a copy of the distribution, it must be installed and built for use at your site. These steps only need to be performed once for the site (unless versions of the module running under different releases of EPICS and/or the other required modules are needed).
unzip tpmacX-Y.zipwhere X-Y is the release.
.../synApps/tpmac/X-Y/
The tpmac is in use at all three GM/CA CAT beamlines at the APS. From two to three PMAC2-VME cards per one beamline provide controls for all GM/CA CAT motors. Since the fall of 2006 the system is also operational at the LS-CAT beamlines at the APS.
Please submit any comments and bug reports to Oleg Makarov (PMAC driver and PMAC configuration), Sergey Stepanov (structure of EPICS layer and PMAC databases), or Nick Reese (EPICS driver, asyn support, and Motor Record for PMAC).