From cb58039fb6a45cfece4cc3bf8ec8d1ad7e8e17cd Mon Sep 17 00:00:00 2001
From: Tamas Kerenyi <tamas.kerenyi@ess.eu>
Date: Mon, 3 Aug 2020 13:47:49 +0200
Subject: [PATCH 01/10] Update README.md

---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index c366e29..11c9379 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
 # ne1x00
 
-ESS Site-specific EPICS IOC driver: ne1x00 (supports New Era syringe pumps NE-1200, NE-1600, NE-1800 and NE-1002x)
+ESS Site-specific EPICS IOC driver: ne1x00 (supports New Era syringe pumps NE-1200, NE-1600, NE-1800, NE-1002x and NE-9000)
 
-- 
GitLab


From 192f40e5bae0b607c14dd8a0816bcff125a88b9c Mon Sep 17 00:00:00 2001
From: Tamas Kerenyi <tamas.kerenyi@ess.eu>
Date: Mon, 3 Aug 2020 13:49:28 +0200
Subject: [PATCH 02/10] Update ne1x00.proto

---
 ne1x00App/Db/ne1x00.proto | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ne1x00App/Db/ne1x00.proto b/ne1x00App/Db/ne1x00.proto
index 33018c9..4342291 100644
--- a/ne1x00App/Db/ne1x00.proto
+++ b/ne1x00App/Db/ne1x00.proto
@@ -1,7 +1,7 @@
 # -----------------------------------------------------------------------------
 # EPICS - Protocol used by StreamDevice module
 # -----------------------------------------------------------------------------
-# Syringe Pump - NE 1002x; NE 1200; NE 1600; NE 1800;
+# Syringe Pump - NE 1002x; NE 1200; NE 1600; NE 1800; NE 9000;
 # -----------------------------------------------------------------------------
 # ESS ERIC - ICS HWI group, 2019-2020
 # -----------------------------------------------------------------------------
-- 
GitLab


From e0a71cacbc4a77af40f3891cdd55fe351a737439 Mon Sep 17 00:00:00 2001
From: Tamas Kerenyi <tamas.kerenyi@ess.eu>
Date: Mon, 3 Aug 2020 13:56:18 +0200
Subject: [PATCH 03/10] Add new file for ne-9000

---
 ne1x00App/Db/ne9000.substitutions | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
 create mode 100644 ne1x00App/Db/ne9000.substitutions

diff --git a/ne1x00App/Db/ne9000.substitutions b/ne1x00App/Db/ne9000.substitutions
new file mode 100644
index 0000000..e88d80e
--- /dev/null
+++ b/ne1x00App/Db/ne9000.substitutions
@@ -0,0 +1,19 @@
+# -----------------------------------------------------------------------------
+# EPICS - Database
+# -----------------------------------------------------------------------------
+# Syringe Pump - NE 9000
+# -----------------------------------------------------------------------------
+# ESS ERIC - ICS HWI group, 2019-2020
+# -----------------------------------------------------------------------------
+# WP12 - john.sparger@ess.eu
+# WP12 - douglas.bezerra.beniz@ess.eu
+# -----------------------------------------------------------------------------
+
+file "ne1x00_common.template" {
+    pattern { } { }
+}
+
+file "ne1x00_variable.template" {
+    pattern { INDEX, RATE_UNITS_ENUM, RATE_UNIT_1ST, RATE_UNIT_2ND, RATE_UNIT_3RD, RATE_UNIT_4TH, VOL_UNITS_ENUM, VOL_UNIT_1ST, VOL_UNIT_2ND }
+            { 0, "OM|MM|OS|MS", "Oz / min", "mL / min", "Oz / sec", "mL / sec", "OZ|ML", "OZ", "mL" }
+}
-- 
GitLab


From ec26a06d7aab5c2f3df82c9753b0bf5276bc2a69 Mon Sep 17 00:00:00 2001
From: Tamas Kerenyi <tamas.kerenyi@ess.eu>
Date: Mon, 3 Aug 2020 13:57:04 +0200
Subject: [PATCH 04/10] Update ne9000.substitutions

-- 
GitLab


From b2d379a4e2d917d17b7264c1a6abdc88f7c6db94 Mon Sep 17 00:00:00 2001
From: Tamas Kerenyi <tamas.kerenyi@ess.eu>
Date: Mon, 3 Aug 2020 14:03:46 +0200
Subject: [PATCH 05/10] Add new file

---
 ne1x00App/iocsh/ne9000.iocsh | 37 ++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 ne1x00App/iocsh/ne9000.iocsh

diff --git a/ne1x00App/iocsh/ne9000.iocsh b/ne1x00App/iocsh/ne9000.iocsh
new file mode 100644
index 0000000..7ae6bcc
--- /dev/null
+++ b/ne1x00App/iocsh/ne9000.iocsh
@@ -0,0 +1,37 @@
+# -----------------------------------------------------------------------------
+# EPICS - Database
+# -----------------------------------------------------------------------------
+# Syringe Pump - NE 9000
+# -----------------------------------------------------------------------------
+# ESS ERIC - ICS HWI group, 2019-2020
+# -----------------------------------------------------------------------------
+# WP12 - john.sparger@ess.eu
+# WP12 - douglas.bezerra.beniz@ess.eu
+# -----------------------------------------------------------------------------
+#@field IPADDR
+#@type STRING
+#IP or hostname of the TCP endpoint.
+#
+#@field IPPORT
+#@type INTEGER
+#IP port of the TCP endpoint.
+#
+#@field PREFIX
+#@type STRING
+#Prefix for EPICS PVs.
+#
+#@field SCAN
+#@type STRING
+#Scan rate for PVs.
+
+# -----------------------------------------------------------------------------
+# AsynIPPort configuration
+# -----------------------------------------------------------------------------
+#Specifying the TCP endpoint and port name
+drvAsynIPPortConfigure("$(PORTNAME)", "$(IPADDR):$(IPPORT)")
+
+# -----------------------------------------------------------------------------
+# Loading databases
+# -----------------------------------------------------------------------------
+#Load your database defining the EPICS records
+dbLoadRecords(ne1600.db, "P=$(PREFIX), PORT=$(PORTNAME), ADDR=$(IPPORT), SCAN=$(SCAN)")
-- 
GitLab


