IOCINFRAApp/Db/devKeithley6487.proto
changeset 0 77d8eafe2a07
child 1 f6e1a4c75073
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IOCINFRAApp/Db/devKeithley6487.proto	Thu Mar 07 09:23:26 2019 +0100
@@ -0,0 +1,119 @@
+##########################################################################
+# Copyright (c) 2011 Lawrence Berkeley National Laboratory, Accelerator
+# Technology Group, Engineering Division
+# This code is distributed subject to a Software License Agreement found
+# in file LICENSE that is included with this distribution.
+##########################################################################
+
+@writetimeout { disconnect; }
+@replytimeout { disconnect; }
+@readtimeout  { disconnect; }
+@mismatch     { disconnect; }
+
+ReplyTimeout = 1200;
+InTerminator = "\n";
+OutTerminator = "\n";
+
+getIDN {
+    out "*IDN?";
+    in "%\$1[^\r\n]";
+    ExtraInput = Ignore;
+}
+cmd {
+    out "\$1";
+}
+
+setD {
+    out "\$1 %d";
+    @init { out "\$1?"; in "%d"; }
+}
+getD {
+    out "\$1?";
+    in "%d";
+    ExtraInput = Ignore;
+}
+
+setF {
+    out "\$1 %f";
+    @init { out "\$1?"; in "%f"; }
+}
+getF {
+    out "\$1?";
+    in "%f";
+    ExtraInput = Ignore;
+}
+
+setRange {
+    out "RANG 2E-%d";
+    @init { out "RANG?"; in "%*[^E]E-%d"; }
+}
+getRange {
+    out "RANG?";
+    in "%*[^E]E-%d";
+    ExtraInput = Ignore;
+}
+
+setArmSource {
+    out "ARM:SOUR %{IMM|BUS|TIM|MAN|TLIN|NST|PST|BST}";
+    @init { out "ARM:SOUR?"; in "%{IMM|BUS|TIM|MAN|TLIN|NST|PST|BST}"; }
+}
+getArmSource {
+    out "ARM:SOUR?";
+    in "%{IMM|BUS|TIM|MAN|TLIN|NST|PST|BST}";
+    ExtraInput = Ignore;
+}
+setTriggerSource {
+    out "TRIG:SOUR %{IMM|TLIN}";
+    @init { out "TRIG:SOUR?"; in "%{IMM|TLIN}"; }
+}
+getTriggerSource {
+    out "TRIG:SOUR?";
+    in "%{IMM|TLIN}";
+    ExtraInput = Ignore;
+}
+cancel {
+    out "\030ABOR\r";
+    in "%*s";
+    ExtraInput = Ignore;
+}
+
+#
+# Measure current
+#
+measureCurrent {
+    ReplyTimeout = 5000;
+    out "READ?";
+    in "%f";
+    ExtraInput = Ignore;
+    @init { out "FORM:ELEM READ;CONF:CURR:DC"; }
+}
+fetchBuffered {
+    ReplyTimeout = 10000;
+    Separator = ",";
+    out "FETC?";
+    in "%f";
+    ExtraInput = Ignore;
+}
+
+#
+# Source
+#
+setIlimit {
+    out "SOUR:VOLT:ILIM 2.5E-%d";
+    @init { out "SOUR:VOLT:ILIM?"; in "2.5%*[^E]E-%d"; }
+}
+getIlimit {
+    out "SOUR:VOLT:ILIM?";
+    in "2.5%*[^E]E-%d";
+    ExtraInput = Ignore;
+}
+setSourceRange {
+    out "SOUR:VOLT:RANGE %d";
+    @init { out "SOUR:VOLT:RANGE?"; in "%{1.000000E+01|5.000000E+01|5.000000E+02}"; }
+}
+getSourceRange {
+    out "SOUR:VOLT:RANGE?";
+    in "%{1.000000E+01|5.000000E+01|5.000000E+02}";
+    ExtraInput = Ignore;
+}
+