# HG changeset patch # User Heinz Junkes # Date 1594793542 -7200 # Node ID 320de4b4c9eea1e3d7477b699f4d00243a6852ae # Parent f6e1a4c750735af2f8adfcb0ce7aa32e166b7823 Add 2nd moxa XGS600 and TPG256 diff -r f6e1a4c75073 -r 320de4b4c9ee IOCINFRAApp/Db/Makefile --- a/IOCINFRAApp/Db/Makefile Fri Jul 10 06:11:39 2020 +0200 +++ b/IOCINFRAApp/Db/Makefile Wed Jul 15 08:12:22 2020 +0200 @@ -6,7 +6,8 @@ # Install databases, templates & substitutions like this DB += XGS600_chan.db DB += XGS600.proto -DB += XGS600.substitutions +DB += XGS600_1.substitutions +DB += XGS600_2.substitutions DB += XGS600_unit.db DB += TPG26x.db DB += TPG26x.proto @@ -21,6 +22,9 @@ DB += devKeithley6487.db DB += devKeithley6487.proto DB += asynRecord.db +DB += maxigauge.proto +DB += maxigauge.template +DB += maxigauge.sub # If .db template is not named *.template add # _TEMPLATE = diff -r f6e1a4c75073 -r 320de4b4c9ee IOCINFRAApp/Db/XGS600_1.substitutions --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IOCINFRAApp/Db/XGS600_1.substitutions Wed Jul 15 08:12:22 2020 +0200 @@ -0,0 +1,14 @@ +file "db/XGS600_unit.db" { + pattern + { HWUNIT, ADDR } + { "${LINK}", "00" } +} + +file "db/XGS600_chan.db" { + pattern + { HWUNIT, ADDR, CHAN, SYS, DEV, INST } + { "${LINK}", "00", "I1", "trARPES:", "XGS600:", "PressureAC" } + { "${LINK}", "00", "I2", "trARPES:", "XGS600:", "PressureTC" } + { "${LINK}", "00", "I3", "trARPES:", "XGS600:", "PressureMETIS" } + { "${LINK}", "00", "I4", "trARPES:", "XGS600:", "PressureMBE" } +} diff -r f6e1a4c75073 -r 320de4b4c9ee IOCINFRAApp/Db/XGS600_2.substitutions --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IOCINFRAApp/Db/XGS600_2.substitutions Wed Jul 15 08:12:22 2020 +0200 @@ -0,0 +1,14 @@ +file "db/XGS600_unit.db" { + pattern + { HWUNIT, ADDR } + { "${LINK}", "00" } +} + +file "db/XGS600_chan.db" { + pattern + { HWUNIT, ADDR, CHAN, SYS, DEV, INST } + { "${LINK}", "00", "I1", "staticARPES:", "XGS600:", "PressurePREP" } + { "${LINK}", "00", "I2", "staticARPES:", "XGS600:", "PressureANA" } + { "${LINK}", "00", "I3", "staticARPES:", "XGS600:", "PressureCH3" } + { "${LINK}", "00", "I4", "staticARPES:", "XGS600:", "PressureCH4" } +} diff -r f6e1a4c75073 -r 320de4b4c9ee IOCINFRAApp/Db/maxigauge.proto --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IOCINFRAApp/Db/maxigauge.proto Wed Jul 15 08:12:22 2020 +0200 @@ -0,0 +1,6 @@ +getSensorValue { + out "PR\$1\r"; + in ACK CR LF; + out ENQ; + in "%s" CR LF; +} diff -r f6e1a4c75073 -r 320de4b4c9ee IOCINFRAApp/Db/maxigauge.sub --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IOCINFRAApp/Db/maxigauge.sub Wed Jul 15 08:12:22 2020 +0200 @@ -0,0 +1,16 @@ +# macros +# P -> Device +# R -> PV +# PORT -> Asyn Link +# CHA -> Physical Port on the Pfeiffer Maxigauge + +file db/maxigauge.template +{ + pattern{ P, R, PORT, CHA, DESC } + { "staticARPES:TPG256", "CH1", "MAXI_01", "1" , "tobedef" } + { "staticARPES:TPG256", "CH2", "MAXI_01", "2" , "tobedef" } + { "staticARPES:TPG256", "CH3", "MAXI_01", "3" , "tobedef" } + { "staticARPES:TPG256", "CH4", "MAXI_01", "4" , "tobedef" } + { "staticARPES:TPG256", "CH5", "MAXI_01", "5" , "tobedef" } + { "staticARPES:TPG256", "CH6", "MAXI_01", "6" , "tobedef" } +} diff -r f6e1a4c75073 -r 320de4b4c9ee IOCINFRAApp/Db/maxigauge.template --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/IOCINFRAApp/Db/maxigauge.template Wed Jul 15 08:12:22 2020 +0200 @@ -0,0 +1,22 @@ +record(stringin, "$(P):$(R):getter"){ + field(DESC, "$(DESC) raw answer") + field(DTYP, "stream") + field(INP, "@maxigauge.proto getSensorValue($(CHA)) $(PORT)") + field(SCAN, "1 second") + field(FLNK, "$(P):$(R):Status") +} + +record(scalcout, "$(P):$(R):Status"){ + field(DESC, "$(DESC)") + field(INAA, "$(P):$(R):getter") + field(CALC, "SSCANF(AA, \"%d%*\")") + field(FLNK, "$(P):$(R):Pressure") +} + +record(scalcout, "$(P):$(R):Pressure"){ + field(DESC, "$(DESC)") + field(INAA, "$(P):$(R):getter") + field(CALC, "SSCANF(AA, \"%*2c%E\")") + field(PREC, "12") + field(EGU, "mbar") +} diff -r f6e1a4c75073 -r 320de4b4c9ee iocBoot/iocIOCINFRA/st.cmd --- a/iocBoot/iocIOCINFRA/st.cmd Fri Jul 10 06:11:39 2020 +0200 +++ b/iocBoot/iocIOCINFRA/st.cmd Wed Jul 15 08:12:22 2020 +0200 @@ -24,7 +24,8 @@ epicsEnvSet ("LOG_DIR", "/epics/iocs/log") cd "${TOP}" -epicsEnvSet "XGS-600" "_trarpes_vac_xgs600_1" +epicsEnvSet "XGS-600_1" "_trarpes_vac_xgs600_1" +epicsEnvSet "XGS-600_2" "_trarpes_vac_xgs600_2" ## Register all support components dbLoadDatabase "dbd/IOCINFRA.dbd" @@ -34,8 +35,19 @@ #dbLoadRecords("db/xxx.db","user=epics") # Configure asyn communication port, first -drvAsynIPPortConfigure(${XGS-600}, "172.24.192.29:4001", 0, 0, 0 ) -dbLoadTemplate("db/XGS600.substitutions") +drvAsynIPPortConfigure(${XGS-600_1}, "172.24.192.29:4001", 0, 0, 0 ) +dbLoadTemplate("db/XGS600_1.substitutions", "LINK=${XGS-600_1}") +drvAsynIPPortConfigure(${XGS-600_2}, "172.24.192.32:4001", 0, 0, 0 ) +dbLoadTemplate("db/XGS600_2.substitutions", "LINK=${XGS-600_2}") + +# von 4kstm +epicsEnvSet MAXI_INET 172.24.192.32:4002 +epicsEnvSet MAXI_LINK MAXI_01 +drvAsynIPPortConfigure(${MAXI_LINK}, ${MAXI_INET}, 0, 0, 0) +dbLoadTemplate("db/maxigauge.sub") + +#drvAsynIPPortConfigure("MOXA_2_2", "172.24.192.32:4002", 0, 0, 0) +#dbLoadRecords("db/TPG26x.db", "P=staticARPES:TPG256:CH, IFPRESSUR1=, IFPRESSUR2=, PORT=MOXA_2_2") drvAsynIPPortConfigure("MOXA_2", "172.24.192.29:4002", 0, 0, 0) #asynSetTraceIOMask("MOXA_2", -1, 0x2)