Skip to content

Commit

Permalink
Merge pull request #5 from slaclab/aug25_pamm
Browse files Browse the repository at this point in the history
Updates for Aug25 PAMM
  • Loading branch information
jamock authored Aug 22, 2020
2 parents bbfad33 + 0d70c82 commit 5448b7f
Show file tree
Hide file tree
Showing 31 changed files with 283 additions and 62 deletions.
47 changes: 0 additions & 47 deletions README

This file was deleted.

95 changes: 95 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# FastFeedback
## The NC LINAC FastFeedback EPICS Application

# Contents
1. [Documentation](#documentation)
2. [Directory Tree](#directory-tree)
3. [List of IOCs](#list-of-iocs)


## Documentation
Links to various bits of information about the FastFeedback system are below. A unified FastFeedback documentation source is in progress.

[Assorted Documentation](https://confluence.slac.stanford.edu/display/~rreno/Fast+Feedback+assorted+Documentation?flashId=-195444716) PowerPoints, mostly

## Directory Tree
```
. Build system <TOP>
+-- bin
| +-- linuxRT-x86_64 # fastFeedback and ffUnitTest binaries
+-- configure # Build system configuration files
+-- fastFeedbackApp
| +-- Db
| | +-- common # Database files common to all Feedback IOCs
| | +-- iocs # Database files specific to a Feedback IOC
| +-- src # Source directory. Contains state notation files, database definitions, and the main entry point
| | +-- algo # C++ sources for feedback algorithms
| | +-- exec__ # C sources and database definitions to register EPICS interface functions
| | +-- framework # C++ sources for the Fast Feedback framework
| | +-- test # Unit Test sources
| | +-- util # Utility functions - logging, time, and EPICS device support
+-- iocBoot # Common and IOC specific startup scripts
| +-- common
| +-- sioc-AREA-UNIT
| ...
+-- test # integration testing development support files
+-- tools # misc. support scripts
```


## List of IOCs

### Global
| Name | CPU | Function | FB |Loop |VEVR # | Notes |
|:-----------------:|:-----------------:|:----------------:|:-------:|:-----:|:-----:|:-------------------------------------------------|
| sioc-sys0-fb01 | cpu-sys0-fb01 | Watchdog | N/A | N/A | N/A | Moved from lcls-daemon1 in R3.2.0 (Aug 25, 2020) |
| sioc-sys0-lg01 | cpu-sys0-fb02 | HXR Longitudinal | FB04 | LG01 | 3 | |
| sioc-sys0-lg02 | cpu-sys0-fb01 | SXR Longitudinal | FB03 | LG01 | 10 | Not yet commissioned |
| sioc-sys0-gn01 | cpu-sys0-fb02 | BunchCharge | FB02 | GN01 | 2 | |

### S20
| Name | CPU | Function | FB |Loop |VEVR # | Notes |
|:-----------------:|:-----------------:|:----------------:|:-------:|:-----:|:-----:|:-------------------------------------------------|
| sioc-in20-tr01 | cpu-sys0-fb02 | Gun Launch | FB01 | TR01 | 0 | |
| sioc-in20-tr02 | cpu-sys0-fb02 | Injector Launch | FB01 | TR02 | 1 | |
| sioc-in20-tr03 | cpu-sys0-fb01 | Injector Launch1 | FB02 | TR05 | 8 | |
| sioc-in20-tr04 | cpu-sys0-fb01 | Injector Launch2 | FB04 | TR04 | 9 | |
| sioc-in20-tr05 | cpu-sys0-fb02 | Injector Launch3 | FB03 | TR03 | 7 | |

### S21
| Name | CPU | Function | FB |Loop |VEVR # | Notes |
|:-----------------:|:-----------------:|:----------------:|:-------:|:-----:|:-----:|:-------------------------------------------------|
| sioc-li21-tr01 | cpu-sys0-fb01 | XCAV Launch | FB01 | TR03 | 1 | |
| sioc-li21-tr02 | cpu-sys0-fb01 | L2 Launch | FB01 | TR04 | 2 | |

### S24
| Name | CPU | Function | FB |Loop |VEVR # | Notes |
|:-----------------:|:-----------------:|:----------------:|:-------:|:-----:|:-----:|:-------------------------------------------------|
| sioc-li24-tr01 | cpu-sys0-fb01 | L3 Launch | FB02 | TR01 | 3 | |

### S28
| Name | CPU | Function | FB |Loop |VEVR # | Notes |
|:-----------------:|:-----------------:|:----------------:|:-------:|:-----:|:-----:|:-------------------------------------------------|
| sioc-li28-tr01 | cpu-sys0-fb01 | LI28 Launch | FB02 | TR02 | 4 | |

### BSY
| Name | CPU | Function | FB |Loop |VEVR # | Notes |
|:-----------------:|:-----------------:|:----------------:|:-------:|:-----:|:-----:|:-------------------------------------------------|
| sioc-bsy0-tr01 | cpu-sys0-fb01 | BSY X | FB01 | TR05 | 0 | |
| sioc-bsy0-tr01 | cpu-sys0-fb02 | BSY Y | FB05 | TR01 | 6 | |

### LTU
| Name | CPU | Function | FB |Loop |VEVR # | Notes |
|:-----------------:|:-----------------:|:----------------:|:-------:|:-----:|:-----:|:-------------------------------------------------|
| sioc-ltuh-tr01 | cpu-sys0-fb01 | Slow LTUH1 | FB02 | TR04 | 5 | |
| sioc-ltuh-tr02 | cpu-sys0-fb01 | Slow LTUH2 | FB02 | TR03 | 6 | |
| sioc-ltuh-tr03 | cpu-sys0-fb01 | LTUH Launch | FB03 | TR01 | 7 | |
| sioc-ltus-tr01 | cpu-sys0-fb01 | LTUS Launch | FB04 | TR01 | 11 | |

### Undulator Hall
| Name | CPU | Function | FB |Loop |VEVR # | Notes |
|:-----------------:|:-----------------:|:----------------:|:-------:|:-----:|:-----:|:-------------------------------------------------|
| sioc-undh-tr01 | cpu-sys0-fb02 | UNDH Launch | FB03 | TR04 | 4 | |
| sioc-undh-tr02 | cpu-sys0-fb02 | UNDH BLD | FB05 | TR05 | 6 | |
| sioc-unds-tr01 | cpu-sys0-fb01 | UNDS Launch | FB04 | TR01 | 12 | |
| sioc-unds-tr02 | cpu-sys0-fb01 | UNDS BLD | FB03 | TR02 | 13 | Not yet commissioned |
7 changes: 7 additions & 0 deletions RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
# 2018, W. Williams (ernesto)
#
#==============================================================
R3.2.0: 25-August-2020 R.Reno (rreno)
* Add ability to select BY1 energy source at IOC startup
* Fixed bug where error handling code for an FCOM channel creation failure would never run
* Target linuxRT platform on watchdog IOC (sioc-sys0-fb01)
* Rewrote README in Markdown
* Added UNDS BLD IOC (sioc-unds-tr02)

R3.1.0: 05-August-2020 R.Reno (rreno)
* Add 2 new transverse feedbacks for SXR (sioc-ltus-tr01 sioc-unds-tr01)
* Codebase changes:
Expand Down
4 changes: 2 additions & 2 deletions fastFeedbackApp/Db/common/fbckIoc.substitutions
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ file fbckIocConfig.db {
}
# ioc level status pvs
file fbckIocStatus.db {
pattern { IOC, LC, LOOP, AREA }
{ $(IOC), $(LC), $(LP), $(AR) }
pattern { IOC, LC, LOOP, AREA, BEND_MAG }
{ $(IOC), $(LC), $(LP), $(AR), $(BEND_MAG) }
}
2 changes: 1 addition & 1 deletion fastFeedbackApp/Db/common/fbckIocStatus.db
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ record(ai, "$(IOC):$(LC):$(LOOP):BY1BDES_IN") {
field(PINI, "YES")
field(FLNK, "$(IOC):$(LC):$(LOOP):BY1BDES")
field(VAL, "0")
field(INP, "BEND:LTUH:125:BDES CPP MS")
field(INP, "${BEND_MAG} CPP MS")
field(EGU, "GeV/c")
field(PRIO, "LOW")
}
Expand Down
4 changes: 2 additions & 2 deletions fastFeedbackApp/Db/iocs/fbck_template.substitutions
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ file fbckLoop.db {


file fbckIoc.db {
pattern { AR, LP, IOC, LC }
{$(FEEDBACK), $(LOOP_TYPE), $(VIOC), $(LOC) }
pattern { AR, LP, IOC, LC, BEND_MAG }
{$(FEEDBACK), $(LOOP_TYPE), $(VIOC), $(LOC), $(BEND_MAG) }
}

# This is a necessary additional template file for longitudinal feedbacks
Expand Down
15 changes: 7 additions & 8 deletions fastFeedbackApp/src/framework/FcomChannelStates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,18 @@ FcomChannelStates::~FcomChannelStates() {
}

/**
* Initializes the channel, by first finding out the FcomID for the device
* name (PV) and then subscribing to updates using fcomSubscribe() call.
* Initializes the channel by first finding out the FcomID for the device
* name (PV).
*
* @return -1 if PV name cannot be found or subscribe operation failed.
* @throws Exception if unable to get an FCOM ID for the PV
* @author L.Piccoli
*/
int FcomChannelStates::initialize() {
std::string fcomName = _name;

_id = fcomLCLSPV2FcomID(fcomName.c_str());
if (_id < 0) {
_stringStream.str(std::string()); // Clear the stream
_stringStream << "Failed to get FCOM ID for " << fcomName;
_id = fcomLCLSPV2FcomID(_name.c_str());
if (_id == FCOM_ID_NONE) {
_stringStream.str(""); // Clear the stream
_stringStream << "Failed to get FCOM ID for " << _name;
throw Exception(_stringStream.str());
}
_type = STATES;
Expand Down
2 changes: 1 addition & 1 deletion iocBoot/common/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ dbLoadRecords("db/save_restoreStatus.db", "P=${IOC_NAME}:")
# Load application specific databases
# ===================================================================
# These macros are used in PV generation:
dbLoadRecords("db/fbck_template.db","VIOC=${IOC_TYPE},LOC=${LOCA},FEEDBACK=${FB},LOOP_TYPE=${LOOP},CON_NAME=${CONFIG_NAME},LOCAL_SETPOINTS=${LOCAL_SETPOINTS}")
dbLoadRecords("db/fbck_template.db","VIOC=${IOC_TYPE},LOC=${LOCA},FEEDBACK=${FB},LOOP_TYPE=${LOOP},CON_NAME=${CONFIG_NAME},LOCAL_SETPOINTS=${LOCAL_SETPOINTS},BEND_MAG=${BEND_MAG}")
#########################################################################
#BEGIN: Setup autosave/restore
######################################################################
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-bsy0-tr01/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB01")
epicsEnvSet("LOOP", "TR05")
epicsEnvSet("CONFIG_NAME", "LaunchLoop1")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs & VIOC
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-bsy0-tr02/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ epicsEnvSet("FB", "FB05")
epicsEnvSet("LOOP", "TR01")
epicsEnvSet("CONFIG_NAME", "LaunchLoop1")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs & VIOC
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-in20-tr01/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ epicsEnvSet("FB", "${LOCA}")
epicsEnvSet("LOOP", "TR01")
epicsEnvSet("CONFIG_NAME", "LaunchLoop1")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs & VIOC
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-in20-tr02/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB01")
epicsEnvSet("LOOP", "TR02")
epicsEnvSet("CONFIG_NAME", "LaunchLoop2")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-in20-tr03/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ epicsEnvSet("FB", "FB02")
epicsEnvSet("LOOP", "TR05")
epicsEnvSet("CONFIG_NAME", "LaunchLoop5")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-in20-tr04/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ epicsEnvSet("FB", "FB04")
epicsEnvSet("LOOP", "TR04")
epicsEnvSet("CONFIG_NAME", "LaunchLoop2")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-in20-tr05/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ epicsEnvSet("FB", "FB03")
epicsEnvSet("LOOP", "TR03")
epicsEnvSet("CONFIG_NAME", "LaunchLoop3")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-li21-tr01/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB01")
epicsEnvSet("LOOP", "TR03")
epicsEnvSet("CONFIG_NAME", "LaunchLoop1")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs & VIOC
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-li21-tr02/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB01")
epicsEnvSet("LOOP", "TR04")
epicsEnvSet("CONFIG_NAME", "LaunchLoop2")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs & VIOC
#====================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-li24-tr01/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB02")
epicsEnvSet("LOOP", "TR01")
epicsEnvSet("CONFIG_NAME", "LaunchLoop1")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#=====================================================================
# Set MACROS for EVRs & VIOC
#====================================================================
Expand Down
4 changes: 4 additions & 0 deletions iocBoot/sioc-li28-tr01/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ epicsEnvSet("FB", "FB02")
epicsEnvSet("LOOP", "TR02")
epicsEnvSet("CONFIG_NAME", "LaunchLoop1")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")


#===================================================================
# Set MACROS for EVRs & VIOC
#===================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-ltuh-tr01/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB02")
epicsEnvSet("LOOP", "TR03")
epicsEnvSet("CONFIG_NAME", "LaunchLoop1")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#===================================================================
# Set MACROS for EVRs & VIOC
#===================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-ltuh-tr02/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB02")
epicsEnvSet("LOOP", "TR04")
epicsEnvSet("CONFIG_NAME", "LaunchLoop2")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#===================================================================
# Set MACROS for EVRs & VIOC
#===================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-ltuh-tr03/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB03")
epicsEnvSet("LOOP", "TR01")
epicsEnvSet("CONFIG_NAME", "LaunchLoop3")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUH:125:BDES")

#===================================================================
# Set MACROS for EVRs & VIOC
#===================================================================
Expand Down
3 changes: 3 additions & 0 deletions iocBoot/sioc-ltus-tr01/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ epicsEnvSet("FB", "FB04")
epicsEnvSet("LOOP", "TR01")
epicsEnvSet("CONFIG_NAME", "LaunchLoop1")

# Which BY1 bend magnet do we want to read energy from?
epicsEnvSet("BEND_MAG", "BEND:LTUS:525:BDES")

#===================================================================
# Set MACROS for EVRs & VIOC
#===================================================================
Expand Down
Loading

0 comments on commit 5448b7f

Please sign in to comment.