From 279f8cbeece3dbe6a81715fedf6f696e6fd91394 Mon Sep 17 00:00:00 2001 From: HannahCawley Date: Wed, 31 May 2023 16:54:10 +0100 Subject: [PATCH 1/4] Add 'model' macro and pass through to DBs --- TPG300/iocBoot/iocTPG300-IOC-01/config.xml | 3 ++- TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/TPG300/iocBoot/iocTPG300-IOC-01/config.xml b/TPG300/iocBoot/iocTPG300-IOC-01/config.xml index 337f389e2..acc842160 100644 --- a/TPG300/iocBoot/iocTPG300-IOC-01/config.xml +++ b/TPG300/iocBoot/iocTPG300-IOC-01/config.xml @@ -1,13 +1,14 @@ - Pfeiffer TPG 300 pressure sensor + Pfeiffer TPG x00 pressure sensor + diff --git a/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd b/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd index 96e3f6d69..4197f8789 100644 --- a/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd +++ b/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd @@ -31,17 +31,18 @@ $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0",0,"ixoff","N") ##################### ## Load record instances +stringiftest("300", $(MODEL="300"), 5, "300") stringiftest("PRESSURA1", $(PRESA1ON="Y"), 5, "Y") stringiftest("PRESSURA2", $(PRESA2ON="Y"), 5, "Y") stringiftest("PRESSURB1", $(PRESB1ON="Y"), 5, "Y") stringiftest("PRESSURB2", $(PRESB2ON="Y"), 5, "Y") -dbLoadRecords("$(TPG)/db/devTPG300.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") -dbLoadRecords("$(TPG)/db/TPG300_channels.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0), IFPRESSURA1=$(IFPRESSURA1),IFPRESSURA2=$(IFPRESSURA2),IFPRESSURB1=$(IFPRESSURB1),IFPRESSURB2=$(IFPRESSURB2)") +dbLoadRecords("$(TPG)/db/devTPG300.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") +dbLoadRecords("$(TPG)/db/TPG300_channels.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0), IFPRESSURA1=$(IFPRESSURA1),IFPRESSURA2=$(IFPRESSURA2),IFPRESSURB1=$(IFPRESSURB1),IFPRESSURB2=$(IFPRESSURB2),IF300=$(IF300),IFNOT300=$(IFNOT300)") dbLoadRecords("$(TPG)/db/unit_setter.db","P=$(MYPVPREFIX)$(IOCNAME):") -dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") -dbLoadRecords("$(TPG)/db/TPG300_switching_functions.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") +dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") +dbLoadRecords("$(TPG)/db/TPG300_switching_functions.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") dbLoadRecords("$(TPG)/db/TPG300_function_statuses.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb_error_setter.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") dbLoadRecords("$(TPG)/db/TPG300_function_statuses_error_setter.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") From ffdbda8fd7d5a48cfb6960b951e28a7142001d03 Mon Sep 17 00:00:00 2001 From: HannahCawley Date: Fri, 2 Jun 2023 11:27:39 +0100 Subject: [PATCH 2/4] Make TPGx00 IOC description more explicit --- TPG300/iocBoot/iocTPG300-IOC-01/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TPG300/iocBoot/iocTPG300-IOC-01/config.xml b/TPG300/iocBoot/iocTPG300-IOC-01/config.xml index acc842160..8ef9e2da2 100644 --- a/TPG300/iocBoot/iocTPG300-IOC-01/config.xml +++ b/TPG300/iocBoot/iocTPG300-IOC-01/config.xml @@ -1,7 +1,7 @@ - Pfeiffer TPG x00 pressure sensor + Pfeiffer TPG x00 pressure sensor (i.e. 300/500) From a458270d2f685fdb88e714c4e6a00e7c84abf060 Mon Sep 17 00:00:00 2001 From: HannahCawley Date: Wed, 14 Jun 2023 12:12:40 +0100 Subject: [PATCH 3/4] Add new DB so can optionally load PVs for the 300 --- TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd | 1 + 1 file changed, 1 insertion(+) diff --git a/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd b/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd index 4197f8789..e6ef56086 100644 --- a/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd +++ b/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd @@ -42,6 +42,7 @@ dbLoadRecords("$(TPG)/db/devTPG300.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECS dbLoadRecords("$(TPG)/db/TPG300_channels.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0), IFPRESSURA1=$(IFPRESSURA1),IFPRESSURA2=$(IFPRESSURA2),IFPRESSURB1=$(IFPRESSURB1),IFPRESSURB2=$(IFPRESSURB2),IF300=$(IF300),IFNOT300=$(IFNOT300)") dbLoadRecords("$(TPG)/db/unit_setter.db","P=$(MYPVPREFIX)$(IOCNAME):") dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") +$(IF300) dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb_AB.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") dbLoadRecords("$(TPG)/db/TPG300_switching_functions.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") dbLoadRecords("$(TPG)/db/TPG300_function_statuses.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb_error_setter.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") From a748b586e2652c8294e688c3be66818bee94101b Mon Sep 17 00:00:00 2001 From: HannahCawley Date: Thu, 6 Jul 2023 14:16:57 +0100 Subject: [PATCH 4/4] Enable configuring tpg500 with ethernet & update DBs --- TPG300/iocBoot/iocTPG300-IOC-01/config.xml | 3 +- TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd | 28 +++++++++++-------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/TPG300/iocBoot/iocTPG300-IOC-01/config.xml b/TPG300/iocBoot/iocTPG300-IOC-01/config.xml index 8ef9e2da2..bd83cf493 100644 --- a/TPG300/iocBoot/iocTPG300-IOC-01/config.xml +++ b/TPG300/iocBoot/iocTPG300-IOC-01/config.xml @@ -1,9 +1,10 @@ - Pfeiffer TPG x00 pressure sensor (i.e. 300/500) + Pfeiffer TPG x00 pressure sensor (300/500) + diff --git a/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd b/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd index e6ef56086..47a733575 100644 --- a/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd +++ b/TPG300/iocBoot/iocTPG300-IOC-01/st-common.cmd @@ -3,6 +3,8 @@ epicsEnvSet "STREAM_PROTOCOL_PATH" "$(TPG)/data" +stringiftest("USEIP", "$(IPADDR=)", 3) + ## For recsim: $(IFRECSIM) drvAsynSerialPortConfigure("L0", "$(PORT=NUL)", 0, 1, 0, 0) @@ -10,19 +12,21 @@ $(IFRECSIM) drvAsynSerialPortConfigure("L0", "$(PORT=NUL)", 0, 1, 0, 0) $(IFDEVSIM) drvAsynIPPortConfigure("L0", "localhost:$(EMULATOR_PORT=57677)") ## For real device use: -$(IFNOTDEVSIM) $(IFNOTRECSIM) drvAsynSerialPortConfigure("L0", "$(PORT)", 0, 0, 0, 0) -$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", -1, "baud", "9600") -$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", -1, "bits", "8") -$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", -1, "parity", "none") -$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", -1, "stop", "1") +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) drvAsynSerialPortConfigure("L0", "$(PORT=NOTSPECIFIED)", 0, 0, 0, 0) +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", -1, "baud", "9600") +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", -1, "bits", "8") +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", -1, "parity", "none") +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", -1, "stop", "1") # Hardware flow control off -$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", 0, "clocal", "Y") -$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0",0,"crtscts","N") +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0", 0, "clocal", "Y") +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0",0,"crtscts","N") # Software flow control off -$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0",0,"ixon","N") -$(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0",0,"ixoff","N") +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0",0,"ixon","N") +$(IFNOTUSEIP) $(IFNOTDEVSIM) $(IFNOTRECSIM) asynSetOption("L0",0,"ixoff","N") + +$(IFUSEIP) drvAsynIPPortConfigure("L0", "$(IPADDR=NOTSPECIFIED):8000") ## Load record instances @@ -38,13 +42,15 @@ stringiftest("PRESSURA2", $(PRESA2ON="Y"), 5, "Y") stringiftest("PRESSURB1", $(PRESB1ON="Y"), 5, "Y") stringiftest("PRESSURB2", $(PRESB2ON="Y"), 5, "Y") -dbLoadRecords("$(TPG)/db/devTPG300.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") +dbLoadRecords("$(TPG)/db/devTPGx00.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") +$(IF300) dbLoadRecords("$(TPG)/db/devTPG300.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") +$(IFNOT300) dbLoadRecords("$(TPG)/db/devTPG500.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") dbLoadRecords("$(TPG)/db/TPG300_channels.db","P=$(MYPVPREFIX)$(IOCNAME):, PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0), IFPRESSURA1=$(IFPRESSURA1),IFPRESSURA2=$(IFPRESSURA2),IFPRESSURB1=$(IFPRESSURB1),IFPRESSURB2=$(IFPRESSURB2),IF300=$(IF300),IFNOT300=$(IFNOT300)") dbLoadRecords("$(TPG)/db/unit_setter.db","P=$(MYPVPREFIX)$(IOCNAME):") dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") $(IF300) dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb_AB.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") dbLoadRecords("$(TPG)/db/TPG300_switching_functions.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") -dbLoadRecords("$(TPG)/db/TPG300_function_statuses.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") +dbLoadRecords("$(TPG)/db/TPG300_function_statuses.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0),IF300=$(IF300),IFNOT300=$(IFNOT300)") dbLoadRecords("$(TPG)/db/TPG300_switching_functions_rb_error_setter.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)") dbLoadRecords("$(TPG)/db/TPG300_function_statuses_error_setter.db","P=$(MYPVPREFIX)$(IOCNAME):,PORT=L0,RECSIM=$(RECSIM=0),DISABLE=$(DISABLE=0)")