Machine:Control System

From .:: Wiki-Sirius ::.
Jump to: navigation, search

Introduction

Sirius control system consists of a hardware/software solution that will provide a complete and reliable distributed system for supervision, data acquisition and control of the machine.

This page is a synopsis of all the content related to Sirius control system. Additional pages contain detailed information about each topic cited here.

General architecture of the control system

The figure below shows a conceptual overview of the control system architecture.


Sirius control system architecture.png


Next to the accelerator components, there are various types of hardware that interact with them, collecting information or providing configuration parameters and setpoints. These hardware entities consists of in-house developments or commercial equipments, and will implement all fast closed-loop controls. They will communicate to upper levels of the control system through serial interfaces (RS-485, RS-232) or Ethernet.

The serial communication to low-level hardware will be performed by single-board computers (SBCs), each of them controlling one or more devices. By now, our choice of single-board computer model is BeagleBone Black, a low-cost SBC with real-time capabilities that runs Linux operating system. These boards will execute EPICS server applications, which will interoperate between the EPICS Channel Access protocol (over Ethernet) and hardware communication protocols (over RS-485 or RS-232).

Some local hardware interfaces, like the LINAC control hardware, will have an Ethernet connection available with a built-in EPICS Input/Output Controller (IOC). There may be also devices with only Ethernet as a communication interface, but without bult-in EPICS software. For them, a Linux-powered SBC or workstation, located anywhere at the building, will run a corresponding EPICS server application.

EPICS was chosen as the default control software platform. Current server-side software development consists of traditional IOCs and Channel Access servers. At the moment we have worked only with 3.14.12 series of EPICS releases.

A high-performance computer network infrastructure will connect all SBCs and other devices which run server-side EPICS software to client-side applications (high level applications). These will consist of operator interfaces (computer software with graphical interfaces to read/write EPICS process variables), a data archiver application (for storage and retrieval of variable values history) and an alarm handling application (essential for notifying operators of anormal events), among others.

In-house hardware design

Some groups at LNLS are developing hardware solutions for Sirius. In order to standardize communication to all these hardware, CON developed a lightweight application layer protocol named Basic Small Messages Protocol (BSMP). It may be used over several communication links (current uses are over RS-485 and Ethernet).

Controls group is responsible for the development of general-purpose analog and digital hardware control interfaces, an adapter board with UARTs for BeagleBone Black and a module for reading temperature data from Pt100 sensors.

Software development and computer network

As mentioned before, EPICS is the default software environment for exchange of data between client and server control applications. See Sirius control system interfaces for more information about server-side EPICS software, its conventions and how they are related to hardware devices.

This Wiki also have a page dedicated to Sirius high level applications.

Sirius control system network contains all the details about control system underlying computer network.

Power Supply IOCs

Here the expected behavior of power supply IOCs is described from the point of view of the high level control system. This description below is organized in process variables, the IOCs' interface to the control system.


For nomenclature, the following diagram with the power supply state model, may be useful. Left arrows indicate that state variable of the left-hand side is supposed to be synchronized with the state variable in the right-hand side.

           Power Supply State Model
.==========================================.
|       IOC                    DSP         |
|==========================================|
| OpMode-Sel     |    |                    |
| OpMode-Sts     | <- | operation mode     |
| Abort-Cmd      | <- | abort cmd counter  |
| Reset-Cmd      | <- | reset cmd counter  |
| PwrState-Sel   |    |                    |
| PwrState-Sts   | <- | power state        | 
| Current-SP     |    |                    |
| Current-RB     | <- | current setpoint   |
| CurrentRef-Mon | <- | current reference  |
| Current-Mon    | <- | current load       |
| WfmLoad-Sel    |    |                    |
| WfmLoad-Sts    | <- | wfm_load_sel       |
| WfmSave-Cmd    | <- | save cmd counter   |
| WfmLabel-SP    |    |                    |
| WfmLabel-RB    | <- |                    |
| WfmLabels-Mon  | <- |                    |
| WfmData-SP     |    |                    |
| WfmData-RB     | <- |                    |
| Intlk-Mon      | <- | interlock value    |
| IntlkLabels-Cte| <- | interlock labels   |
|------------------------------------------|
|              (Waveform)                  |
|                           wfm_in_use     |
|                                          |
| Wfm1 (nv)         .            ^         |                  
| Wfm2 (nv)         .            |         |
| Wfm3 (nv)    wfm_load_sel -----*         |
| Wfm4 (nv)         .                      |
| Wfm5 (nv)         .                      |
| Wfm6 (nv)         .                      | 
*==========================================*
(nv): non-volatile 


OpMode-Sel

Select the power supply operation mode.