From e5b22229643e3108c2236f726ebf4ef1244ffd47 Mon Sep 17 00:00:00 2001
From: Tamas Kerenyi <tamas.kerenyi@ess.eu>
Date: Mon, 3 Aug 2020 14:46:59 +0200
Subject: [PATCH 06/10] Update ne9000.iocsh

---
 ne1x00App/iocsh/ne9000.iocsh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ne1x00App/iocsh/ne9000.iocsh b/ne1x00App/iocsh/ne9000.iocsh
index 7ae6bcc..469be0f 100644
--- a/ne1x00App/iocsh/ne9000.iocsh
+++ b/ne1x00App/iocsh/ne9000.iocsh
@@ -34,4 +34,4 @@ drvAsynIPPortConfigure("$(PORTNAME)", "$(IPADDR):$(IPPORT)")
 # Loading databases
 # -----------------------------------------------------------------------------
 #Load your database defining the EPICS records
-dbLoadRecords(ne1600.db, "P=$(PREFIX), PORT=$(PORTNAME), ADDR=$(IPPORT), SCAN=$(SCAN)")
+dbLoadRecords(ne9000.db, "P=$(PREFIX), PORT=$(PORTNAME), ADDR=$(IPPORT), SCAN=$(SCAN)")
-- 
GitLab


From a244279c19e507a433708793ea089f4315395691 Mon Sep 17 00:00:00 2001
From: Douglas Bezerra Beniz <douglas.bezerra.beniz@ess.eu>
Date: Wed, 5 Aug 2020 14:09:49 +0200
Subject: [PATCH 07/10] ICSHWI-4917; Some modifications to adapt to NE9000
 special commands systaxes;

---
 ne1x00App/Db/ne1x00_common.template   | 133 --------------
 ne1x00App/Db/ne1x00_variable.template | 138 ++++++++++++++
 ne1x00App/Db/ne9000.proto             |  79 ++++++++
 ne1x00App/Db/ne9000.substitutions     |   2 +-
 ne1x00App/Db/ne9000_variable.template | 252 ++++++++++++++++++++++++++
 5 files changed, 470 insertions(+), 134 deletions(-)
 create mode 100644 ne1x00App/Db/ne9000.proto
 create mode 100644 ne1x00App/Db/ne9000_variable.template

diff --git a/ne1x00App/Db/ne1x00_common.template b/ne1x00App/Db/ne1x00_common.template
index e70f9cf..a340ae9 100644
--- a/ne1x00App/Db/ne1x00_common.template
+++ b/ne1x00App/Db/ne1x00_common.template
@@ -209,43 +209,6 @@ record(fanout, $(P):RATE_UNITS_RST__) {
     field(LNK3, "$(P):RATE_SET_3D__")
 }
 
