# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db
+DB += VACOM_MVC3.db
#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
--- /dev/null
+#############################################
+# ### ### #
+# ### EPICS Database for ### #
+# ### VACOM_MVC3 ### #
+# ### ### #
+# ### author: O.Artz ### #
+# ### P.Klaus ### #
+# ### ### #
+# ### Ref 1.0; 2017-05-03 ### #
+# ### ### #
+# ### macros: ### #
+# ### sys system ### #
+# ### sub subsystem ### #
+# ### vsys vacuum sub system ### #
+# ### PORT Asyn Interface ### #
+#############################################
+
+record (ai, "$(sys):$(sub):VACUUM:$(vsys):Pressure") {
+ field (DTYP, "stream")
+ field (INP, "@VACOM_MVC3.proto getPressureValue2 $(PORT)")
+ field (SCAN, "10 second")
+ #field (FLNK, "PANDA:$(subsys):COOLING:$(sector):getExtTemp")
+ field (EGU, "mbar")
+ #field (PREC, "2")
+ #field (ADEL, "1")
+ #field (MDEL, "1")
+ #field (ASLO, "0.01")
+ #field (AOFF, "0")
+}
+
# VACOM_MVC3.dbd will be made up from these files:
VACOM_MVC3_DBD += base.dbd
+VACOM_MVC3_DBD += stream.dbd
+VACOM_MVC3_DBD += asyn.dbd
+VACOM_MVC3_DBD += drvAsynSerialPort.dbd
# Include dbd files from all support applications:
#VACOM_MVC3_DBD += xxx.dbd
# Add all the support libraries needed by this IOC
#VACOM_MVC3_LIBS += xxx
+VACOM_MVC3_LIBS += stream
+VACOM_MVC3_LIBS += asyn
# VACOM_MVC3_registerRecordDeviceDriver.cpp derives from VACOM_MVC3.dbd
VACOM_MVC3_SRCS += VACOM_MVC3_registerRecordDeviceDriver.cpp
# Variables and paths to dependent modules:
#MODULES = /path/to/modules
+MODULES = /home/scs/EPICS/EPICS/modules/
#MYMODULE = $(MODULES)/my-module
# If using the sequencer, point SNCSEQ at its top directory:
#SNCSEQ = $(MODULES)/seq-ver
+SNCSEQ = $(MODULES)/synApps_5_8/support/seq-2-2-1
+ASYN = $(MODULES)/synApps_5_8/support/asyn-4-26
+STREAM = $(MODULES)/synApps_5_8/support/stream-2-6a
# EPICS_BASE should appear last so earlier modules can override stuff:
EPICS_BASE = /home/scs/EPICS/EPICS/base
## everywhere it appears in this file
< envPaths
+epicsEnvSet ("STREAM_PROTOCOL_PATH", "${TOP}/protocols")
cd "${TOP}"
dbLoadDatabase "dbd/VACOM_MVC3.dbd"
VACOM_MVC3_registerRecordDeviceDriver pdbbase
+drvAsynSerialPortConfigure("HUBER_PORT","/dev/ttyUSB0")
+asynSetOption ("HUBER_PORT", 0, "baud", "19200")
+asynSetOption ("HUBER_PORT", 0, "bits", "8")
+asynSetOption ("HUBER_PORT", 0, "parity", "none")
+asynSetOption ("HUBER_PORT", 0, "stop", "1")
+asynSetOption ("HUBER_PORT", 0, "clocal", "N")
+asynSetOption ("HUBER_PORT", 0, "crtscts", "N")
+
+#lots! of debug output
+#var streamDebug 1
+
## Load record instances
#dbLoadRecords("db/xxx.db","user=scs")
+dbLoadRecords("db/VACOM_MVC3.db","PORT=HUBER_PORT,sys=CBM,sub=MVD,vsys=RECIPIENT")
cd "${TOP}/iocBoot/${IOC}"
iocInit
--- /dev/null
+#################################################
+# ### ### #
+# ### StreamDevice Protocol for ### #
+# ### VACOM_MVC3 ### #
+# ### ### #
+# ### author: O.Artz ### #
+# ### P.Klaus ### #
+# ### ### #
+# ### Ref 1.0; 2017-05-03 ### #
+#################################################
+
+###################
+# ### Globals ### #
+###################
+Terminator = CR;
+LockTimeout = 5000;
+ReplyTimeout = 500;
+ReadTimeout = 500;
+WriteTimeout = 300;
+ExtraInput = Ignore;
+
+#####################
+# ### Protocols ### #
+#####################
+
+
+getPressureValue2 {
+ out "RPV2";
+ in "%*d,\t%e";
+}
+