Merge branch 'ess'
This commit is contained in:
@ -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
|
||||
|
40
sinqEPICSApp/Db/dimetix.db
Normal file
40
sinqEPICSApp/Db/dimetix.db
Normal file
@ -0,0 +1,40 @@
|
||||
|
||||
# DB file for dimetix laser distance measurement device
|
||||
|
||||
##
|
||||
## Switch the laser
|
||||
##
|
||||
record(bo, "$(PREFIX)LASER") {
|
||||
field(DESC, "Switch laser on and off")
|
||||
field(DTYP,"stream")
|
||||
field(OUT,"@dimetix.proto setlaser() dimetix 0")
|
||||
field(PINI, "YES")
|
||||
field(VAL, "0")
|
||||
field(ZNAM, "OFF")
|
||||
field(ONAM, "ON")
|
||||
}
|
||||
|
||||
##
|
||||
## Read the distance
|
||||
##
|
||||
record(ai, "$(PREFIX)DIST") {
|
||||
field(DTYP, "stream")
|
||||
field(DESC, "Distance")
|
||||
field(INP, "@dimetix.proto read() dimetix 0")
|
||||
field(SCAN, "1 second")
|
||||
field(PREC, "1")
|
||||
field(EGU, "mm")
|
||||
}
|
||||
|
||||
|
||||
##
|
||||
## Set the readback (for simulation purposes only)
|
||||
##
|
||||
record(ao, "$(PREFIX)SimVal") {
|
||||
field(DTYP, "stream")
|
||||
field(DESC, "Set readback for simulation")
|
||||
field(OUT, "@dimetix.proto setreadback() dimetix 0")
|
||||
field(PREC, "1")
|
||||
field(EGU, "mm")
|
||||
}
|
||||
|
23
sinqEPICSApp/Db/dimetix.proto
Normal file
23
sinqEPICSApp/Db/dimetix.proto
Normal file
@ -0,0 +1,23 @@
|
||||
# Streamdevice protocol file for a Dimetix distance measuring device as used at
|
||||
# AMOR
|
||||
|
||||
InTerminator = "\n";
|
||||
OutTerminator = "\r\n";
|
||||
ExtraInput = Ignore;
|
||||
|
||||
setlaser {
|
||||
out "%{s0p|s0o}";
|
||||
in "g0?";
|
||||
}
|
||||
|
||||
setreadback {
|
||||
out "setval %d";
|
||||
in "g0?";
|
||||
}
|
||||
|
||||
read {
|
||||
out "s0g";
|
||||
in "g0g+%d";
|
||||
@mismatch {in "@E213"}
|
||||
}
|
||||
|
94
sinqEPICSApp/Db/slsvme.db
Normal file
94
sinqEPICSApp/Db/slsvme.db
Normal 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")
|
||||
}
|
31
sinqEPICSApp/Db/slsvme.proto
Normal file
31
sinqEPICSApp/Db/slsvme.proto
Normal 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";
|
||||
}
|
32
sinqEPICSApp/Db/spsamor.db
Normal file
32
sinqEPICSApp/Db/spsamor.db
Normal file
@ -0,0 +1,32 @@
|
||||
# DB definition for a SPS-S5 with the custom RS232 interface as used at SINQ.
|
||||
|
||||
#The digital inputs. Ignore the first one, which is the response character R
|
||||
|
||||
record(waveform, "$(PREFIX)DigitalInput") {
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@spss5.proto readDigital() spss5 0")
|
||||
field(SCAN, "5 second")
|
||||
field(NELM, "16")
|
||||
field(FTVL, "LONG")
|
||||
field(PREC, "1")
|
||||
}
|
||||
|
||||
# The analog inputs, again ignore the first one as it is the response character A
|
||||
record(waveform, "$(PREFIX)AnalogInput") {
|
||||
field(DTYP, "stream")
|
||||
field(INP, "@spss5.proto readAnalog() spss5 0")
|
||||
field(SCAN, "5 second")
|
||||
field(NELM, "8")
|
||||
field(FTVL, "LONG")
|
||||
field(PREC, "1")
|
||||
}
|
||||
|
||||
# This is forwarding the S0001 style strings to the hardware. This is the easiest solution but requires
|
||||
# Hardware knowledge upstream. Which is required anyway. The syntax is: SBBBI with 3 characters for the byte
|
||||
# to set and one character for the bit in the byte. The Byte must always be filled with 0 to the left.
|
||||
record(stringout, "$(PREFIX)Push") {
|
||||
field(DESC, "String for pushing buttons")
|
||||
field(DTYP, "stream")
|
||||
field(OUT, "@spss5.proto push() spss5 0")
|
||||
}
|
||||
|
25
sinqEPICSApp/Db/spss5.proto
Normal file
25
sinqEPICSApp/Db/spss5.proto
Normal file
@ -0,0 +1,25 @@
|
||||
# Streamdevice protocol file for the Siemens SPS-S5 with the custom RS232 interface as used at
|
||||
# AMOR
|
||||
|
||||
InTerminator = "\n";
|
||||
OutTerminator = "\r\n";
|
||||
ExtraInput = Ignore;
|
||||
|
||||
|
||||
readDigital {
|
||||
out "R";
|
||||
separator="";
|
||||
in "\?%d";
|
||||
}
|
||||
|
||||
readAnalog {
|
||||
out "A";
|
||||
separator="";
|
||||
in "\?%d";
|
||||
}
|
||||
|
||||
|
||||
push {
|
||||
out "%s";
|
||||
}
|
||||
|
Reference in New Issue
Block a user