Merge branch 'ess'

This commit is contained in:
2017-05-17 11:23:50 +02:00
19 changed files with 498 additions and 54 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

View 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")
}

View 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
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

@ -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")
}

View 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";
}