Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • mateusznabywaniec/e3-ioc-llrf-ts2-1-2
  • iocs/manual/rf/e3-ioc-llrf-ts2-1-2
2 results
Show changes
Commits on Source (45)
# e3-ioc-LLRF
# LLRF IOC
ESS LLRF ioc for TS2 - system 1
LLRF IOC for TS2 - System 1 - LLRF 2
---
## IOC template
This project was generated with the [E3 cookiecutter IOC template](https://gitlab.esss.lu.se/ics-cookiecutter/cookiecutter-e3-ioc).
This README.md should be updated as part of creation and should add complementary information about the IOC in question (hardware controlled, addresses, etc.).
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
import glob
import os
import pathlib
from epics import caput
path = pathlib.Path(__file__).parent.absolute()
print(path)
# clean old clean files
file_rm = glob.glob('*clean*')
for f in file_rm:
os.remove(f)
file_names = glob.glob('*.csv')
for file_name in file_names:
file_result_name = file_name[:-4] + "_clean.csv"
# clean the last comment lines
with open(file_name, "r") as f:
lines = f.readlines()
while lines[-1][0] == "#" or lines[-1][0] == "\n":
lines = lines[:-1]
with open(file_result_name, "w") as f_result:
f_result.writelines(lines)
pv_name = file_name[:-4].replace("_", ":") + "-CalCSV"
print(pv_name)
caput(pv_name, str(path) + "/" + file_result_name)
export IOCNAME="TS2-010:Ctrl-IOC-005"
export AS_TOP=/opt/nonvolatile
export EPICS_CA_MAX_ARRAY_BYTES=16777300
export LLRF_PREFIX="TS2-LLRF1"
export LLRF_DIGRTM_PREFIX="TS2-010"
export LLRF_DIG_R_1="RFS-DIG-101"
export LLRF_DIG_R_2="RFS-DIG-102"
export LLRF_RFM_R_1="RFS-RFM-101"
export LLRF_RFM_R_2="RFS-RFM-102"
export F_SAMPLING=117.403333333
export F_SYSTEM=704.42
export NEARIQN=14
export NEARIQM=3
export LLRF_SLOT_1=4
export LLRF_SLOT_2=6
# Move this to llrfsystem with different substitutions?
export CAVITYCH=0
export CAVFWDCH=2
export CAVITYCH1=0
export CAVFWDCH1=2
export CAVITYCH2=0
export CAVFWDCH2=2
export PWRFWDCH=3
export TABLE_SMNM_MAX=1000 # Double check this
{
"ioc_type": "nfs",
"epics_version": "7.0.8",
"require_version": "5.1.0",
"realtime": false,
"address_list": [
"172.16.111.255"
]
}
require common
epicsEnvSet("LLRF_P", "TS2-010RFC")
epicsEnvSet("LLRF_R", "RFS-LLRF-102")
epicsEnvSet("LLRF_DIG_R_1", "RFS-DIG-102")
epicsEnvSet("LLRF_RFM_R_1", "RFS-RFM-102")
epicsEnvSet("TSELPV" "TS2-010:Ctrl-EVR-101:EvtACnt-I.TIME")
epicsEnvSet("PVRFWDT", "TS2-010:Ctrl-EVM-101:RFWidth-RB")
epicsEnvSet("SEC", "ts2sec")
epicsEnvSet("RFSTATION", "4") # Cavity number
require essioc
epicsEnvSet("ENGINEER", "Gabriel Fedel <gabriel.fedel@ess.eu>")
## Add extra environment variables here
epicsEnvSet("TOP", "$(E3_CMD_TOP)")
epicsEnvSet("F-SAMPLING" "$(F_SAMPLING)")
epicsEnvSet("F-SYSTEM" "$(F_SYSTEM)")
# Load standard module startup scripts
iocshLoad("$(common_DIR)/e3-common.iocsh")
iocshLoad("$(essioc_DIR)/common_config.iocsh")
# Load LLRF
require llrfsystem
require sis8300llrf, 5.29.4+0
require llrfsystem, 3.19.3+0
iocshLoad("$(llrfsystem_DIR)/ts2.iocsh", "P=$(LLRF_PREFIX)::, R=, PD=$(LLRF_DIGRTM_PREFIX):, RD=$(LLRF_DIG_R_1):, PD1=$(LLRF_DIGRTM_PREFIX):, RD1=$(LLRF_DIG_R_1):, PD2=$(LLRF_DIGRTM_PREFIX):, RD2=$(LLRF_DIG_R_2):")
iocshLoad("$(llrfsystem_DIR)/llrfsystem.iocsh")
dbl > PVs.list
## For commands to be run after iocInit, use the function afterInit()
# Call iocInit to start the IOC
iocInit()
date
dbgrep REQMOD* > '/iocs/sis8300llrf/REQMODs.list'