--- /dev/null
+record (ai, "$(sys):$(sub):VACUUM:$(vsys):PressureP3") {
+ field (DTYP, "stream")
+ field (INP, "@MKS_910_DualTrans.proto getPressureP3 $(PORT)")
+ field (SCAN, "2 second")
+ field (EGU, "mbar")
+ field (PREC, "3")
+}
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
#DB += xxx.db
+DB += MKS_910_DualTrans.db
#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# MKS_910_DualTrans.dbd will be made up from these files:
MKS_910_DualTrans_DBD += base.dbd
+MKS_910_DualTrans_DBD += stream.dbd
+MKS_910_DualTrans_DBD += asyn.dbd
+MKS_910_DualTrans_DBD += drvAsynSerialPort.dbd
# Include dbd files from all support applications:
#MKS_910_DualTrans_DBD += xxx.dbd
# Add all the support libraries needed by this IOC
#MKS_910_DualTrans_LIBS += xxx
+MKS_910_DualTrans_LIBS += asyn
+MKS_910_DualTrans_LIBS += stream
# MKS_910_DualTrans_registerRecordDeviceDriver.cpp derives from MKS_910_DualTrans.dbd
MKS_910_DualTrans_SRCS += MKS_910_DualTrans_registerRecordDeviceDriver.cpp
# Variables and paths to dependent modules:
#MODULES = /path/to/modules
+#MODULES = /home/scs/EPICS/EPICS/modules/
+MODULES = /home/pklaus/local_software/EPICS/modules/
#MYMODULE = $(MODULES)/my-module
# If using the sequencer, point SNCSEQ at its top directory:
#SNCSEQ = $(MODULES)/seq-ver
+ASYN = $(MODULES)/asyn
+STREAM = $(MODULES)/StreamDevice
# EPICS_BASE should appear last so earlier modules can override stuff:
EPICS_BASE = $(EPICS_ROOT)/base
< envPaths
+epicsEnvSet ("STREAM_PROTOCOL_PATH", "${TOP}/protocols")
+
cd "${TOP}"
## Register all support components
dbLoadDatabase "dbd/MKS_910_DualTrans.dbd"
MKS_910_DualTrans_registerRecordDeviceDriver pdbbase
+drvAsynSerialPortConfigure("PORT","/dev/ttyUSB0")
+asynSetOption ("PORT", 0, "baud", "9600")
+asynSetOption ("PORT", 0, "bits", "8")
+asynSetOption ("PORT", 0, "parity", "none")
+asynSetOption ("PORT", 0, "stop", "1")
+asynSetOption ("PORT", 0, "clocal", "N")
+asynSetOption ("PORT", 0, "crtscts", "N")
+
+#lots! of debug output
+#var streamDebug 1
+
## Load record instances
#dbLoadRecords("db/xxx.db","user=pklaus")
+dbLoadRecords("db/MKS_910_DualTrans.db","PORT=PORT,sys=CBM,sub=MVD,vsys=PRESTO")
cd "${TOP}/iocBoot/${IOC}"
iocInit
--- /dev/null
+#################################################
+# ### ### #
+# ### StreamDevice Protocol for ### #
+# ### MKS 910 DualTrans ### #
+# ### ### #
+# ### author: P.Klaus ### #
+# ### ### #
+# ### Ref 1.0; 2019-10-28 ### #
+#################################################
+
+###################
+# ### Globals ### #
+###################
+Terminator = ";FF";
+LockTimeout = 5000;
+ReplyTimeout = 500;
+ReadTimeout = 500;
+WriteTimeout = 300;
+ExtraInput = Ignore;
+
+#####################
+# ### Protocols ### #
+#####################
+
+
+getPressureP3 {
+ out "@253PR3?";
+ in "@253ACK%e";
+}