PV Type
access: write/read
type: enumerate(SlowRef, SlowRefSync, FastRef, RmpWfm,MigWfm, WfmRef, Cycle)
Write behavior
SlowRef
Set the power supply in the slow reference mode. This passive mode is the default operation mode. In this mode all current setpoint values come from the control system.
SlowRefSync
Set the power supply in the synchronized slow reference mode. In this mode implementation of a received reference current setpoint is done only after a trigger signal from the timing system.
FastRef
Set the power supply in the fast reference mode. In this mode the current reference is controlled by the fast orbit feedback system (FOFB).
RmpWfm
Set the power supply in the ramp mode with multiple trigger. In this mode, the current reference is controlled using an array with 2000 points defined in a waveform file. When a trigger happens, a new point in waveform file is set as current reference. We need a trigger for each point. When the last point is set, a new trigger makes the sequence to start again.
MigWfm
Set the power supply in the migration mode with multiple trigger. In this mode, the current reference is controlled using an array with 2000 points defined in a waveform file. When a trigger happens, a new point in waveform file is set as current reference. We need a trigger for each point. When the last point is set, the DSP SP is set as the value of reference and goes to 'SlowRef' mode. The purpose of this mode is just to migrate the current reference from one state to another, following the defined waveform.
Cycle
Set the power supply in the cycling generator mode. This is a mode for magnet cycling, identical in behavior to the SigGen mode but with static generator parameters are are specific to each power supply, depending on the magnets excited by it. These parameters are not write-accessible within the control system.
Read behavior
Return the operation mode, as stored in the power supply IOC. A readout of this variable is used to get the value-timestamp pair of the last current setpoint written to the power supply from the control system.

OpMode-Sts

Read the power supply operation mode.

PV Type
access: read
type: enumerate(SlowRef, SlowRefSync, FastRef, RmpWfm, MigWfm, Cycle)
Read behavior
Return the operation mode, as stored in the power supply DSP.

PwrState-Sel

Select the power state of the power supply.

PV Type
access: write/read
type: enumerate(Off, On)
Write behavior
Off
1. Turn power supply off immediately.
2. When off, the IOC still responds to control system read and write requests.
On
1. Check interlocks and, if clear, send 'Current-SP' to DSP.
Read behavior
Return current power state of power supply, as stored in the power supply IOC.

PwrState-Sts

Read the power state of the power supply.

PV Type
access: read
type: enumerate(Off, On)
Read behavior
Return current power state of power supply, as stored in the power supply DSP.

Reset-Cmd

Reset power supply interlock flags and change its operation state to default.

PV Type
access: write/read
type: int (PV value works as counter of number of issued commands since IOC boot)
Write behavior
SlowRef | SlowRefSync | FastRef | RmpWfm | MigWfm | Cycle
1. Increment command counter.
2. Write zero to Current-SP.
3. Change operation mode to default SlowRef.
4. Reset-check interlock signals.
Read behavior
Return the command counter value.

Abort-Cmd

Abort waveform scans and trigger-enabled state, changing the power supply to the default operation mode.

PV Type
access: read/write
type: int (PV value works as counter of number of issued commands since IOC boot)
Write behavior
SlowRef
1. Increment command counter.
SlowRefSync | FastRef | MigWfm | Cycle
1. Increment command counter.
2. Change operation to SlowRef.
3. Update IOC's Current-RB with the DSP reference current.
RmpWfm
1. Increment counter.
2. Wait either for the end of the waveform scan or the timeout.
3. Change operation mode to default SlowRef.
4. Update IOC's Current-RB with the DSP reference current.
Read behavior
Return the command counter value.

WfmLoad-Sel

Select a waveform slot.

PV Type
access: write/read
type: enumerate(Waveform1, Waveform2, Waveform3, Waveform4, Waveform5, Waveform6)
Write behavior
1. Load specified waveform data and label from non-volatile memory.
1. The IOC should choose the slot 'Waveform1' as the default waveform, at boot time.
2. If no non-volatile waveform exist for a slot, the IOC should load a waveform with zero values.
2. Start using the selected waveform in the next cycle, if one of the waveform modes are on.
Read behavior
Return int with the last valid waveform enumerate index, as stored in the IOC.

WfmLoad-Sts

Return selected waveform slot.

PV Type
access: read
type: enumerate(Waveform1, Waveform2, Waveform3, Waveform4, Waveform5, Waveform6)
Read behavior
Return int with last valid selected waveform enumerate index, as stored in the DSP.

WfmLabel-SP

Set label for selected waveform.

PV Type
access: write/read
string
Write behavior
Rewrite the label of selected waveform in volatile memory.
Read behavior
Return the label of selected waveform from volatile memory, as stored in the IOC.

WfmLabel-RB

Read label for selected waveform.

