marcel grunder, epics collaboration meeting october 20081 aerotech a3200 high precision rotation...

11
Marcel Grunder, EPICS Collaboration Meeting October 2008 1 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Upload: louisa-chapman

Post on 30-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 20081

Aerotech A3200 high precision rotation stage

Windows based Epics IOC driver implementation

Page 2: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

2

Aerotech components…

ABR1000 Air-Bearing Rot. StageATS125 Linear Stage

Ndrive + Npaq Amplifier

A3200 motion software

Page 3: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

3

Aerotech SMC controller■Motion control system and programming environment ■ Runs on a standard Windows PC■Maximum of 32 intelligent drives connected via IEEE 1394■ 20 kHz servo update rate for all axes ■ Integrated high-speed Position Synchronized Output (PSO) for

position latching.■ Utility Programs to configure, troubleshoot, and operate the

controller■ Programming interfaces include Aerotech’s own AEROBasic or

RS274 G-code, C, C++, VisualBasic, Delphi and LabVIEW

Page 4: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

4

A3200 Software Architecture

Windows

RTX

Hardware Ndrive Npaq

motors

■ Layer 4: Windows Apps

■ Layer 3: Programming Interface

■ Layer 2: Nmotion SMC engine

■ Layer 1: Drive Firmware

IOC

Page 5: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

5

At a beamline

X-ray beam

exposure box

(filter)

cryojet

microscope

Page 6: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

6

Measurement mode timing diagram

Meas. time

osc. angle

time

angle

1. calc

Shutter Open

Open delay

PSO Open

Accl delay

Close delay

PSO-Close

M-Stop

PSO Open

Moving

2. move

3. Det. on4. move

M-Start

Start

Page 7: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

7

Epics driver requirements

■ Fast signal indicating "movement done"■ A3200 PSO feature used to open/close fast beam shutter ■ Safe homing sequence for multiple axes stages■Measurement mode►Define start + oscillation angle and oscillation time►Use calc records to generate movement start + stop pos, shutter open

+ close pos and velocity.

■ Direct mode►Absolute or incremental move of axis (axes) at defined speed

Page 8: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

8

Software environment

■ Runs on Windows XP■ EPICS base 3.14.8■ autosave and restore 4-2-1►store offset and velocities

■ state notation language (SNL) 2.0.1►homing sequence

■ A3200 v.2.19

Page 9: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

9

A3200 programming models

■ Library Programming Model ►Simplest programming model used to initialize controller, to get

controller and motor status info…

■ CNC Programming Model (G code)►compiled and loaded as binary code, directly into the Nmotion SMC

controller.►Runs in RTX real time environment

Page 10: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

10

A3200 programming models (cont.)

■Mixed Programming Models ►There is no explicit synchronization between the CNC tasks and

Windows threads. ►To synchronize use G-code global variables and CALLBACK

statement.

■ In C: userCallback()►Get the G-code Task number►Set the correct moving flag►scanIoRequest()►epicsEventWaitWithTimeout()

Page 11: Marcel Grunder, EPICS Collaboration Meeting October 20081 Aerotech A3200 high precision rotation stage Windows based Epics IOC driver implementation

Marcel Grunder, EPICS Collaboration Meeting October 2008

Aerotech Rotation StageAerotech Rotation Stage

11

Difficulties

■ Long time performance was limited by “automatic updates”. Updates done manually while no user operation.

■McAfee Antivirus could disturb long time measurements when McShield service started. McShield will be restarted before user operation starts.

■ A3200 v. > 2.13 requires larger thread stack sizestatic const unsigned stackSizeTable[epicsThreadStackBig+1]

= {4000, 6000, 5000000};

■ A3200 without hardware behaves differently. Attention when testing limits, homing, errors…