-# -----------------------------------------------------------------------------
-# Get/Set pumping DIRECTION
-#  - dir: enum [ INF | WDR | REV | STK ]
-# -----------------------------------------------------------------------------
-record(mbbi, $(P):DIRECTION) {
-    field(DESC, "Pumping direction")
-    field(DTYP, "stream")
-    field(ZRVL, "0")
-    field(ZRST, "Infuse")
-    field(ONVL, "1")
-    field(ONST, "Withdraw")
-    field(TWVL, "2")
-    field(TWST, "Reverse pumping")
-    field(THVL, "3")
-    field(THST, "Sticky")
-    field(INP,  "@ne1x00.proto get_direction($(P):STATUS) $(PORT) $(ADDR)")
-    field(SCAN, "Passive")
-    field(PINI, "YES")
-    field(FLNK, "$(P):VOLUME")
-}
-
-record(mbbo, $(P):SET_DIRECTION) {
-    field(DESC, "Desired pumping direction")
-    field(DTYP, "stream")
-    field(ZRVL, "0")
-    field(ZRST, "Infuse")
-    field(ONVL, "1")
-    field(ONST, "Withdraw")
-    field(TWVL, "2")
-    field(TWST, "Reverse pumping")
-    field(THVL, "3")
-    field(THST, "Sticky")
-    field(UNSV, "MAJOR")
-    field(OUT,  "@ne1x00.proto set_direction($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
-    field(FLNK, "$(P):DIRECTION")
-}
-
 # -----------------------------------------------------------------------------
 # Set syringe VOLUME value
 #  - max 4 digits + 1 decimal point send;
@@ -309,85 +272,6 @@ record(fanout, $(P):VOL_UNITS_RST__) {
     field(LNK3, "$(P):VOL_SET_3D__")
 }
 
-# -----------------------------------------------------------------------------
-# Get syringe DIAMETER
-# -----------------------------------------------------------------------------
-record(ai, $(P):DIAMETER) {
-    field(DESC, "Inside diameter of the syringe")
-    field(EGU,  "mm")
-    field(DTYP, "stream")
-    field(INP,  "@ne1x00.proto get_diameter($(P):STATUS) $(PORT) $(ADDR)")
-    field(SCAN, "Passive")
-    field(PINI, "YES")
-    field(FLNK, "$(P):VOLUME_INFUSED")
-}
-
-# -----------------------------------------------------------------------------
-# Set syringe DIAMETER
-#  - limits: 0.100 mm to 50.00 mm
-#  - max 4 digits + 1 decimal point send;
-# -----------------------------------------------------------------------------
-record(ao, $(P):SET_DIAMETER) {
-    field(DESC, "Input for inside diameter")
-    field(DTYP, "Soft Channel")
-    field(EGU,  "mm")
-    field(FLNK, "$(P):DIA_RST__")
-}
-
-record(fanout, $(P):DIA_RST__) {
-    field(DESC, "(int.) Diameter reset")
-    field(LNK1, "$(P):MSG_CLEAR__")
-    field(LNK2, "$(P):DIA_CLR_ALARM__")
-}
-
-record(calcout, $(P):DIA_CHK_ALARM__) {
-    field(DESC, "(int.) Diameter alarm")
-    field(INPA, "$(P):DIA_SET_3D__.SEVR")
-    field(INPB, "$(P):DIA_SET_2D__.SEVR")
-    field(CALC, "((A=3)&&(B=3))")
-    field(OOPT, "When Non-zero")
-    field(OUT,  "$(P):DIA_SET_ALARM__.PROC")
-}
-
-record(ao, $(P):DIA_SET_ALARM__) {
-    field(DESC, "(int.) Diam. alarm set")
-    field(VAL, "3")
-    field(OUT, "$(P):SET_DIAMETER.HHSV")
-}
-
-record(ao, $(P):DIA_CLR_ALARM__) {
-    field(DESC, "(int.) Diam. alarm clear")
-    field(VAL, "0")
-    field(OUT, "$(P):SET_DIAMETER.HHSV")
-}
-
-record(ao, $(P):DIA_SET_3D__) {
-    field(DESC, "(int.) Set diam. 3 digits")
-    field(DTYP, "stream")
-    field(DOL,  "$(P):SET_DIAMETER CP")
-    field(OMSL, "closed_loop")
-    field(OUT,  "@ne1x00.proto set_diameter_3decimal_points($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
-    field(FLNK, "$(P):DIA_CHK_3D__")
-}
-
-record(calcout, $(P):DIA_CHK_3D__) {
-    field(DESC, "(int.) Set diam. 3 digits")
-    field(INPA, "$(P):DIA_SET_3D__.SEVR")
-    field(CALC, "A#3")
-    field(OOPT, "When Zero")
-    field(OUT,  "$(P):DIA_SET_2D__.PROC")
-    field(FLNK, "$(P):MSG_CLEAR__")
-}
-
-record(ao, $(P):DIA_SET_2D__) {
-    field(DESC, "(int.) Set diam. 2 digits")
-    field(DTYP, "stream")
-    field(DOL,  "$(P):SET_DIAMETER")
-    field(OMSL, "closed_loop")
-    field(OUT,  "@ne1x00.proto set_diameter_2decimal_points($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
-    field(FLNK, "$(P):DIA_CHK_ALARM__")
-}
-
 # -----------------------------------------------------------------------------
 # Clear volume dispensed
 # -----------------------------------------------------------------------------
@@ -416,23 +300,6 @@ record(calcout, $(P):RUN_CHK_ALARM__) {
     field(OUT,  "$(P):MSG_CLEAR__.PROC")
 }
 
-# -----------------------------------------------------------------------------
-# Start to purge
-# -----------------------------------------------------------------------------
-record(bo, $(P):PURGE) {
-    field(DESC, "Start purge")
-    field(DTYP, "stream")
-    field(OUT,  "@ne1x00.proto start_purge($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
-    field(FLNK, "$(P):PURGE_CHK_ALARM__")
-}
-
-record(calcout, $(P):PURGE_CHK_ALARM__) {
-    field(DESC, "(int.) Purge alarm")
-    field(INPA, "$(P):PURGE.SEVR")
-    field(CALC, "(A=0)")
-    field(OOPT, "When Non-zero")
-    field(OUT,  "$(P):MSG_CLEAR__.PROC")
-}
 
 # -----------------------------------------------------------------------------
 # Stop pumping/purge
diff --git a/ne1x00App/Db/ne1x00_variable.template b/ne1x00App/Db/ne1x00_variable.template
index 91c1d6e..5baaa27 100644
--- a/ne1x00App/Db/ne1x00_variable.template
+++ b/ne1x00App/Db/ne1x00_variable.template
@@ -9,6 +9,87 @@
 # WP12 - douglas.bezerra.beniz@ess.eu
 # -----------------------------------------------------------------------------
 
+# -----------------------------------------------------------------------------
+# Get syringe DIAMETER
+# -----------------------------------------------------------------------------
+record(ai, $(P):DIAMETER) {
+    field(DESC, "Inside diameter of the syringe")
+    field(EGU,  "mm")
+    field(DTYP, "stream")
+    field(INP,  "@ne1x00.proto get_diameter($(P):STATUS) $(PORT) $(ADDR)")
+    field(SCAN, "Passive")
+    field(PINI, "YES")
+    field(FLNK, "$(P):VOLUME_INFUSED")
+}
+
+
+# -----------------------------------------------------------------------------
+# Set syringe DIAMETER
+#  - limits: 0.100 mm to 50.00 mm
+#  - max 4 digits + 1 decimal point send;
+# -----------------------------------------------------------------------------
+record(ao, $(P):SET_DIAMETER) {
+    field(DESC, "Input for inside diameter")
+    field(DTYP, "Soft Channel")
+    field(EGU,  "mm")
+    field(FLNK, "$(P):DIA_RST__")
+}
+
+record(fanout, $(P):DIA_RST__) {
+    field(DESC, "(int.) Diameter reset")
+    field(LNK1, "$(P):MSG_CLEAR__")
+    field(LNK2, "$(P):DIA_CLR_ALARM__")
+}
+
+record(calcout, $(P):DIA_CHK_ALARM__) {
+    field(DESC, "(int.) Diameter alarm")
+    field(INPA, "$(P):DIA_SET_3D__.SEVR")
+    field(INPB, "$(P):DIA_SET_2D__.SEVR")
+    field(CALC, "((A=3)&&(B=3))")
+    field(OOPT, "When Non-zero")
+    field(OUT,  "$(P):DIA_SET_ALARM__.PROC")
+}
+
+record(ao, $(P):DIA_SET_ALARM__) {
+    field(DESC, "(int.) Diam. alarm set")
+    field(VAL, "3")
+    field(OUT, "$(P):SET_DIAMETER.HHSV")
+}
+
+record(ao, $(P):DIA_CLR_ALARM__) {
+    field(DESC, "(int.) Diam. alarm clear")
+    field(VAL, "0")
+    field(OUT, "$(P):SET_DIAMETER.HHSV")
+}
+
+record(ao, $(P):DIA_SET_3D__) {
+    field(DESC, "(int.) Set diam. 3 digits")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_DIAMETER CP")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne1x00.proto set_diameter_3decimal_points($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):DIA_CHK_3D__")
+}
+
+record(calcout, $(P):DIA_CHK_3D__) {
+    field(DESC, "(int.) Set diam. 3 digits")
+    field(INPA, "$(P):DIA_SET_3D__.SEVR")
+    field(CALC, "A#3")
+    field(OOPT, "When Zero")
+    field(OUT,  "$(P):DIA_SET_2D__.PROC")
+    field(FLNK, "$(P):MSG_CLEAR__")
+}
+
+record(ao, $(P):DIA_SET_2D__) {
+    field(DESC, "(int.) Set diam. 2 digits")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_DIAMETER")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne1x00.proto set_diameter_2decimal_points($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):DIA_CHK_ALARM__")
+}
+
+
 # -----------------------------------------------------------------------------
 # Get pumping RATE value and unit
 # -----------------------------------------------------------------------------
@@ -176,3 +257,60 @@ record(mbbi, $(P):VOLUME_DIS_UNIT) {
     field(ONST, "$(VOL_UNIT_2ND)")
     field(SCAN, "Passive")
 }
+
+
+# -----------------------------------------------------------------------------
+# Get/Set pumping DIRECTION
+#  - dir: enum [ INF | WDR | REV | STK ]
+# -----------------------------------------------------------------------------
+record(mbbi, $(P):DIRECTION) {
+    field(DESC, "Pumping direction")
+    field(DTYP, "stream")
+    field(ZRVL, "0")
+    field(ZRST, "Infuse")
+    field(ONVL, "1")
+    field(ONST, "Withdraw")
+    field(TWVL, "2")
+    field(TWST, "Reverse pumping")
+    field(THVL, "3")
+    field(THST, "Sticky")
+    field(INP,  "@ne1x00.proto get_direction($(P):STATUS) $(PORT) $(ADDR)")
+    field(SCAN, "Passive")
+    field(PINI, "YES")
+    field(FLNK, "$(P):VOLUME")
+}
+
+record(mbbo, $(P):SET_DIRECTION) {
+    field(DESC, "Desired pumping direction")
+    field(DTYP, "stream")
+    field(ZRVL, "0")
+    field(ZRST, "Infuse")
+    field(ONVL, "1")
+    field(ONST, "Withdraw")
+    field(TWVL, "2")
+    field(TWST, "Reverse pumping")
+    field(THVL, "3")
+    field(THST, "Sticky")
+    field(UNSV, "MAJOR")
+    field(OUT,  "@ne1x00.proto set_direction($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):DIRECTION")
+}
+
+
+# -----------------------------------------------------------------------------
+# Start to purge
+# -----------------------------------------------------------------------------
+record(bo, $(P):PURGE) {
+    field(DESC, "Start purge")
+    field(DTYP, "stream")
+    field(OUT,  "@ne1x00.proto start_purge($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):PURGE_CHK_ALARM__")
+}
+
+record(calcout, $(P):PURGE_CHK_ALARM__) {
+    field(DESC, "(int.) Purge alarm")
+    field(INPA, "$(P):PURGE.SEVR")
+    field(CALC, "(A=0)")
+    field(OOPT, "When Non-zero")
+    field(OUT,  "$(P):MSG_CLEAR__.PROC")
+}
diff --git a/ne1x00App/Db/ne9000.proto b/ne1x00App/Db/ne9000.proto
new file mode 100644
index 0000000..4ba0694
--- /dev/null
+++ b/ne1x00App/Db/ne9000.proto
@@ -0,0 +1,79 @@
+# -----------------------------------------------------------------------------
+# EPICS - Protocol used by StreamDevice module
+# -----------------------------------------------------------------------------
+# Syringe Pump - NE 9000;
+# -----------------------------------------------------------------------------
+# ESS ERIC - ICS HWI group, 2019-2020
+# -----------------------------------------------------------------------------
+# WP12 - tamas.kerenyi@ess.eu
+# WP12 - douglas.bezerra.beniz@ess.eu
+# -----------------------------------------------------------------------------
+
+InTerminator  = ETX;
+OutTerminator = CR;
+#ReplyTimeout = 1000;
+
+address = "%*d";
+# -----------------------------------------------------------------------------
+# Status - enum [ I | W | S | P | T | U | X ]
+#    >  I = Infusing
+#    >  W = Withdrawing
+#    >  S = Pumping Program Stopped
+#    >  P = Pumping Program Paused
+#    >  T = Pause Phase
+#    >  U = Operational trigger wait (user wait)
+#    >  X = Purging
+# -----------------------------------------------------------------------------
+status  = "%(\$1)/[IWSPTUX]|A?\w/";
+
+# <start of text>,<pump address>,<pump status>
+prompt = STX,${address},${status};
+
+
+# -----------------------------------------------------------------------------
+# Get pumping DIRECTION
+#  - dir: enum [ INF | WDR | REV ]
+# -----------------------------------------------------------------------------
+direction = "%{INF|WDR|REV}";
+get_direction {
+    out "DIR";
+    in ${prompt},${direction};
+}
+
+# -----------------------------------------------------------------------------
+# Set pumping DIRECTION
+#  - dir: enum [ INF | WDR | REV ]
+#    >  INF = Dispense
+#    >  WDR = Withdraw
+#    >  REV = Reverse pumping direction
+# -----------------------------------------------------------------------------
+set_direction {
+    direction = "%{INF|WDR|REV}";
+    out "DIR",${direction};
+    in ${prompt};
+    @mismatch { in "%*/00[IWSPTUX]/%*/00[IWSPTUX]/%(\$2)s" };
+    @init { get_direction; }
+}
+
+# -----------------------------------------------------------------------------
+# Get syringe DIAMETER
+#  - syntax: DIA [ nn / nn ]
+# -----------------------------------------------------------------------------
+syringe_diameter = "%!2d/!2d";
+get_diameter {
+    out "DIA";
+    in ${prompt},${syringe_diameter};
+}
+
+# -----------------------------------------------------------------------------
+# Set syringe DIAMETER
+#  - syntax: DIA [ nn / nn ]
+#  - limits: tubing inside diameter should be smaller than 1" (inch)
+# -----------------------------------------------------------------------------
+set_diameter {
+    format = "%(\$2)/%(\$3)";
+    out "DIA",${format};
+    in ${prompt};
+    @mismatch { in "%*/00[IWSPTUX]/%(\$4)s" };
+    @init { get_diameter; }
+}
diff --git a/ne1x00App/Db/ne9000.substitutions b/ne1x00App/Db/ne9000.substitutions
index e88d80e..38e4d7c 100644
--- a/ne1x00App/Db/ne9000.substitutions
+++ b/ne1x00App/Db/ne9000.substitutions
@@ -13,7 +13,7 @@ file "ne1x00_common.template" {
     pattern { } { }
 }
 
-file "ne1x00_variable.template" {
+file "ne9000_variable.template" {
     pattern { INDEX, RATE_UNITS_ENUM, RATE_UNIT_1ST, RATE_UNIT_2ND, RATE_UNIT_3RD, RATE_UNIT_4TH, VOL_UNITS_ENUM, VOL_UNIT_1ST, VOL_UNIT_2ND }
             { 0, "OM|MM|OS|MS", "Oz / min", "mL / min", "Oz / sec", "mL / sec", "OZ|ML", "OZ", "mL" }
 }
diff --git a/ne1x00App/Db/ne9000_variable.template b/ne1x00App/Db/ne9000_variable.template
new file mode 100644
index 0000000..d50f494
--- /dev/null
+++ b/ne1x00App/Db/ne9000_variable.template
@@ -0,0 +1,252 @@
+# -----------------------------------------------------------------------------
+# EPICS - Database
+# -----------------------------------------------------------------------------
+# Syringe Pump - NE 9000;
+# -----------------------------------------------------------------------------
+# ESS ERIC - ICS HWI group, 2019-2020
+# -----------------------------------------------------------------------------
+# WP12 - tamas.kerenyi@ess.eu
+# WP12 - douglas.bezerra.beniz@ess.eu
+# -----------------------------------------------------------------------------
+
+# -----------------------------------------------------------------------------
+# Get syringe DIAMETER
+# -----------------------------------------------------------------------------
+record(stringin, $(P):DIAMETER) {
+    field(DESC, "Inside diameter of the syringe")
+    field(EGU,  "\"")
+    field(DTYP, "stream")
+    field(INP,  "@ne9000.proto get_diameter($(P):STATUS) $(PORT) $(ADDR)")
+    field(SCAN, "Passive")
+    field(PINI, "YES")
+    field(FLNK, "$(P):VOLUME_INFUSED")
+}
+
+
+# -----------------------------------------------------------------------------
+# Set syringe DIAMETER
+#  - limits: 0.100 mm to 50.00 mm
+#  - max 4 digits + 1 decimal point send;
+# -----------------------------------------------------------------------------
+record(ao, $(P):SET_DIAMETER) {
+    field(DESC, "Set inside diameter")
+    field(DTYP, "stream")
+    field(OUT,  "@ne9000.proto set_diameter($(P):STATUS,$(P):SET_DIAMETER_NUM,$(P):SET_DIAMETER_DEN,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):DIAMETER")
+}
+
+record(ao, $(P):SET_DIAMETER_NUM) {
+    field(DESC, "Numerator input for diameter")
+    field(DTYP, "Soft Channel")
+    field(FLNK, "$(P):SET_DIAMETER")
+}
+
+record(ao, $(P):SET_DIAMETER_DEN) {
+    field(DESC, "Denominator input for diameter")
+    field(DTYP, "Soft Channel")
+    field(FLNK, "$(P):SET_DIAMETER")
+}
+
+
+# -----------------------------------------------------------------------------
+# Get pumping RATE value and unit
+# -----------------------------------------------------------------------------
+record(ai, $(P):RATE) {
+    field(DESC, "Pumping rate")
+    field(DTYP, "stream")
+    field(INP,  "@ne1x00.proto get_rate($(P):STATUS,$(P):RATE_UNITS,$(RATE_UNITS_ENUM)) $(PORT) $(ADDR)")
+    field(SCAN, "$(SCAN) second")
+    field(PINI, "YES")
+    field(FLNK, "$(P):DIRECTION")
+}
+
+record(mbbi, $(P):RATE_UNITS) {
+    field(DESC, "Pumping rate units")
+    field(DTYP, "Soft Channel")
+    field(ZRVL, "0")
+    field(ZRST, "$(RATE_UNIT_1ST)")
+    field(ONVL, "1")
+    field(ONST, "$(RATE_UNIT_2ND)")
+    field(TWVL, "2")
+    field(TWST, "$(RATE_UNIT_3RD)")
+    field(THVL, "3")
+    field(THST, "$(RATE_UNIT_4TH)")
+    field(SCAN, "Passive")
+}
+
+record(ao, $(P):RATE_SET_3D__) {
+    field(DESC, "(int.) Set rate 3 digits")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_RATE CP")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne1x00.proto set_rate_3decimal_points($(P):STATUS,$(P):SET_RATE_UNITS,$(RATE_UNITS_ENUM),$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):RATE_CHK_3D__")
+}
+
+record(ao, $(P):RATE_SET_2D__) {
+    field(DESC, "(int.) Set rate 2 digits")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_RATE")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne1x00.proto set_rate_2decimal_points($(P):STATUS,$(P):SET_RATE_UNITS,$(RATE_UNITS_ENUM),$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):RATE_CHK_2D__")
+}
+
+record(ao, $(P):RATE_SET_1D__) {
+    field(DESC, "(int.) Set rate 1 digit")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_RATE")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne1x00.proto set_rate_1decimal_point($(P):STATUS,$(P):SET_RATE_UNITS,$(RATE_UNITS_ENUM),$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):RATE_CHK_ALARM__")
+}
+
+# -----------------------------------------------------------------------------
+# Set pumping RATE value and unit
+#  - val:   max 4 digits + 1 decimal point send;
+#  - units: enum [ UM | MM | UH | MH ]
+#    >  UM = μL / min
+#    >  MM = mL / min
+#    >  UH = μL / hr
+#    >  MH = mL / hr
+# -----------------------------------------------------------------------------
+record(mbbo, $(P):SET_RATE_UNITS) {
+    field(DESC, "Desired pumping rate")
+    field(ZRVL, "0")
+    field(ZRST, "$(RATE_UNIT_1ST)")
+    field(ONVL, "1")
+    field(ONST, "$(RATE_UNIT_2ND)")
+    field(TWVL, "2")
+    field(TWST, "$(RATE_UNIT_3RD)")
+    field(THVL, "3")
+    field(THST, "$(RATE_UNIT_4TH)")
+    field(UNSV, "MAJOR")
+    field(FLNK, "$(P):RATE_UNITS_RST__")
+}
+
+
+# -----------------------------------------------------------------------------
+# Get syringe VOLUME value and unit
+# -----------------------------------------------------------------------------
+record(ai, $(P):VOLUME) {
+    field(DESC, "Volume to be pumped")
+    field(DTYP, "stream")
+    field(INP,  "@ne1x00.proto get_volume($(P):STATUS,$(P):VOLUME_UNITS,$(VOL_UNITS_ENUM)) $(PORT) $(ADDR)")
+    field(SCAN, "Passive")
+    field(PINI, "YES")
+    field(FLNK, "$(P):DIAMETER")
+}
+
+record(mbbi, $(P):VOLUME_UNITS) {
+    field(DESC, "Volume units")
+    field(DTYP, "Soft Channel")
+    field(ZRVL, "0")
+    field(ZRST, "$(VOL_UNIT_1ST)")
+    field(ONVL, "1")
+    field(ONST, "$(VOL_UNIT_2ND)")
+    field(SCAN, "Passive")
+}
+
+record(ao, $(P):VOL_SET_3D__) {
+    field(DESC, "(int.) Set vol. 3 digits")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_VOLUME CP")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne1x00.proto set_volume_3decimal_points($(P):STATUS,$(P):SET_VOLUME_UNITS,$(VOL_UNITS_ENUM),$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):VOL_CHK_3D__")
+}
+
+record(ao, $(P):VOL_SET_2D__) {
+    field(DESC, "(int.) Set vol. 2 digits")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_VOLUME")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne1x00.proto set_volume_2decimal_points($(P):STATUS,$(P):SET_VOLUME_UNITS,$(VOL_UNITS_ENUM),$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):VOL_CHK_2D__")
+}
+
+record(ao, $(P):VOL_SET_1D__) {
+    field(DESC, "(int.) Set vol. 1 digit")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_VOLUME")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne1x00.proto set_volume_1decimal_point($(P):STATUS,$(P):SET_VOLUME_UNITS,$(VOL_UNITS_ENUM),$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):VOL_CHK_ALARM__")
+}
+
+# -----------------------------------------------------------------------------
+# Set pumping VOLUME unit
+#  - units: enum [ UL | ML ]
+#    >  UL = μL (microliters)
+#    >  ML = mL (milliliters)
+# -----------------------------------------------------------------------------
+record(mbbo, $(P):SET_VOLUME_UNITS) {
+    field(DESC, "Pumping volume unit")
+    field(ZRVL, "0")
+    field(ZRST, "$(VOL_UNIT_1ST)")
+    field(ONVL, "1")
+    field(ONST, "$(VOL_UNIT_2ND)")
+    field(UNSV, "MAJOR")
+    field(FLNK, "$(P):VOL_UNITS_RST__")
+}
+
+
+# -----------------------------------------------------------------------------
+# Get volume infused and withdrawn
+# -----------------------------------------------------------------------------
+record(ai, $(P):VOLUME_INFUSED) {
+    field(DESC, "Volume infused so far")
+    field(DTYP, "stream")
+    field(INP,  "@ne1x00.proto get_volume_dispensed($(P):STATUS,$(P):VOLUME_WITHDRAWN,$(P):VOLUME_DIS_UNIT,$(VOL_UNITS_ENUM)) $(PORT) $(ADDR)")
+    field(SCAN, "Passive")
+    field(PINI, "YES")
+}
+
+record(ai, $(P):VOLUME_WITHDRAWN) {
+    field(DESC, "Volume withdrawn so far")
+}
+
+record(mbbi, $(P):VOLUME_DIS_UNIT) {
+    field(DESC, "Unit for WDR and INF volumes")
+    field(DTYP, "Soft Channel")
+    field(ZRVL, "0")
+    field(ZRST, "$(VOL_UNIT_1ST)")
+    field(ONVL, "1")
+    field(ONST, "$(VOL_UNIT_2ND)")
+    field(SCAN, "Passive")
+}
+
+
+# -----------------------------------------------------------------------------
+# Get/Set pumping DIRECTION
+#  - dir: enum [ INF | WDR | REV | STK ]
+# -----------------------------------------------------------------------------
+record(mbbi, $(P):DIRECTION) {
+    field(DESC, "Pumping direction")
+    field(DTYP, "stream")
+    field(ZRVL, "0")
+    field(ZRST, "Dispense")
+    field(ONVL, "1")
+    field(ONST, "Withdraw")
+    field(TWVL, "2")
+    field(TWST, "Reverse pumping")
+    field(INP,  "@ne9000.proto get_direction($(P):STATUS) $(PORT) $(ADDR)")
+    field(SCAN, "Passive")
+    field(PINI, "YES")
+    field(FLNK, "$(P):VOLUME")
+}
+
+record(mbbo, $(P):SET_DIRECTION) {
+    field(DESC, "Desired pumping direction")
+    field(DTYP, "stream")
+    field(ZRVL, "0")
+    field(ZRST, "Dispense")
+    field(ONVL, "1")
+    field(ONST, "Withdraw")
+    field(TWVL, "2")
+    field(TWST, "Reverse pumping")
+    field(UNSV, "MAJOR")
+    field(OUT,  "@ne9000.proto set_direction($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):DIRECTION")
+}
+
-- 
GitLab