PV Type
access: read
string
Read behavior
Return the label of selected waveform from volatile memory, as stored in the DSP.


WfmLabels-Mon

Read labels for all waveforms.

PV Type
access: read
string
Read behavior
Return the label of all waveforms, as stored in the DSP.


WfmData-SP

Set data of selected waveform slot.

PV Type
access
write/read
type: float, array of 2000 points.
Write behavior
1. Write data to selected waveform slot in volatile memory.
2. If in 'RmpWfm'/'MigWfm' mode, use new set of waveform points in the next scan cycle.
Read behavior
Return data of currently selected waveform slot, as stored in the IOC.

WfmData-RB

Read data of selected waveform slot.

PV Type
access
read
type: float, array of 2000 points.
Initialization behavior
Reads data from non-volatile memory when DSP boots.
Read behavior
Return data of currently selected waveform slot, as stored in the DSP.

WfmSave-Cmd

PV Type
access: write/read
type: int (PV value works as counter of number of issued commands since IOC boot)
Write behavior
1. Increment command counter
2. Save currently selected (WfmLoad-Sts) waveform data and label from volatile to non-volatile memory.
Read behavior
Return the command counter value.


WfmIndex-Mon

PV Type
access: read
type: int (The index of waveform array who has set last)
Read behavior
Return the waveform index of the last value set as current reference.

Current-SP

Change current setpoint of the power supply.

PV Type
access: write/read
type: float
Write behavior
Depending on the operation mode:
SlowRef
1. Set the DSP setpoint value.
2. Implement the new value by sending the DSP setpoint value to the DSP reference value.
SlowRefSync
1. Set the DSP setpoint value.
2. Wait for trigger of the timing system to implement setpoint
FastRef | RmpWfm | MigWfm | Cycle
1. Set the DSP setpoint value.
Read behavior
Return current setpoint, as stored in the IOC.

Current-RB

Read current readback of the power supply.

PV Type
access: read
type: float
Read behavior
Return current setpoint of power supply, as stored in the power supply DSP.

CurrentRef-Mon

Read current reference of the power supply.

PV Type
access: read
type: float
Read behavior
Return current reference used in the power supply control loop and stored in the DSP.

Current-Mon

Read current of the power supply.

PV Type
access: read
type: float
Read behavior
Return the value of the current that the power supply is conveying to the magnets.

Intlk-Mon

Read interlock value.

PV Type
access: read
type: int
Read behavior
Return the value of the interlock variable. Each bit represents a interlock signal.

IntlkLabels-Cte

Read values of labels for interlock variable.

PV Type
access: read
type: tuple(Timeout, Bit1, Bit2, Bit3, Bit4, Bit5, Bit6, Bit7)
Read behavior
Description of the meaning for each bit in interlock variable.


BPM IOCS

Below we describe the high level control interface for the BPMs of the transport lines, booster and Storage ring.


PVs to define the operation mode of the BPM

PV Name PV Type
OpMode-(Sel|Sts) enum: Continuous | SinglePass

Continuous Mode

When operating in Continuous mode, the BPM IOC will continuously update some position monitoring PVs at a specified rate (currently 10Hz) and will be simultaneously available for acquisition measurements at higher rates. Below we describe these functionalities.

Monitoring PVs

PV Name PV Type Description
PosX-Mon array of floats
PosY-Mon array of floats
PosS-Mon array of floats Sum signal of the four antennas
PosQ-Mon array of floats Skew signal of the four antennas
AmpA-Mon array of floats
AmpB-Mon array of floats
AmpC-Mon array of floats
AmpD-Mon array of floats

PVs to configure acquisition of data

PV Name PV Type Description
AcqRate-(Sel|Sts) enum: TbT | ADC | FOFB Define the acquisition rate.
TbT: turn by turn, time spacing between points is one turn in the ring.
ADC: rate of a complete scan of the ADC. At this rate only the antennas data are available. (208/864*frf = 211MHz)
FOFB: rate of fast orbit feedback system. Revolution turn by 5.
AcqNrShots-(SP|RB) integer Number of acquisitions to perform.
AcqDelay-(SP|RB) float [us] wait this time after receive trigger to start acquisition
AcqNrSmplsPre-(SP|RB) integer Number of samples to acquire before the start of acquisition
AcqNrSmplsPos-(SP|RB) integer Number of samples to acquire after the start of acquisition
AcqStart-Cmd boolean Command to start acquisition
AcqStop-Cmd boolean Could abort also stop the 'repetitive' acquisiton too?
AcqState-Sts enum: Idle | Wait | Acquire | Error | Aborted State of the acquisition. Idle:
AcqTrigType-(Sel|Sts) enum: External | Manual | Auto | SoftTrig
AcqTrigRep-(Sel|Sts) enum: Dsbl | Enbl
AcqTrigExt-(Sel|Sts) enum: Trig1 | Trig2 | Trig3 | Trig4 | Trig5 Are these names ok?
AcqTrigAuto-(Sel|Sts) enum: TbT | ADC | FOFB
AcqTrigAutoCh-(Sel|Sts) enum: AmpA | AmpB | AmpC | AmpD | PosX | PosY | PosS | PosQ If 'ADC', then only the first four options
AcqTrigAutoThres-(SP|RB) integer Number of counts that sets the trigger
AcqTrigAutoSlope-(Sel|Sts) enum: Positive | Negative Polarity of data that sets the trigger
AcqTrigAutoHyst-(SP|RB) integer minimum number of consecutive points satisfying 'Thres' and 'Slope' that sets the trigger

