]> jspc29.x-matter.uni-frankfurt.de Git - mvd_epics.git/commitdiff
HAMEG_HMP4030: Get/Set naming in PV names / protocols
authorPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Tue, 8 Aug 2017 13:46:33 +0000 (15:46 +0200)
committerPhilipp Klaus <klaus@physik.uni-frankfurt.de>
Tue, 8 Aug 2017 13:46:33 +0000 (15:46 +0200)
HAMEG_HMP4030/HAMEG_HMP4030App/Db/HAMEG_HMP4030_CHANNEL.template
HAMEG_HMP4030/protocols/HAMEG_HMP4030.proto

index 13a4bac147bc231a5ba9f2103c8ed7f80a6cb221..f96646227c1f030bcc498ffcf26ff74330ba271b 100644 (file)
@@ -6,9 +6,9 @@ record (ao, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):SetVoltage") {
   field (ADEL, "0.005")
   field (MDEL, "0.001")
 }
-record (ai, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):ReadSetVoltage") {
+record (ai, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):GetVoltage") {
   field (DTYP, "stream")
-  field (INP,  "@HAMEG_HMP4030.proto ReadSetVoltage($(CHAN)) $(PORT)")
+  field (INP,  "@HAMEG_HMP4030.proto GetVoltage($(CHAN)) $(PORT)")
   field (SCAN, "2 second")
   field (EGU, "V")
   field (PREC, "4")
@@ -25,9 +25,9 @@ record (ao, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):SetVoltageStepSize") {
   field (MDEL, "0.001")
 }
 
-record (ai, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):ReadSetVoltageStepSize") {
+record (ai, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):GetVoltageStepSize") {
   field (DTYP, "stream")
-  field (INP,  "@HAMEG_HMP4030.proto ReadSetVoltageStepSize($(CHAN)) $(PORT)")
+  field (INP,  "@HAMEG_HMP4030.proto GetVoltageStepSize($(CHAN)) $(PORT)")
   field (EGU, "V")
   field (PREC, "4")
   field (ADEL, "0.005")
@@ -42,9 +42,9 @@ record (ao, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):SetCurrent") {
   field (ADEL, "0.005")
   field (MDEL, "0.001")
 }
-record (ai, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):ReadSetCurrent") {
+record (ai, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):GetCurrent") {
   field (DTYP, "stream")
-  field (INP,  "@HAMEG_HMP4030.proto ReadSetCurrent($(CHAN)) $(PORT)")
+  field (INP,  "@HAMEG_HMP4030.proto GetCurrent($(CHAN)) $(PORT)")
   field (SCAN, "2 second")
   field (EGU, "A")
   field (PREC, "4")
@@ -61,9 +61,9 @@ record (ao, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):SetCurrentStepSize") {
   field (MDEL, "0.001")
 }
 
-record (ai, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):ReadSetCurrentStepSize") {
+record (ai, "$(sys):$(sub):POWER:$(vsys):$(CHAN_NAME):GetCurrentStepSize") {
   field (DTYP, "stream")
-  field (INP,  "@HAMEG_HMP4030.proto ReadSetCurrentStepSize($(CHAN)) $(PORT)")
+  field (INP,  "@HAMEG_HMP4030.proto GetCurrentStepSize($(CHAN)) $(PORT)")
   field (EGU, "A")
   field (PREC, "4")
   field (ADEL, "0.005")
index 1ba13e68f96438db44738ed4339edda420439077..d64c69f9bd43b73fd2c3de53cb076af8755158c8 100644 (file)
@@ -23,53 +23,70 @@ ExtraInput    = Ignore;
 # ### Protocols ### #
 #####################
 
-#---VOLTAGE---------------------------------------------------------------------------
-SetVoltage {
-  out "INST OUT\$1";
-  out "VOLT %f";
+#---GLOBAL STATE-----------------------------------------------------------------------
+
+ActivateAllChannel {
+  out "OUTP:GEN ON";
+}
+
+DeactivateAllChannel {
+  out "OUTP:GEN OFF";
 }
 
-ReadSetVoltage {
+#---VOLTAGE---------------------------------------------------------------------------
+
+GetVoltage {
   out "INST OUT\$1";
   out "VOLT?";
   in "%f";
 }
 
-SetVoltageStepSize {
+SetVoltage {
   out "INST OUT\$1";
-  out "VOLT:STEP %f";
+  out "VOLT %f";
+  @init { GetVoltage; }
 }
 
-ReadSetVoltageStepSize {
+GetVoltageStepSize {
   out "INST OUT\$1"; 
   out "VOLT:STEP?"; 
   in "%f";
 }
 
-#---CURRENT---------------------------------------------------------------------------
-SetCurrent {
+SetVoltageStepSize {
   out "INST OUT\$1";
-  out "CURR %f";
+  out "VOLT:STEP %f";
+  @init { GetVoltageStepSize; }
 }
 
-ReadSetCurrent {
+#---CURRENT---------------------------------------------------------------------------
+
+GetCurrent {
   out "INST OUT\$1";
   out "CURR?";
   in "%f";
 }
-SetCurrentStepSize {
+
+ SetCurrent {
   out "INST OUT\$1";
-  out "CURR:STEP %f";
+  out "CURR %f";
+  @init { GetCurrent; }
 }
-ReadSetCurrentStepSize {
+
+GetCurrentStepSize {
   out "INST OUT\$1";
   out "CURR:STEP?";
   in "%f";
 }
 
+SetCurrentStepSize {
+  out "INST OUT\$1";
+  out "CURR:STEP %f";
+  @init { GetCurrentStepSize; }
+}
 #---CHANNELMODE-----------------------------------------------------------------------
+
 ActivateChannel {
   out "INST OUT\$1";
   out "OUTP ON";
@@ -89,15 +106,8 @@ ReadChannelMode {
   in "%i";
 }
 
-ActivateAllChannel {
-  out "OUTP:GEN ON";
-}
-
-DeactivateAllChannel {
-  out "OUTP:GEN OFF";
-}
-
 #---FUSE------------------------------------------------------------------------------
+
 ActivateFuse {
   out "INST OUT\$1";
   out "FUSE ON";
@@ -115,6 +125,7 @@ ReadFuseMode {
 }
 
 #---PROTECTION------------------------------------------------------------------------
+
 SetVoltageProtection {
   out "INST OUT\$1";
   out "VOLT:PROT %f";