From 86e0da0236d0a2d357104d61d79b293d0ae58dfd Mon Sep 17 00:00:00 2001 From: Philipp Klaus Date: Fri, 7 Jul 2017 14:02:28 +0200 Subject: [PATCH] BALZERS: breaktable conversion: volt -> mbar (malfunc!) --- .../BALZERS_PKG020App/Db/BALZERS_PKG020.db | 45 ++++---- BALZERS_PKG020/BALZERS_PKG020App/src/Makefile | 2 + .../src/bptBALZERS_PKG020.dbd | 102 ++++++++++++++++++ .../BALZERS_PKG020App/src/menuConvert.dbd | 28 +++++ .../iocBoot/iocBALZERS_PKG020/st.cmd | 1 + 5 files changed, 160 insertions(+), 18 deletions(-) create mode 100644 BALZERS_PKG020/BALZERS_PKG020App/src/bptBALZERS_PKG020.dbd create mode 100644 BALZERS_PKG020/BALZERS_PKG020App/src/menuConvert.dbd diff --git a/BALZERS_PKG020/BALZERS_PKG020App/Db/BALZERS_PKG020.db b/BALZERS_PKG020/BALZERS_PKG020App/Db/BALZERS_PKG020.db index fe11b6d..7f95f06 100644 --- a/BALZERS_PKG020/BALZERS_PKG020App/Db/BALZERS_PKG020.db +++ b/BALZERS_PKG020/BALZERS_PKG020App/Db/BALZERS_PKG020.db @@ -15,36 +15,45 @@ # ### PORT Asyn Interface ### # ############################################# -#record (ai, "$(sys):$(sub):VACUUM:$(vsys):TPR:Pressure") { ... +record (ai, "$(sys):$(sub):VACUUM:$(vsys):TPR:Pressure") { + field (DTYP, "stream") + field (INP, "@BALZERS_PKG020.proto getVoltage5 $(PORT)") + field (SCAN, "I/O Intr") + field (EGU, "mbar") + field (LINR, "tpr2") + field (PREC, "6") + #field (ADEL, "0.010") + #field (MDEL, "0.001") +} -#record (ai, "$(sys):$(sub):VACUUM:$(vsys):IKR:Pressure") { -# field (DTYP, "stream") -# field (INP, "@BALZERS_PKG020.proto getPressureValue3 $(PORT)") -# field (SCAN, "I/O Intr") -# field (EGU, "mbar") -# #field (PREC, "2") -# #field (ADEL, "1") -# #field (MDEL, "1") -# #field (ASLO, "0.01") -# #field (AOFF, "0") -#} +record (ai, "$(sys):$(sub):VACUUM:$(vsys):IKR:Pressure") { + field (DTYP, "stream") + field (INP, "@BALZERS_PKG020.proto getVoltage7 $(PORT)") + field (SCAN, "I/O Intr") + field (EGU, "mbar") + field (LINR, "ikr") + field (PREC, "6") + #field (ADEL, "0.000010") + #field (MDEL, "0.000001") +} record (ai, "$(sys):$(sub):VACUUM:$(vsys):TPR:Voltage") { field (DTYP, "stream") field (INP, "@BALZERS_PKG020.proto getVoltage5 $(PORT)") field (SCAN, "I/O Intr") field (EGU, "V") - #field (PREC, "3") - #field (ADEL, "0.001") - #field (MDEL, "0.001") + field (PREC, "3") + field (ADEL, "0.05") + field (MDEL, "0.01") } + record (ai, "$(sys):$(sub):VACUUM:$(vsys):IKR:Voltage") { field (DTYP, "stream") field (INP, "@BALZERS_PKG020.proto getVoltage7 $(PORT)") field (SCAN, "I/O Intr") field (EGU, "V") - #field (PREC, "3") - #field (ADEL, "0.001") - #field (MDEL, "0.001") + field (PREC, "3") + field (ADEL, "0.05") + field (MDEL, "0.01") } diff --git a/BALZERS_PKG020/BALZERS_PKG020App/src/Makefile b/BALZERS_PKG020/BALZERS_PKG020App/src/Makefile index 0bd1cb3..d07c652 100644 --- a/BALZERS_PKG020/BALZERS_PKG020App/src/Makefile +++ b/BALZERS_PKG020/BALZERS_PKG020App/src/Makefile @@ -12,6 +12,8 @@ PROD_IOC = BALZERS_PKG020 # BALZERS_PKG020.dbd will be created and installed DBD += BALZERS_PKG020.dbd +DBD += bptBALZERS_PKG020.dbd + # BALZERS_PKG020.dbd will be made up from these files: BALZERS_PKG020_DBD += base.dbd BALZERS_PKG020_DBD += stream.dbd diff --git a/BALZERS_PKG020/BALZERS_PKG020App/src/bptBALZERS_PKG020.dbd b/BALZERS_PKG020/BALZERS_PKG020App/src/bptBALZERS_PKG020.dbd new file mode 100644 index 0000000..7c17682 --- /dev/null +++ b/BALZERS_PKG020/BALZERS_PKG020App/src/bptBALZERS_PKG020.dbd @@ -0,0 +1,102 @@ +breaktable(tpr2) { + 0.00 0.00010000 + 0.10 0.00020000 + 0.22 0.00150000 + 0.30 0.00200000 + 0.44 0.00300000 + 0.60 0.00400000 + 0.75 0.00500000 + 0.90 0.00600000 + 1.04 0.00700000 + 1.19 0.00800000 + 1.36 0.00900000 + 1.52 0.01000000 + 1.94 0.01500000 + 2.09 0.02000000 + 2.38 0.03000000 + 2.58 0.04000000 + 2.72 0.05000000 + 2.97 0.06000000 + 3.12 0.07000000 + 3.29 0.08000000 + 3.44 0.09000000 + 3.60 0.10000000 + 3.96 0.15000000 + 4.14 0.20000000 + 4.50 0.30000000 + 4.72 0.40000000 + 4.96 0.50000000 + 5.17 0.60000000 + 5.32 0.70000000 + 5.50 0.80000000 + 5.62 0.90000000 + 5.72 1.00000000 + 5.96 1.50000000 + 6.26 2.00000000 + 6.58 3.00000000 + 6.74 4.00000000 + 6.92 5.00000000 + 7.07 6.00000000 + 7.21 7.00000000 + 7.34 8.00000000 + 7.51 9.00000000 + 7.68 10.00000000 + 8.25 15.00000000 + 8.58 20.00000000 + 8.99 30.00000000 + 9.20 40.00000000 + 9.37 50.00000000 + 9.49 60.00000000 + 9.56 70.00000000 + 9.63 80.00000000 + 9.70 100.00000000 + 10.00 1000.00000000 +} + +breaktable(ikr) { + 0.09 0.00000005 + 0.24 0.00000010 + 0.34 0.00000015 + 0.45 0.00000020 + 0.67 0.00000030 + 0.86 0.00000040 + 1.05 0.00000050 + 1.25 0.00000060 + 1.44 0.00000070 + 1.63 0.00000080 + 1.82 0.00000090 + 2.01 0.00000100 + 2.61 0.00000150 + 2.74 0.00000200 + 3.01 0.00000300 + 3.22 0.00000400 + 3.44 0.00000500 + 3.67 0.00000600 + 3.87 0.00000700 + 4.09 0.00000800 + 4.31 0.00000900 + 4.53 0.00001000 + 5.07 0.00001500 + 5.26 0.00002000 + 5.64 0.00003000 + 5.92 0.00004000 + 6.23 0.00005000 + 6.45 0.00006000 + 6.65 0.00007000 + 6.86 0.00008000 + 7.03 0.00009000 + 7.21 0.00010000 + 7.72 0.00015000 + 8.11 0.00020000 + 8.51 0.00030000 + 8.72 0.00040000 + 8.95 0.00050000 + 9.17 0.00060000 + 9.29 0.00080000 + 9.40 0.00100000 + 9.52 0.00150000 + 9.61 0.00200000 + 9.75 0.00300000 + 9.81 0.00400000 + 9.88 0.00500000 +} diff --git a/BALZERS_PKG020/BALZERS_PKG020App/src/menuConvert.dbd b/BALZERS_PKG020/BALZERS_PKG020App/src/menuConvert.dbd new file mode 100644 index 0000000..42dba30 --- /dev/null +++ b/BALZERS_PKG020/BALZERS_PKG020App/src/menuConvert.dbd @@ -0,0 +1,28 @@ +#************************************************************************* +# Copyright (c) 2013 UChicago Argonne LLC, as Operator of Argonne +# National Laboratory. +# Copyright (c) 2002 The Regents of the University of California, as +# Operator of Los Alamos National Laboratory. +# EPICS BASE is distributed subject to a Software License Agreement found +# in file LICENSE that is included with this distribution. +#************************************************************************* + + +menu(menuConvert) { + choice(menuConvertNO_CONVERSION,"NO CONVERSION") + choice(menuConvertSLOPE,"SLOPE") + choice(menuConvertLINEAR,"LINEAR") + choice(menuConverttypeKdegF,"typeKdegF") + choice(menuConverttypeKdegC,"typeKdegC") + choice(menuConverttypeJdegF,"typeJdegF") + choice(menuConverttypeJdegC,"typeJdegC") + choice(menuConverttypeEdegF,"typeEdegF(ixe only)") + choice(menuConverttypeEdegC,"typeEdegC(ixe only)") + choice(menuConverttypeTdegF,"typeTdegF") + choice(menuConverttypeTdegC,"typeTdegC") + choice(menuConverttypeRdegF,"typeRdegF") + choice(menuConverttypeRdegC,"typeRdegC") + choice(menuConverttypeSdegF,"typeSdegF") + choice(menuConverttypeSdegC,"typeSdegC") + choice(menuConverttpr2,"tpr2") +} diff --git a/BALZERS_PKG020/iocBoot/iocBALZERS_PKG020/st.cmd b/BALZERS_PKG020/iocBoot/iocBALZERS_PKG020/st.cmd index 552d7d6..9f56784 100644 --- a/BALZERS_PKG020/iocBoot/iocBALZERS_PKG020/st.cmd +++ b/BALZERS_PKG020/iocBoot/iocBALZERS_PKG020/st.cmd @@ -24,6 +24,7 @@ asynSetOption ("BALZERS_PORT", 0, "crtscts", "N") ## Load record instances #dbLoadRecords("db/xxx.db","user=scs") +dbLoadRecords("dbd/bptBALZERS_PKG020.dbd") dbLoadRecords("db/BALZERS_PKG020.db", "PORT=BALZERS_PORT,sys=CBM,sub=MVD,vsys=PRESTO_RECIPIENT") cd "${TOP}/iocBoot/${IOC}" -- 2.43.0