Results from Measurements

Below we describe the PVs for the fast acquisition measurements. To get the real name of the PVs it is necessary to substitute the variable 'ACQ' by any of ('TbT', 'DAC', 'FOFB') and the variable 'SIG' by any of ('PosX', 'PosY', 'PosS', 'PosQ', 'AmpA', 'AmpB', 'AmpC', 'AmpD') if 'ACQ' is any of ('TbT', 'FOFB') or by any of ('AmpA', 'AmpB', 'AmpC', 'AmpD') if 'ACQ' is 'DAC'.

These Variables will be updated by the IOC only when a new experiment is carried out.

PV Name PV Type Description
(ACQ)(SIG)-Mon array of floats Array with processed measured data with interval between points determined by the acquisition rate.
Configuration of FFT:
(ACQ)(SIG)FFT.SPAN integer Number of points to consider in FFT. IOC will set this parameter according to measurement configuration
FFT related data
(ACQ)(SIG)FFT.FREQ array of floats Not sure about the pv name. Is frequency a field of the FFT?
(ACQ)(SIG)FFT.AMP array of floats
(ACQ)(SIG)FFT.PHA array of floats
(ACQ)(SIG)FFT.SIN array of floats
(ACQ)(SIG)FFT.COS array of floats
Statistics of data
(ACQ)(SIG)Min float Does this statistic take into account
(ACQ)(SIG)Max float
(ACQ)(SIG)Avg float
(ACQ)(SIG)Std float

SinglePass Mode

PV Name PV Type Description
Configuration PVs
SglStart-Cmd boolean Command to start acquisition
SglStop-Cmd boolean Could abort also stop the 'repetitive' acquisiton too?
SglTrigType enum('Auto','External')
SglDelay float [us] wait this time after receive trigger to start acquisition
SglTrigExt enum('Ch1', 'Ch2', 'Ch3', 'Ch4', 'Ch5')
SglTrigAutoCh enum('A', 'B', 'C', 'D', 'X', 'Y', 'S', 'Q')
SglTrigAutoThres integer Minimum number of counts that sets the trigger
SglTrigAutoSlope enum('Pos', 'Neg') Polarity of data that sets the trigger
SglTrigAutoHyst integer minimum number of consecutive points satisfying 'Thres' and 'Slope' that sets the trigger
Data PVs
SglPosX-Mon float
SglPosY-Mon float
SglPosS-Mon float
SglPosQ-Mon float
SglAmpA-Mon float
SglAmpB-Mon float
SglAmpC-Mon float
SglAmpD-Mon float
SglAntA-Mon array of floats raw data
SglAntB-Mon array of floats raw data
SglAntC-Mon array of floats raw data
SglAntD-Mon array of floats raw data

Questions and remarks

  1. Generally the acquisitions at TbT rate will be done without switching to eliminate noise. But if the FOFB system is on, then the measurements will happen with the switching turned on.
  2. Discuss possibility of implementing a new acquisition rate with frequency of the order of 1kHz.
  3. The number of shots in multi-shots acquisitions is only limited by the number of points of each shot. It means we will be able to do several, more than 20, shots along the ramp.
  4. Lucas will study the possibility of performing the FFT for each shot and returning the result as a single concatenated array instead of what is done today, where the FFT of the whole array is performed;
  5. The monit channels are continuous, independent of the BPM operational mode.
  6. It seems it is not difficult to include NAFF calculations in the BPM IOC for single shot and multi-shot. Lucas will study this possibility.
  7. Apply the convention described in Suffix Conventions to the BPM PVs.
  8. Create enum PV to select which Trigger line will be used in external trigger data acquisitions.
  9. Create a state reset in PV ACQTriggerEvent-Sel to bring back the status of the acquisition to idle.
  10. It would also be useful if the statistics returned for each acquisition were calculated per shot. This means that for multiple shot acquisitions each statistics PV would be a vector.
  11. Lucas said that currently the maximum number of acquisitions per shot in a multi-shot acquisition is 2048 points. He will increase this number to approximately 8192 points.
  12. Do we change the name of the PV ACQDataTrigChan-(Sel|Sts) to ACQTriggerDataChan-(Sel|Sts) and the name of ACQExtTrigChan-(Sel|Sts) to ACQTriggerExternalChan-(Sel|Sts)? This would follow the pattern of other PVs, where Trigger comes first and then comes Data.
  13. Dow we change the PV ACQTriggerDataSel-(SP|RB) to the type enum with string values A, B, C, D, X, Y, Q, Sum? This would make it easier to choose the appropriate data type for acquisitions. The behavior for invalid values would be the same as today.

