Integrated lakeshore 336 support into the SINQ IOC

See lakeshore.cmd for the pains involved
This commit is contained in:
2015-08-21 16:16:18 +02:00
parent 06b982ed09
commit e224004969
7 changed files with 25723 additions and 1 deletions

View File

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

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

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
file "lakeshore336.template"
{
pattern {P, PORT, ADDR, TEMPSCAN, SCAN}
{KM36:TST:LS,serial1,0, 1, 5}
}