ID Controls Information

Version 4.0 (as of July 30, 2001), Mohan Ramanathan.


This document gives a brief introduction to the Insertion Device (ID) and its associated control system.

Most of the devices installed in the storage ring are the 2.4 m long Undulator A (UA) style.  The vacuum chamber is typically a 5 m long chamber with an inside vertical aperture of 8 mm.  The minimum gap of the Undulator is 10.5 mm.  The devices are normally located in the downstream half of the 5 m long straight section.

At this time, a lower limit of 11.0 mm is imposed on most devices and the fully open gap is approximately 180.0 mm.

Most of the devices are controlled by stepping motors which move the ends of the device independently.  The motors at either end give us the ability to taper the device to broaden the harmonics.  The device has both a rotary and a linear encoder at each end.

During normal operation the linear encoder is used to position the device to the correct gap.  The rotary encoder is used as a backup.

Under normal operation the device is issued a command to move the two ends together.  However, when taper is needed a command can be issued for the amount of taper.

The taper angle cannot be more than 2 mrad, which translates to about 5 mm difference in gap between the two ends.

Operation Issues

When beam is lost or during injection, the ID control is changed from User mode to Operator mode and all the devices are fully opened.  After restoration of beam the devices are instructed to move to their previous user values which was set prior to the beam loss/ injection.  At this time the access of the device control is changed from Operator mode to User mode.

The beamline coordinator can request the Floor Coordinator to set a beamline limit on the minimum gap of the device.  This can be used by the beamline staff for their equipment protection. However, this limit value cannot be guaranteed to remain the same from run to run, and possibly even following an id control ioc reboot.

During operation of the device, any problems encountered by the users related to the device should be brought to the immediate attention of the floor coordinator on shift.  Also if one of the listed error message appears, the device control will be switched from User mode to System Manager mode.  Please notify the floor coordinator to expedite resolution of the problems.

The next section will discuss in greater detail the controls aspect of the devices.


The devices are controlled by EPICS.  Each sector has a VME crate (IOC) to control the Insertion Device for that sector.  The control system for the device is set up in a manner that a user can request a specific gap in mm for the Undulator or a specific energy in keV for a harmonic range of 1 to 7of the device.  The control system uses a calculation algorithm for conversion of gap to energy and vice versa based on stored files of the measured magnetic profile of the particular device and the finite beam emittance.  In the case of the wiggler all calculation for energy reflects the critical energy for the specific gap.  The control system commands the motors to move to a specific value, while it monitors the encoders.

The control of the device is accomplished with 10 process variables.  An additional 5 process variables are used for synchronous Scanning mode.  There are only 8 relevant process variables which need to be monitored at any time.  In addition there are other process variable which are useful to monitor.  In addition there are more process variables which are not relevant for normal operation.  If anyone is interested in these process variables please contact your floor coordinator.

Later in this document are some example MEDM screen images.  Also copies of the MEDM control displays can be downloaded for your use.

At the end of this document, is a table displaying the process variables and their functionality.  All process variables conforms to EPICS standard database conventions.  Unless specified all process variable fields referred below are to the VAL field.

Listed below is a concise description of all the relevant process variables, some for controlling and others for monitoring.

Control Process Variables

CAT's can only have write permission to these field when device access control is set to USER mode

Replace the $(xx) with your 2 digit (01-35) sector number AND (us or ds) for upstream and downstream devices. 

   Example: ID01ds:EnergySet

There is one exception to the above:

Monitor Process Variables

The following records are for monitoring purposes.

Status/Error Messages

The following messages are displayed via the process variable (ID$(xx):Message1).

The following messages are displayed via the process variable (ID$(xx):Message2 ).

The following messages are displayed via the process variable (ID$(xx):Message3 ).

How to Access

Please refer to the Data from APS Control System doucument for a detailed approach on accessing the data from the APS control system.

However to control and write into the controllable process variable your computer name and the user name must be one from the list provided to ASD Controls group.  In addition the access control for the specific device must be in USER mode.

Other Information

For your convenience we have provided medm adl files.  Sample screen can be viewed by clicking on the links below.

For the new version (3.0x and beyond) of Undulator Control Software it is recommended that you retrieve these new adl files.
You can get a copy of these adl files by using the link below.

On these adl files replace $(xx) by your sector number in the range 01-35.