Timing Devices IOCs

The Timing IOCs will be divided in two levels. The low Level IOCs are the ones that controls the different Timing devices along the machine and the High Level IOCs will be responsible of gather the

FOUT

PV Name PV type Description
DevEnbl-(Sel|Sts) enum: Dsbl | Enbl Control the state of the device
Los-Mon bool[7] and int Loss of return signal in the module exit
Alive-Mon int Counter indicating the module was initialized and is active
Network-Mon enum:Disconnected | Connected Network connection status of the module
Link-Mon enum: Unlink | Link Link Status

EVG

Important Points:

  1. EVG will provide 8 independent clocks.
  2. Clock7 (last one) will be used as the coincidence clock.
  3. EVG can provide 256 events, with codes from 00 to FF, but some events are reserved for configuration of the timing devices.
  4. All the remaining event codes will be available for use.
PV Name PV type Description
Configuration PVs
DevEnbl-(Sel|Sts) enum: Dsbl | Enbl Control the state of the device
ContinuousEvt-(Sel|Sts) enum:Dsbl | Enbl Defines the generation of events in mode 'Continuous'. All the other modes only work if this PV is 'Enbl'.
InjectionEvt-(Sel|Sts) enum:Dsbl | Enbl Defines the generation of the Events on 'Injection' mode.
UpdateEvt-(Cmd) boolean Restarts Injection and/or Continuous Modes and apply to the hardware any event parameter changes.
BucketList-(SP|RB) int[864], min: 1 max: 864 The value 1 refers to the first bunch and 864 is the last bunch. A number out of the range [1,864] in BucketList-SP invalidate the rest of the sequence passed to BucketList-RB. Example: BucketList-SP = 1, 2, 0, 10 -> BucketList-RB = 1, 2
BucketListLen-Mon int, min: 0 max: 864 The length of the valid bucket list sequence, which is the BucketList-RB.
RepeatBucketList-(SP|RB) int, min:0 max:100 Defines how many times events on 'Injection' mode will be generated by successive readings of BucketList, where 0 means infinite times.
ACDiv-(SP|RB) int, min:1 max:60 Defines the divisor of the AC frequency and consequently the rate at which continuous and injection modes will work.
RFDiv-(SP|RB) int, min:1 max:2^32 Defines the divisor of the RF frequency and consequently the rate at which Events and Clocks are generated.
Los-Mon bool[7] and int Loss of return signal in the module exit
Alive-Mon int Counter indicating the module was initialized and is active
ACStatus-Mon enum:Disconnected | Connected AC signal status
Network-Mon enum:Disconnected | Connected Network connection status of the module
RFStatus-Mon enum:Loss or Out of Range | Normal RF signal status
StateMachine-Mon enum:Initializing|Stopped|Continuous|Injection|Preparing Continuous|Preparing Injection State machine of the injection states
TotalInjCount-Mon int, min:0 max:2^32 Total injection counter shows how many injections were done by the EVG. Disable or turn off the module will reset the counter.
InjCount-Mon int, min:0 max:2^32 Injection counter shows how many injections were done during an injection process. At the end of the injection process the counter holds the last value and a new injection resets the counter.
Clock PVs
Clock(XX)MuxDiv-(SP|RB) int, min:2 max:2^32 Defines the frequency of the clock: Divisor of the base frequency (RF_FREQ/RFDiv).
Clock(XX)MuxEnbl-(Sel|Sts) enum:Dsbl | Enbl Defines if the clock is generated or not.
Event PVs
Evt(YY)Mode-(Sel|Sts) enum: Disabled | Continuous | Injection | External Selection of Event mode.
Disabled: the event is only generated through the GenIndEvent PV.
Continuous: the event is generated if ContinuousState is enabled.
Injection : the event is generated if InjectionState is enabled.
External: the event is generated every time the command ExtTrig-Cmd is sent.
Evt(YY)Desc-(SP|RB) string[40] A short description of the event.
Evt(YY)ExtTrig-Cmd boolean If Evt(Code)Mode-Sts is in External, setting this PV generates the event Evt(Code).
Evt(YY)DelayType-(Sel|Sts) enum: Incr | Fixed Defines if Delay is relative to the start of events generation pulse or to the BucketList.
Evt(YY)Delay-(SP|RB) int, min:0 max:2^32-1 Defines the delay of the event in units of 1/(RF_FREQ/RFDiv).

