diff --git a/site_ansto/instrument/config/environment/temperature/oxford_mercury.sct b/site_ansto/instrument/config/environment/temperature/oxford_mercury.sct index 5fed0357..12d9d3a3 100644 --- a/site_ansto/instrument/config/environment/temperature/oxford_mercury.sct +++ b/site_ansto/instrument/config/environment/temperature/oxford_mercury.sct @@ -63,7 +63,7 @@ for i in range(8): var nick = { type=text; readable = 15; read_command = 'READ:DEV:DB5.P1:PRES:NICK'; read_function = rdText; } var valve = { conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]'; - read_command = 'READ:DEV:DB4.G1:AUX:SIG:OPEN'; + read_command = 'READ:DEV:DB4.G1:AUX:SIG:PERC'; } var setpoint = { conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]'; @@ -80,7 +80,7 @@ for i in range(8): var nick = { type=text; readable = 15; read_command = 'READ:DEV:DB8.P1:PRES:NICK'; read_function = rdText; } var valve = { conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]'; - read_command = 'READ:DEV:DB4.G1:AUX:SIG:OPEN'; + read_command = 'READ:DEV:DB4.G1:AUX:SIG:PERC'; } var setpoint = { conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]'; @@ -95,7 +95,7 @@ for i in range(8): conditional = '[string equal -nocase [string index ${cards} 3] V]'; priv = user; type = float; var sensor = { - readable = 5; read_command = 'READ:DEV:DB4.G1:AUX:SIG:OPEN'; + readable = 5; read_command = 'READ:DEV:DB4.G1:AUX:SIG:PERC'; } var nick = { type=text; readable = 15; read_command = 'READ:DEV:DB4.G1:AUX:NICK'; read_function = rdText; } var setpoint = { @@ -116,18 +116,17 @@ for i in range(8): code read_function rdValue = { @TCL set value [lindex [split "${data}" ":"] end] - if {[string equal -nocase [string index ${value} end] K]} { - set value [string range ${value} 0 end-1] - } - if {[string equal -nocase ${value} NaN]} { + if {[string equal -nocase -length 3 ${value} NaN]} { set value 0 } - if {[string equal -nocase ${value} inf] || [string equal -nocase ${value} -inf]} { + if {[string equal -nocase -length 3 ${value} inf] || [string equal -nocase -length 4 ${value} -inf]} { set value 0 } - if {![string is double ${value}]} { + if {![string is digit [string index ${value} 0]]} { set value 0 } + debug_log ${tc_root} 1 "rdValue tc_root=${tc_root} sct=[sct] result=[sct result]" + debug_log ${tc_root} 1 "rdValue tc_root=${tc_root} data=${data} value=${value}" scan ${value} "%g" data @END }