AsynMotor: Support For Coordinated Multi-Axis Motion In EPICS Mark Rivers University of Chicago.

Slides:



Advertisements
Similar presentations
Layered EPICS User Gap Control Interface for NSLS Mini-gap Undulators William Nolan and John Skinner, Biology Department Susila Ramamoorthy and Lonny Berman,
Advertisements

Motor A recipe for driver implementation using the C++ asyn motor API Jon Thompson For the 2013 EPICS for experiment control workshop, Diamond Light Source,
EPICS Collaboration Meeting, June 3, 2010 asynPortDriver C++ Base Class for asyn Port Drivers Mark Rivers University of Chicago Advanced Photon Source.
Delta Tau Coordinate Systems and PLCs at Diamond Matthew Pearson Controls Group, Diamond Light Source Overview: Delta Tau Geobrick motor controller Delta.
17th Oct 08 Matthew Pearson - Motion Control at DLS 1 Motion Control Developments at Diamond Light Source Matthew Pearson DLS Controls Group.
Guide To UNIX Using Linux Third Edition
EPICS Meeting, APS, June 14 th 2006 MCS-8 The 8 axes motion control system Rok Šabjan
AreaDetector: Recent Additions and Future Plans Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
Power PMAC Electronic Cam Tables April 2014
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Feb Motor Support.
On-the-fly scanning: Improvements in the EPICS motor and mca modules Mark Rivers University of Chicago.
Mini kappa calibration and maintenance use of glass capillary (WPI) phi reconstr. error: – average: (9 calibrations over 8 months)
Detectors for Light Sources Contribution to the eXtreme Data Workshop of Nicola Tartoni Diamond Light Source.
Integrating EPICS and LabVIEW on Windows using DCOM Freddie Akeroyd ISIS Computing Group.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays - done for rsrv in 3.14 Channel access priorities - planned to.
Python Applications for Beamline Control Mark Rivers.
Motor drivers for asyn motor device support Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
An EPICS solution for Galil products that can provide a comprehensive, and high performance motor and PLC control system for use at synchrotrons and other.
A U.S. Department of Energy Office of Science Laboratory Operated by The University of Chicago Argonne National Laboratory Office of Science U.S. Department.
Diagnostics and Optimization Procedures for Beamline Control at BESSY A. Balzer, P. Bischoff, R. Follath, D. Herrendörfer, G. Reichardt, P. Stange.
CLS Stepper Motor Control S tepper motors - Currently over 400 motors - many different brands: Parker, Phytron, SloSyn, McLennan, and others.
Motion Control at the Advanced Photon Source Argonne National Laboratory Mark Rivers University of Chicago 7 GeV synchrotron x-ray light source, the largest.
Office of Science U.S. Department of Energy “Traditional” Tools for Beamline Applications Mark Rivers University of Chicago October 16, 2008.
Diamond Light Source Data Acquisition System Paul Gibbons.
OPERATING SYSTEMS DO YOU REQUIRE AN OPERATING SYSTEM IN YOUR SYSTEM?
Windows Vista Configuration MCTS : Installing and Upgrading.
Software Troubleshooting Eliminate possible programming and timing errors by stopping all programs ( and ). Use the Executive program terminal and send.
Calibration and the status of the photon calibrators Evan Goetz University of Michigan with Peter Kalmus (Columbia U.) & Rick Savage (LHO) 17 October 2006.
1 OPERATING SYSTEMS. 2 CONTENTS 1.What is an Operating System? 2.OS Functions 3.OS Services 4.Structure of OS 5.Evolution of OS.
Lesson 9: SOFTWARE ICT Fundamentals 2nd Semester SY
Introduction toData structures and Algorithms
Motion Controllers in SLS and SwissFEL
NEW UPGRADE TO THE APS MAGNETIC FIELD INTEGRAL MEASUREMENT SYSTEM
Chapter 8 I/O.
Diamond Motion Control Emma Shepherd & Matthew Pearson May 2011
The software side of the moon
Device Pool Status Report TANGO Collaboration Meeting April 17, 2008
C++ Base Class for asyn Port Drivers
Credits: 3 CIE: 50 Marks SEE:100 Marks Lab: Embedded and IOT Lab
SSRL Beam Line Infrastructure Update February 2002
Mark Rivers University of Chicago
C++ Base Class for asyn Port Drivers
Advanced Photon Source
Webinar 2011 New PTO Utility
asynMotor: Support For Coordinated Multi-Axis Motion In EPICS
EPICS MCA and Canberra Support
Chapter 8 I/O.
Assembler Design Options
Motion Control (at APS)
Chapter 8 I/O.
Topics Introduction to File Input and Output
Machine Independent Features
MICROPROCESSOR MEMORY ORGANIZATION
Recursion Data Structures.
C++ Base Class for asyn Port Drivers
Chapter 8 I/O.
asyn Driver Tutorial Measurement Computing 1608GX-2A0
An Introduction to Software Architecture
File Storage and Indexing
Neurophysiological Monitoring January 18, 2007
Chapter 8 I/O.
C++ Base Class for asyn Port Drivers
Getting Started with EPICS Lecture Series
High Level Physics Applications for LCLS Commissioning
Topics Introduction to File Input and Output
Chapter 13: I/O Systems.
quadEM: New Beam Position Monitor & Electrometer Hardware and Software
GeoSoilEnviroCARS The University of Chicago
Computed Tomography (C.T)
Alignment, Scanning Malcolm Guthrie
Presentation transcript:

asynMotor: Support For Coordinated Multi-Axis Motion In EPICS Mark Rivers University of Chicago