where:

  1. XX: 0, 1, 2, 3, 4, 5, 6, 7
  2. YY: 01, 02, ..., 62, 63

EVR

Important Points:

  1. The template for naming of this type of device is: AS-Glob:TI-EVR-n, where n is the index of the device;
  2. This device has 24 internal trigger channels that can be configured to listen to any of the available events generated by the EVG;
  3. This device has 8 multimode optical fibres that can be related to any of the 24 internal trigger channels or any of the 8 clocks provided by the EVG;
  4. This device has 12 plastic fibres connected to the first 12 internal trigger channels;
  5. The low level IOC will rename the first 12 internal triggers to OTP and the next eight triggers to OUT.
PV Name PV type Description
DevEnbl-(Sel|Sts) enum: Dsbl | Enbl Control the state of the device
Los-Mon bool[7] and int Loss of return signal in the module exit
Alive-Mon int Counter indicating the module was initialized and is active
Network-Mon enum:Disconnected | Connected Network connection status of the module
Link-Mon enum: Unlink | Link Link Status
Intlk-Mon enum: Dsbl | Enbl Interlock status
Internal OTP Triggers PVs
OTP(XX)State-(Sel|Sts) enum: Dsbl | Enbl Defines if this channel is enabled.
OTP(XX)ByPassIntlk-(Sel|Sts) enum: Bypass | Active Defines if this channel is turned off when interlock input is active.
OTP(XX)Evt-(SP|RB) int, min:1 max:63 Defines the event to which the trigger is listening.
OTP(XX)Width-(SP|RB) int, min:1 max:2^32 Width of the trigger pulse in units of 1/(RF_FREQ/RFDiv).
OTP(XX)Polarity-(Sel|Sts) enum: Normal | Inverse Defines if the pulse is ___---___ or ---__---.
OTP(XX)Pulses-(SP|RB) int, min:0, max:2^16-1 Defines the number of pulses to generate per event occurrence.
OTP(XX)Delay-(SP|RB) int, min:0 max:2^32-1 Defines the Delay of the trigger in units of 1/(RF_FREQ/RFDiv).
Multimode Fibre Output PVs
OUT(YY)Intlk-(Sel|Sts) enum: Dsbl | Enbl Defines if this channel is turned off when interlock input is active.
OUT(YY)Src-(Sel|Sts) enum: Dsbl | Trigger | Clock0 | ... | Clock7 Defines if the output will be connected to an internal trigger or to an EVG clock.
OUT(YY)SrcTrig-(SP|RB) int, min: 0, max: 23 Defines which internal trigger will be associated to OUT(YY)Src-(Sel|Sts). The options are 0x10 to 0x1F and 0x30 to 0x37.
OUT(YY)RFDelay-(SP|RB) int, min:0, max:31 Defines the delay of the output in relation to the trigger in OTP:
For values from 0 to 30, the number defined is the multiple of 20/(RF_FREQ/RFDiv) to wait;
when 31, the multiple will be defined by an event from EVG.
OUT(YY)FineDelay-(SP|RB) int, min:0 max:200 Additional time over RFDelay to wait to generate the output after the trigger is generated. The integer defines the multiple of 5 ps to wait.

where:

  1. XX: 00, 01, ..., 22, 23
  2. YY: 0, 1, 2, 3, 4, 5, 6, 7

EVE

Important Points:

  1. The template for naming of this type of device is: AS-Glob:TI-EVE-n, where n is the index of the device;
  2. This device has 16 internal trigger channels that can be configured to listen to any of the available events generated by the EVG;
  3. This device has 8 eletric outputs that can be related to any of the 16 internal trigger channels or any of the 8 clocks provided by the EVG;
