]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
MKS_910_DualTrans .proto + .db + load asyn&stream modules
authorPhilipp Klaus <philipp.l.klaus@web.de>
Mon, 28 Oct 2019 11:02:26 +0000 (12:02 +0100)
committerPhilipp Klaus <philipp.l.klaus@web.de>
Mon, 28 Oct 2019 11:02:26 +0000 (12:02 +0100)
MKS_910_DualTrans/MKS_910_DualTransApp/Db/MKS_910_DualTrans.db [new file with mode: 0644]
MKS_910_DualTrans/MKS_910_DualTransApp/Db/Makefile
MKS_910_DualTrans/MKS_910_DualTransApp/src/Makefile
MKS_910_DualTrans/configure/RELEASE
MKS_910_DualTrans/iocBoot/iocMKS_910_DualTrans/st.cmd
MKS_910_DualTrans/protocols/MKS_910_DualTrans.proto [new file with mode: 0644]

diff --git a/MKS_910_DualTrans/MKS_910_DualTransApp/Db/MKS_910_DualTrans.db b/MKS_910_DualTrans/MKS_910_DualTransApp/Db/MKS_910_DualTrans.db
new file mode 100644 (file)
index 0000000..dd50e7e
--- /dev/null
@@ -0,0 +1,7 @@
+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")
+}
index 8eb97279d19c56456f20368843fa70bf92ec9048..760b0bb97834c58afae4997a603aff4cd1f72a94 100644 (file)
@@ -7,6 +7,7 @@ include $(TOP)/configure/CONFIG
 # 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
index 20a05ceb114a0747bf85710636cb34a201e1c084..1235545425529746e75a51e2ff42604b79f846d3 100644 (file)
@@ -14,12 +14,17 @@ DBD += MKS_910_DualTrans.dbd
 
 # 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
index d6f46ca26b76cedad17e37700a3a349748d39f63..822cf6fd32421bf16b370a43d23ae0decef782cf 100644 (file)
 
 # 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
index e77d2b3f99d067eea84a12c379eab3e88852649b..11597e4a1c661f1ffea727553ee44ba9966e5e4f 100755 (executable)
@@ -5,14 +5,28 @@
 
 < 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
diff --git a/MKS_910_DualTrans/protocols/MKS_910_DualTrans.proto b/MKS_910_DualTrans/protocols/MKS_910_DualTrans.proto
new file mode 100644 (file)
index 0000000..9ba0ebe
--- /dev/null
@@ -0,0 +1,29 @@
+#################################################
+# ###                                       ### #
+# ### 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";
+}