Traditional step scanning overheads: –Start and stop motors & mechanical systems –Arm and read detectors. Typically much more efficient to collect data on-the-fly as the motors are moving. –Better detectors, more flux with APS Upgrade, don’t waste photons and time However, on-the-fly scanning with EPICS has been subject to limitations. –Typically limited to simple single-motor scans because EPICS did not provide a way to program motor controllers to perform synchronized motion of multi-axis controllers. Exception to this was the Trajectory Scanning software I wrote for the Newport XPS and MM4005 motor controllers. Not a clean solution: EPICS SNL program talking directly to the controller, “behind the back” of the motor record driver. PMAC does have motion control programs – good for fixed, simple geometry –New solution that incorporates a coordinated motion API in the motor driver layer Motivation

class epicsShareFunc asynMotorController : public asynPortDriver { asynMotorController(const char *portName, int numAxes, int numParams, int interfaceMask, int interruptMask, int asynFlags, int autoConnect, int priority, int stackSize); virtual asynMotorAxis* getAxis(asynUser *pasynUser); virtual asynMotorAxis* getAxis(int axisNo); virtual asynStatus startPoller(double movingPollPeriod, double idlePollPeriod, int forcedFastPolls); virtual asynStatus wakeupPoller(); virtual asynStatus poll(); void asynMotorPoller(); virtual asynStatus initializeProfile(size_t maxPoints); virtual asynStatus buildProfile(); virtual asynStatus executeProfile(); virtual asynStatus abortProfile(); virtual asynStatus readbackProfile(); asynMotorController

class epicsShareFunc asynMotorAxis { virtual asynStatus move(double position, int relative, double minVelocity, double maxVelocity, double acceleration); virtual asynStatus moveVelocity(double minVelocity, double maxVelocity, double acceleration); virtual asynStatus home(double minVelocity, double maxVelocity, double acceleration, int forwards); virtual asynStatus stop(double acceleration); virtual asynStatus poll(bool *moving); virtual asynStatus setPosition(double position); virtual asynStatus initializeProfile(size_t maxPoints); virtual asynStatus defineProfile(double *positions, size_t numPoints); virtual asynStatus buildProfile(); virtual asynStatus executeProfile(); virtual asynStatus abortProfile(); virtual asynStatus readbackProfile(); asynMotorAxis

Create arrays of target locations of each motor in a multi- axis controller Create array of time per element Define times/locations to output synchronization pulses to trigger detectors Execute coordinated move Optionally read back encoder positions when each synchronization pulse was output Many controllers have this capability –Newport MM4005, Newport XPS, Delta Tau PMAC, Pro-Dex MAXv, Parker ACR series, etc. We now have an API to take use this capability in a consistent way Now done in same driver as for motor record, eliminates conflicts Coordinated Motion (Now called ProfileMove, previously TrajectoryScan)

Coordinated Motion ; IDL program to build, execute and readback profile ; This program builds a profile and executes it. nelements = 100 ; 100 elements in the profile. npulses = 100 ; 100 pulses in the profile. naxes=2 ; We will move the first 2 motors (Phi and Kappa) ; Define array of positions positions = dblarr(nelements, naxes) ; The Phi profile is a sin wave with two complete periods and an ; amplitude of +-1 degrees positions[*,0] = 1.*sin(findgen(nelements)/(nelements-1.)*4.*!pi) ; The Kappa profile is a sin wave with one complete period and an ; amplitude of +-1 degrees positions[*,1] = 1.*sin(findgen(nelements)/(nelements-1.)*2.*!pi) profile = 'IOC:Prof1:' group = 'GROUP1' time = 0.1 ; Fixed time per profile point status = profile_move(profile, positions, group=group, maxAxes=6, $ build=1, execute=1, readback=1, time=time, $ npulses=npulses, actual=actual, errors=errors) end

Phi output profile Kappa readback profile Kappa following error Phi following error

SPEC Interface SPEC macros have been written to allow SPEC to utilize profile moves via EPICS interface Low level interface, all of SPEC's standard scans can be done "on-the-fly" with profile move software. Replacement macros for: –_ascan # Used by all ascan and dscan macros –Mesh –hklscan # Used by hscan, kscan and lscan –_hklmesh –_hklline # Used by hkcircle, hlcircle, klcircle, hkradial, hlradial and klradial –_scanabort resume –_loop

SPEC 4° scan of virtual chi axis, 1000 points at.02 seconds/point. Coordinated motion of the phi, kappa and omega axes. XPS outputs synchronization pulses to trigger Pilatus. Execution time: theoretical 20.0 seconds, actual to completion 20.8 seconds. Includes the to save 1000 images to disk (366 MB), for the Pilatus driver to read each file, correct the bad pixels and flat field, compute the ROIs, and post the ROIs to EPICS. SPEC Scan Using 6-Cicle Diffractometer

Preliminary Quick-XAFS Tests at GSE 13-IDE Si(111) mono, at Cu K-edge, 1 keV ~ 1 deg scan Tapered undulator, but did not try to synchronize undulator and monochromator Ran sinusoidal trajectory profiles with Newport XPS – can run many oscillations in a row. The motor and controller can easily do 5 deg/s (probably up to 20 deg/s). Full cycle scans of 1 degree in well under 1 seconds should not be a problem.

Preliminary QXAFS Tests at GSE 13-IDE 4 Cu K-edge scans in one 10 second sweep, showing reproducible time-lag from ion- chamber response.

Future Work Convert Pro-Dex MAXv, Aerotech Ensemble to Model 3 –Tim Mooney already has trajectory scanning running in SNL program on each of these Support other controllers –PMAC, etc. Add additional features Work on replacement for EPICS motor record?