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

@ -34,7 +34,8 @@ MOTOR=/opt/epics/modules/motor/6.10.0/3.14.12.5
ASYN=/opt/epics/modules/asyn/4.27.0/3.14.12.5
SYNAPPSSTD=/opt/epics/modules/synAppsStd/3.4.1/3.14.12.5/
#ANC=/usr/local/epics/anc350v17
#STREAMS=/opt/epics/modules/streamdevice/2.6.0/3.14.12.5
STREAMS=/opt/epics/modules/streamdevice/2.6.0/3.14.12.5
#LAKESHORE336=/usr/local/epics/support/lakeshore336
BUSY=/opt/epics/modules/busy/1.6.0/3.14.12.5
#OXINSTCRYOJET=/usr/local/epics/support/OxInstCryojet-2-18-3
PCRE=/opt/epics/modules/pcre/8.36.0/3.14.12.5

View File

@ -1,10 +1,10 @@
epicsEnvSet("ARCH","centos7-x86_64")
epicsEnvSet("IOC","sinqEPICS")
epicsEnvSet("TOP","/opt/amor/epics")
epicsEnvSet("TOP","/afs/psi.ch/project/sinqdev/sinqepicsapp")
epicsEnvSet("EPICS_BASE","/opt/epics/bases/base-3.14.12.5")
epicsEnvSet("ASYN","/opt/epics/modules/asyn/4.27.0")
epicsEnvSet("MOTOR","/opt/amor/epics")
epicsEnvSet("SYNAPPSSTD","/opt/epics/modules/synAppsStd/3.4.1")
#epicsEnvSet("LAKESHORE336","/usr/local/epics/support/lakeshore336")
epicsEnvSet("STREAM","/opt/epics/modules/streamdevice/2.7.1")

View File

@ -0,0 +1,34 @@
#!../../bin/centos7-x86_64/sinqEPICS
# for debugging..................
## You may have to change sinqEPICS to something else
## everywhere it appears in this file
< envPaths
cd ${TOP}
## Register all support components
dbLoadDatabase "dbd/sinqEPICS.dbd"
dbLoadDatabase "dbd/sinq.dbd"
sinqEPICS_registerRecordDeviceDriver pdbbase
## Load record instances
#dbLoadRecords("db/xxx.db","user=koenneckeHost")
#---------- Install SLSVME
drvAsynIPPortConfigure("slsvme", "mpc2084:60066",0,0,0)
#drvAsynIPPortConfigure("slsvme", "localhost:8080",0,0,0)
dbLoadRecords("$(ASYN)/db/asynRecord.db","P=SQ:AMOR:,R=slsvme,PORT=slsvme,ADDR=0,OMAX=80,IMAX=80")
epicsEnvSet ("STREAM_PROTOCOL_PATH", "$(TOP)/sinqEPICSApp/Db:.")
cd ${TOP}/iocBoot/iocsinqEPICS
dbLoadRecords("slsvme.db","PREFIX=SQ:AMOR:PBY:,NO=1")
iocInit
## Start any sequence programs
#seq sncxxx,"user=koenneckeHost"

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"