If you feel you need any other additional information feel free to contact ASD Controls.

Table of Process Variables

Listed below is a table of all process variables.  The record type for each process variable is also listed.  The functionality of all the records is listed. In addition a brief description of each record is listed.

Process Variable Type Functionality Description
ID$(xx):GapSet AI User Control Set the Average Gap in mm.
ID$(xx):TaperGapSet AI User Control Set the Taper Gap amount in mm.
ID$(xx):ScanGap AI User Control Average Gap for Scanning in mm.
ID$(xx):ScanEnergy AI User Control Average Energy for Scanning in keV.
ID$(xx):EnergySet AI User Control Set the Average Energy in keV for the set Harmonic.
ID$(xx):TaperEnergySet AI User Control Set the Taper Energy amount in keV for the set Harmonic.
ID$(xx):DeadbandGap AI User Control Set the Deadband Value for the Gap in microns.
ID$(xx):HarmonicValue AO User Control Set the Harmonic Value for proper Energy conversions.
ID$(xx):Start BI User Control Set flag to start the device motion.
ID$(xx):Stop BI User Control Set flag to stop all motion of the device.
ID$(xx):SyncScanMode BI User Control Set the device up for performing Synchronous Scanning.
ID$(xx):SSStartGap AI User Control Set the Starting Gap for performing Synchronous Scanning in mm .
ID$(xx):SSEndGap AI User Control Set the Ending Gap for performing Synchronous Scanning in mm .
ID$(xx):SSTime AI User Control Set the Time Duration for performing Synchronous Scanning in seconds .
ID$(xx):SSStart BI User Control Set flag to start the Synchronous Scanning.
ID$(xx):TaperGap AO User Readback Readback of amount of Taper Gap in mm.
ID$(xx):Energy AO User Readback Readback of the Average Energy in keV for the set Harmonic.
ID$(xx):TaperEnergy AO User Readback Readback of the amount of Taper Energy in keV for the set Harmonic.
ID$(xx):Busy BO User Readback Busy flag readback to indicate device in motion.
ID$(xx):Message1 STRINGOUT User Readback Status and Error messages
ID$(xx):Message2 STRINGOUT User Readback Energy Conversion and global operation messages
ID$(xx):Message3 STRINGOUT User Readback Infromation about Auto Open-Close
ID$(xx):SSBusy BO User Readback Flag is set during the desired time for Synchronous Scanning.
ID$(xx):OldGapSet CALC User Readback Readback of Previous value of Average Gap Set in mm.
ID$(xx):Taper BO User Readback Indicates whether the device is in Tapered condition.
ID$(xx):EncoderSelect BI User Readback Readback of Encoder Selected
ID$(xx):PositionAccuracy CALC User Readback Current Operating Accuracy of the Device in mm.
ID$(xx):Location STRINGOUT Useful Readback Location Identifier String for the device.
ID$(xx):Device STRINGOUT Useful Readback Device Identifier String.
ID$(xx):Version STRINGOUT Useful Readback Software Version Number
ID$(xx):SSState MBBO Useful Readback Useful Status information during Synchronous Scanning.
ID$(xx):MotorSpeed AO Useful Readback Current Motor Speed in rev/sec
ID$(xx):ReturnGap AI Useful Readback Average User Gap saved for Global Return in mm.
ID$(xx):TaperReturnGap AI Useful Readback Taper Amount saved for Global Return in mm.
ID$(xx):ShClosedTime CALCOUT Useful Readback Time left before Auto Open of Device in seconds .
ID$(xx):TotalPower CALC Useful Readback Total Power output from the device normalized to 100 mA in Watts .
ID$(xx):ExpectedPower CALC Useful Readback Total Power for the Desired gap normalized to 100 mA in Watts .
ID$(xx):AccessSecurity MBBI Floor Coordinator Control Value of the current Access Security Mode.
ID$(xx):DeviceLimit AO Floor Coordinator Control Set the Small Gap limit for Beamline Operations in mm.
ID$(xx):DeviceLimit.DRVL AO System Manager Control Set the Lower Limit Gap for the device
ID$(xx):DeviceLimit.DRVH AO System Manager Control Set the Upper Limit Gap for the device.
ID$(xx):FullOpenGap AI System Manager Control Full Open Gap in mm.