Diamond Motion Control Emma Shepherd & Matthew Pearson May 2011

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

Software setup with PL7 and Sycon V2.8
RoboCell and Cell Setup
ICS Test Environment Alexander Söderqvist Dec 9, 2014.
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.
EPICS Meeting, APS, June 14 th 2006 MCS-8 The 8 axes motion control system Rok Šabjan
SNS Integrated Control System EPICS Collaboration Meeting SNS Machine Protection System SNS Timing System Coles Sibley xxxx/vlb.
EPICS Insertion Device Control System Pete Owens EPICS Collaboration Meeting June 2003 Control System for a Helical Undulator Pete Owens Daresbury Laboratory.
Managed by UT-Battelle for the Department of Energy Kay Kasemir ORNL/SNS Feb Motor Support.
Marcel Grunder, EPICS Collaboration Meeting October Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation.
Debby Quock November 13, 2012 IRMIS at CLS. IRMIS Currently at CLS PV Crawler –Perl modules that parse EPICS IOC st.cmd, db, and dbd files. Information.
DELTA TAU Data Systems, Inc. 1 UMAC TurboTurbo PMAC PCIGeo Drive Single Source Machine Control motion logic data Power PMAC Operational Summary November.
HARDWARE INTERFACE FOR A 3-DOF SURGICAL ROBOT ARM Ahmet Atasoy 1, Mehmed Ozkan 2, Duygun Erol Barkana 3 1 Institute of Biomedical Engineering, Bogazici.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Tuning. Overview Basic Tuning Difference between commutation methods Use of digital filters Vertical axis – no brake Overview 2.
Automated Testing Presentation to EPICS Collaboration Meeting DESY Paul Gibbons PhD Diamond Light Source Ltd.
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.
Motor drivers for asyn motor device support Mark Rivers GeoSoilEnviroCARS, Advanced Photon Source University of Chicago.
CEA DSM Irfu July 19th 2013-Françoise Gougnaud - Status of EPICS control for ECCTD 1 Françoise Gougnaud Irfu/SIS.
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.
1 i-Pendant for the R-J3iC & R-30iA Controllers ArcTool Version (GMAW) i Pendant New.
Motion Control at the Advanced Photon Source Argonne National Laboratory Mark Rivers University of Chicago 7 GeV synchrotron x-ray light source, the largest.
Embedded Real-Time Systems Introduction to embedded software development Lecturer Department University.
Software Troubleshooting Eliminate possible programming and timing errors by stopping all programs ( and ). Use the Executive program terminal and send.
Sardana/IcePAP Based Control System for elliptically polarized Undulator at Max IV 30th Tango Collaboration meeting
THE MOTION FUNCTION OF ASDA-A2
AsynMotor: Support For Coordinated Multi-Axis Motion In EPICS Mark Rivers University of Chicago.
ICAICT201A USE COMPUTER OPERATING SYSTEM. USING THE CONTROL PANEL The Control Panel contains many options for configuring your computer, including: adding.
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.
SOFTWARE TESTING TRAINING TOOLS SUPPORT FOR SOFTWARE TESTING Chapter 6 immaculateres 1.
SPiiPlus Training Class
SNS COLLEGE OF ENGINEERING
SPiiPlus Training Class
4m. Blanco TCS Upgrade: Signals and Interfaces
Chapter 8 I/O.
Operations Machine Simulator.
Do-more Technical Training
RoboVis Alistair Wick.
Architectures of Digital Information Systems Part 1: Interrupts and DMA dr.ir. A.C. Verschueren Eindhoven University of Technology Section of Digital.
WORKSHOP 1 introduction
Chapter Objectives In this chapter, you will learn:
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
BRX Technical Training
2. OPERATING SYSTEM 2.1 Operating System Function
Experience & Status of the LIGO Slow Controls System(s)
Mark Rivers University of Chicago
Introduction to Operating System (OS)
HAPS Controls Glen White ATF2 Software Review Workshop, LAL, June 2008
4m. Blanco TCS Upgrade: Signals and Interfaces
Session III Architecture of PLC
Computer Numerical Control
Modbus with the AKD Using Modbus Poll and Wireshark Rev. F Dec
Chapter 1: Introduction
Programmable Logic Controllers (PLCs) An Overview.
Chapter 8 I/O.
Getting to Know Control Studio
NC,CNC machines and Control Programming.
Chapter 2: System Structures
CS703 - Advanced Operating Systems
NC and CNC machines and Control Programming
Chapter 2: Operating-System Structures
Chapter 8 I/O.
Getting Started with EPICS Lecture Series
Controller interfaces
Motor record – next generation ?
Chapter 2: Operating-System Structures
quadEM: New Beam Position Monitor & Electrometer Hardware and Software
Introduction to Multi-Tasking
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Diamond Motion Control Emma Shepherd & Matthew Pearson May 2011 High level look at motor control software EPICS Motor record EPICS Motor driver organisation PMAC Co-ordinate systems (synchronized motion) PMAC PLC programs Python motor control software Plans

