[Date Prev][Date Next][Date Index]

Re: Reply to Ben Ocko re: pseudomotors




This is something I have been thinking about for some time as well.
My MX library has an abstraction layer for motors that has allowed
me to build pseudomotors that combine multiple EPICS and non-EPICS
controlled motors.  Examples of pseudomotors I've built include:
APS insertion device gap and/or energy, monochromator energy, XAFS
electron wavenumber, slit motors, elapsed time, and linear combinations
of other motors. The library also lets me ignore the differences
between real motor controllers like EPICS VME58, EPICS PMAC, Newport,
Compumotor, E500, etc.  For clients that use my MX library, all these
motors and pseudomotors look the same.  So far, my users have found
as most useful my monochromator theta pseudomotor that allows things
like the undulator gap and the monochromator second crystal orientation
to automatically track the value of theta.

So why is this of relevance to a discussion about EPICS controlled
motors?  Well, I've built the MX library in such a way that it is
relatively easy to embed in other programs.  For example, my MX server
uses the exact same library as MX clients.  Thus, I feel certain that
it would be relatively straightforward to embed my MX library within
the EPICS portable channel access server.  Using the portable channel
access server one could define an EPICS motor record that looks as
much like the regular EPICS motor record as was necessary, but which
performed the actual control via the MX library.

The advantage (for me, at least) is that it is much simpler to build
pseudomotors using my MX library than it is to do the same thing using
lots of links in an EPICS IOC.  I can generally write and debug a new
MX pseudomotor driver in a day or two and have sometimes done it in 
3 to 4 hours when the needs of the beamline required it.  Anytime
I've looked at the EPICS motor databases (like the two slit database),
I've come away feeling unconvinced that I would ever be able to create
a new pseudomotor using links in an EPICS IOC in anywhere near as
short a time.

Now, I haven't had much time yet to play with the EPICS portable channel
access server, since I've had a lot of other commitments to take care of.
But I intend to give the 'MX inside a portable channel access server'
idea a try sometime this year, if at all possible.  If anything good
results, I'll let you know.

Bill Lavender
Illinois Institute of Technology/IMCA-CAT/MRCAT
lavender@sparky.csrri.iit.edu
Phone: +1-630-252-0523,  Fax: +1-630-252-0521