Added support for the AMOR SPS-S5 using streamdevice
This commit is contained in:
34
iocBoot/iocsinqEPICS/stsps.cmd
Executable file
34
iocBoot/iocsinqEPICS/stsps.cmd
Executable 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 SPS
|
||||||
|
drvAsynIPPortConfigure("spss5", "localhost:63000",0,0,0)
|
||||||
|
#drvAsynIPPortConfigure("slsvme", "localhost:8080",0,0,0)
|
||||||
|
|
||||||
|
dbLoadRecords("$(ASYN)/db/asynRecord.db","P=SQ:AMOR:,R=spss5,PORT=spss5,ADDR=0,OMAX=80,IMAX=80")
|
||||||
|
|
||||||
|
epicsEnvSet ("STREAM_PROTOCOL_PATH", "$(TOP)/sinqEPICSApp/Db:.")
|
||||||
|
|
||||||
|
cd ${TOP}/iocBoot/iocsinqEPICS
|
||||||
|
dbLoadRecords("$(TOP)/sinqEPICSApp/Db/spsamor.db","PREFIX=SQ:AMOR:SPSS5:")
|
||||||
|
|
||||||
|
|
||||||
|
iocInit
|
||||||
|
|
||||||
|
## Start any sequence programs
|
||||||
|
#seq sncxxx,"user=koenneckeHost"
|
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