The EPICS Motor Record Generic user interface to most kinds of motor: Move, Stop, Home User offset Change sign of motion Motion retries in case of failed move Handles backlash Software limits Axis status Set velocity, acceleration, etc Call-back when motion complete >100 fields in the record

Diamond User Interface (EDM)

Axis Status Motion Parameters

Soft Limits and Calibration User adjustable direction and offset

High level look at motor control software IOC Motor Record Axis 2 Motor Record Axis 1 User interface Driver abstraction layer Motor Controller Device Support Device Support User Program Controller Tasks (servo loop, etc) Device Driver VME Bus, Ethernet, Etc Record/Device Support/Device Driver is generally how EPICS software is organised.

PMAC Co-ordinate System Driver Can define virtual axes that look (almost) the same as standard motors. We use a customised PMAC driver to operate/readback the co-ordinate systems. Example: Table with 3 jacks Y1 Y2 Y3 Pitch Angle - X Height - Y Advantages: True synchronized motion Pushes complexity down into controller Disadvantages: Requires EPICS PMAC driver changes More to maintain #1 J=100 X(0.5)Y(100)

Example: Hexapods Complex kinematics Suppliers adhere to Diamond PMAC programming conventions so that we can use the motor record co-ordinate system driver to control it: Q71..Q79: Axis demand positions – written down from the motor record Q81..Q89: Axis readback positions – constantly calculated in a PLC from the real motor (leg) positions

‘Soft’ Motor Driver Calc Define output and readback links to other PVs An alternative to PMAC co-ordinate systems Commonly used to control piezo motors via simple analogue interface X+ Blade Calc X- Blade X Centre

Motor Record Closed Loop Control Define output to the motion controller axis Setup readback link to a PV Turn ‘Use Readback If Present’ ON Setup maximum retries and retry deadband

Example Control Screen (a PGM) Different motor record parameters for fast vs high precision moves Encoder averaging done in EPICS

PMAC Status

PMAC PLC Programs Run in the background PLC 0 can be used for more Monitor digital inputs / set outputs Setup motion related parameters Provide safety checks (encoder loss and motion stop) Reset controller state Power on/off amplifiers between moves Axis homing Run in the background PLC 0 can be used for more critical tasks. PLC 1 is run first at power-on / reset CLOSE DELETE GATHER OPEN PLC 2 CLEAR {PLC statements here} ENABLE PLC 2

Diamond Standard PLCs Try to standardise PLCs run on all PMACs and Geobricks: PLC1 – PMAC/UMAC initialization PLC2 – Monitors the motion stop input PLC3 – Auto-energises motors PLC4 – Encoder loss detection PLC5 – CPU load monitoring PLC6 – Geobrick internal amplifier setup PLC7 – Powers down motors after a move