PV Name PV type Description
DevEnbl-(Sel|Sts) enum: Dsbl | Enbl Control the state of the device
RFOut-(Sel|Sts) enum: OFF | 5*RF/2 | 5*RF/4 | RF | RF/2 | RF/4 Defines the creation of a signal in the RFOut output
Alive-Mon int Counter indicating the module was initialized is active
Network-Mon enum:Disconnected | Connected Network connection status of the module
Link-Mon enum: Unlink | Link Link Status
Intlk-Mon enum: Dsbl | Enbl Interlock status
Internal OTP Trigger PVs
OTP(XX)State-(Sel|Sts) enum: Dsbl | Enbl Defines if this channel is enabled.
OTP(XX)ByPassIntlk-(Sel|Sts) enum: Bypass | Active Defines if this channel is turned off when interlock input is active.
OTP(XX)Evt-(SP|RB) int, min:1, max:63 Defines the event to which the trigger is listening.
OTP(XX)Width-(SP|RB) int, min:1 max:2^32 Width of the trigger pulse in units of 1/(RF_FREQ/RFDiv).
OTP(XX)Polarity-(Sel|Sts) enum: Normal | Inverse Defines if the pulse is ___---___ or ---__---.
OTP(XX)Pulses-(SP|RB) int min:1, max:2^32-1 Defines the number of pulses to generate per event occurrence.
OTP(XX)Delay-(SP|RB) int, min:0 max:2^32-1 Defines the Delay of the trigger in units of 1/(RF_FREQ/RFDiv).
OUT electrical output PVs
OUT(YY)Intlk-(Sel|Sts) enum: Dsbl | Enbl Defines if this channel is turned off when interlock input is active.
OUT(YY)Src-(Sel|Sts) enum: Dsbl | Trigger | Clock0 | ... | Clock7 Defines if the output will be connected to an internal trigger or to an EVG clock.
OUT(YY)SrcTrig-(SP|RB) int, min: 0, max: 15 Defines which internal trigger will be associated to OUT(YY)Src-(Sel|Sts). The options are 0x10 to 0x1F.
OUT(YY)RFDelay-(SP|RB) int, min:0, max:31 Defines the delay of the output in relation to the trigger in IntChan:
For values from 0 to 30, the number defined is the multiple of 20/(RF_FREQ/RFDiv) to wait;
when 31, the multiple will be defined by an event from EVG.
OUT(YY)FineDelay-(SP|RB) int, min:0 max:200 Additional time over RFDelay to wait to generate the output after the trigger is generated. The integer defines the multiple of 5 ps to wait.

where:

  1. XX: 00, 01, 02, ..., 14, 15
  2. YY: 0, 1, 2, 3, 4, 5, 6, 7

AFC

Important Points:

  1. The template for naming of this type of device is: AS-XX:TI-AFC-n, where XX is the section of the storage ring the device is located, and n is the index of the device, in case there is more than one in a given section;
  2. This device has 18 internal trigger channels that can be configured to listen to any of the available events generated by the EVG;
  3. This device has 8 electrical outputs that can be configured to listen to any of the available events or any of the 8 clocks provided by the EVG;
  4. This device has 10 plastic fibres that can be configured to listen to any of the available events or any of the 8 clocks provided by the EVG;
PV Name PV type Description
DevEnbl-(Sel|Sts) enum: Dsbl | Enbl Control the state of the device
Los-Mon bool[7] and int Loss of return signal in the module exit
Alive-Mon int Counter indicating the module was initialized and is active
Network-Mon enum:Disconnected | Connected Network connection status of the module
Link-Mon enum: Unlink | Link Link Status
Intlk-Mon enum: Dsbl | Enbl Interlock status
Output PVs
(TP)(XX)State-(Sel|Sts) enum: Dsbl | Enbl Defines if this channel is enabled.
(TP)(XX)ByPassIntlk-(Sel|Sts) enum: Bypass | Active Defines if this channel is turned off when interlock input is active.
(TP)(XX)Evt-(SP|RB) int, min:1, max: 63 Defines the event to which the trigger is listening.
(TP)(XX)Src-(Sel|Sts) enum: Dsbl | Trigger | Clock0 | ... | Clock7 Defines if the output will be connected to an internal trigger or to an EVG clock.
(TP)(XX)Width-(SP|RB) int, min:1, max:2^32 Width of the trigger pulse in units of 1/(RF_FREQ/RFDiv).
(TP)(XX)Polarity-(Sel|Sts) enum: Normal|Inverse Defines if the pulse is ___---___ or ---__---.
(TP)(XX)Pulses-(SP|RB) int min:1, max:2^32 Defines the number of pulses to generate per event occurrence.
(TP)(XX)Delay-(SP|RB) int, min:0, max:2^32-1 Time to wait for to generate the trigger after the event arrives in units of 1/(RF_FREQ/RFDiv).

where:

  1. for the electric signals: TP = AMC and XX = 0, 1, ..., 6, 7
  2. for the plastic fiber signals: TP = FMC1, FMC2 and XX = Ch1, Ch2, Ch3, Ch4, Ch5

High Level Timing IOC

The high level timing system will have the following interface:

The NameOfEvent will be replaced by: Linac InjBO RmpBO InjSI RmpSI DigLI DigTB DigBO DigTS DigSI


Triggers

Trigger Types

