Added support for the AMOR SLS VME Magnet controllers to the sinq IOC application

refs #DM-91
This commit is contained in:
2016-07-08 13:53:21 +02:00
parent c75957f284
commit 7c1693e606
8 changed files with 167 additions and 7 deletions

View File

@ -10,7 +10,7 @@ include $(TOP)/configure/CONFIG
#----------------------------------------------------
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db
DB_INSTALL += slsvme.proto
#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add

94
sinqEPICSApp/Db/slsvme.db Normal file
View File

@ -0,0 +1,94 @@
# Database definition for the SLS VME magnets as installed at AMOR
##
## Read the High Limit
##
record(ai, "$(PREFIX)HighLim") {
field(DTYP, "stream")
field(DESC, "High Current Limit")
field(INP, "@slsvme.proto read($(NO),hl) slsvme 0")
field(SCAN, "1 second")
field(PREC, "3")
field(EGU, "A")
}
##
## Read the High Limit
##
record(ai, "$(PREFIX)LowLim") {
field(DTYP, "stream")
field(DESC, "Low Current Limit")
field(INP, "@slsvme.proto read($(NO),ll) slsvme 0")
field(SCAN, "1 second")
field(PREC, "3")
field(EGU, "A")
}
##
## Read the Error code
##
record(ai, "$(PREFIX)ErrCode") {
field(DTYP, "stream")
field(DESC, "Error Code")
field(INP, "@slsvme.proto read($(NO),err) slsvme 0")
field(SCAN, "1 second")
field(PREC, "3")
field(EGU, "A")
}
##
## Read the textual representation of the error.
##
record(stringin, "$(PREFIX)ErrText") {
field(DTYP, "stream")
field(INP, "@slsvme.proto readErrTxt($(NO)) slsvme 0")
field(SCAN, "1 second")
field(PINI, "YES")
}
##
## Read the Current
##
record(ai, "$(PREFIX)CurRBV") {
field(DTYP, "stream")
field(DESC, "Low Current Limit")
field(INP, "@slsvme.proto read($(NO),cur) slsvme 0")
field(SCAN, "1 second")
field(PREC, "3")
field(EGU, "A")
}
##
## Set the current
##
record(ao, "$(PREFIX)CurSet") {
field(DTYP, "stream")
field(DESC, "Setpoint current")
field(OUT, "@slsvme.proto write($(NO),cur) slsvme 0")
field(PREC, "3")
field(EGU, "A")
}
##
## Read power status of the magnet
##
record(bi, "$(PREFIX)PowerStatusRBV") {
field(DESC, "Readback of the power status")
field(DTYP, "stream")
field(INP, "@slsvme.proto readonoff($(NO)) slsvme 0")
field(SCAN, "1 second")
field(ZNAM, "off")
field(ONAM, "on")
}
##
## Set the power status
##
record(bo, "$(PREFIX)PowerStatus") {
field(DESC, "Set the power status")
field(DTYP, "stream")
field(OUT, "@slsvme.proto setpower($(NO)) slsvme 0")
field(ZNAM, "on")
field(ONAM, "off")
}

View File

@ -0,0 +1,31 @@
# Streamdevice protocol file for the PSI SLS VME magnet controller used at AMOR
InTerminator = "\n";
OutTerminator = "\r\n";
#ExtraInput = Ignore;
read {
out "r \$1 \$2";
in "\$1 \$2 %f";
}
readErrTxt {
out "r \$1 errtext";
in "\$1 errtext %s";
}
write {
out "w \$1 \$2 %f";
in "OK";
}
readonoff {
out "r \$1 onoff";
in "\$1 onoff %{off|on}";
}
setpower {
out "w \$1 %{on|off}";
in "OK";
}

View File

@ -20,7 +20,7 @@ sinqEPICS_DBD += sinq.dbd
#sinqEPICS_DBD += pmacAsynIPPort.dbd pmacAsynMotorPort.dbd
# Add all the support libraries needed by this IOC
sinqEPICS_LIBS += motor asyn busy synAppsStd
sinqEPICS_LIBS += motor asyn busy synAppsStd streamdevice pcre
# sinqEPICS_registerRecordDeviceDriver.cpp derives from sinqEPICS.dbd
sinqEPICS_SRCS += sinqEPICS_registerRecordDeviceDriver.cpp

View File

@ -16,7 +16,7 @@ include "synAppsStd.dbd"
device(scaler,INST_IO,devScalerEL737,"asynScalerEL737")
#--------- For lakeshore
#addpath "/opt/epics/modules/streamdevice/2.6.0/3.14.12.5/dbd"
#include "streamdevice.dbd"
addpath "/opt/epics/modules/streamdevice/2.6.0/3.14.12.5/dbd"
include "streamdevice.dbd"
addpath "/opt/epics/modules/busy/1.6.0/3.14.12.5/dbd"
include "busy.dbd"