Homing PLC programs We use PLCs to: Widen soft limits when homing Search for home flag on encoder Drive quickly (in right direction) to home position Move back to old position after home Provides feedback (success, fail, following error, etc.) 1 PLC to handle a ‘device’ – pair of slits, mirror jacks, etc. Provides a 1-click ‘home’ button for a device. Python script is used to generate the PLC at IOC build time.

Nanomotor Duty Cycle PLC 0 used to enforce the duty cycle Motor is killed after maximum move time Enforced rest time is 3*actual move time EPICS interrogates PMAC variables to display status

Python motor applications Expert control Configuration upload/backup

Similar software for XPS controller

Build framework for scanning / data gathering Future/Ongoing work Build framework for scanning / data gathering Currently have software for XPS, but no equivalent for PMAC. Need to build abstract interface for this. Re-implement driver layers in C++ There is a new Epics motor driver framework, developed by Mark Rivers (Chicago/APS). Will make it easier to implement and maintain drivers in future. Make our PMAC python motor software and utilities more widely available. Attempt to standardise use of PMAC advanced functions (PLCs, co-ordinate systems, etc) across EPICS sites, which will lead to common EPICS software. Bug fixes, etc…..

Questions?

Backup Slides

Driver Layers XPS drvMotorAsyn.c drvXPSAsyn.c pmacAsynMotor.c TCP Socket XPS_C8_Drivers.c Asyn Interpose pmacAsynIPPort.c pmacDriver.c pmacVme.c XPS drvAsynIPPort.c VME PMAC Ethernet PMAC

EPICS motor control software summary Motor Record 1 ai Motor Record 2 DTYPE=asynFloat64 devMotorAsyn devAsynFloat64 devMotorAsyn Asyn Port Asyn Port drvMotorAsyn drvMotorAsyn pmacAsynMotor drvXPSAsyn Asyn Octet Socket pmacAsynIPPort (interpose - optional) XPS VME or Socket or Serial Port interface PMAC

EPICS IOC startup (XPS example from I16 diffractometer) #XPSSetup(number of controllers) XPSSetup(3) #XPSConfig(card,IP,PORT,number of axes,active poll period (ms), #idle poll period (ms)) XPSConfig(0, "172.23.116.164", 5001, 7, 50, 500) #Configure ASYN motor controller. #(asyn port, driver name, controller index, max number of axes). drvAsynMotorConfigure("XPS1", "motorXPS", 0, 7) #XPSConfigAxis(card, axis, group.positioner, #number of steps per user unit) XPSConfigAxis(0,0,"Z1_Z2_Z3.Z1_BASE", 10000) XPSConfigAxis(0,1,"Z1_Z2_Z3.Z2_BASE", 10000) XPSConfigAxis(0,2,"Z1_Z2_Z3.Z3_BASE", 10000) XPSConfigAxis(0,3,"GROUP4.Y_BASE", 1000) XPSConfigAxis(0,4,"GROUP6.X_sample", 100000) XPSConfigAxis(0,5,"GROUP7.Y_sample", 100000) XPSConfigAxis(0,6,"GROUP8.Z_sample", 100000) Allocate memory for driver data structures for each XPS Configure driver for each XPS. Open sockets, etc. Set up Asyn driver. Pass in type of driver and name of XPS port. Set up controller axis names in driver.

Example Coordinate system (slit gap and centre) ; Change to coordinate system 2 and set relevant ; axes to use kinematics &2 #1->I ; +ve blade (B+) #2->I ; -ve blade (B-) OPEN FORWARD ; Calculate Gap and Centre ; X = Q7 = centre in mm = ({B+}+{B-})/2 ; Y = Q8 = gap in mm = {B+}-{B-} CLEAR Q7=(P1+P2)/2 Q8=P1-P2 CLOSE + similar for inverse + actual position readback PLC program + motion program to execute move Q-variables are local to coordinate systems Python script is used to generate the coordinate system and PLC at IOC build time.