We predict two types of triggers:

TYPE1:

   # The first type is for the generation of a train of triggers and it shall have this interface:
   Evnt-Mon    # Event to which this trigger is associated.
   Delay-SP    # Delay in microseconds, relative to its event. (granularity of 0.4ns)
   Delay-RB
   State-Sel   # enum: ('Off','On')
   State-Sts   # enum: ('Off','On')
   NrTrig-SP   # number of triggers to generate in the train.
   NrTrig-RB
   TrainDur-SP # Duration of the train of pulses in miliseconds.
   TrainDur-RB

TYPE2:

   # The second type generates a single trigger and shall have this interface:
   Evnt-Mon    # Event to which this trigger is associated.
   Delay-SP    # Delay in microseconds, relative to its event.
   Delay-RB
   Enbl-Sel    # enum: ('Off','On')
   Enbl-Sts    # enum: ('Off','On')

Events and their triggers

Linac:

   LI-01:TI-EGun:MultBun           TYPE2,     # Multi-Bunch Amplifier
   LI-01:TI-EGun:SglBun            TYPE2,     # Single-Bunch Amplifier
   LI-01:TI-Modltr-1               TYPE2,
   LI-01:TI-Modltr-2               TYPE2,
   LI-Glob:TI-SHAmp                TYPE2,     # 500MHz Amplifier
   LI-Glob:TI-RFAmp-1              TYPE2,     # 3GHz Amplifier
   LI-Glob:TI-RFAmp-2              TYPE2,
   LI-Glob:TI-LLRF-1               TYPE2,
   LI-Glob:TI-LLRF-2               TYPE2,
   LI-Glob:TI-LLRF-3               TYPE2,

InjBO:

   TB-04:TI-InjS                   TYPE2,
   BO-01D:TI-InjK                  TYPE2,
   BO-05D:TI-P5Cav                 TYPE1,     # For RF Voltage Ramping

RmpBO:

   BO-Glob:TI-Mags                 TYPE1,     # All Booster magnets only need one
                                              # Trigger signal for ramping

InjSI:

   BO-48D:TI-EjeK                  TYPE2,
   TS-01:TI-EjeSF                  TYPE2,
   TS-01:TI-EjeSG                  TYPE2,
   TS-Fam:TI-InjSG                 TYPE2,
   TS-04:TI-InjSF                  TYPE2,
   SI-01SA:TI-InjK                 TYPE2,   # will serve both, InjDpK and InjNLK

RmpSI:

   SI-Glob:TI-Mags                 TYPE1,   # All Storage Ring magnets only need one Trigger
                                            # but all power supplies should get this trigger

DigLI:

   LI-Fam:TI-BPM                  TYPE1,
   LI-Fam:TI-Scrn                 TYPE1,
   LI-01:TI-ICT-1                 TYPE1,
   LI-01:TI-ICT-2                 TYPE1,

DigTB:

   TB-Fam:TI-BPM                  TYPE1,
   TB-Fam:TI-Scrn                 TYPE1,
   TB-02:TI-ICT                   TYPE1,
   TB-04:TI-ICT                   TYPE1,
   TB-04:TI-FCT                   TYPE1,

DigBO:

   BO-Fam:TI-BPM                  TYPE1,
   BO-Fam:TI-Scrn                 TYPE1,
   BO-04U:TI-GSL                  TYPE1,
   BO-02D:TI-TuneS                TYPE1,
   BO-04D:TI-TuneP                TYPE1,
   BO-35D:TI-DCCT                 TYPE1, # repensar

DigTS:

   TS-Fam:TI-BPM                  TYPE1,
   TS-Fam:TI-Scrn                 TYPE1,
   TS-01:TI-ICT                   TYPE1,
   TS-04:TI-ICT                   TYPE1,
   TS-04:TI-FCT                   TYPE1,

DigSI:

   SI-19SP:TI-GSL15               TYPE1 #repensar
   SI-20SB:TI-GSL07               TYPE1 #repensar
   SI-13C4:TI-DCCT                TYPE1 #repensar
   SI-14C4:TI-DCCT                TYPE1 #repensar
   SI-01SA:TI-HTuneS              TYPE1 #repensar
   SI-17SA:TI-HTuneP              TYPE1 #repensar
   SI-18C4:TI-VTuneS              TYPE1 #repensar
   SI-17C4:TI-VTuneP              TYPE1 #repensar
   SI-19C4:TI-VPing               TYPE1 # I placed these guys in DigSI event to do
   SI-01SA:TI-HPing               TYPE1 # not create another event only for them...
   SI-16C4:TI-GBPM                TYPE1
   SI-Fam:TI-BPM                  TYPE1
   SI-Glob:TI-BbB:                TYPE1 #repensar