Integrated lakeshore 336 support into the SINQ IOC
See lakeshore.cmd for the pains involved
This commit is contained in:
@ -34,3 +34,6 @@ MOTOR=/usr/local/epics/support/motor-6-7
|
||||
ASYN=/usr/local/epics/support/asyn-4-18
|
||||
STD=/usr/local/epics/support/std-3-1
|
||||
ANC=/usr/local/epics/anc350v17
|
||||
STREAMS=/usr/local/epics/support/StreamDevice-2-6
|
||||
LAKESHORE336=/usr/local/epics/support/lakeshore336
|
||||
BUSY=/usr/local/epics/support/busy-1-4
|
@ -4,3 +4,4 @@ epicsEnvSet("TOP","/afs/psi.ch/project/sinqdev/sinqepicsapp")
|
||||
epicsEnvSet("EPICS_BASE","/usr/local/epics")
|
||||
epicsEnvSet("ASYN","/usr/local/epics/support/asyn-4-18")
|
||||
epicsEnvSet("MOTOR","/usr/local/epics/support/motor-6-7")
|
||||
epicsEnvSet("LAKESHORE336","/usr/local/epics/support/lakeshore336")
|
||||
|
56
iocBoot/iocsinqEPICS/lakeshore.cmd
Executable file
56
iocBoot/iocsinqEPICS/lakeshore.cmd
Executable file
@ -0,0 +1,56 @@
|
||||
#!../../bin/linux-x86-debug/sinqEPICS
|
||||
|
||||
|
||||
## You may have to change sinqEPICS to something else
|
||||
## everywhere it appears in this file
|
||||
|
||||
< envPaths
|
||||
|
||||
cd ${TOP}
|
||||
|
||||
|
||||
epicsEnvSet("STREAM_PROTOCOL_PATH", "$(LAKESHORE336)/protocol/")
|
||||
|
||||
## Register all support components
|
||||
dbLoadDatabase "dbd/sinqEPICS.dbd"
|
||||
#dbLoadDatabase "dbd/sinq.dbd"
|
||||
sinqEPICS_registerRecordDeviceDriver pdbbase
|
||||
|
||||
|
||||
#----------
|
||||
drvAsynIPPortConfigure("serial1", "localhost:2020",0,0,0)
|
||||
|
||||
dbLoadRecords("$(ASYN)/db/asynRecord.db","P=KM36:,R=serial1,PORT=serial1,ADDR=0,OMAX=80,IMAX=80")
|
||||
|
||||
cd ${TOP}/iocBoot/${IOC}
|
||||
# The db file had to be generated from the lakeshore.substitutions file using the command:
|
||||
# msi -I/usr/local/epics/db -I/usr/local/epics/support/asyn-4-18/db -I/usr/local/epics/support/lakeshore336/db
|
||||
# -I/usr/local/epics/support/devIocStats-3-1-7/db -I/usr/local/epics/db -Slakeshore.substitutions > lakeshore.db
|
||||
# The substitutions file uses constructs which are only understood by msi but not from dbLoadTemplate
|
||||
#dbLoadTemplate "lakeshore.substitutions"
|
||||
dbLoadRecords("lakeshore.db")
|
||||
|
||||
#-----------------------------------------------------------------------------------
|
||||
# Getting this to work cost some pain:
|
||||
#
|
||||
# See the note above about translating the template with msi.
|
||||
#
|
||||
# The first was that stream device failed to include the AsynDriverInterface. I had
|
||||
# to manually hack the Makefile to get this in. There must be a better way but I do
|
||||
# not know it.
|
||||
#
|
||||
# Undocumented, but true: this requires the busy record to be available, had to be added
|
||||
# too
|
||||
#
|
||||
# The next thing is that the LS366 simulator uses \r as terminator and not \r\n as
|
||||
# asked for in the protocol file. I had to chnage ls366.protocol to account for this.
|
||||
# I am not sure if this problem is a protocol problem or a simulator issue
|
||||
#
|
||||
# Definitly a simulator issue is that the simulator does not implement some commands.
|
||||
# Which causes error messages.
|
||||
#-----------------------------------------------------------------------------------
|
||||
|
||||
iocInit
|
||||
|
||||
## Start any sequence programs
|
||||
#seq sncxxx,"user=koenneckeHost"
|
25652
iocBoot/iocsinqEPICS/lakeshore.db
Normal file
25652
iocBoot/iocsinqEPICS/lakeshore.db
Normal file
File diff suppressed because it is too large
Load Diff
5
iocBoot/iocsinqEPICS/lakeshore.substitutions
Normal file
5
iocBoot/iocsinqEPICS/lakeshore.substitutions
Normal file
@ -0,0 +1,5 @@
|
||||
file "lakeshore336.template"
|
||||
{
|
||||
pattern {P, PORT, ADDR, TEMPSCAN, SCAN}
|
||||
{KM36:TST:LS,serial1,0, 1, 5}
|
||||
}
|
@ -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 std anc350 anc350AsynMotor
|
||||
sinqEPICS_LIBS += motor asyn std anc350 anc350AsynMotor stream busy
|
||||
|
||||
# sinqEPICS_registerRecordDeviceDriver.cpp derives from sinqEPICS.dbd
|
||||
sinqEPICS_SRCS += sinqEPICS_registerRecordDeviceDriver.cpp
|
||||
|
@ -16,3 +16,8 @@ include "anc350AsynMotor.dbd"
|
||||
include "scalerRecord.dbd"
|
||||
device(scaler,INST_IO,devScalerEL737,"asynScalerEL737")
|
||||
|
||||
#--------- For lakeshore
|
||||
addpath "/usr/local/epics/support/StreamDevice-2-6/dbd"
|
||||
include "stream.dbd"
|
||||
addpath "/usr/local/epics/support/busy-1-4/dbd"
|
||||
include "busySupport.dbd"
|
||||
|
Reference in New Issue
Block a user