From 2f11bf79f790ecb909cd733cb26cfdd302a3f92e Mon Sep 17 00:00:00 2001
From: Douglas Bezerra Beniz <douglas.bezerra.beniz@ess.eu>
Date: Wed, 5 Aug 2020 15:26:53 +0200
Subject: [PATCH 08/10] ICSHWI-4917; Some fixes after initial bench-tests;

---
 ne1x00App/Db/ne9000.proto             | 4 ++--
 ne1x00App/Db/ne9000.substitutions     | 2 +-
 ne1x00App/Db/ne9000_variable.template | 3 +--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/ne1x00App/Db/ne9000.proto b/ne1x00App/Db/ne9000.proto
index 4ba0694..1e53c97 100644
--- a/ne1x00App/Db/ne9000.proto
+++ b/ne1x00App/Db/ne9000.proto
@@ -59,7 +59,7 @@ set_direction {
 # Get syringe DIAMETER
 #  - syntax: DIA [ nn / nn ]
 # -----------------------------------------------------------------------------
-syringe_diameter = "%!2d/!2d";
+syringe_diameter = "%s";
 get_diameter {
     out "DIA";
     in ${prompt},${syringe_diameter};
@@ -71,7 +71,7 @@ get_diameter {
 #  - limits: tubing inside diameter should be smaller than 1" (inch)
 # -----------------------------------------------------------------------------
 set_diameter {
-    format = "%(\$2)/%(\$3)";
+    format = "%(\$2)2d\/%(\$3)2d";
     out "DIA",${format};
     in ${prompt};
     @mismatch { in "%*/00[IWSPTUX]/%(\$4)s" };
diff --git a/ne1x00App/Db/ne9000.substitutions b/ne1x00App/Db/ne9000.substitutions
index 38e4d7c..599cb7a 100644
--- a/ne1x00App/Db/ne9000.substitutions
+++ b/ne1x00App/Db/ne9000.substitutions
@@ -15,5 +15,5 @@ file "ne1x00_common.template" {
 
 file "ne9000_variable.template" {
     pattern { INDEX, RATE_UNITS_ENUM, RATE_UNIT_1ST, RATE_UNIT_2ND, RATE_UNIT_3RD, RATE_UNIT_4TH, VOL_UNITS_ENUM, VOL_UNIT_1ST, VOL_UNIT_2ND }
-            { 0, "OM|MM|OS|MS", "Oz / min", "mL / min", "Oz / sec", "mL / sec", "OZ|ML", "OZ", "mL" }
+            { 0, "OM|MM|OS|MS", "Oz / min", "mL / min", "Oz / sec", "mL / sec", "OZ|ML", "Oz", "mL" }
 }
diff --git a/ne1x00App/Db/ne9000_variable.template b/ne1x00App/Db/ne9000_variable.template
index d50f494..cad9d1f 100644
--- a/ne1x00App/Db/ne9000_variable.template
+++ b/ne1x00App/Db/ne9000_variable.template
@@ -14,7 +14,6 @@
 # -----------------------------------------------------------------------------
 record(stringin, $(P):DIAMETER) {
     field(DESC, "Inside diameter of the syringe")
-    field(EGU,  "\"")
     field(DTYP, "stream")
     field(INP,  "@ne9000.proto get_diameter($(P):STATUS) $(PORT) $(ADDR)")
     field(SCAN, "Passive")
@@ -32,7 +31,7 @@ record(ao, $(P):SET_DIAMETER) {
     field(DESC, "Set inside diameter")
     field(DTYP, "stream")
     field(OUT,  "@ne9000.proto set_diameter($(P):STATUS,$(P):SET_DIAMETER_NUM,$(P):SET_DIAMETER_DEN,$(P):MESSAGE) $(PORT) $(ADDR)")
-    field(FLNK, "$(P):DIAMETER")
+    field(FLNK, "$(P):MSG_CLEAR__")
 }
 
 record(ao, $(P):SET_DIAMETER_NUM) {
-- 
GitLab


From 90ee72b081e9415dc9093a3fa0e41f037a1d5a94 Mon Sep 17 00:00:00 2001
From: Douglas Bezerra Beniz <douglas.bezerra.beniz@ess.eu>
Date: Wed, 5 Aug 2020 18:36:27 +0200
Subject: [PATCH 09/10] ICSHWI-4917; Adding CALIB support;

---
 ne1x00App/Db/ne9000.proto             |  31 ++++++++
 ne1x00App/Db/ne9000_variable.template | 108 ++++++++++++++++++++++++--
 2 files changed, 134 insertions(+), 5 deletions(-)

diff --git a/ne1x00App/Db/ne9000.proto b/ne1x00App/Db/ne9000.proto
index 1e53c97..43f19ee 100644
--- a/ne1x00App/Db/ne9000.proto
+++ b/ne1x00App/Db/ne9000.proto
@@ -77,3 +77,34 @@ set_diameter {
     @mismatch { in "%*/00[IWSPTUX]/%(\$4)s" };
     @init { get_diameter; }
 }
+
+
+# -----------------------------------------------------------------------------
+# Calibrates the tubing diameter using <float> as the measured dispense volume,
+#   and the volume dispensed or withdrawn, according to the current pumping
+#   direction. The calibration value cannot be queried. The pump must be stopped
+#   to calibrate.
+# ---
+#  - syntax: CAL <float>
+#  - max 4 digits + 1 decimal point send;
+# -----------------------------------------------------------------------------
+calib_3decimal_points {
+    format = "%.3f";
+    out "CAL",${format};
+    in ${prompt};
+    @mismatch { in "%*/00[IWSPTUX]/%(\$2)s" };
+}
+
+calib_2decimal_points {
+    format = "%.2f";
+    out "CAL",${format};
+    in ${prompt};
+    @mismatch { in "%*/00[IWSPTUX]/%(\$2)s" };
+}
+
+calib_1decimal_point {
+    format = "%.1f";
+    out "CAL",${format};
+    in ${prompt};
+    @mismatch { in "%*/00[IWSPTUX]/%(\$2)s" };
+}
diff --git a/ne1x00App/Db/ne9000_variable.template b/ne1x00App/Db/ne9000_variable.template
index cad9d1f..964cd9b 100644
--- a/ne1x00App/Db/ne9000_variable.template
+++ b/ne1x00App/Db/ne9000_variable.template
@@ -24,28 +24,32 @@ record(stringin, $(P):DIAMETER) {
 
 # -----------------------------------------------------------------------------
 # Set syringe DIAMETER
-#  - limits: 0.100 mm to 50.00 mm
-#  - max 4 digits + 1 decimal point send;
+#  - syntax: DIA [ nn / nn ]
+#  - limits: tubing inside diameter should be smaller than 1" (inch)
 # -----------------------------------------------------------------------------
 record(ao, $(P):SET_DIAMETER) {
     field(DESC, "Set inside diameter")
     field(DTYP, "stream")
     field(OUT,  "@ne9000.proto set_diameter($(P):STATUS,$(P):SET_DIAMETER_NUM,$(P):SET_DIAMETER_DEN,$(P):MESSAGE) $(PORT) $(ADDR)")
-    field(FLNK, "$(P):MSG_CLEAR__")
 }
 
 record(ao, $(P):SET_DIAMETER_NUM) {
     field(DESC, "Numerator input for diameter")
     field(DTYP, "Soft Channel")
-    field(FLNK, "$(P):SET_DIAMETER")
+    field(FLNK, "$(P):DIA_SET__")
 }
 
 record(ao, $(P):SET_DIAMETER_DEN) {
     field(DESC, "Denominator input for diameter")
     field(DTYP, "Soft Channel")
-    field(FLNK, "$(P):SET_DIAMETER")
+    field(FLNK, "$(P):DIA_SET__")
 }
 
+record(fanout, $(P):DIA_SET__) {
+    field(DESC, "(int.) Diameter set")
+    field(LNK1, "$(P):MSG_CLEAR__")
+    field(LNK2, "$(P):SET_DIAMETER")
+}
 
 # -----------------------------------------------------------------------------
 # Get pumping RATE value and unit
@@ -249,3 +253,97 @@ record(mbbo, $(P):SET_DIRECTION) {
     field(FLNK, "$(P):DIRECTION")
 }
 
+
+# -----------------------------------------------------------------------------
+# Calibrates the tubing diameter using <float> as the measured dispense volume,
+#   and the volume dispensed or withdrawn, according to the current pumping
+#   direction. The calibration value cannot be queried. The pump must be stopped
+#   to calibrate.
+# ---
+#  - syntax: CAL <float>
+#  - max 4 digits + 1 decimal point send;
+# -----------------------------------------------------------------------------
+record(bo, $(P):CALIB) {
+    field(DESC, "Start calibration")
+    field(DTYP, "Soft Channel")
+    field(FLNK, "$(P):CAL_RST__")
+}
+
+record(ao, $(P):SET_CALIB) {
+    field(DESC, "Input for calibration volume")
+    field(DTYP, "Soft Channel")
+}
+
+record(fanout, $(P):CAL_RST__) {
+    field(DESC, "(int.) Calibrate reset")
+    field(LNK1, "$(P):MSG_CLEAR__")
+    field(LNK2, "$(P):CAL_CLR_ALARM__")
+    field(LNK3, "$(P):CAL_SET_3D__")
+}
+
+record(calcout, $(P):CAL_CHK_ALARM__) {
+    field(DESC, "(int.) Calibrate alarm")
+    field(INPA, "$(P):CAL_SET_3D__.SEVR")
+    field(INPB, "$(P):CAL_SET_2D__.SEVR")
+    field(INPC, "$(P):CAL_SET_1D__.SEVR")
+    field(CALC, "((A=3)&&(B=3)&&(C=3))")
+    field(OOPT, "When Non-zero")
+    field(OUT,  "$(P):CAL_SET_ALARM__.PROC")
+}
+
+record(ao, $(P):CAL_SET_ALARM__) {
+    field(DESC, "(int.) Calib. alarm set")
+    field(VAL, "3")
+    field(OUT, "$(P):SET_CALIB.HHSV")
+}
+
+record(ao, $(P):CAL_CLR_ALARM__) {
+    field(DESC, "(int.) Calib. alarm clear")
+    field(VAL, "0")
+    field(OUT, "$(P):SET_CALIB.HHSV")
+}
+
+record(ao, $(P):CAL_SET_3D__) {
+    field(DESC, "(int.) Set calib. 3 digits")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_CALIB")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne9000.proto calib_3decimal_points($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):CAL_CHK_3D__")
+}
+
+record(calcout, $(P):CAL_CHK_3D__) {
+    field(DESC, "(int.) Set calib. 3 digits")
+    field(INPA, "$(P):CAL_SET_3D__.SEVR")
+    field(CALC, "A#3")
+    field(OOPT, "When Zero")
+    field(OUT,  "$(P):CAL_SET_2D__.PROC")
+    field(FLNK, "$(P):MSG_CLEAR__")
+}
+
+record(ao, $(P):CAL_SET_2D__) {
+    field(DESC, "(int.) Set calib. 2 digits")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_CALIB")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne9000.proto calib_2decimal_points($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):CAL_CHK_2D__")
+}
+
+record(calcout, $(P):CAL_CHK_2D__) {
+    field(DESC, "(int.) Set calib. 2 digits")
+    field(INPA, "$(P):CAL_SET_2D__.SEVR")
+    field(CALC, "A#3")
+    field(OOPT, "When Zero")
+    field(OUT,  "$(P):CAL_SET_1D__.PROC")
+    field(FLNK, "$(P):MSG_CLEAR__")
+}
+
+record(ao, $(P):CAL_SET_1D__) {
+    field(DESC, "(int.) Set calib. 1 digit")
+    field(DTYP, "stream")
+    field(DOL,  "$(P):SET_CALIB")
+    field(OMSL, "closed_loop")
+    field(OUT,  "@ne9000.proto calib_1decimal_point($(P):STATUS,$(P):MESSAGE) $(PORT) $(ADDR)")
+    field(FLNK, "$(P):CAL_CHK_ALARM__")
+}
-- 
GitLab


From db0454ebb2904d9c26a370186ab705bd0ba69e52 Mon Sep 17 00:00:00 2001
From: Douglas Bezerra Beniz <douglas.bezerra.beniz@ess.eu>
Date: Wed, 5 Aug 2020 19:06:29 +0200
Subject: [PATCH 10/10] ICSHWI-4917; Small fix to clear error messages when
 entering new CALIB volume;

---
 ne1x00App/Db/ne9000_variable.template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ne1x00App/Db/ne9000_variable.template b/ne1x00App/Db/ne9000_variable.template
index 964cd9b..acc5220 100644
--- a/ne1x00App/Db/ne9000_variable.template
+++ b/ne1x00App/Db/ne9000_variable.template
@@ -272,6 +272,7 @@ record(bo, $(P):CALIB) {
 record(ao, $(P):SET_CALIB) {
     field(DESC, "Input for calibration volume")
     field(DTYP, "Soft Channel")
+    field(FLNK, "$(P):MSG_CLEAR__")
 }
 
 record(fanout, $(P):CAL_RST__) {
-- 
GitLab