]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
VACOM_MVC3: .proto .db first working version
authorOle Artz <ole.artz@t-online.de>
Wed, 3 May 2017 14:06:14 +0000 (16:06 +0200)
committerOle Artz <ole.artz@t-online.de>
Wed, 3 May 2017 14:06:14 +0000 (16:06 +0200)
VACOM_MVC3/VACOM_MVC3App/Db/Makefile
VACOM_MVC3/VACOM_MVC3App/Db/VACOM_MVC3.db [new file with mode: 0644]
VACOM_MVC3/VACOM_MVC3App/src/Makefile
VACOM_MVC3/configure/RELEASE
VACOM_MVC3/iocBoot/iocVACOM_MVC3/st.cmd
VACOM_MVC3/protocols/VACOM_MVC3.proto [new file with mode: 0644]

index 983981d401b27c05644f2f2cc19cbf888f053bf3..a36420b9d41a6a01a558215f956fa710c118419a 100644 (file)
@@ -11,6 +11,7 @@ include $(TOP)/configure/CONFIG
 # 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
diff --git a/VACOM_MVC3/VACOM_MVC3App/Db/VACOM_MVC3.db b/VACOM_MVC3/VACOM_MVC3App/Db/VACOM_MVC3.db
new file mode 100644 (file)
index 0000000..f667f54
--- /dev/null
@@ -0,0 +1,30 @@
+#############################################
+# ###                                   ### #
+# ### 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")
+}
+
index 0f888140b4b6d28a50bdf6c4b861094135675b2c..57147b7cc805004b8db6896745c4a89d5a939dcc 100644 (file)
@@ -14,12 +14,17 @@ DBD += VACOM_MVC3.dbd
 
 # 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
index bd6b780b1ca1620a0b61ddf3a126e3a14a4819d6..9dc0e93ab66427caff9bf75e65e4ada70bd07197 100644 (file)
 
 # 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
index 868745ccbea5d576d420c40279b49f78d100937f..d57a7cbee1feb27d8b4dd2e0fafdb59ff5d599c6 100644 (file)
@@ -4,6 +4,7 @@
 ## everywhere it appears in this file
 
 < envPaths
+epicsEnvSet ("STREAM_PROTOCOL_PATH", "${TOP}/protocols")
 
 cd "${TOP}"
 
@@ -11,8 +12,20 @@ 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
diff --git a/VACOM_MVC3/protocols/VACOM_MVC3.proto b/VACOM_MVC3/protocols/VACOM_MVC3.proto
new file mode 100644 (file)
index 0000000..efc1065
--- /dev/null
@@ -0,0 +1,31 @@
+#################################################
+# ###                                       ### #
+# ### 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";
+}
+