|Module Owners:||Oleg Makarov and Sergey Stepanov, Argonne National Laboratory
Nick Rees and Matthew Pearson, Diamond Light Source
|License:||This software is distributed under EPICS Open License|
This page is a home of tpmac. The most recent version of it can be found at http://www.gmca.aps.anl.gov/TPMAC2/. There is also a page maintained by Matthew Pearson at Diamond Light Source (http://controls.diamond.ac.uk/downloads/support/tpmac/), which allows to post the DLS extensions (such as the motorRecord support) to the tpmac support module more promptly. Finally, there are plans to start a public code repository at Github, Launchpad, or Sourceforge, but we are not there yet.
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|
|Implemented some stability fixes and workarounds for Turbo PMAC2 VME UltraLite firmware bugs. Also included the latest up-to-date changes and bug fixes to pmacAsynCoordSrc, pmacAsynIPPortSrc, and pmacAsynMotorSrc from the Diamond Light Source tpmac and pmacCoord distributions. See Release Notes for additional details.|
|Added support for Ethernet-accessed PMACs (see src_eth) with the same-style EPICS DBs as for VME PMAC; replaced tsDef.h by epicsTime.h; fixed name conflict with win32 in tsub, and included the latest up-to-date changes and bug fixes to pmacAsynCoordSrc, pmacAsynIPPortSrc, and pmacAsynMotorSrc from the Diamond Light Source tpmac and pmacCoord distributions. See Release Notes for additional details.|
|A number of changes and bug fixes to pmacAsynCoordSrc, pmacAsynIPPortSrc, and pmacAsynMotorSrc produced at the Diamond Light Source. See Release Notes for additional details.|
|The TSUB (Transformation Subroutine) Record was made portable (independent of VxWorks) so that now it can be used independently from the TPMAC distribution. Note that it requires few minor tweaks of user-supplied subroutines. Additional detais are provided in Release Notes.|
|Essentilly same as 3-7, but a few examples of coordinate system DBs added/updated, more documentation, boot tree examples (xxx) added, and the directory changed from 3-x to synApps/tpmac/3-x reflecting that the package is a part of synApps.|
|A small fix to statusRecord.c allowing for compilation with EPICS base 3.14.11. Added support for waveform PVs and a mechanism to post PMAC error messages previoulsy only available on IOC console into a waveform PVs. A patch by Lewis Muir to devPmacRam.c avoiding potential crash on IOC reboots. See Release Notes for additional details.|
|New versions of pmacAsynCoordSrc, pmacAsynIPPort and pmacAsynMotorSrc by Matthew Pearson and Nick Reese from the Diamond Light Source. Also, a few patches to databases including those to AssyGeneric_scanrec.db and bkgfix1pcs_scanrec.db by Lewis Muir. See Release Notes for details.|
|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, 3-6, 3-7||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.
The tpmac is in use at all three GM/CA @ APS beamlines. From two to three PMAC2-VME cards per one beamline provide controls for all motors. Since the fall of 2006 the system is also operational at four LS-CAT beamlines at the APS and since 2009 it is used at IMCA-CAT. At Diamond several hundred PMACs are in used (VME Turbo PMAC2 Ultralite and Geobrick LVM with ethernet interface). While using the EPICS tpmac driver, Diamond prefers to build EPICS Motor Records and Coordinate System Records instead of servicing PMAC communication via multiple standard EPICS records as at the GM/CA and LS-CAT control systems.
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).