Insertion Device Serial Control Interface
Version
1.01 (November 1, 1999)
This document describes the details of the Insertion Device control
directly through a serial interface.
We have implemented a direct link between the IOC controlling the Insertion
Device and the Beamline control system through a serial link. The
protocol is straight RS232 communications. The link between the IOC and
the beamline is via a fiber optic cable and a fiber modem. The user
can connect the fiber modem which has a DB25 male to a computer serial
port.
We will be using the Blue and White fibers from the MSL fiber bundle.
The Blue fiber will be used for Transmit (T) and the white for Receive
(R) on the fiber modem. The modem will be set to the DTE modem for communications
to a computer (This depends on the type of cable used between the
computer and fiber modem. The port parameters are 19200 baud, 8 bit
and N parity and 1 stop bit with XON/XOFF protocol.
This software running on the IOC monitors the port at all times. All
inputs from the serial port has to be terminated with only a carriage return
(0xD). The IOC listens to the port and upon receiving a string with the
CR delimiter immediately processes the command and depending on the request
will act on it. An acknowledgment is always sent with a CR delimiter. When
the program is ready it will send a message Program Ready.
The device control is only possible when the device is in User Mode.
Requests for status is always available. When an unrecognized command
is sent the program will respond with a message Unknown Command!!
Listed below are all the commands and their responses:
Control Process Variables
Control is possible only
when the device access control is set to USER mode. All controls
commands are followed by = and the value with no spaces between
them.
-
GapSet=xxx.xxx
Reply : IDxx:Message1
Operating Range : 11.0 - 200.0
Unit : mm
Sets the average desired gap position of the insertion device.
-
TaperGapSet=xxx.xxx
Reply : IDxx:Message1
Operating Range : 0.000 - 5.000
Unit : mm
Sets desired Taper amount about the average gap. For normal Operation
this value should be set to zero.
-
ScanGap=xxx.xxx
Reply : IDxx:Message1
Operating Range : 11.0 - 200.0
Unit : mm
Set this for scanning of the device in terms of average gap. The device
starts to move upon entering a value in this field.
-
ScanEnergy=xxx.xxx
Reply : IDxx:Message2
Operating Range : 2.7 - 100.0
Unit : keV
Set this for scanning the device in terms of the energy for the specified
harmonic. The harmonic value is used for the energy to gap conversion.
The device starts the move upon entering a value in this field.
-
EnergySet=xxx.xxx
Reply : IDxx:Message2
Operating Range : 2.7 - 100.0
Unit : keV
Sets the ID gap by entering the desired energy for the specified harmonic.
The gap position is calculated based on the selected energy.
-
TaperEnergySet=xxx.xxx
Reply : IDxx:Message2
Operating Range : variable
Unit : keV
Sets the desired amount of energy spread about the average energy for
the specified harmonic.
-
HarmonicValue=n
Reply: IDxx:Message2
Operating Range : 1 to 7
This sets the harmonic value for gap-energy calculation.
-
DeadbandGap=xxxx
Reply: IDxx:Message1
Operating Range : 0-1000
Unit : microns
This sets the Dead band gap.
-
Start=1
Reply: IDxx:Message1
Operating Range : 1
Send the above command to start moving the device.
-
Stop=1
Reply: IDxx:Message1
Operating Range : 1
Send the above command to stop all motion of the device.
Read Commands
The following commands
are send as is for status updates.
-
Gap
Monitor the current average gap position in mm.
-
TaperGap
Monitor the current taper amount of gap in mm.
-
Energy
Monitor the current average energy for the specified harmonic in keV
.
-
TaperEnergy
Monitor the current amount of tapered energy for the specified harmonic
in keV.
-
Busy
Monitor to determine whether the device is moving. Reply
is Moving or Done Moving
-
HarmonicValue
Read the current Harmonic value chosen for the gap-energy calculations..
-
DeadbandGap
Read the current deadband gap in microns.
-
Message1
Monitor for all status and error messages.
-
Message2
Monitor for status message related to gap - energy conversions
and all global information.
-
Message3
Monitor for status message related to Auto Open of ID when front end
shutters are closed.
-
ShClosedTime
Monitor the count down timer and displays the time left in seconds
before ID will be opened automatically.
-
TotalPower
Read the calculated total power in Watts from the device normalized
to 100 ma for the current gap.
-
ExpectedPower
Read the calculated total power in Watts from the device normalized
to 100 ma for the desired gap entered.
-
AccessSecurity
Monitor the current access mode. When in User the control has
been transferred to user.
The following modes are the modes:
User
Operator
Floor Coordinator
Machine Physics
System Manager
-
ID$(xx):DeviceLimit
Read to determine the beamline closed gap limit in mm
for the device. This is an administrative limit set by Floor Coordinator
upon request from beamline coordinator.
-
srCurrent
Read the storage ring current in ma.
-
srLifetime
Read the storage ring Beam lifetime in hours.
-
ActualMode
Read Operating Mode of the Storage ring.
-
ShutterPermit
Read the shutter permit as enabled or disabled.
-
IDFEShutter
Read the ID front end shutter status as closed or open.
Suggestions and Comments to Mohan Ramanathan
(Last Modified Monday, 05-Mar-2001 16:10:01 CST)