Delta Tau Coordinate Systems and PLCs at Diamond

10
Delta Tau Coordinate Systems and PLCs at Diamond Matthew Pearson Controls Group, Diamond Light Source Overview: Delta Tau Geobrick motor controller • Delta Tau Coordinate Systems and PLCs • Homing PLCs • Diamond standards

description

Delta Tau Coordinate Systems and PLCs at Diamond. Overview: Delta Tau Geobrick motor controller Delta Tau Coordinate Systems and PLCs Homing PLCs Diamond standards. Matthew Pearson Controls Group, Diamond Light Source. Delta Tau Motion Control at DLS. VME PMAC Turbo 2 - PowerPoint PPT Presentation

Transcript of Delta Tau Coordinate Systems and PLCs at Diamond

Page 1: Delta Tau Coordinate Systems and PLCs at Diamond

Delta Tau Coordinate Systems and PLCs at Diamond

Matthew Pearson

Controls Group, Diamond Light Source

Overview:• Delta Tau Geobrick motor controller• Delta Tau Coordinate Systems and PLCs• Homing PLCs• Diamond standards

Page 2: Delta Tau Coordinate Systems and PLCs at Diamond

Delta Tau Motion Control at DLS

Also have Newport XPS.

19 operational beamlines.~1000 motorised axes

VME PMAC Turbo 2+ separate UMAC andAmplifiers crates

Geobrick LV IMSIntegrated amplifiers4U boxEthernet comms

Page 3: Delta Tau Coordinate Systems and PLCs at Diamond

Quick look at Delta Tau Geobrick LV IMS

• 16 axis PMAC• 8 axis amplifier board• Plant Interface Board• Dual Power supply• Acc910 Options Board

Software:• 16 coordinate systems• 32 PLC programs• Forward and inverse kinematics• Complex trajectories with lookahead• Position compare

Page 4: Delta Tau Coordinate Systems and PLCs at Diamond

PLC programs

• Monitor digital inputs / set outputs• Set up motion related parameters (but not used for motion)• Provide safety checks (encoder loss)• Reset controller state• Power off amplifiers between moves• Axis Homing

CLOSEDELETE GATHEROPEN PLC 2CLEAR{PLC statements here}CLOSEENABLE PLC 2

PLC1 is run at resetor power up.

P-variables (global, general purpose)

Page 5: Delta Tau Coordinate Systems and PLCs at Diamond

Motion programs / Coordinate systems on PMAC

Can define on PMAC new coordinate systems that look (almost) the same as a standard motor. We use a customised PMACdriver to operate/readback the coordinate systems.

Example: Table with 3 jacks Y1Y2Y3

Pitch Angle - XHeight - Y

#1 J=100 X(0.5)Y(100)

Have to do this in a motion program run on PMAC

Advantages:• Synchronised motion• Pushes complexity down into controller

Disadvantages:• Requires EPICS PMAC driver changes• Hard to maintain and debug

Page 6: Delta Tau Coordinate Systems and PLCs at Diamond

Example Coordinate system (slit gap and center)

; 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-} CLEARQ7=(P1+P2)/2Q8=P1-P2CLOSE

+ 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.

Page 7: Delta Tau Coordinate Systems and PLCs at Diamond

Homing PLC programs

PMAC home command is #nHM (n=axis number)

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.

Page 8: Delta Tau Coordinate Systems and PLCs at Diamond

Diamond Standards for PMAC PLCs

• Reserve PLC numbers for specific applications• PLC n uses P-variables Pn00->Pn99• PLCs 8->16 are free for applications• PLCs 17-31 are reserved for coordinate system position reporting (coordinate systems 2-16)

Reserved PLCs: PLC1 – initialisation (+ enable other PLCs) PLC2 – motion stop detection PLC3 – automated amplifier enable PLC4 – encoder loss PLC6 – Geobrick amplifier reset PLC7 – Amplifier power down between moves

Page 9: Delta Tau Coordinate Systems and PLCs at Diamond

Diamond Standards for PMAC Coordinate Systems

• Do not use coordinate system 1 – used by Delta Tau tuning software• If need to use global P-variables, use P3200 and above.• Use certain coordinate system specific Q-variables for

• Position demands (Q71-Q79)• Position readbacks via PLC (Q81-89)

• Use DLS standard motion program to execute moves

Documented and forwarded on to equipment supplies

• Ensures compatibility with tpmac coordinate system Asyn driver• Easier to maintain across beamlines• Minimises problems with new PMAC software

Page 10: Delta Tau Coordinate Systems and PLCs at Diamond

Points to note:

• With coordinate systems and PLCs on PMACs system complexity is spread out.

• Possible resource issues on PMAC.

• With more software running on PMAC you need to monitor it, and we have developed a pmacStatus epics module:

• CPU load and memory use.• Running PLCs• Axis and controller status words

• Useful to have tools (python scripts) to semi automate PMAC configuration backup and configuration verification.

dls-pmac-analyse.py –tcpip=172.23.243.156:1025 –comparewith=myconfig.pmc