diff --git a/iocBoot/iocsinqEPICS/stel755.cmd b/iocBoot/iocsinqEPICS/stel755.cmd new file mode 100755 index 0000000..b91182d --- /dev/null +++ b/iocBoot/iocsinqEPICS/stel755.cmd @@ -0,0 +1,34 @@ +#!../../bin/linux-x86-debug/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 "$(TOP)/dbd/sinqEPICS.dbd" +dbLoadDatabase "$(TOP)/sinqEPICSApp/src/sinq.dbd" +sinqEPICS_registerRecordDeviceDriver pdbbase + +## Load record instances +#dbLoadRecords("db/xxx.db","user=koenneckeHost") + + +#---------- Install SLSVME +drvAsynIPPortConfigure("el755", "narziss-ts:3004",0,0,0) +#drvAsynIPPortConfigure("slsvme", "localhost:8080",0,0,0) + +dbLoadRecords("$(ASYN)/db/asynRecord.db","P=SQ:NZ:,R=el755,PORT=el755,ADDR=0,OMAX=80,IMAX=80") + +epicsEnvSet ("STREAM_PROTOCOL_PATH", "$(TOP)/sinqEPICSApp/Db:.") + +cd ${TOP}/iocBoot/iocsinqEPICS +dbLoadRecords("$(TOP)/sinqEPICSApp/Db/el755.db","PREFIX=SQ:NZ:AMAG:,NO=2") + + +iocInit + +## Start any sequence programs +#seq sncxxx,"user=koenneckeHost" diff --git a/sinqEPICSApp/Db/el755.db b/sinqEPICSApp/Db/el755.db new file mode 100644 index 0000000..cc4bfa4 --- /dev/null +++ b/sinqEPICSApp/Db/el755.db @@ -0,0 +1,22 @@ +## +## Read the Current +## +record(ai, "$(PREFIX)CurRBV") { + field(DTYP, "stream") + field(DESC, "Current Readback") + field(INP, "@el755.proto read($(NO)) el755 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, "@el755.proto write($(NO)) el755 0") + field(PREC, "3") + field(EGU, "A") +} diff --git a/sinqEPICSApp/Db/el755.proto b/sinqEPICSApp/Db/el755.proto new file mode 100644 index 0000000..e40044b --- /dev/null +++ b/sinqEPICSApp/Db/el755.proto @@ -0,0 +1,22 @@ +# Streamdevice protocol file for the PSI EL755 Magnet Controller + +InTerminator = "\r"; +OutTerminator = "\r"; +#ExtraInput = Ignore; + +read { + out "I \$1"; + in "%*f %f"; + @mismatch {out "RMT 1"; + in ""; + out "ECHO 0"; + in ""; + } +} + + +write { + out "I \$1 %f"; + in ""; +} +