From 8a7ff5d63c7623193cac096356ea7c19ecf36c3e Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Thu, 13 Nov 2014 14:10:20 +1100 Subject: [PATCH] Make 3He fields numeric and align with R 3.1 --- .../config/beamline/he3_polanal.sct | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/site_ansto/instrument/config/beamline/he3_polanal.sct b/site_ansto/instrument/config/beamline/he3_polanal.sct index 68ba2a24..b0f784c0 100644 --- a/site_ansto/instrument/config/beamline/he3_polanal.sct +++ b/site_ansto/instrument/config/beamline/he3_polanal.sct @@ -16,14 +16,14 @@ driver he3_polanal = { writeable = 1; write_command = 'polariser'; check_function = chkWrite; - allowed = "+,-,Refresh" + allowed = "-1,0,+1" } var amplitude = { } var freq = { units = 'Hertz'; } var phase = { units = 'Degree'; } var time2 = { units = 'Second'; } var field = { units = 'Oersted'; } - var timestamp = { } + var timestamp = { type = int; } } group polariser_start = { conditional = '[string equal -nocase ${has_pol} "true"]'; @@ -34,7 +34,7 @@ driver he3_polanal = { var phase = { units = 'Degree'; } var time2 = { units = 'Second'; } var field = { units = 'Oersted'; } - var timestamp = { } + var timestamp = { type = int; } } group analyser = { @@ -54,7 +54,7 @@ driver he3_polanal = { var phase = { units = 'Degree'; } var time2 = { units = 'Second'; } var field = { units = 'Oersted'; } - var timestamp = { } + var timestamp = { type = int; } } group analyser_start = { conditional = '[string equal -nocase ${has_anal} "true"]'; @@ -65,7 +65,7 @@ driver he3_polanal = { var phase = { units = 'Degree'; } var time2 = { units = 'Second'; } var field = { units = 'Oersted'; } - var timestamp = { } + var timestamp = { type = int; } } code chkWrite = {%% @@ -103,27 +103,9 @@ driver he3_polanal = { code setValue = {%% set cmd "${cmd_str}" - if {[string equal -nocase [sct target] "refresh"]} { - set cmd "${cmd_str}" - } - if {[string equal -nocase [sct target] "minus"]} { - set cmd "${cmd_str} -" - } - if {[string equal -nocase [sct target] "dn"]} { - set cmd "${cmd_str} -" - } - if {[string equal -nocase [sct target] "down"]} { - set cmd "${cmd_str} -" - } if {[sct target] == "-" || [sct target] == -1} { set cmd "${cmd_str} -" } - if {[string equal -nocase [sct target] "plus"]} { - set cmd "${cmd_str} +" - } - if {[string equal -nocase [sct target] "up"]} { - set cmd "${cmd_str} +" - } if {[sct target] == "+" || [sct target] == 1} { set cmd "${cmd_str} +" }