diff --git a/asyncqueue.c b/asyncqueue.c index e754eb73..e1a91337 100644 --- a/asyncqueue.c +++ b/asyncqueue.c @@ -18,7 +18,6 @@ #include #include #include -#include #include "network.h" #include "asyncqueue.h" #include "nwatch.h" diff --git a/site_ansto/hardsup/modbus_asyncprotocol.c b/site_ansto/hardsup/modbus_asyncprotocol.c index cde567e9..3779447b 100644 --- a/site_ansto/hardsup/modbus_asyncprotocol.c +++ b/site_ansto/hardsup/modbus_asyncprotocol.c @@ -20,7 +20,7 @@ */ #define PROTOCOL_NAME "MODBUS_AP" #define PROTOCOL_INIT MODBUSInitProtocol -#define ADUSIZE 17 +#define ADUSIZE 300 /* * MODBUS DataTypes @@ -63,7 +63,7 @@ struct modbus_private_t { int aduLen; int RespLen; int DatLen; - unsigned char ADU[ADUSIZE]; /* Allows upto 8 bytes if data */ + unsigned char ADU[ADUSIZE]; /* Allows up to 255 bytes of data */ pDynString rdBuffer; }; @@ -89,6 +89,10 @@ static ProtoPrivate *makeProtoPrivate() static ProtoPrivate *Proto_KillPrivate(ProtoPrivate *priv) { if (priv) { + if (priv->wrBuffer) { + DeleteDynString(priv->wrBuffer); + priv->wrBuffer = NULL; + } if (priv->rxBuffer) { DeleteDynString(priv->rxBuffer); priv->rxBuffer = NULL; @@ -268,7 +272,7 @@ static int ModbusOutput(pPrivate myPriv, pDynString wrBuffer, pDynString send_bu int ADUlen, PDUlenPlusUID; unsigned int i, j; char *cmdLine; - unsigned char ADU[32], ieee[4]; + unsigned char ADU[ADUSIZE], ieee[4]; cmdLine = GetCharArray(wrBuffer); for (i=0; i < 4; i++) diff --git a/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl b/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl index 3b93f2b8..8d8c4d2b 100644 --- a/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl +++ b/site_ansto/instrument/bilby/config/chopper/astrium_chopper_sct.tcl @@ -248,6 +248,7 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name device_class simul MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver astrium_chopper sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -624,6 +625,7 @@ proc ::scobj::astrium_chopper::mkDriver { sct_controller name device_class simul hsetprop ${scobj_hpath}/disk_4 data "true" hsetprop ${scobj_hpath}/disk_4 klass "@none" hsetprop ${scobj_hpath}/disk_4 type "part" + hsetprop ${scobj_hpath} driver astrium_chopper hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/bilby/config/motors/shutters_sct.tcl b/site_ansto/instrument/bilby/config/motors/shutters_sct.tcl index 6dac44d5..9a0d259c 100644 --- a/site_ansto/instrument/bilby/config/motors/shutters_sct.tcl +++ b/site_ansto/instrument/bilby/config/motors/shutters_sct.tcl @@ -203,6 +203,7 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver shutters sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -285,6 +286,7 @@ proc ::scobj::shutters::mkDriver { sct_controller name device_class simulation_f hsetprop ${scobj_hpath} klass "@none" hsetprop ${scobj_hpath} nxsave "true" hsetprop ${scobj_hpath} type "part" + hsetprop ${scobj_hpath} driver shutters hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/bilby/config/motors/tank_sct.tcl b/site_ansto/instrument/bilby/config/motors/tank_sct.tcl index 05e13e12..3a3ec271 100644 --- a/site_ansto/instrument/bilby/config/motors/tank_sct.tcl +++ b/site_ansto/instrument/bilby/config/motors/tank_sct.tcl @@ -211,6 +211,7 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver tank sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -334,6 +335,7 @@ proc ::scobj::tank::mkDriver { sct_controller name device_class simulation_flag hsetprop ${scobj_hpath}/switches data "true" hsetprop ${scobj_hpath}/switches klass "@none" hsetprop ${scobj_hpath}/switches type "part" + hsetprop ${scobj_hpath} driver tank hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/beamline/aerolas_doppler_sct.tcl b/site_ansto/instrument/config/beamline/aerolas_doppler_sct.tcl index a742855f..02e6c6b3 100644 --- a/site_ansto/instrument/config/beamline/aerolas_doppler_sct.tcl +++ b/site_ansto/instrument/config/beamline/aerolas_doppler_sct.tcl @@ -337,6 +337,7 @@ proc ::scobj::aerolas_doppler::mkDriver { sct_controller name device_class simul MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver aerolas_doppler sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -4303,6 +4304,7 @@ proc ::scobj::aerolas_doppler::mkDriver { sct_controller name device_class simul hsetprop ${scobj_hpath}/testing/shorts klass "@none" hsetprop ${scobj_hpath}/testing/shorts type "part" } + hsetprop ${scobj_hpath} driver aerolas_doppler hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/beamline/he3_polanal_sct.tcl b/site_ansto/instrument/config/beamline/he3_polanal_sct.tcl index 8b7ec570..3c5e93f1 100644 --- a/site_ansto/instrument/config/beamline/he3_polanal_sct.tcl +++ b/site_ansto/instrument/config/beamline/he3_polanal_sct.tcl @@ -207,6 +207,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver he3_polanal sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -593,6 +594,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio hsetprop ${scobj_hpath}/polariser_start klass "@none" hsetprop ${scobj_hpath}/polariser_start type "part" } + hsetprop ${scobj_hpath} driver he3_polanal hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/beamline/sct_he3_polanal.tcl b/site_ansto/instrument/config/beamline/sct_he3_polanal.tcl index cfd66666..7ed65ef9 100644 --- a/site_ansto/instrument/config/beamline/sct_he3_polanal.tcl +++ b/site_ansto/instrument/config/beamline/sct_he3_polanal.tcl @@ -216,6 +216,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver he3_polanal sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -416,6 +417,7 @@ proc ::scobj::he3_polanal::mkDriver { sct_controller name device_class simulatio hsetprop ${scobj_hpath}/polariser klass "@none" hsetprop ${scobj_hpath}/polariser type "part" # End of named group: polariser + hsetprop ${scobj_hpath} driver he3_polanal hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 0 diff --git a/site_ansto/instrument/config/environment/agilent_33220A_sct.tcl b/site_ansto/instrument/config/environment/agilent_33220A_sct.tcl index b0016c98..0147ac6f 100644 --- a/site_ansto/instrument/config/environment/agilent_33220A_sct.tcl +++ b/site_ansto/instrument/config/environment/agilent_33220A_sct.tcl @@ -100,6 +100,8 @@ proc ::scobj::agilent_33220A::read_config {} { } if { [string equal -nocase [dict get $v "driver"] "agilent_33220A"] } { ::scobj::agilent_33220A::sics_log 9 "No sctcontroller for agilent_33220A" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] ${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} } } diff --git a/site_ansto/instrument/config/environment/hiden_xcs_sct.tcl b/site_ansto/instrument/config/environment/hiden_xcs_sct.tcl index 966e7623..4dfa52cb 100644 --- a/site_ansto/instrument/config/environment/hiden_xcs_sct.tcl +++ b/site_ansto/instrument/config/environment/hiden_xcs_sct.tcl @@ -797,6 +797,7 @@ proc ::scobj::hiden_xcs::mkDriver { sct_controller name device_class simulation_ MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver hiden_xcs sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -1264,6 +1265,7 @@ proc ::scobj::hiden_xcs::mkDriver { sct_controller name device_class simulation_ hsetprop ${scobj_hpath}/humidity nxsave "true" hsetprop ${scobj_hpath}/humidity type "part" ansto_makesctdrive ${name}_humidity_setpoint ${scobj_hpath}/humidity/setpoint ${scobj_hpath}/humidity/sensor ${sct_controller} + hsetprop ${scobj_hpath} driver hiden_xcs hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/huber_pilot_sct.tcl b/site_ansto/instrument/config/environment/huber_pilot_sct.tcl index ccfbfed3..bebb7729 100644 --- a/site_ansto/instrument/config/environment/huber_pilot_sct.tcl +++ b/site_ansto/instrument/config/environment/huber_pilot_sct.tcl @@ -304,6 +304,7 @@ proc ::scobj::huber_pilot::mkDriver { sct_controller name device_class simulatio MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver huber_pilot sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -480,6 +481,7 @@ proc ::scobj::huber_pilot::mkDriver { sct_controller name device_class simulatio hsetprop ${scobj_hpath}/Loop1 klass "@none" hsetprop ${scobj_hpath}/Loop1 type "part" ansto_makesctdrive ${name}_Loop1_setpoint ${scobj_hpath}/Loop1/setpoint ${scobj_hpath}/Loop1/sensor_int ${sct_controller} + hsetprop ${scobj_hpath} driver huber_pilot hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/isotech_ps_sct.tcl b/site_ansto/instrument/config/environment/isotech_ps_sct.tcl index 7bbf2875..db1e7e5d 100644 --- a/site_ansto/instrument/config/environment/isotech_ps_sct.tcl +++ b/site_ansto/instrument/config/environment/isotech_ps_sct.tcl @@ -250,6 +250,7 @@ proc ::scobj::isotech_ps::mkDriver { sct_controller name device_class simulation MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver isotech_ps sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -331,6 +332,7 @@ proc ::scobj::isotech_ps::mkDriver { sct_controller name device_class simulation hsetprop ${scobj_hpath} data "true" hsetprop ${scobj_hpath} klass "@none" hsetprop ${scobj_hpath} type "part" + hsetprop ${scobj_hpath} driver isotech_ps hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/keithley_m2700_sct.tcl b/site_ansto/instrument/config/environment/keithley_m2700_sct.tcl index 70234012..6d468450 100644 --- a/site_ansto/instrument/config/environment/keithley_m2700_sct.tcl +++ b/site_ansto/instrument/config/environment/keithley_m2700_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::keithley_m2700::mkDriver { sct_controller name device_class simula MakeSICSObj ${name} SCT_OBJECT user float + sicslist setatt ${name} driver keithley_m2700 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver keithley_m2700 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/keysight_N8740A.sct b/site_ansto/instrument/config/environment/keysight_N8740A.sct new file mode 100644 index 00000000..710b3ce0 --- /dev/null +++ b/site_ansto/instrument/config/environment/keysight_N8740A.sct @@ -0,0 +1,159 @@ +# vim: ts=8 sts=2 sw=2 expandtab autoindent smartindent nocindent +driver keysight_N8740A = { + vendor = keysight; device = N8740A; + protocol = std + class = instrument + simulation_group = environment_simulation + group = { + type = int; + var output_enable = { + readable = 2; read_command = 'OUTPUT:STATE?'; + writeable = 1; write_command = 'OUTPUT:STATE '; + allowed = '0,1'; + } + type = float; + var amps = { + readable = 1; read_command = 'MEASURE:SCALAR:CURRENT:DC?'; + units = 'A'; + } + var volts = { + readable = 1; read_command = 'MEASURE:SCALAR:VOLTAGE:DC?'; + units = 'V'; + } + var setpoint = { + readable = 1; fetch_function = read_setpoint; read_command = 'SOURCE:VOLTAGE?'; + writeable = 1; write_function = write_setpoint; write_command = 'SOURCE:VOLTAGE '; + driveable = working_setpoint; + tolerance = 1; property settle_time = 5; + lowerlimit = 0; upperlimit = 150; + units = 'V'; + } + var ramp_rate = { + type = float; + value = 1.0; + units = 'V/S'; + writeable = 1; write_function = write_direct; + lowerlimit = 0; upperlimit = 15; + } + var working_setpoint = { + type = float; + readable = 1; read_command = 'SOURCE:VOLTAGE?'; + writeable = 1; write_function = write_direct; + units = 'V'; + } + } + group current = { + type = float; + var prot_enable = { + type = int; + readable = 1; read_command = 'SOURCE:CURRENT:PROTECTION:STATE?'; + writeable = 1; write_command = 'SOURCE:CURRENT:PROTECTION:STATE '; + allowed = '0,1'; + } + var prot_limit = { + readable = 1; read_command = 'SOURCE:CURRENT?'; + writeable = 1; write_command = 'SOURCE:CURRENT '; + lowerlimit = 0; upperlimit = 22; + units = 'A'; + } + } + group voltage = { + type = float; + var lolimit = { + readable = 1; read_command = 'SOURCE:VOLTAGE:LIMIT:LOW?'; + writeable = 1; write_command = 'SOURCE:VOLTAGE:LIMIT:LOW '; + units = 'V'; + } + var hilimit = { + readable = 1; read_command = 'SOURCE:VOLTAGE:PROTECTION?'; + writeable = 1; write_command = 'SOURCE:VOLTAGE:PROTECTION '; + lowerlimit = 0; upperlimit = 165; + units = 'V'; + } + } + group system = { + type = text; + data = false; control = false; mutable = false; nxsave = false; + var ident = { + readable = 15; read_command = '*IDN?'; + } + var error = { + readable = 1; read_command = 'SYSTEM:ERROR?'; + } + var version = { + readable = 15; read_command = 'SYSTEM:VERSION?'; + } + } + code setValue = { + @TCL + set cmd "${cmd_str}${par}@@NOREPLY@@" + @END + } + code write_direct = { + @TCL + set cmd "@@NOSEND@@" + sct result "" + if { [sct target] != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:[sct target], from old:[sct oldval]" + sct oldval [sct target] + sct update [sct target] + sct utime readtime + } + @END + } + code write_setpoint = { + @TCL + set cmd "@@NOSEND@@" + sct result "" + sct ramp_start_time [sct utime] + sct ramp_start_value [hval ${tc_root}/working_setpoint] + sct ramp_rate_value [hval ${tc_root}/ramp_rate] + if { [sct target] != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:[sct target], from old:[sct oldval]" + sct oldval [sct target] + sct update [sct target] + sct utime readtime + } + @END + } + code read_setpoint = { + @TCL + if { [hpropexists [sct] target] } { + set target [sct target] + if { [hval ${tc_root}/working_setpoint] != ${target} } { + set elapsed_time [expr {[sct utime] - [sct ramp_start_time]}] + debug_log ${tc_root} 1 "read_setpoint elapsed_time = ${elapsed_time}" + if {[hpropexists [sct] ramp_rate_value] && [sct ramp_rate_value] > 0.0} { + set ramped_value [expr {[sct ramp_rate_value] * ${elapsed_time}}] + debug_log ${tc_root} 1 "read_setpoint ramped_value = ${ramped_value}" + if { ${target} > [hval ${tc_root}/working_setpoint] } { + set working_setpoint [expr {[sct ramp_start_value] + ${ramped_value}}] + debug_log ${tc_root} 1 "read_setpoint working_setpoint+ = ${working_setpoint}" + if { ${working_setpoint} > ${target} } { + set working_setpoint ${target} + } + } else { + set working_setpoint [expr {[sct ramp_start_value] - ${ramped_value}}] + debug_log ${tc_root} 1 "read_setpoint working_setpoint- = ${working_setpoint}" + if { ${working_setpoint} < ${target} } { + set working_setpoint ${target} + } + } + } else { + set working_setpoint ${target} + debug_log ${tc_root} 1 "read_setpoint working_setpoint = ${working_setpoint}" + } + if {![hpropexists [sct] ramp_rate_value] || [sct ramp_rate_value] != [hval ${tc_root}/ramp_rate]} { + sct ramp_start_time [sct utime] + sct ramp_start_value [hval ${tc_root}/working_setpoint] + sct ramp_rate_value [hval ${tc_root}/ramp_rate] + } + set cmd "SOURCE:VOLTAGE ${working_setpoint}@@NOREPLY@@" + sct result [hval ${tc_root}/working_setpoint] + } + } else { + # cmd is fine + } + @END + } +} diff --git a/site_ansto/instrument/config/environment/keysight_N8740A_sct.tcl b/site_ansto/instrument/config/environment/keysight_N8740A_sct.tcl new file mode 100644 index 00000000..c6989b86 --- /dev/null +++ b/site_ansto/instrument/config/environment/keysight_N8740A_sct.tcl @@ -0,0 +1,843 @@ +# Generated driver for keysight_N8740A +# vim: ft=tcl tabstop=8 softtabstop=2 shiftwidth=2 nocindent smartindent +# + +namespace eval ::scobj::keysight_N8740A { + set debug_threshold 5 +} + +proc ::scobj::keysight_N8740A::debug_log {tc_root debug_level debug_string} { + set catch_status [ catch { + set debug_threshold [hgetpropval ${tc_root} debug_threshold] + if {${debug_level} >= ${debug_threshold}} { + set now [clock seconds] + set ts [clock format ${now} -format "%Y%m%d"] + set log_file_name "../log/keysight_N8740A_[basename ${tc_root}]_${ts}.log" + set fd [open "${log_file_name}" "a"] + set ts [clock format ${now} -format "%T"] + puts ${fd} "${ts} ${debug_string}" + close ${fd} + } + } catch_message ] +} + +proc ::scobj::keysight_N8740A::sics_log {debug_level debug_string} { + set catch_status [ catch { + set debug_threshold ${::scobj::keysight_N8740A::debug_threshold} + if {${debug_level} >= ${debug_threshold}} { + sicslog "::scobj::keysight_N8740A::${debug_string}" + } + } catch_message ] +} + +# checklimits function for driveable interface +proc ::scobj::keysight_N8740A::checklimits {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "checklimits tc_root=${tc_root} sct=[sct] target=[sct target]" + set setpoint [sct target] + if { [hpropexists [sct] lowerlimit] } { + set lolimit [sct lowerlimit] + } else { + # lowerlimit not set, use target + set lolimit [sct target] + } + if { [hpropexists [sct] upperlimit] } { + set hilimit [sct upperlimit] + } else { + # upperlimit not set, use target + set hilimit [sct target] + } +# checklimits hook code goes here + if { ${setpoint} < ${lolimit} || ${setpoint} > ${hilimit} } { + sct driving 0 + error "setpoint ${setpoint} violates limits (${lolimit}..${hilimit}) on [sct]" + } + return OK + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# check function for hset change +proc ::scobj::keysight_N8740A::checkrange {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "checkrange tc_root=${tc_root} sct=[sct] target=[sct target]" + set setpoint [sct target] + if { [hpropexists [sct] lowerlimit] } { + set lolimit [sct lowerlimit] + } else { + # lowerlimit not set, use target + set lolimit [sct target] + } + if { [hpropexists [sct] upperlimit] } { + set hilimit [sct upperlimit] + } else { + # upperlimit not set, use target + set hilimit [sct target] + } +# checkrange hook code goes here + if { ${setpoint} < ${lolimit} || ${setpoint} > ${hilimit} } { + error "setpoint ${setpoint} violates limits (${lolimit}..${hilimit}) on [sct]" + } + return OK + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# checkstatus function for driveable interface +proc ::scobj::keysight_N8740A::checkstatus {tc_root} { + set catch_status [ catch { +# checkstatus hook code goes here + if {[sct driving]} { + set sp "[sct target]" + if {[hpropexists [sct] simulated] && [sct simulated] == "true"} { + set pv "${sp}" + hupdateif ${tc_root}/[sct driveable] ${sp} + } else { + set pv "[hval ${tc_root}/[sct driveable]]" + } + if { abs(${pv} - ${sp}) <= [sct tolerance] } { + if { [hpropexists [sct] settle_time] } { + if { [hpropexists [sct] settle_time_start] } { + if { [sct utime] - [sct settle_time_start] >= [sct settle_time]} { + sct driving 0 + return "idle" + } + return "busy" + } else { + sct utime settle_time_start + return "busy" + } + } + sct driving 0 + return "idle" + } + if { [hpropexists [sct] settle_time_start] } { + hdelprop [sct] settle_time_start + } + return "busy" + } else { + return "idle" + } + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to request the read of a parameter on a device +proc ::scobj::keysight_N8740A::getValue {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "getValue tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set cmd "${cmd_str}" +# getValue hook code goes here + debug_log ${tc_root} 1 "getValue sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# halt function for driveable interface +proc ::scobj::keysight_N8740A::halt {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "halt tc_root=${tc_root} sct=[sct] driving=[sct driving]" + ### TODO hset [sct] [hval [sct]] +# halt hook code goes here + sct driving 0 + return "idle" + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to check the write parameter on a device +proc ::scobj::keysight_N8740A::noResponse {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "noResponse tc_root=${tc_root} sct=[sct] resp=[sct result]" +# noResponse hook code goes here + return "idle" + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to parse the read of a parameter on a device +proc ::scobj::keysight_N8740A::rdValue {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "rdValue tc_root=${tc_root} sct=[sct] result=[sct result]" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set data [sct result] + set nextState "idle" + if {[string equal -nocase -length 7 ${data} "ASCERR:"]} { + # the protocol driver has reported an error + sct geterror "${data}" + error "[sct geterror]" + } +# rdValue hook code goes here + if { ${data} != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:${data}, from old:[sct oldval]" + sct oldval ${data} + sct update ${data} + sct utime readtime + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to request the read of a parameter on a device +proc ::scobj::keysight_N8740A::read_setpoint {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "read_setpoint tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set cmd "${cmd_str}" +# read_setpoint hook code starts + if { [hpropexists [sct] target] } { + set target [sct target] + if { [hval ${tc_root}/working_setpoint] != ${target} } { + set elapsed_time [expr {[sct utime] - [sct ramp_start_time]}] + debug_log ${tc_root} 1 "read_setpoint elapsed_time = ${elapsed_time}" + if {[hpropexists [sct] ramp_rate_value] && [sct ramp_rate_value] > 0.0} { + set ramped_value [expr {[sct ramp_rate_value] * ${elapsed_time}}] + debug_log ${tc_root} 1 "read_setpoint ramped_value = ${ramped_value}" + if { ${target} > [hval ${tc_root}/working_setpoint] } { + set working_setpoint [expr {[sct ramp_start_value] + ${ramped_value}}] + debug_log ${tc_root} 1 "read_setpoint working_setpoint+ = ${working_setpoint}" + if { ${working_setpoint} > ${target} } { + set working_setpoint ${target} + } + } else { + set working_setpoint [expr {[sct ramp_start_value] - ${ramped_value}}] + debug_log ${tc_root} 1 "read_setpoint working_setpoint- = ${working_setpoint}" + if { ${working_setpoint} < ${target} } { + set working_setpoint ${target} + } + } + } else { + set working_setpoint ${target} + debug_log ${tc_root} 1 "read_setpoint working_setpoint = ${working_setpoint}" + } + if {![hpropexists [sct] ramp_rate_value] || [sct ramp_rate_value] != [hval ${tc_root}/ramp_rate]} { + sct ramp_start_time [sct utime] + sct ramp_start_value [hval ${tc_root}/working_setpoint] + sct ramp_rate_value [hval ${tc_root}/ramp_rate] + } + set cmd "SOURCE:VOLTAGE ${working_setpoint}@@NOREPLY@@" + sct result [hval ${tc_root}/working_setpoint] + } + } else { + # cmd is fine + } +# read_setpoint hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + debug_log ${tc_root} 1 "read_setpoint sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to write a parameter value on a device +proc ::scobj::keysight_N8740A::setValue {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "setValue tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set par [sct target] + set cmd "${cmd_str}${par}" +# setValue hook code starts + set cmd "${cmd_str}${par}@@NOREPLY@@" +# setValue hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + if { [hpropexists [sct] driving] } { + if { [hpropexists [sct] writestatus] && [sct writestatus] == "start" } { + sct driving 1 + } + } + debug_log ${tc_root} 1 "setValue sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to write a parameter value on a device +proc ::scobj::keysight_N8740A::write_direct {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "write_direct tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set par [sct target] + set cmd "${cmd_str}${par}" +# write_direct hook code starts + set cmd "@@NOSEND@@" + sct result "" + if { [sct target] != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:[sct target], from old:[sct oldval]" + sct oldval [sct target] + sct update [sct target] + sct utime readtime + } +# write_direct hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + if { [hpropexists [sct] driving] } { + if { [hpropexists [sct] writestatus] && [sct writestatus] == "start" } { + sct driving 1 + } + } + debug_log ${tc_root} 1 "write_direct sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to write a parameter value on a device +proc ::scobj::keysight_N8740A::write_setpoint {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "write_setpoint tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set par [sct target] + set cmd "${cmd_str}${par}" +# write_setpoint hook code starts + set cmd "@@NOSEND@@" + sct result "" + sct ramp_start_time [sct utime] + sct ramp_start_value [hval ${tc_root}/working_setpoint] + sct ramp_rate_value [hval ${tc_root}/ramp_rate] + if { [sct target] != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:[sct target], from old:[sct oldval]" + sct oldval [sct target] + sct update [sct target] + sct utime readtime + } +# write_setpoint hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + if { [hpropexists [sct] driving] } { + if { [hpropexists [sct] writestatus] && [sct writestatus] == "start" } { + sct driving 1 + } + } + debug_log ${tc_root} 1 "write_setpoint sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +proc ::scobj::keysight_N8740A::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port } { + ::scobj::keysight_N8740A::sics_log 9 "::scobj::keysight_N8740A::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}" + set ns "[namespace current]" + set catch_status [ catch { + + MakeSICSObj ${name} SCT_OBJECT + + sicslist setatt ${name} driver keysight_N8740A + sicslist setatt ${name} klass ${device_class} + sicslist setatt ${name} long_name ${name} + + set scobj_hpath /sics/${name} + + hfactory ${scobj_hpath}/amps plain user float + hsetprop ${scobj_hpath}/amps read ${ns}::getValue ${scobj_hpath} rdValue {MEASURE:SCALAR:CURRENT:DC?} + hsetprop ${scobj_hpath}/amps rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/amps control true + hsetprop ${scobj_hpath}/amps data true + hsetprop ${scobj_hpath}/amps mutable true + hsetprop ${scobj_hpath}/amps nxsave true + hsetprop ${scobj_hpath}/amps units A + hsetprop ${scobj_hpath}/amps oldval 0.0 + hsetprop ${scobj_hpath}/amps klass "parameter" + hsetprop ${scobj_hpath}/amps sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/amps type "part" + hsetprop ${scobj_hpath}/amps nxalias "${name}_amps" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/amps 1 + hsetprop ${scobj_hpath}/amps simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/amps simulated true + } + + hfactory ${scobj_hpath}/output_enable plain user int + hsetprop ${scobj_hpath}/output_enable read ${ns}::getValue ${scobj_hpath} rdValue {OUTPUT:STATE?} + hsetprop ${scobj_hpath}/output_enable rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/output_enable write ${ns}::setValue ${scobj_hpath} noResponse {OUTPUT:STATE } + hsetprop ${scobj_hpath}/output_enable noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/output_enable check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/output_enable control true + hsetprop ${scobj_hpath}/output_enable data true + hsetprop ${scobj_hpath}/output_enable mutable true + hsetprop ${scobj_hpath}/output_enable nxsave true + hsetprop ${scobj_hpath}/output_enable values 0,1 + hsetprop ${scobj_hpath}/output_enable oldval 0 + hsetprop ${scobj_hpath}/output_enable klass "parameter" + hsetprop ${scobj_hpath}/output_enable sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/output_enable type "part" + hsetprop ${scobj_hpath}/output_enable nxalias "${name}_output_enable" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/output_enable 2 + ${sct_controller} write ${scobj_hpath}/output_enable + hsetprop ${scobj_hpath}/output_enable simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/output_enable simulated true + } + + hfactory ${scobj_hpath}/ramp_rate plain user float + hsetprop ${scobj_hpath}/ramp_rate write ${ns}::write_direct ${scobj_hpath} noResponse {} + hsetprop ${scobj_hpath}/ramp_rate noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/ramp_rate check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/ramp_rate control true + hsetprop ${scobj_hpath}/ramp_rate data true + hsetprop ${scobj_hpath}/ramp_rate mutable true + hsetprop ${scobj_hpath}/ramp_rate nxsave true + hsetprop ${scobj_hpath}/ramp_rate lowerlimit 0 + hsetprop ${scobj_hpath}/ramp_rate upperlimit 15 + hsetprop ${scobj_hpath}/ramp_rate units V/S + hsetprop ${scobj_hpath}/ramp_rate oldval 1.0 + hset ${scobj_hpath}/ramp_rate 1.0 + hsetprop ${scobj_hpath}/ramp_rate klass "parameter" + hsetprop ${scobj_hpath}/ramp_rate sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/ramp_rate type "part" + hsetprop ${scobj_hpath}/ramp_rate nxalias "${name}_ramp_rate" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} write ${scobj_hpath}/ramp_rate + hsetprop ${scobj_hpath}/ramp_rate simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/ramp_rate simulated true + } + + hfactory ${scobj_hpath}/setpoint plain user float + hsetprop ${scobj_hpath}/setpoint read ${ns}::read_setpoint ${scobj_hpath} rdValue {SOURCE:VOLTAGE?} + hsetprop ${scobj_hpath}/setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint write ${ns}::write_setpoint ${scobj_hpath} noResponse {SOURCE:VOLTAGE } + hsetprop ${scobj_hpath}/setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint driving 0 + hsetprop ${scobj_hpath}/setpoint checklimits ${ns}::checklimits ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint halt ${ns}::halt ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint driveable working_setpoint + hsetprop ${scobj_hpath}/setpoint control true + hsetprop ${scobj_hpath}/setpoint data true + hsetprop ${scobj_hpath}/setpoint mutable true + hsetprop ${scobj_hpath}/setpoint nxsave true + hsetprop ${scobj_hpath}/setpoint lowerlimit 0 + hsetprop ${scobj_hpath}/setpoint upperlimit 150 + hsetprop ${scobj_hpath}/setpoint tolerance 1 + hsetprop ${scobj_hpath}/setpoint units V + hsetprop ${scobj_hpath}/setpoint oldval 0.0 + hsetprop ${scobj_hpath}/setpoint klass "parameter" + hsetprop ${scobj_hpath}/setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/setpoint settle_time "5" + hsetprop ${scobj_hpath}/setpoint type "drivable" + hsetprop ${scobj_hpath}/setpoint nxalias "${name}_setpoint" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/setpoint 1 + ${sct_controller} write ${scobj_hpath}/setpoint + hsetprop ${scobj_hpath}/setpoint simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/setpoint simulated true + } + + hfactory ${scobj_hpath}/volts plain user float + hsetprop ${scobj_hpath}/volts read ${ns}::getValue ${scobj_hpath} rdValue {MEASURE:SCALAR:VOLTAGE:DC?} + hsetprop ${scobj_hpath}/volts rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/volts control true + hsetprop ${scobj_hpath}/volts data true + hsetprop ${scobj_hpath}/volts mutable true + hsetprop ${scobj_hpath}/volts nxsave true + hsetprop ${scobj_hpath}/volts units V + hsetprop ${scobj_hpath}/volts oldval 0.0 + hsetprop ${scobj_hpath}/volts klass "parameter" + hsetprop ${scobj_hpath}/volts sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/volts type "part" + hsetprop ${scobj_hpath}/volts nxalias "${name}_volts" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/volts 1 + hsetprop ${scobj_hpath}/volts simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/volts simulated true + } + + hfactory ${scobj_hpath}/working_setpoint plain user float + hsetprop ${scobj_hpath}/working_setpoint read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:VOLTAGE?} + hsetprop ${scobj_hpath}/working_setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/working_setpoint write ${ns}::write_direct ${scobj_hpath} noResponse {} + hsetprop ${scobj_hpath}/working_setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/working_setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/working_setpoint control true + hsetprop ${scobj_hpath}/working_setpoint data true + hsetprop ${scobj_hpath}/working_setpoint mutable true + hsetprop ${scobj_hpath}/working_setpoint nxsave true + hsetprop ${scobj_hpath}/working_setpoint units V + hsetprop ${scobj_hpath}/working_setpoint oldval 0.0 + hsetprop ${scobj_hpath}/working_setpoint klass "parameter" + hsetprop ${scobj_hpath}/working_setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/working_setpoint type "part" + hsetprop ${scobj_hpath}/working_setpoint nxalias "${name}_working_setpoint" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/working_setpoint 1 + ${sct_controller} write ${scobj_hpath}/working_setpoint + hsetprop ${scobj_hpath}/working_setpoint simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/working_setpoint simulated true + } + + hsetprop ${scobj_hpath} data "true" + hsetprop ${scobj_hpath} klass "@none" + hsetprop ${scobj_hpath} type "part" + ansto_makesctdrive ${name}_setpoint ${scobj_hpath}/setpoint ${scobj_hpath}/working_setpoint ${sct_controller} + + hfactory ${scobj_hpath}/current plain spy none + + hfactory ${scobj_hpath}/current/prot_enable plain user int + hsetprop ${scobj_hpath}/current/prot_enable read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:CURRENT:PROTECTION:STATE?} + hsetprop ${scobj_hpath}/current/prot_enable rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_enable write ${ns}::setValue ${scobj_hpath} noResponse {SOURCE:CURRENT:PROTECTION:STATE } + hsetprop ${scobj_hpath}/current/prot_enable noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_enable check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_enable control true + hsetprop ${scobj_hpath}/current/prot_enable data true + hsetprop ${scobj_hpath}/current/prot_enable mutable true + hsetprop ${scobj_hpath}/current/prot_enable nxsave true + hsetprop ${scobj_hpath}/current/prot_enable values 0,1 + hsetprop ${scobj_hpath}/current/prot_enable oldval 0 + hsetprop ${scobj_hpath}/current/prot_enable klass "parameter" + hsetprop ${scobj_hpath}/current/prot_enable sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/current/prot_enable type "part" + hsetprop ${scobj_hpath}/current/prot_enable nxalias "${name}_current_prot_enable" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/current/prot_enable 1 + ${sct_controller} write ${scobj_hpath}/current/prot_enable + hsetprop ${scobj_hpath}/current/prot_enable simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/current/prot_enable simulated true + } + + hfactory ${scobj_hpath}/current/prot_limit plain user float + hsetprop ${scobj_hpath}/current/prot_limit read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:CURRENT?} + hsetprop ${scobj_hpath}/current/prot_limit rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_limit write ${ns}::setValue ${scobj_hpath} noResponse {SOURCE:CURRENT } + hsetprop ${scobj_hpath}/current/prot_limit noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_limit check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_limit control true + hsetprop ${scobj_hpath}/current/prot_limit data true + hsetprop ${scobj_hpath}/current/prot_limit mutable true + hsetprop ${scobj_hpath}/current/prot_limit nxsave true + hsetprop ${scobj_hpath}/current/prot_limit lowerlimit 0 + hsetprop ${scobj_hpath}/current/prot_limit upperlimit 22 + hsetprop ${scobj_hpath}/current/prot_limit units A + hsetprop ${scobj_hpath}/current/prot_limit oldval 0.0 + hsetprop ${scobj_hpath}/current/prot_limit klass "parameter" + hsetprop ${scobj_hpath}/current/prot_limit sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/current/prot_limit type "part" + hsetprop ${scobj_hpath}/current/prot_limit nxalias "${name}_current_prot_limit" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/current/prot_limit 1 + ${sct_controller} write ${scobj_hpath}/current/prot_limit + hsetprop ${scobj_hpath}/current/prot_limit simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/current/prot_limit simulated true + } + hsetprop ${scobj_hpath}/current data "true" + hsetprop ${scobj_hpath}/current klass "@none" + hsetprop ${scobj_hpath}/current type "part" + + hfactory ${scobj_hpath}/system plain spy none + + hfactory ${scobj_hpath}/system/error plain user text + hsetprop ${scobj_hpath}/system/error read ${ns}::getValue ${scobj_hpath} rdValue {SYSTEM:ERROR?} + hsetprop ${scobj_hpath}/system/error rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/system/error control false + hsetprop ${scobj_hpath}/system/error data false + hsetprop ${scobj_hpath}/system/error mutable false + hsetprop ${scobj_hpath}/system/error nxsave false + hsetprop ${scobj_hpath}/system/error oldval UNKNOWN + hsetprop ${scobj_hpath}/system/error sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/system/error type "part" + hsetprop ${scobj_hpath}/system/error nxalias "${name}_system_error" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/system/error 1 + hsetprop ${scobj_hpath}/system/error simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/system/error simulated true + } + + hfactory ${scobj_hpath}/system/ident plain user text + hsetprop ${scobj_hpath}/system/ident read ${ns}::getValue ${scobj_hpath} rdValue {*IDN?} + hsetprop ${scobj_hpath}/system/ident rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/system/ident control false + hsetprop ${scobj_hpath}/system/ident data false + hsetprop ${scobj_hpath}/system/ident mutable false + hsetprop ${scobj_hpath}/system/ident nxsave false + hsetprop ${scobj_hpath}/system/ident oldval UNKNOWN + hsetprop ${scobj_hpath}/system/ident sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/system/ident type "part" + hsetprop ${scobj_hpath}/system/ident nxalias "${name}_system_ident" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/system/ident 15 + hsetprop ${scobj_hpath}/system/ident simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/system/ident simulated true + } + + hfactory ${scobj_hpath}/system/version plain user text + hsetprop ${scobj_hpath}/system/version read ${ns}::getValue ${scobj_hpath} rdValue {SYSTEM:VERSION?} + hsetprop ${scobj_hpath}/system/version rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/system/version control false + hsetprop ${scobj_hpath}/system/version data false + hsetprop ${scobj_hpath}/system/version mutable false + hsetprop ${scobj_hpath}/system/version nxsave false + hsetprop ${scobj_hpath}/system/version oldval UNKNOWN + hsetprop ${scobj_hpath}/system/version sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/system/version type "part" + hsetprop ${scobj_hpath}/system/version nxalias "${name}_system_version" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/system/version 15 + hsetprop ${scobj_hpath}/system/version simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/system/version simulated true + } + hsetprop ${scobj_hpath}/system data "false" + hsetprop ${scobj_hpath}/system klass "@none" + hsetprop ${scobj_hpath}/system type "part" + + hfactory ${scobj_hpath}/voltage plain spy none + + hfactory ${scobj_hpath}/voltage/hilimit plain user float + hsetprop ${scobj_hpath}/voltage/hilimit read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:VOLTAGE:PROTECTION?} + hsetprop ${scobj_hpath}/voltage/hilimit rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/hilimit write ${ns}::setValue ${scobj_hpath} noResponse {SOURCE:VOLTAGE:PROTECTION } + hsetprop ${scobj_hpath}/voltage/hilimit noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/hilimit check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/hilimit control true + hsetprop ${scobj_hpath}/voltage/hilimit data true + hsetprop ${scobj_hpath}/voltage/hilimit mutable true + hsetprop ${scobj_hpath}/voltage/hilimit nxsave true + hsetprop ${scobj_hpath}/voltage/hilimit lowerlimit 0 + hsetprop ${scobj_hpath}/voltage/hilimit upperlimit 165 + hsetprop ${scobj_hpath}/voltage/hilimit units V + hsetprop ${scobj_hpath}/voltage/hilimit oldval 0.0 + hsetprop ${scobj_hpath}/voltage/hilimit klass "parameter" + hsetprop ${scobj_hpath}/voltage/hilimit sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/voltage/hilimit type "part" + hsetprop ${scobj_hpath}/voltage/hilimit nxalias "${name}_voltage_hilimit" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/voltage/hilimit 1 + ${sct_controller} write ${scobj_hpath}/voltage/hilimit + hsetprop ${scobj_hpath}/voltage/hilimit simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/voltage/hilimit simulated true + } + + hfactory ${scobj_hpath}/voltage/lolimit plain user float + hsetprop ${scobj_hpath}/voltage/lolimit read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:VOLTAGE:LIMIT:LOW?} + hsetprop ${scobj_hpath}/voltage/lolimit rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/lolimit write ${ns}::setValue ${scobj_hpath} noResponse {SOURCE:VOLTAGE:LIMIT:LOW } + hsetprop ${scobj_hpath}/voltage/lolimit noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/lolimit check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/lolimit control true + hsetprop ${scobj_hpath}/voltage/lolimit data true + hsetprop ${scobj_hpath}/voltage/lolimit mutable true + hsetprop ${scobj_hpath}/voltage/lolimit nxsave true + hsetprop ${scobj_hpath}/voltage/lolimit units V + hsetprop ${scobj_hpath}/voltage/lolimit oldval 0.0 + hsetprop ${scobj_hpath}/voltage/lolimit klass "parameter" + hsetprop ${scobj_hpath}/voltage/lolimit sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/voltage/lolimit type "part" + hsetprop ${scobj_hpath}/voltage/lolimit nxalias "${name}_voltage_lolimit" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/voltage/lolimit 1 + ${sct_controller} write ${scobj_hpath}/voltage/lolimit + hsetprop ${scobj_hpath}/voltage/lolimit simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/voltage/lolimit simulated true + } + hsetprop ${scobj_hpath}/voltage data "true" + hsetprop ${scobj_hpath}/voltage klass "@none" + hsetprop ${scobj_hpath}/voltage type "part" + hsetprop ${scobj_hpath} driver keysight_N8740A + hsetprop ${scobj_hpath} klass ${device_class} + hsetprop ${scobj_hpath} data true + hsetprop ${scobj_hpath} debug_threshold 5 +# mkDriver hook code goes here + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +proc ::scobj::keysight_N8740A::add_driver {name device_class simulation_flag ip_address tcp_port} { + set catch_status [ catch { + ::scobj::keysight_N8740A::sics_log 9 "::scobj::keysight_N8740A::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}" + if {[string equal -nocase "${simulation_flag}" "false"]} { + if {[string equal -nocase "aqadapter" "${ip_address}"]} { + ::scobj::keysight_N8740A::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}" + makesctcontroller sct_${name} aqadapter ${tcp_port} + } else { + ::scobj::keysight_N8740A::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}" + makesctcontroller sct_${name} std ${ip_address}:${tcp_port} + } + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for keysight_N8740A" + ::scobj::keysight_N8740A::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL" + makesctcontroller sct_${name} aqadapter NULL + } + ::scobj::keysight_N8740A::sics_log 1 "::scobj::keysight_N8740A::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}" + ::scobj::keysight_N8740A::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +namespace eval ::scobj::keysight_N8740A { + namespace export debug_threshold + namespace export debug_log + namespace export sics_log + namespace export mkDriver + namespace export add_driver +} + +proc add_keysight_N8740A {name ip_address tcp_port} { + set simulation_flag "[string tolower [SplitReply [environment_simulation]]]" + ::scobj::keysight_N8740A::add_driver ${name} "instrument" ${simulation_flag} ${ip_address} ${tcp_port} +} + +clientput "file evaluation of keysight_N8740A_sct.tcl" +::scobj::keysight_N8740A::sics_log 9 "file evaluation of keysight_N8740A_sct.tcl" + +proc ::scobj::keysight_N8740A::read_config {} { + set catch_status [ catch { + set ns "::scobj::keysight_N8740A" + dict for {k u} $::config_dict { + if { [dict exists $u "implementation"] } { + set simulation_flag "[string tolower [SplitReply [environment_simulation]]]" + set device_class "instrument" + if { !([dict exists $u "name"] && [dict exists $u "enabled"]) } { + continue + } + set enabled [string tolower [dict get $u "enabled"]] + if { ! ([string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"]) } { + continue + } + if { [dict exists $u "simulation_group"] } { + set simulation_flag [SplitReply [[string tolower [dict get $u "simulation_group"]]]] + } + if { [dict exists $u "device_class"] } { + set device_class "[dict get $u "device_class"]" + } + set name [dict get $u name] + set implementation [dict get $u "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } + set v [dict get $::config_dict $implementation] + if { !([dict exists $v "driver"]) } { + continue + } + if { [string equal -nocase [dict get $v "driver"] "keysight_N8740A"] } { + if { ![string equal -nocase "${simulation_flag}" "false"] } { + set asyncqueue "null" + ${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue" + ${ns}::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL" + makesctcontroller sct_${name} aqadapter NULL + } elseif { [dict exists $v "asyncqueue"] } { + set asyncqueue [dict get $v "asyncqueue"] + if { [string equal -nocase ${asyncqueue} "sct"] } { + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] + makesctcontroller sct_${name} std ${ip_address}:${tcp_port} + } else { + makesctcontroller sct_${name} aqadapter ${asyncqueue} + } + } else { + if { [dict exists $v "asyncprotocol"] } { + set asyncprotocol [dict get $v "asyncprotocol"] + } else { + set asyncprotocol ${name}_protocol + MakeAsyncProtocol ${asyncprotocol} + if { [dict exists $v "sendterminator"] } { + ${asyncprotocol} sendterminator "[dict get $v "sendterminator"]" + } elseif { [dict exists $v "terminator"] } { + ${asyncprotocol} sendterminator "[dict get $v "terminator"]" + } + if { [dict exists $v "replyterminator"] } { + ${asyncprotocol} replyterminator "[dict get $v "replyterminator"]" + } elseif { [dict exists $v "terminator"] } { + ${asyncprotocol} replyterminator "[dict get $v "terminator"]" + } + } + set asyncqueue ${name}_queue + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] + MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${ip_address} ${tcp_port} + if { [dict exists $v "timeout"] } { + ${asyncqueue} timeout "[dict get $v "timeout"]" + } + makesctcontroller sct_${name} aqadapter ${asyncqueue} + } + ${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} + } + } + } + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +if { [info exists ::config_dict] } { + ::scobj::keysight_N8740A::read_config +} else { + ::scobj::keysight_N8740A::sics_log 5 "No config dict" +} diff --git a/site_ansto/instrument/config/environment/knauer_pump_sct.tcl b/site_ansto/instrument/config/environment/knauer_pump_sct.tcl index 4649bdb4..c33dcfac 100644 --- a/site_ansto/instrument/config/environment/knauer_pump_sct.tcl +++ b/site_ansto/instrument/config/environment/knauer_pump_sct.tcl @@ -883,6 +883,7 @@ proc ::scobj::knauer_pump::mkDriver { sct_controller name device_class simulatio MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver knauer_pump sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -1174,6 +1175,7 @@ proc ::scobj::knauer_pump::mkDriver { sct_controller name device_class simulatio hsetprop ${scobj_hpath}/pump/volume klass "@none" hsetprop ${scobj_hpath}/pump/volume type "part" ansto_makesctdrive ${name}_pump_volume_setp ${scobj_hpath}/pump/volume/setp ${scobj_hpath}/pump/volume/pval ${sct_controller} + hsetprop ${scobj_hpath} driver knauer_pump hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/magneticField/bruker.sct b/site_ansto/instrument/config/environment/magneticField/bruker.sct index c1daa165..5abe322b 100644 --- a/site_ansto/instrument/config/environment/magneticField/bruker.sct +++ b/site_ansto/instrument/config/environment/magneticField/bruker.sct @@ -1,11 +1,12 @@ # vim: ts=8 sts=2 sw=2 expandtab autoindent smartindent nocindent driver bruker = { + wrapper_property nosctcontroller = True protocol = astvelsel class = environment simulation_group = environment_simulation add_args = 'id datype {tol 0.1}' make_args = 'id datype tol' code mkWrapper = {%% - add_bruker_BEC1 $name $ip_address $tcp_port $tol + add_bruker_bec1 $name $ip_address $tcp_port $tol $id $datype %%} } diff --git a/site_ansto/instrument/config/environment/magneticField/bruker_sct.tcl b/site_ansto/instrument/config/environment/magneticField/bruker_sct.tcl index e1fed462..e73448de 100644 --- a/site_ansto/instrument/config/environment/magneticField/bruker_sct.tcl +++ b/site_ansto/instrument/config/environment/magneticField/bruker_sct.tcl @@ -36,7 +36,7 @@ proc ::scobj::bruker::mkDriver { sct_controller name device_class simulation_fla set catch_status [ catch { # mkWrapper hook code starts - add_bruker_BEC1 $name $ip_address $tcp_port $tol + add_bruker_bec1 $name $ip_address $tcp_port $tol $id $datype # mkWrapper hook code ends } catch_message ] handle_exception ${catch_status} ${catch_message} @@ -45,19 +45,7 @@ proc ::scobj::bruker::mkDriver { sct_controller name device_class simulation_fla proc ::scobj::bruker::add_driver {name device_class simulation_flag ip_address tcp_port id datype {tol 0.1}} { set catch_status [ catch { ::scobj::bruker::sics_log 9 "::scobj::bruker::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}" - if {[string equal -nocase "${simulation_flag}" "false"]} { - if {[string equal -nocase "aqadapter" "${ip_address}"]} { - ::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}" - makesctcontroller sct_${name} aqadapter ${tcp_port} - } else { - ::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port}" - makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port} - } - } else { - ::scobj::bruker::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for bruker" - ::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL" - makesctcontroller sct_${name} aqadapter NULL - } + ::scobj::bruker::sics_log 9 "No sctcontroller for bruker" ::scobj::bruker::sics_log 1 "::scobj::bruker::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}" ::scobj::bruker::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol} } catch_message ] @@ -110,46 +98,9 @@ proc ::scobj::bruker::read_config {} { continue } if { [string equal -nocase [dict get $v "driver"] "bruker"] } { - if { ![string equal -nocase "${simulation_flag}" "false"] } { - set asyncqueue "null" - ${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue" - ${ns}::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL" - makesctcontroller sct_${name} aqadapter NULL - } elseif { [dict exists $v "asyncqueue"] } { - set asyncqueue [dict get $v "asyncqueue"] - if { [string equal -nocase ${asyncqueue} "sct"] } { - set ip_address [dict get $v ip] - set tcp_port [dict get $v port] - makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port} - } else { - makesctcontroller sct_${name} aqadapter ${asyncqueue} - } - } else { - if { [dict exists $v "asyncprotocol"] } { - set asyncprotocol [dict get $v "asyncprotocol"] - } else { - set asyncprotocol ${name}_protocol - MakeAsyncProtocol ${asyncprotocol} - if { [dict exists $v "sendterminator"] } { - ${asyncprotocol} sendterminator "[dict get $v "sendterminator"]" - } elseif { [dict exists $v "terminator"] } { - ${asyncprotocol} sendterminator "[dict get $v "terminator"]" - } - if { [dict exists $v "replyterminator"] } { - ${asyncprotocol} replyterminator "[dict get $v "replyterminator"]" - } elseif { [dict exists $v "terminator"] } { - ${asyncprotocol} replyterminator "[dict get $v "terminator"]" - } - } - set asyncqueue ${name}_queue - set ip_address [dict get $v ip] - set tcp_port [dict get $v port] - MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${ip_address} ${tcp_port} - if { [dict exists $v "timeout"] } { - ${asyncqueue} timeout "[dict get $v "timeout"]" - } - makesctcontroller sct_${name} aqadapter ${asyncqueue} - } + ::scobj::bruker::sics_log 9 "No sctcontroller for bruker" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] set arg_list [list] set missing_list [list] foreach arg {id datype tol} { diff --git a/site_ansto/instrument/config/environment/magneticField/green_magnet_labview_sct.tcl b/site_ansto/instrument/config/environment/magneticField/green_magnet_labview_sct.tcl index 34efc8ac..89c57fe2 100644 --- a/site_ansto/instrument/config/environment/magneticField/green_magnet_labview_sct.tcl +++ b/site_ansto/instrument/config/environment/magneticField/green_magnet_labview_sct.tcl @@ -106,6 +106,8 @@ proc ::scobj::green_magnet_labview::read_config {} { } if { [string equal -nocase [dict get $v "driver"] "green_magnet_labview"] } { ::scobj::green_magnet_labview::sics_log 9 "No sctcontroller for green_magnet_labview" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] ${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} } } diff --git a/site_ansto/instrument/config/environment/magneticField/oxford12tlv_sct.tcl b/site_ansto/instrument/config/environment/magneticField/oxford12tlv_sct.tcl index 77d15f45..d56ebdf6 100644 --- a/site_ansto/instrument/config/environment/magneticField/oxford12tlv_sct.tcl +++ b/site_ansto/instrument/config/environment/magneticField/oxford12tlv_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::oxford12tlv::mkDriver { sct_controller name device_class simulatio MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver oxford12tlv sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver oxford12tlv hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/magneticField/sct_bruker.tcl b/site_ansto/instrument/config/environment/magneticField/sct_bruker.tcl index 7093b2d7..e86bab65 100644 --- a/site_ansto/instrument/config/environment/magneticField/sct_bruker.tcl +++ b/site_ansto/instrument/config/environment/magneticField/sct_bruker.tcl @@ -36,7 +36,7 @@ proc ::scobj::bruker::mkDriver { sct_controller name device_class simulation_fla set catch_status [ catch { # mkWrapper hook code starts - add_bruker_BEC1 $name $ip_address $tcp_port $tol + add_bruker_bec1 $name $ip_address $tcp_port $tol $id $datype # mkWrapper hook code ends } catch_message ] handle_exception ${catch_status} ${catch_message} @@ -45,19 +45,7 @@ proc ::scobj::bruker::mkDriver { sct_controller name device_class simulation_fla proc ::scobj::bruker::add_driver {name device_class simulation_flag ip_address tcp_port id datype {tol 0.1}} { set catch_status [ catch { ::scobj::bruker::sics_log 9 "::scobj::bruker::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}" - if {[string equal -nocase "${simulation_flag}" "false"]} { - if {[string equal -nocase "aqadapter" "${ip_address}"]} { - ::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}" - makesctcontroller sct_${name} aqadapter ${tcp_port} - } else { - ::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port}" - makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port} - } - } else { - ::scobj::bruker::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for bruker" - ::scobj::bruker::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL" - makesctcontroller sct_${name} aqadapter NULL - } + ::scobj::bruker::sics_log 9 "No sctcontroller for bruker" ::scobj::bruker::sics_log 1 "::scobj::bruker::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol}" ::scobj::bruker::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${datype} ${tol} } catch_message ] @@ -110,46 +98,9 @@ proc ::scobj::bruker::read_config {} { continue } if { [string equal -nocase [dict get $v "driver"] "bruker"] } { - if { ![string equal -nocase "${simulation_flag}" "false"] } { - set asyncqueue "null" - ${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue" - ${ns}::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL" - makesctcontroller sct_${name} aqadapter NULL - } elseif { [dict exists $v "asyncqueue"] } { - set asyncqueue [dict get $v "asyncqueue"] - if { [string equal -nocase ${asyncqueue} "sct"] } { - set ip_address [dict get $v ip] - set tcp_port [dict get $v port] - makesctcontroller sct_${name} astvelsel ${ip_address}:${tcp_port} - } else { - makesctcontroller sct_${name} aqadapter ${asyncqueue} - } - } else { - if { [dict exists $v "asyncprotocol"] } { - set asyncprotocol [dict get $v "asyncprotocol"] - } else { - set asyncprotocol ${name}_protocol - MakeAsyncProtocol ${asyncprotocol} - if { [dict exists $v "sendterminator"] } { - ${asyncprotocol} sendterminator "[dict get $v "sendterminator"]" - } elseif { [dict exists $v "terminator"] } { - ${asyncprotocol} sendterminator "[dict get $v "terminator"]" - } - if { [dict exists $v "replyterminator"] } { - ${asyncprotocol} replyterminator "[dict get $v "replyterminator"]" - } elseif { [dict exists $v "terminator"] } { - ${asyncprotocol} replyterminator "[dict get $v "terminator"]" - } - } - set asyncqueue ${name}_queue - set ip_address [dict get $v ip] - set tcp_port [dict get $v port] - MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${ip_address} ${tcp_port} - if { [dict exists $v "timeout"] } { - ${asyncqueue} timeout "[dict get $v "timeout"]" - } - makesctcontroller sct_${name} aqadapter ${asyncqueue} - } + ::scobj::bruker::sics_log 9 "No sctcontroller for bruker" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] set arg_list [list] set missing_list [list] foreach arg {id datype tol} { diff --git a/site_ansto/instrument/config/environment/magneticField/sct_bruker_BEC1.tcl b/site_ansto/instrument/config/environment/magneticField/sct_bruker_BEC1.tcl index 5d38ceb0..4c5f20b0 100644 --- a/site_ansto/instrument/config/environment/magneticField/sct_bruker_BEC1.tcl +++ b/site_ansto/instrument/config/environment/magneticField/sct_bruker_BEC1.tcl @@ -375,7 +375,7 @@ proc inTolerance {expectedLength} { set nodename $tc_root/sensor/nominal_outp_current set setpt [hval $nodename] set nodename $tc_root/sensor/desired_current - set nominal_outp_current [hval $nodename] + set NominalOutpCurrent [hval $nodename] # clientput "inTolerance(): comparing sensor/setpoint=$setpt with actual sensorValue=$temp" set diff [expr {abs($setpt - $NominalOutpCurrent)}] if {$diff > $::scobj::bruker_BEC1::bruker_BEC1_driveTolerance} { @@ -851,7 +851,7 @@ proc checktol {tc_root} { set catch_status [ catch { set retVal 0 set sensorValue $tc_root/sensor/desired_current - set nominal_outp_current [hval $sensorValue] + set NominalOutpCurrent [hval $sensorValue] set isetp $tc_root/sensor/nominal_outp_current set setpt [hval $isetp] set tol [hval $tc_root/emon/tolerance] diff --git a/site_ansto/instrument/config/environment/magneticField/tsi_smc_sct.tcl b/site_ansto/instrument/config/environment/magneticField/tsi_smc_sct.tcl index 5bd23ec0..7392df7e 100644 --- a/site_ansto/instrument/config/environment/magneticField/tsi_smc_sct.tcl +++ b/site_ansto/instrument/config/environment/magneticField/tsi_smc_sct.tcl @@ -278,6 +278,7 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name device_class simulation_fl MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver tsi_smc sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -564,6 +565,7 @@ proc ::scobj::tsi_smc::mkDriver { sct_controller name device_class simulation_fl hsetprop ${scobj_hpath}/b data "true" hsetprop ${scobj_hpath}/b klass "@none" hsetprop ${scobj_hpath}/b type "part" + hsetprop ${scobj_hpath} driver tsi_smc hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/mvp_valve_sct.tcl b/site_ansto/instrument/config/environment/mvp_valve_sct.tcl index 43ddb802..e0886b11 100644 --- a/site_ansto/instrument/config/environment/mvp_valve_sct.tcl +++ b/site_ansto/instrument/config/environment/mvp_valve_sct.tcl @@ -99,6 +99,8 @@ proc ::scobj::mvp_valve::read_config {} { } if { [string equal -nocase [dict get $v "driver"] "mvp_valve"] } { ::scobj::mvp_valve::sics_log 9 "No sctcontroller for mvp_valve" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] set arg_list [list] set missing_list [list] foreach arg {id datype} { diff --git a/site_ansto/instrument/config/environment/nhq_200_sct.tcl b/site_ansto/instrument/config/environment/nhq_200_sct.tcl index d2ba565f..b662c288 100644 --- a/site_ansto/instrument/config/environment/nhq_200_sct.tcl +++ b/site_ansto/instrument/config/environment/nhq_200_sct.tcl @@ -284,6 +284,7 @@ proc ::scobj::nhq_200::mkDriver { sct_controller name device_class simulation_fl MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver nhq_200 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -860,6 +861,7 @@ proc ::scobj::nhq_200::mkDriver { sct_controller name device_class simulation_fl hsetprop ${scobj_hpath}/ch2 klass "@none" hsetprop ${scobj_hpath}/ch2 type "part" ansto_makesctdrive ${name}_ch2_v_sp ${scobj_hpath}/ch2/v_sp ${scobj_hpath}/ch2/voltage ${sct_controller} + hsetprop ${scobj_hpath} driver nhq_200 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/omron_hldc.sct b/site_ansto/instrument/config/environment/omron_hldc.sct index 3331b342..b14693b6 100644 --- a/site_ansto/instrument/config/environment/omron_hldc.sct +++ b/site_ansto/instrument/config/environment/omron_hldc.sct @@ -2,7 +2,7 @@ # vim: ts=8 sts=2 sw=2 expandtab autoindent smartindent # driver omron_hldc = { - vendor = Omron; device = 'ZS-HDLC'; protocol = std; + vendor = Omron; device = 'ZS-HDLC'; protocol = omron_ap; class = environment; simulation_group = environment_simulation; diff --git a/site_ansto/instrument/config/environment/omron_hldc_sct.tcl b/site_ansto/instrument/config/environment/omron_hldc_sct.tcl index 5d52e70e..2b102b96 100644 --- a/site_ansto/instrument/config/environment/omron_hldc_sct.tcl +++ b/site_ansto/instrument/config/environment/omron_hldc_sct.tcl @@ -200,6 +200,7 @@ proc ::scobj::omron_hldc::mkDriver { sct_controller name device_class simulation MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver omron_hldc sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -250,6 +251,7 @@ proc ::scobj::omron_hldc::mkDriver { sct_controller name device_class simulation hsetprop ${scobj_hpath} data "true" hsetprop ${scobj_hpath} klass "@none" hsetprop ${scobj_hpath} type "part" + hsetprop ${scobj_hpath} driver omron_hldc hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 @@ -266,8 +268,8 @@ proc ::scobj::omron_hldc::add_driver {name device_class simulation_flag ip_addre ::scobj::omron_hldc::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}" makesctcontroller sct_${name} aqadapter ${tcp_port} } else { - ::scobj::omron_hldc::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}" - makesctcontroller sct_${name} std ${ip_address}:${tcp_port} + ::scobj::omron_hldc::sics_log 9 "makesctcontroller sct_${name} omron_ap ${ip_address}:${tcp_port}" + makesctcontroller sct_${name} omron_ap ${ip_address}:${tcp_port} } } else { ::scobj::omron_hldc::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for omron_hldc" @@ -336,7 +338,7 @@ proc ::scobj::omron_hldc::read_config {} { if { [string equal -nocase ${asyncqueue} "sct"] } { set ip_address [dict get $v ip] set tcp_port [dict get $v port] - makesctcontroller sct_${name} std ${ip_address}:${tcp_port} + makesctcontroller sct_${name} omron_ap ${ip_address}:${tcp_port} } else { makesctcontroller sct_${name} aqadapter ${asyncqueue} } diff --git a/site_ansto/instrument/config/environment/protekmm_sct.tcl b/site_ansto/instrument/config/environment/protekmm_sct.tcl index 1d96f5fa..c26a5a75 100644 --- a/site_ansto/instrument/config/environment/protekmm_sct.tcl +++ b/site_ansto/instrument/config/environment/protekmm_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::protekmm::mkDriver { sct_controller name device_class simulation_f MakeSICSObj ${name} SCT_OBJECT user float + sicslist setatt ${name} driver protekmm sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver protekmm hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/sct_keysight_N8740A.tcl b/site_ansto/instrument/config/environment/sct_keysight_N8740A.tcl new file mode 100644 index 00000000..3cd79eec --- /dev/null +++ b/site_ansto/instrument/config/environment/sct_keysight_N8740A.tcl @@ -0,0 +1,843 @@ +# Generated driver for keysight_N8740A +# vim: ft=tcl tabstop=8 softtabstop=2 shiftwidth=2 nocindent smartindent +# + +namespace eval ::scobj::keysight_N8740A { + set debug_threshold 5 +} + +proc ::scobj::keysight_N8740A::debug_log {tc_root debug_level debug_string} { + set catch_status [ catch { + set debug_threshold [hgetpropval ${tc_root} debug_threshold] + if {${debug_level} >= ${debug_threshold}} { + set now [clock seconds] + set ts [clock format ${now} -format "%Y%m%d"] + set log_file_name "../log/keysight_N8740A_[basename ${tc_root}]_${ts}.log" + set fd [open "${log_file_name}" "a"] + set ts [clock format ${now} -format "%T"] + puts ${fd} "${ts} ${debug_string}" + close ${fd} + } + } catch_message ] +} + +proc ::scobj::keysight_N8740A::sics_log {debug_level debug_string} { + set catch_status [ catch { + set debug_threshold ${::scobj::keysight_N8740A::debug_threshold} + if {${debug_level} >= ${debug_threshold}} { + sicslog "::scobj::keysight_N8740A::${debug_string}" + } + } catch_message ] +} + +# checklimits function for driveable interface +proc ::scobj::keysight_N8740A::checklimits {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "checklimits tc_root=${tc_root} sct=[sct] target=[sct target]" + set setpoint [sct target] + if { [hpropexists [sct] lowerlimit] } { + set lolimit [sct lowerlimit] + } else { + # lowerlimit not set, use target + set lolimit [sct target] + } + if { [hpropexists [sct] upperlimit] } { + set hilimit [sct upperlimit] + } else { + # upperlimit not set, use target + set hilimit [sct target] + } +# checklimits hook code goes here + if { ${setpoint} < ${lolimit} || ${setpoint} > ${hilimit} } { + sct driving 0 + error "setpoint ${setpoint} violates limits (${lolimit}..${hilimit}) on [sct]" + } + return OK + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# check function for hset change +proc ::scobj::keysight_N8740A::checkrange {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "checkrange tc_root=${tc_root} sct=[sct] target=[sct target]" + set setpoint [sct target] + if { [hpropexists [sct] lowerlimit] } { + set lolimit [sct lowerlimit] + } else { + # lowerlimit not set, use target + set lolimit [sct target] + } + if { [hpropexists [sct] upperlimit] } { + set hilimit [sct upperlimit] + } else { + # upperlimit not set, use target + set hilimit [sct target] + } +# checkrange hook code goes here + if { ${setpoint} < ${lolimit} || ${setpoint} > ${hilimit} } { + error "setpoint ${setpoint} violates limits (${lolimit}..${hilimit}) on [sct]" + } + return OK + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# checkstatus function for driveable interface +proc ::scobj::keysight_N8740A::checkstatus {tc_root} { + set catch_status [ catch { +# checkstatus hook code goes here + if {[sct driving]} { + set sp "[sct target]" + if {[hpropexists [sct] simulated] && [sct simulated] == "true"} { + set pv "${sp}" + hupdateif ${tc_root}/[sct driveable] ${sp} + } else { + set pv "[hval ${tc_root}/[sct driveable]]" + } + if { abs(${pv} - ${sp}) <= [sct tolerance] } { + if { [hpropexists [sct] settle_time] } { + if { [hpropexists [sct] settle_time_start] } { + if { [sct utime] - [sct settle_time_start] >= [sct settle_time]} { + sct driving 0 + return "idle" + } + return "busy" + } else { + sct utime settle_time_start + return "busy" + } + } + sct driving 0 + return "idle" + } + if { [hpropexists [sct] settle_time_start] } { + hdelprop [sct] settle_time_start + } + return "busy" + } else { + return "idle" + } + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to request the read of a parameter on a device +proc ::scobj::keysight_N8740A::getValue {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "getValue tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set cmd "${cmd_str}" +# getValue hook code goes here + debug_log ${tc_root} 1 "getValue sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# halt function for driveable interface +proc ::scobj::keysight_N8740A::halt {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "halt tc_root=${tc_root} sct=[sct] driving=[sct driving]" + ### TODO hset [sct] [hval [sct]] +# halt hook code goes here + sct driving 0 + return "idle" + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to check the write parameter on a device +proc ::scobj::keysight_N8740A::noResponse {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "noResponse tc_root=${tc_root} sct=[sct] resp=[sct result]" +# noResponse hook code goes here + return "idle" + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to parse the read of a parameter on a device +proc ::scobj::keysight_N8740A::rdValue {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "rdValue tc_root=${tc_root} sct=[sct] result=[sct result]" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set data [sct result] + set nextState "idle" + if {[string equal -nocase -length 7 ${data} "ASCERR:"]} { + # the protocol driver has reported an error + sct geterror "${data}" + error "[sct geterror]" + } +# rdValue hook code goes here + if { ${data} != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:${data}, from old:[sct oldval]" + sct oldval ${data} + sct update ${data} + sct utime readtime + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to request the read of a parameter on a device +proc ::scobj::keysight_N8740A::read_setpoint {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "read_setpoint tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set cmd "${cmd_str}" +# read_setpoint hook code starts + if { [hpropexists [sct] target] } { + set target [sct target] + if { [hval ${tc_root}/working_setpoint] != ${target} } { + set elapsed_time [expr {[sct utime] - [sct ramp_start_time]}] + debug_log ${tc_root} 1 "read_setpoint elapsed_time = ${elapsed_time}" + if {[hpropexists [sct] ramp_rate_value] && [sct ramp_rate_value] > 0.0} { + set ramped_value [expr {[sct ramp_rate_value] * ${elapsed_time}}] + debug_log ${tc_root} 1 "read_setpoint ramped_value = ${ramped_value}" + if { ${target} > [hval ${tc_root}/working_setpoint] } { + set working_setpoint [expr {[sct ramp_start_value] + ${ramped_value}}] + debug_log ${tc_root} 1 "read_setpoint working_setpoint+ = ${working_setpoint}" + if { ${working_setpoint} > ${target} } { + set working_setpoint ${target} + } + } else { + set working_setpoint [expr {[sct ramp_start_value] - ${ramped_value}}] + debug_log ${tc_root} 1 "read_setpoint working_setpoint- = ${working_setpoint}" + if { ${working_setpoint} < ${target} } { + set working_setpoint ${target} + } + } + } else { + set working_setpoint ${target} + debug_log ${tc_root} 1 "read_setpoint working_setpoint = ${working_setpoint}" + } + if {![hpropexists [sct] ramp_rate_value] || [sct ramp_rate_value] != [hval ${tc_root}/ramp_rate]} { + sct ramp_start_time [sct utime] + sct ramp_start_value [hval ${tc_root}/working_setpoint] + sct ramp_rate_value [hval ${tc_root}/ramp_rate] + } + set cmd "SOURCE:VOLTAGE ${working_setpoint}@@NOREPLY@@" + sct result [hval ${tc_root}/working_setpoint] + } + } else { + # cmd is fine + } +# read_setpoint hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + debug_log ${tc_root} 1 "read_setpoint sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to write a parameter value on a device +proc ::scobj::keysight_N8740A::setValue {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "setValue tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set par [sct target] + set cmd "${cmd_str}${par}" +# setValue hook code starts + set cmd "${cmd_str}${par}@@NOREPLY@@" +# setValue hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + if { [hpropexists [sct] driving] } { + if { [hpropexists [sct] writestatus] && [sct writestatus] == "start" } { + sct driving 1 + } + } + debug_log ${tc_root} 1 "setValue sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to write a parameter value on a device +proc ::scobj::keysight_N8740A::write_direct {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "write_direct tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set par [sct target] + set cmd "${cmd_str}${par}" +# write_direct hook code starts + set cmd "@@NOSEND@@" + sct result "" + if { [sct target] != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:[sct target], from old:[sct oldval]" + sct oldval [sct target] + sct update [sct target] + sct utime readtime + } +# write_direct hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + if { [hpropexists [sct] driving] } { + if { [hpropexists [sct] writestatus] && [sct writestatus] == "start" } { + sct driving 1 + } + } + debug_log ${tc_root} 1 "write_direct sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +# function to write a parameter value on a device +proc ::scobj::keysight_N8740A::write_setpoint {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "write_setpoint tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set par [sct target] + set cmd "${cmd_str}${par}" +# write_setpoint hook code starts + set cmd "@@NOSEND@@" + sct result "" + sct ramp_start_time [sct utime] + sct ramp_start_value [hval ${tc_root}/working_setpoint] + sct ramp_rate_value [hval ${tc_root}/ramp_rate] + if { [sct target] != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:[sct target], from old:[sct oldval]" + sct oldval [sct target] + sct update [sct target] + sct utime readtime + } +# write_setpoint hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + if { [hpropexists [sct] driving] } { + if { [hpropexists [sct] writestatus] && [sct writestatus] == "start" } { + sct driving 1 + } + } + debug_log ${tc_root} 1 "write_setpoint sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +proc ::scobj::keysight_N8740A::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port } { + ::scobj::keysight_N8740A::sics_log 9 "::scobj::keysight_N8740A::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}" + set ns "[namespace current]" + set catch_status [ catch { + + MakeSICSObj ${name} SCT_OBJECT + + sicslist setatt ${name} driver keysight_N8740A + sicslist setatt ${name} klass ${device_class} + sicslist setatt ${name} long_name ${name} + + set scobj_hpath /sics/${name} + + hfactory ${scobj_hpath}/amps plain user float + hsetprop ${scobj_hpath}/amps read ${ns}::getValue ${scobj_hpath} rdValue {MEASURE:SCALAR:CURRENT:DC?} + hsetprop ${scobj_hpath}/amps rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/amps control true + hsetprop ${scobj_hpath}/amps data true + hsetprop ${scobj_hpath}/amps mutable true + hsetprop ${scobj_hpath}/amps nxsave true + hsetprop ${scobj_hpath}/amps units A + hsetprop ${scobj_hpath}/amps oldval 0.0 + hsetprop ${scobj_hpath}/amps klass "parameter" + hsetprop ${scobj_hpath}/amps sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/amps type "part" + hsetprop ${scobj_hpath}/amps nxalias "${name}_amps" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/amps 1 + hsetprop ${scobj_hpath}/amps simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/amps simulated true + } + + hfactory ${scobj_hpath}/output_enable plain user int + hsetprop ${scobj_hpath}/output_enable read ${ns}::getValue ${scobj_hpath} rdValue {OUTPUT:STATE?} + hsetprop ${scobj_hpath}/output_enable rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/output_enable write ${ns}::setValue ${scobj_hpath} noResponse {OUTPUT:STATE } + hsetprop ${scobj_hpath}/output_enable noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/output_enable check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/output_enable control true + hsetprop ${scobj_hpath}/output_enable data true + hsetprop ${scobj_hpath}/output_enable mutable true + hsetprop ${scobj_hpath}/output_enable nxsave true + hsetprop ${scobj_hpath}/output_enable values 0,1 + hsetprop ${scobj_hpath}/output_enable oldval 0 + hsetprop ${scobj_hpath}/output_enable klass "parameter" + hsetprop ${scobj_hpath}/output_enable sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/output_enable type "part" + hsetprop ${scobj_hpath}/output_enable nxalias "${name}_output_enable" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/output_enable 2 + ${sct_controller} write ${scobj_hpath}/output_enable + hsetprop ${scobj_hpath}/output_enable simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/output_enable simulated true + } + + hfactory ${scobj_hpath}/ramp_rate plain user float + hsetprop ${scobj_hpath}/ramp_rate write ${ns}::write_direct ${scobj_hpath} noResponse {} + hsetprop ${scobj_hpath}/ramp_rate noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/ramp_rate check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/ramp_rate control true + hsetprop ${scobj_hpath}/ramp_rate data true + hsetprop ${scobj_hpath}/ramp_rate mutable true + hsetprop ${scobj_hpath}/ramp_rate nxsave true + hsetprop ${scobj_hpath}/ramp_rate lowerlimit 0 + hsetprop ${scobj_hpath}/ramp_rate upperlimit 15 + hsetprop ${scobj_hpath}/ramp_rate units V/S + hsetprop ${scobj_hpath}/ramp_rate oldval 1.0 + hset ${scobj_hpath}/ramp_rate 1.0 + hsetprop ${scobj_hpath}/ramp_rate klass "parameter" + hsetprop ${scobj_hpath}/ramp_rate sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/ramp_rate type "part" + hsetprop ${scobj_hpath}/ramp_rate nxalias "${name}_ramp_rate" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} write ${scobj_hpath}/ramp_rate + hsetprop ${scobj_hpath}/ramp_rate simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/ramp_rate simulated true + } + + hfactory ${scobj_hpath}/setpoint plain user float + hsetprop ${scobj_hpath}/setpoint read ${ns}::read_setpoint ${scobj_hpath} rdValue {SOURCE:VOLTAGE?} + hsetprop ${scobj_hpath}/setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint write ${ns}::write_setpoint ${scobj_hpath} noResponse {SOURCE:VOLTAGE } + hsetprop ${scobj_hpath}/setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint driving 0 + hsetprop ${scobj_hpath}/setpoint checklimits ${ns}::checklimits ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint halt ${ns}::halt ${scobj_hpath} + hsetprop ${scobj_hpath}/setpoint driveable working_setpoint + hsetprop ${scobj_hpath}/setpoint control true + hsetprop ${scobj_hpath}/setpoint data true + hsetprop ${scobj_hpath}/setpoint mutable true + hsetprop ${scobj_hpath}/setpoint nxsave true + hsetprop ${scobj_hpath}/setpoint lowerlimit 0 + hsetprop ${scobj_hpath}/setpoint upperlimit 150 + hsetprop ${scobj_hpath}/setpoint tolerance 1 + hsetprop ${scobj_hpath}/setpoint units V + hsetprop ${scobj_hpath}/setpoint oldval 0.0 + hsetprop ${scobj_hpath}/setpoint klass "parameter" + hsetprop ${scobj_hpath}/setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/setpoint settle_time "5" + hsetprop ${scobj_hpath}/setpoint type "drivable" + hsetprop ${scobj_hpath}/setpoint nxalias "${name}_setpoint" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/setpoint 1 + ${sct_controller} write ${scobj_hpath}/setpoint + hsetprop ${scobj_hpath}/setpoint simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/setpoint simulated true + } + + hfactory ${scobj_hpath}/volts plain user float + hsetprop ${scobj_hpath}/volts read ${ns}::getValue ${scobj_hpath} rdValue {MEASURE:SCALAR:VOLTAGE:DC?} + hsetprop ${scobj_hpath}/volts rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/volts control true + hsetprop ${scobj_hpath}/volts data true + hsetprop ${scobj_hpath}/volts mutable true + hsetprop ${scobj_hpath}/volts nxsave true + hsetprop ${scobj_hpath}/volts units V + hsetprop ${scobj_hpath}/volts oldval 0.0 + hsetprop ${scobj_hpath}/volts klass "parameter" + hsetprop ${scobj_hpath}/volts sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/volts type "part" + hsetprop ${scobj_hpath}/volts nxalias "${name}_volts" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/volts 1 + hsetprop ${scobj_hpath}/volts simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/volts simulated true + } + + hfactory ${scobj_hpath}/working_setpoint plain user float + hsetprop ${scobj_hpath}/working_setpoint read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:VOLTAGE?} + hsetprop ${scobj_hpath}/working_setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/working_setpoint write ${ns}::write_direct ${scobj_hpath} noResponse {} + hsetprop ${scobj_hpath}/working_setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/working_setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/working_setpoint control true + hsetprop ${scobj_hpath}/working_setpoint data true + hsetprop ${scobj_hpath}/working_setpoint mutable true + hsetprop ${scobj_hpath}/working_setpoint nxsave true + hsetprop ${scobj_hpath}/working_setpoint units V + hsetprop ${scobj_hpath}/working_setpoint oldval 0.0 + hsetprop ${scobj_hpath}/working_setpoint klass "parameter" + hsetprop ${scobj_hpath}/working_setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/working_setpoint type "part" + hsetprop ${scobj_hpath}/working_setpoint nxalias "${name}_working_setpoint" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/working_setpoint 1 + ${sct_controller} write ${scobj_hpath}/working_setpoint + hsetprop ${scobj_hpath}/working_setpoint simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/working_setpoint simulated true + } + + hsetprop ${scobj_hpath} data "true" + hsetprop ${scobj_hpath} klass "@none" + hsetprop ${scobj_hpath} type "part" + ansto_makesctdrive ${name}_setpoint ${scobj_hpath}/setpoint ${scobj_hpath}/working_setpoint ${sct_controller} + + hfactory ${scobj_hpath}/current plain spy none + + hfactory ${scobj_hpath}/current/prot_enable plain user int + hsetprop ${scobj_hpath}/current/prot_enable read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:CURRENT:PROTECTION:STATE?} + hsetprop ${scobj_hpath}/current/prot_enable rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_enable write ${ns}::setValue ${scobj_hpath} noResponse {SOURCE:CURRENT:PROTECTION:STATE } + hsetprop ${scobj_hpath}/current/prot_enable noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_enable check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_enable control true + hsetprop ${scobj_hpath}/current/prot_enable data true + hsetprop ${scobj_hpath}/current/prot_enable mutable true + hsetprop ${scobj_hpath}/current/prot_enable nxsave true + hsetprop ${scobj_hpath}/current/prot_enable values 0,1 + hsetprop ${scobj_hpath}/current/prot_enable oldval 0 + hsetprop ${scobj_hpath}/current/prot_enable klass "parameter" + hsetprop ${scobj_hpath}/current/prot_enable sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/current/prot_enable type "part" + hsetprop ${scobj_hpath}/current/prot_enable nxalias "${name}_current_prot_enable" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/current/prot_enable 1 + ${sct_controller} write ${scobj_hpath}/current/prot_enable + hsetprop ${scobj_hpath}/current/prot_enable simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/current/prot_enable simulated true + } + + hfactory ${scobj_hpath}/current/prot_limit plain user float + hsetprop ${scobj_hpath}/current/prot_limit read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:CURRENT?} + hsetprop ${scobj_hpath}/current/prot_limit rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_limit write ${ns}::setValue ${scobj_hpath} noResponse {SOURCE:CURRENT } + hsetprop ${scobj_hpath}/current/prot_limit noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_limit check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/current/prot_limit control true + hsetprop ${scobj_hpath}/current/prot_limit data true + hsetprop ${scobj_hpath}/current/prot_limit mutable true + hsetprop ${scobj_hpath}/current/prot_limit nxsave true + hsetprop ${scobj_hpath}/current/prot_limit lowerlimit 0 + hsetprop ${scobj_hpath}/current/prot_limit upperlimit 22 + hsetprop ${scobj_hpath}/current/prot_limit units A + hsetprop ${scobj_hpath}/current/prot_limit oldval 0.0 + hsetprop ${scobj_hpath}/current/prot_limit klass "parameter" + hsetprop ${scobj_hpath}/current/prot_limit sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/current/prot_limit type "part" + hsetprop ${scobj_hpath}/current/prot_limit nxalias "${name}_current_prot_limit" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/current/prot_limit 1 + ${sct_controller} write ${scobj_hpath}/current/prot_limit + hsetprop ${scobj_hpath}/current/prot_limit simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/current/prot_limit simulated true + } + hsetprop ${scobj_hpath}/current data "true" + hsetprop ${scobj_hpath}/current klass "@none" + hsetprop ${scobj_hpath}/current type "part" + + hfactory ${scobj_hpath}/system plain spy none + + hfactory ${scobj_hpath}/system/error plain user text + hsetprop ${scobj_hpath}/system/error read ${ns}::getValue ${scobj_hpath} rdValue {SYSTEM:ERROR?} + hsetprop ${scobj_hpath}/system/error rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/system/error control false + hsetprop ${scobj_hpath}/system/error data false + hsetprop ${scobj_hpath}/system/error mutable false + hsetprop ${scobj_hpath}/system/error nxsave false + hsetprop ${scobj_hpath}/system/error oldval UNKNOWN + hsetprop ${scobj_hpath}/system/error sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/system/error type "part" + hsetprop ${scobj_hpath}/system/error nxalias "${name}_system_error" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/system/error 1 + hsetprop ${scobj_hpath}/system/error simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/system/error simulated true + } + + hfactory ${scobj_hpath}/system/ident plain user text + hsetprop ${scobj_hpath}/system/ident read ${ns}::getValue ${scobj_hpath} rdValue {*IDN?} + hsetprop ${scobj_hpath}/system/ident rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/system/ident control false + hsetprop ${scobj_hpath}/system/ident data false + hsetprop ${scobj_hpath}/system/ident mutable false + hsetprop ${scobj_hpath}/system/ident nxsave false + hsetprop ${scobj_hpath}/system/ident oldval UNKNOWN + hsetprop ${scobj_hpath}/system/ident sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/system/ident type "part" + hsetprop ${scobj_hpath}/system/ident nxalias "${name}_system_ident" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/system/ident 15 + hsetprop ${scobj_hpath}/system/ident simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/system/ident simulated true + } + + hfactory ${scobj_hpath}/system/version plain user text + hsetprop ${scobj_hpath}/system/version read ${ns}::getValue ${scobj_hpath} rdValue {SYSTEM:VERSION?} + hsetprop ${scobj_hpath}/system/version rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/system/version control false + hsetprop ${scobj_hpath}/system/version data false + hsetprop ${scobj_hpath}/system/version mutable false + hsetprop ${scobj_hpath}/system/version nxsave false + hsetprop ${scobj_hpath}/system/version oldval UNKNOWN + hsetprop ${scobj_hpath}/system/version sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/system/version type "part" + hsetprop ${scobj_hpath}/system/version nxalias "${name}_system_version" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/system/version 15 + hsetprop ${scobj_hpath}/system/version simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/system/version simulated true + } + hsetprop ${scobj_hpath}/system data "false" + hsetprop ${scobj_hpath}/system klass "@none" + hsetprop ${scobj_hpath}/system type "part" + + hfactory ${scobj_hpath}/voltage plain spy none + + hfactory ${scobj_hpath}/voltage/hilimit plain user float + hsetprop ${scobj_hpath}/voltage/hilimit read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:VOLTAGE:PROTECTION?} + hsetprop ${scobj_hpath}/voltage/hilimit rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/hilimit write ${ns}::setValue ${scobj_hpath} noResponse {SOURCE:VOLTAGE:PROTECTION } + hsetprop ${scobj_hpath}/voltage/hilimit noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/hilimit check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/hilimit control true + hsetprop ${scobj_hpath}/voltage/hilimit data true + hsetprop ${scobj_hpath}/voltage/hilimit mutable true + hsetprop ${scobj_hpath}/voltage/hilimit nxsave true + hsetprop ${scobj_hpath}/voltage/hilimit lowerlimit 0 + hsetprop ${scobj_hpath}/voltage/hilimit upperlimit 165 + hsetprop ${scobj_hpath}/voltage/hilimit units V + hsetprop ${scobj_hpath}/voltage/hilimit oldval 0.0 + hsetprop ${scobj_hpath}/voltage/hilimit klass "parameter" + hsetprop ${scobj_hpath}/voltage/hilimit sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/voltage/hilimit type "part" + hsetprop ${scobj_hpath}/voltage/hilimit nxalias "${name}_voltage_hilimit" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/voltage/hilimit 1 + ${sct_controller} write ${scobj_hpath}/voltage/hilimit + hsetprop ${scobj_hpath}/voltage/hilimit simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/voltage/hilimit simulated true + } + + hfactory ${scobj_hpath}/voltage/lolimit plain user float + hsetprop ${scobj_hpath}/voltage/lolimit read ${ns}::getValue ${scobj_hpath} rdValue {SOURCE:VOLTAGE:LIMIT:LOW?} + hsetprop ${scobj_hpath}/voltage/lolimit rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/lolimit write ${ns}::setValue ${scobj_hpath} noResponse {SOURCE:VOLTAGE:LIMIT:LOW } + hsetprop ${scobj_hpath}/voltage/lolimit noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/lolimit check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/voltage/lolimit control true + hsetprop ${scobj_hpath}/voltage/lolimit data true + hsetprop ${scobj_hpath}/voltage/lolimit mutable true + hsetprop ${scobj_hpath}/voltage/lolimit nxsave true + hsetprop ${scobj_hpath}/voltage/lolimit units V + hsetprop ${scobj_hpath}/voltage/lolimit oldval 0.0 + hsetprop ${scobj_hpath}/voltage/lolimit klass "parameter" + hsetprop ${scobj_hpath}/voltage/lolimit sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/voltage/lolimit type "part" + hsetprop ${scobj_hpath}/voltage/lolimit nxalias "${name}_voltage_lolimit" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/voltage/lolimit 1 + ${sct_controller} write ${scobj_hpath}/voltage/lolimit + hsetprop ${scobj_hpath}/voltage/lolimit simulated false + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for keysight_N8740A" + hsetprop ${scobj_hpath}/voltage/lolimit simulated true + } + hsetprop ${scobj_hpath}/voltage data "true" + hsetprop ${scobj_hpath}/voltage klass "@none" + hsetprop ${scobj_hpath}/voltage type "part" + hsetprop ${scobj_hpath} driver keysight_N8740A + hsetprop ${scobj_hpath} klass ${device_class} + hsetprop ${scobj_hpath} data true + hsetprop ${scobj_hpath} debug_threshold 5 +# mkDriver hook code goes here + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +proc ::scobj::keysight_N8740A::add_driver {name device_class simulation_flag ip_address tcp_port} { + set catch_status [ catch { + ::scobj::keysight_N8740A::sics_log 9 "::scobj::keysight_N8740A::add_driver ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}" + if {[string equal -nocase "${simulation_flag}" "false"]} { + if {[string equal -nocase "aqadapter" "${ip_address}"]} { + ::scobj::keysight_N8740A::sics_log 9 "makesctcontroller sct_${name} aqadapter ${tcp_port}" + makesctcontroller sct_${name} aqadapter ${tcp_port} + } else { + ::scobj::keysight_N8740A::sics_log 9 "makesctcontroller sct_${name} std ${ip_address}:${tcp_port}" + makesctcontroller sct_${name} std ${ip_address}:${tcp_port} + } + } else { + ::scobj::keysight_N8740A::sics_log 9 "simulation_flag=${simulation_flag} => Null sctcontroller for keysight_N8740A" + ::scobj::keysight_N8740A::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL" + makesctcontroller sct_${name} aqadapter NULL + } + ::scobj::keysight_N8740A::sics_log 1 "::scobj::keysight_N8740A::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port}" + ::scobj::keysight_N8740A::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +namespace eval ::scobj::keysight_N8740A { + namespace export debug_threshold + namespace export debug_log + namespace export sics_log + namespace export mkDriver + namespace export add_driver +} + +proc add_keysight_N8740A {name ip_address tcp_port} { + set simulation_flag "[string tolower [SplitReply [environment_simulation]]]" + ::scobj::keysight_N8740A::add_driver ${name} "instrument" ${simulation_flag} ${ip_address} ${tcp_port} +} + +clientput "file evaluation of sct_keysight_N8740A.tcl" +::scobj::keysight_N8740A::sics_log 9 "file evaluation of sct_keysight_N8740A.tcl" + +proc ::scobj::keysight_N8740A::read_config {} { + set catch_status [ catch { + set ns "::scobj::keysight_N8740A" + dict for {k u} $::config_dict { + if { [dict exists $u "implementation"] } { + set simulation_flag "[string tolower [SplitReply [environment_simulation]]]" + set device_class "instrument" + if { !([dict exists $u "name"] && [dict exists $u "enabled"]) } { + continue + } + set enabled [string tolower [dict get $u "enabled"]] + if { ! ([string equal -nocase $enabled "true" ] || [string equal -nocase $enabled "always"]) } { + continue + } + if { [dict exists $u "simulation_group"] } { + set simulation_flag [SplitReply [[string tolower [dict get $u "simulation_group"]]]] + } + if { [dict exists $u "device_class"] } { + set device_class "[dict get $u "device_class"]" + } + set name [dict get $u name] + set implementation [dict get $u "implementation"] + if { !([dict exists $::config_dict $implementation]) } { + continue + } + set v [dict get $::config_dict $implementation] + if { !([dict exists $v "driver"]) } { + continue + } + if { [string equal -nocase [dict get $v "driver"] "keysight_N8740A"] } { + if { ![string equal -nocase "${simulation_flag}" "false"] } { + set asyncqueue "null" + ${ns}::sics_log 9 "simulation_flag=${simulation_flag} => using null asyncqueue" + ${ns}::sics_log 9 "makesctcontroller sct_${name} aqadapter NULL" + makesctcontroller sct_${name} aqadapter NULL + } elseif { [dict exists $v "asyncqueue"] } { + set asyncqueue [dict get $v "asyncqueue"] + if { [string equal -nocase ${asyncqueue} "sct"] } { + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] + makesctcontroller sct_${name} std ${ip_address}:${tcp_port} + } else { + makesctcontroller sct_${name} aqadapter ${asyncqueue} + } + } else { + if { [dict exists $v "asyncprotocol"] } { + set asyncprotocol [dict get $v "asyncprotocol"] + } else { + set asyncprotocol ${name}_protocol + MakeAsyncProtocol ${asyncprotocol} + if { [dict exists $v "sendterminator"] } { + ${asyncprotocol} sendterminator "[dict get $v "sendterminator"]" + } elseif { [dict exists $v "terminator"] } { + ${asyncprotocol} sendterminator "[dict get $v "terminator"]" + } + if { [dict exists $v "replyterminator"] } { + ${asyncprotocol} replyterminator "[dict get $v "replyterminator"]" + } elseif { [dict exists $v "terminator"] } { + ${asyncprotocol} replyterminator "[dict get $v "terminator"]" + } + } + set asyncqueue ${name}_queue + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] + MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${ip_address} ${tcp_port} + if { [dict exists $v "timeout"] } { + ${asyncqueue} timeout "[dict get $v "timeout"]" + } + makesctcontroller sct_${name} aqadapter ${asyncqueue} + } + ${ns}::mkDriver sct_${name} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} + } + } + } + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + +if { [info exists ::config_dict] } { + ::scobj::keysight_N8740A::read_config +} else { + ::scobj::keysight_N8740A::sics_log 5 "No config dict" +} diff --git a/site_ansto/instrument/config/environment/sct_mvp_valve.tcl b/site_ansto/instrument/config/environment/sct_mvp_valve.tcl index 7fd5c536..13a70180 100644 --- a/site_ansto/instrument/config/environment/sct_mvp_valve.tcl +++ b/site_ansto/instrument/config/environment/sct_mvp_valve.tcl @@ -99,6 +99,8 @@ proc ::scobj::mvp_valve::read_config {} { } if { [string equal -nocase [dict get $v "driver"] "mvp_valve"] } { ::scobj::mvp_valve::sics_log 9 "No sctcontroller for mvp_valve" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] set arg_list [list] set missing_list [list] foreach arg {id datype} { diff --git a/site_ansto/instrument/config/environment/temperature/eurotherm_3200_sct.tcl b/site_ansto/instrument/config/environment/temperature/eurotherm_3200_sct.tcl index 95b5307f..1d41cda6 100644 --- a/site_ansto/instrument/config/environment/temperature/eurotherm_3200_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/eurotherm_3200_sct.tcl @@ -239,6 +239,7 @@ proc ::scobj::eurotherm_3200::mkDriver { sct_controller name device_class simula MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver eurotherm_3200 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -564,6 +565,7 @@ proc ::scobj::eurotherm_3200::mkDriver { sct_controller name device_class simula hsetprop ${scobj_hpath}/util data "false" hsetprop ${scobj_hpath}/util klass "@none" hsetprop ${scobj_hpath}/util type "part" + hsetprop ${scobj_hpath} driver eurotherm_3200 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/eurotherm_m2000_sct.tcl b/site_ansto/instrument/config/environment/temperature/eurotherm_m2000_sct.tcl index a27edbb1..603d41c0 100644 --- a/site_ansto/instrument/config/environment/temperature/eurotherm_m2000_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/eurotherm_m2000_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::eurotherm_m2000::mkDriver { sct_controller name device_class simul MakeSICSObj ${name} SCT_OBJECT user float + sicslist setatt ${name} driver eurotherm_m2000 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver eurotherm_m2000 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/julabo_lh45_gen_sct.tcl b/site_ansto/instrument/config/environment/temperature/julabo_lh45_gen_sct.tcl index 9dc4143a..02067ea7 100644 --- a/site_ansto/instrument/config/environment/temperature/julabo_lh45_gen_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/julabo_lh45_gen_sct.tcl @@ -379,6 +379,7 @@ proc ::scobj::julabo_lh45_gen::mkDriver { sct_controller name device_class simul MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver julabo_lh45_gen sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -674,6 +675,7 @@ proc ::scobj::julabo_lh45_gen::mkDriver { sct_controller name device_class simul hsetprop ${scobj_hpath}/sensor data "true" hsetprop ${scobj_hpath}/sensor klass "@none" hsetprop ${scobj_hpath}/sensor type "part" + hsetprop ${scobj_hpath} driver julabo_lh45_gen hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/lakeshore_218_sct.tcl b/site_ansto/instrument/config/environment/temperature/lakeshore_218_sct.tcl index 0ae69644..523ee43b 100644 --- a/site_ansto/instrument/config/environment/temperature/lakeshore_218_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/lakeshore_218_sct.tcl @@ -200,6 +200,7 @@ proc ::scobj::lakeshore_218::mkDriver { sct_controller name device_class simulat MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver lakeshore_218 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -419,6 +420,7 @@ proc ::scobj::lakeshore_218::mkDriver { sct_controller name device_class simulat hsetprop ${scobj_hpath}/sensor data "true" hsetprop ${scobj_hpath}/sensor klass "@none" hsetprop ${scobj_hpath}/sensor type "part" + hsetprop ${scobj_hpath} driver lakeshore_218 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/lakeshore_m370_sct.tcl b/site_ansto/instrument/config/environment/temperature/lakeshore_m370_sct.tcl index af987be4..31851dc1 100644 --- a/site_ansto/instrument/config/environment/temperature/lakeshore_m370_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/lakeshore_m370_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::lakeshore_m370::mkDriver { sct_controller name device_class simula MakeSICSObj ${name} SCT_OBJECT user none + sicslist setatt ${name} driver lakeshore_m370 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver lakeshore_m370 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/ls336_sct.tcl b/site_ansto/instrument/config/environment/temperature/ls336_sct.tcl index 27eb90cd..5e3b482d 100644 --- a/site_ansto/instrument/config/environment/temperature/ls336_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/ls336_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::ls336::mkDriver { sct_controller name device_class simulation_flag MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver ls336 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver ls336 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/ls340_sct.tcl b/site_ansto/instrument/config/environment/temperature/ls340_sct.tcl index e7e47a03..3d29d23b 100644 --- a/site_ansto/instrument/config/environment/temperature/ls340_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/ls340_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::ls340::mkDriver { sct_controller name device_class simulation_flag MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver ls340 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver ls340 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/mercury_base_sct.tcl b/site_ansto/instrument/config/environment/temperature/mercury_base_sct.tcl index ca19f8fd..b7ca63c4 100644 --- a/site_ansto/instrument/config/environment/temperature/mercury_base_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/mercury_base_sct.tcl @@ -281,6 +281,7 @@ proc ::scobj::mercury_base::mkDriver { sct_controller name device_class simulati MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver mercury_base sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -606,6 +607,7 @@ proc ::scobj::mercury_base::mkDriver { sct_controller name device_class simulati hsetprop ${scobj_hpath}/Loop3 klass "@none" hsetprop ${scobj_hpath}/Loop3 type "part" ansto_makesctdrive ${name}_Loop3_setpoint ${scobj_hpath}/Loop3/setpoint ${scobj_hpath}/Loop3/sensor ${sct_controller} + hsetprop ${scobj_hpath} driver mercury_base hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/mercury_level_sct.tcl b/site_ansto/instrument/config/environment/temperature/mercury_level_sct.tcl index bcbbaeff..57fe6dc8 100644 --- a/site_ansto/instrument/config/environment/temperature/mercury_level_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/mercury_level_sct.tcl @@ -147,6 +147,7 @@ proc ::scobj::mercury_level::mkDriver { sct_controller name device_class simulat MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver mercury_level sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -202,6 +203,7 @@ proc ::scobj::mercury_level::mkDriver { sct_controller name device_class simulat hsetprop ${scobj_hpath}/Level data "true" hsetprop ${scobj_hpath}/Level klass "@none" hsetprop ${scobj_hpath}/Level type "part" + hsetprop ${scobj_hpath} driver mercury_level hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/mercury_pres_sct.tcl b/site_ansto/instrument/config/environment/temperature/mercury_pres_sct.tcl index cdd900e7..c31e8026 100644 --- a/site_ansto/instrument/config/environment/temperature/mercury_pres_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/mercury_pres_sct.tcl @@ -287,6 +287,7 @@ proc ::scobj::mercury_pres::mkDriver { sct_controller name device_class simulati MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver mercury_pres sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -379,6 +380,7 @@ proc ::scobj::mercury_pres::mkDriver { sct_controller name device_class simulati hsetprop ${scobj_hpath}/Loop8 klass "@none" hsetprop ${scobj_hpath}/Loop8 type "part" ansto_makesctdrive ${name}_Loop8_setpoint ${scobj_hpath}/Loop8/setpoint ${scobj_hpath}/Loop8/sensor ${sct_controller} + hsetprop ${scobj_hpath} driver mercury_pres hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/mercury_scpi_sct.tcl b/site_ansto/instrument/config/environment/temperature/mercury_scpi_sct.tcl index 1aeeff94..d3c735a2 100644 --- a/site_ansto/instrument/config/environment/temperature/mercury_scpi_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/mercury_scpi_sct.tcl @@ -315,6 +315,7 @@ proc ::scobj::mercury_scpi::mkDriver { sct_controller name device_class simulati MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver mercury_scpi sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -860,6 +861,7 @@ proc ::scobj::mercury_scpi::mkDriver { sct_controller name device_class simulati hsetprop ${scobj_hpath}/Valve klass "@none" hsetprop ${scobj_hpath}/Valve type "part" ansto_makesctdrive ${name}_Valve_setpoint ${scobj_hpath}/Valve/setpoint ${scobj_hpath}/Valve/sensor ${sct_controller} + hsetprop ${scobj_hpath} driver mercury_scpi hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/mercury_temp_sct.tcl b/site_ansto/instrument/config/environment/temperature/mercury_temp_sct.tcl index aac830f8..a6b417b2 100644 --- a/site_ansto/instrument/config/environment/temperature/mercury_temp_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/mercury_temp_sct.tcl @@ -281,6 +281,7 @@ proc ::scobj::mercury_temp::mkDriver { sct_controller name device_class simulati MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver mercury_temp sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -392,6 +393,7 @@ proc ::scobj::mercury_temp::mkDriver { sct_controller name device_class simulati hsetprop ${scobj_hpath}/Loop4 klass "@none" hsetprop ${scobj_hpath}/Loop4 type "part" ansto_makesctdrive ${name}_Loop4_setpoint ${scobj_hpath}/Loop4/setpoint ${scobj_hpath}/Loop4/sensor ${sct_controller} + hsetprop ${scobj_hpath} driver mercury_temp hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/mercury_valve_sct.tcl b/site_ansto/instrument/config/environment/temperature/mercury_valve_sct.tcl index a520a67e..4fa59408 100644 --- a/site_ansto/instrument/config/environment/temperature/mercury_valve_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/mercury_valve_sct.tcl @@ -259,6 +259,7 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name device_class simulat MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver mercury_valve sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -325,6 +326,7 @@ proc ::scobj::mercury_valve::mkDriver { sct_controller name device_class simulat hsetprop ${scobj_hpath}/Valve klass "@none" hsetprop ${scobj_hpath}/Valve type "part" ansto_makesctdrive ${name}_Valve_setpoint ${scobj_hpath}/Valve/setpoint ${scobj_hpath}/Valve/sensor ${sct_controller} + hsetprop ${scobj_hpath} driver mercury_valve hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/nprvasm2_sct.tcl b/site_ansto/instrument/config/environment/temperature/nprvasm2_sct.tcl index d5dfcce1..a41c0cab 100644 --- a/site_ansto/instrument/config/environment/temperature/nprvasm2_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/nprvasm2_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::nprvasm2::mkDriver { sct_controller name device_class simulation_f MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver nprvasm2 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver nprvasm2 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/oxford_mercury.sct b/site_ansto/instrument/config/environment/temperature/oxford_mercury.sct index 5fed0357..4cf81754 100644 --- a/site_ansto/instrument/config/environment/temperature/oxford_mercury.sct +++ b/site_ansto/instrument/config/environment/temperature/oxford_mercury.sct @@ -19,96 +19,151 @@ driver oxford_mercury = { group_property 'cards' = '${cards}'; group_property 'assoc' = '${assoc}'; - group Temp0 = { + group temp0 = { # Always the motherboard, always there priv = user; type = float; readable = 5; var sensor = { readable = 1; read_command = 'READ:DEV:MB1.T1:TEMP:SIG:TEMP'; permlink = 'T.S00'; } var nick = { type=text; readable = 15; read_command = 'READ:DEV:MB1.T1:TEMP:NICK'; read_function = rdText; } - var power = { read_command = 'READ:DEV:MB0.H1:HTR:SIG:POWR'; } + var auto = { + type = int; allowed = '0,1'; + read_function = rdOnOff; read_command = 'READ:DEV:MB1.T1:TEMP:LOOP:ENAB'; + writeable = 1; write_function = wrOnOff; write_command = 'SET:DEV:MB1.T1:TEMP:LOOP:ENAB:'; + } var setpoint = { read_command = 'READ:DEV:MB1.T1:TEMP:LOOP:TSET'; - driveable = Temp0/sensor; lowerlimit = 0; upperlimit = 333; tolerance = '${ttol}'; property settle_time = 15; + driveable = temp0/sensor; lowerlimit = 0; upperlimit = 333; tolerance = '${ttol}'; property settle_time = 15; writeable = 1; write_function = setPoint; write_command = 'SET:DEV:MB1.T1:TEMP:LOOP:TSET:'; permlink = 'T.SP00'; } + group heater = { + var power = { read_command = 'READ:DEV:MB0.H1:HTR:SIG:POWR'; } + var perc = { read_command = 'READ:DEV:MB0.H1:HTR:SIG:PERC'; } + var hset = { + read_command = 'READ:DEV:MB1.T1:TEMP:LOOP:HSET'; + lowerlimit = 0; upperlimit = 100; + writeable = 1; write_command = 'SET:DEV:MB1.T1:TEMP:LOOP:HSET:'; + } + } } %exec exec_output = [] for i in range(8): exec_output += [""] - exec_output += [" group Temp%d = {" % (i+1)] + exec_output += [" group temp%d = {" % (i+1)] exec_output += [" conditional = '[string equal -nocase [string index ${cards} %d] T]';" % i] exec_output += [" priv = user; type = float; readable = 5;"] exec_output += [" var sensor = { readable = 1; read_command = 'READ:DEV:DB%d.T1:TEMP:SIG:TEMP'; permlink = 'T.S%02d'; }" % (i+1,i+1)] exec_output += [" var nick = { type=text; readable = 15; read_command = 'READ:DEV:DB%d.T1:TEMP:NICK'; read_function = rdText; }" % (i+1)] if i > 4: - exec_output += [" var power = {"] + exec_output += [" var auto = {"] exec_output += [" conditional = '[string equal -nocase [string index ${cards} %d] H] && [string equal -nocase [string index ${assoc} %d] %d]';" % (i-5, i, i-4)] - exec_output += [" read_command = 'READ:DEV:DB%d.H1:HTR:SIG:POWR';" % (i - 4)] + exec_output += [" type = int; allowed = '0,1'; read_command = 'READ:DEV:DB%d.T1:TEMP:LOOP:ENAB';" % (i + 1)] + exec_output += [" read_function = rdOnOff; read_command = 'READ:DEV:DB%d.T1:TEMP:LOOP:ENAB';" % (i + 1)] + exec_output += [" writeable = 1; write_function = wrOnOff; write_command = 'SET:DEV:DB%d.T1:TEMP:LOOP:ENAB:';" % (i + 1)] exec_output += [" }"] exec_output += [" var setpoint = {"] exec_output += [" conditional = '[string equal -nocase [string index ${cards} %d] H] && [string equal -nocase [string index ${assoc} %d] %d]';" % (i-5, i, i-4)] exec_output += [" read_command = 'READ:DEV:DB%d.T1:TEMP:LOOP:TSET';" % (i + 1)] - exec_output += [" driveable = Temp%d/sensor; lowerlimit = 0; upperlimit = 333; tolerance = '${ttol}'; property settle_time = 15;" % (i + 1)] + exec_output += [" driveable = temp%d/sensor; lowerlimit = 0; upperlimit = 333; tolerance = '${ttol}'; property settle_time = 15;" % (i + 1)] exec_output += [" writeable = 1; write_function = setPoint; write_command = 'SET:DEV:DB%d.T1:TEMP:LOOP:TSET:';" % (i + 1)] exec_output += [" permlink = 'T.SP%02d';" % (i + 1)] exec_output += [" }"] + exec_output += [" group heater = {"] + exec_output += [" conditional = '[string equal -nocase [string index ${cards} %d] H] && [string equal -nocase [string index ${assoc} %d] %d]';" % (i-5, i, i-4)] + exec_output += [" var power = { read_command = 'READ:DEV:DB%d.H1:HTR:SIG:POWR'; }" % (i - 4)] + exec_output += [" var perc = { read_command = 'READ:DEV:DB%d.H1:HTR:SIG:PERC'; }" % (i - 4)] + exec_output += [" var hset = {"] + exec_output += [" read_command = 'READ:DEV:DB%d.T1:TEMP:LOOP:HSET';" % (i + 1)] + exec_output += [" lowerlimit = 0; upperlimit = 100;"] + exec_output += [" writeable = 1; write_command = 'SET:DEV:DB%d.T1:TEMP:LOOP:HSET:';" % (i + 1)] + exec_output += [" }"] + exec_output += [" }"] exec_output += [" }"] %end - group Pres5 = { + group pres5 = { conditional = '[string equal -nocase [string index ${cards} 4] P]'; priv = user; type = float; readable = 5; var sensor = { readable = 1; read_command = 'READ:DEV:DB5.P1:PRES:SIG:PRES'; permlink = 'P.PS05'; units = "mB"; } 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 enab = { + conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]'; + type = int; allowed = '0,1'; + read_function = rdOnOff; read_command = 'READ:DEV:DB5.P1:PRES:LOOP:ENAB'; + writeable = 1; write_function = wrOnOff; write_command = 'SET:DEV:DB5.P1:PRES:LOOP:ENAB:'; + } + var auto = { + conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]'; + type = int; allowed = '0,1'; + read_function = rdOnOff; read_command = 'READ:DEV:DB5.P1:PRES:LOOP:FAUT'; + writeable = 1; write_function = wrOnOff; write_command = 'SET:DEV:DB5.P1:PRES:LOOP:FAUT:'; } var setpoint = { conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]'; read_command = 'READ:DEV:DB5.P1:PRES:LOOP:TSET'; - driveable = Pres5/sensor; lowerlimit = 0; upperlimit = 333; tolerance = '${ptol}'; property settle_time = 15; + driveable = pres5/sensor; lowerlimit = 0; upperlimit = 333; tolerance = '${ptol}'; property settle_time = 15; writeable = 1; write_function = setPoint; write_command = 'SET:DEV:DB8.P1:PRES:LOOP:TSET:'; permlink = 'P.PSP05'; units = "mB"; } + var fset = { + read_command = 'READ:DEV:DB5.P1:PRES:LOOP:FSET'; + lowerlimit = 0; upperlimit = 100; + writeable = 1; write_command = 'SET:DEV:DB5.P1:PRES:LOOP:FSET:'; + } } - group Pres8 = { + group pres8 = { conditional = '[string equal -nocase [string index ${cards} 7] P]'; priv = user; type = float; readable = 5; var sensor = { readable = 1; read_command = 'READ:DEV:DB8.P1:PRES:SIG:PRES'; permlink = 'P.PS08'; units = "mB"; } 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 enab = { + conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]'; + type = int; allowed = '0,1'; + read_function = rdOnOff; read_command = 'READ:DEV:DB8.P1:PRES:LOOP:ENAB'; + writeable = 1; write_function = wrOnOff; write_command = 'SET:DEV:DB8.P1:PRES:LOOP:ENAB:'; + } + var auto = { + conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]'; + type = int; allowed = '0,1'; + read_function = rdOnOff; read_command = 'READ:DEV:DB8.P1:PRES:LOOP:FAUT'; + writeable = 1; write_function = wrOnOff; write_command = 'SET:DEV:DB8.P1:PRES:LOOP:FAUT:'; } var setpoint = { conditional = '[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]'; read_command = 'READ:DEV:DB8.P1:PRES:LOOP:TSET'; - driveable = Pres8/sensor; lowerlimit = 0; upperlimit = 333; tolerance = '${ptol}'; property settle_time = 15; + driveable = pres8/sensor; lowerlimit = 0; upperlimit = 333; tolerance = '${ptol}'; property settle_time = 15; writeable = 1; write_function = setPoint; write_command = 'SET:DEV:DB8.P1:PRES:LOOP:TSET:'; permlink = 'P.PSP08'; units = "mB"; } + var fset = { + read_command = 'READ:DEV:DB8.P1:PRES:LOOP:FSET'; + lowerlimit = 0; upperlimit = 100; + writeable = 1; write_command = 'SET:DEV:DB8.P1:PRES:LOOP:FSET:'; + } } - group Valve = { + group valve = { 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 = { - driveable = Valve/sensor; lowerlimit = 0; upperlimit = 100; tolerance = '${vtol}'; property settle_time = 30; - writeable = 1; write_function = setValve; write_command = 'SET:DEV:DB4.G1:AUX:SIG:OPEN:'; - } } - group Level = { + group level = { conditional = '[string equal -nocase [string index ${cards} 4] L]'; priv = user; type = float; readable = 15; - var Nitrogen = { read_command = 'READ:DEV:DB5.L1:LVL:SIG:NIT:LEV'; permlink = 'T.N2'; } - var Helium = { read_command = 'READ:DEV:DB5.L1:LVL:SIG:HEL:LEV'; permlink = 'T.He'; } + var nitrogen = { read_command = 'READ:DEV:DB5.L1:LVL:SIG:NIT:LEV'; permlink = 'T.N2'; } + var helium = { read_command = 'READ:DEV:DB5.L1:LVL:SIG:HEL:LEV'; permlink = 'T.He'; } var nick = { type=text; readable = 15; read_command = 'READ:DEV:DB5.L1:LVL:NICK'; read_function = rdText; } } @@ -116,18 +171,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 } @@ -136,10 +190,31 @@ for i in range(8): @ scan [lindex [split "$data" ":"] end] "%s" data } - code Write_function setPoint = { + code write_function setPoint = { } - code Write_function setValve = { + code write_function setValve = { + } + + code read_function rdOnOff = { + @TCL + scan [lindex [split "$data" ":"] end] "%s" data + if {[string equal -nocase ${data} "ON"]} { + set data 1 + } else { + set data 0 + } + @END + } + + code write_function wrOnOff = { + @TCL + if { ${par} == 1 } { + set cmd "${cmd_str}ON" + } else { + set cmd "${cmd_str}OFF" + } + @END } code preamble = { @@ -147,7 +222,7 @@ for i in range(8): proc make_config {sct_controller} { set syscat [${sct_controller} transact READ:SYS:CAT] set result "" - set devs [regexp -inline -all {DEV:D[[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] + set devs [regexp -inline -all {DEV:[DM][[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] foreach dev [lsort ${devs}] { set typ [string index [lindex [split ${dev} :] end] 0] set typ [string map {A V} ${typ}] @@ -157,6 +232,34 @@ for i in range(8): clientput "Result: ${result}" return ${result} } + proc read_all {sct_controller} { + set syscat [${sct_controller} transact READ:SYS:CAT] + set devs [regexp -inline -all {DEV:[DM][[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] + foreach dev [lsort ${devs}] { + set response [${sct_controller} transact READ:${dev}] + clientput "Device: ${response}" + } + } + proc read_loop {sct_controller} { + set pat {\m[A-Z]{1,}:[^:]{1,}} + set syscat [${sct_controller} transact READ:SYS:CAT] + set devs [regexp -inline -all {DEV:[DM][[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] + foreach dev [lsort ${devs}] { + set response [${sct_controller} transact READ:${dev}:LOOP] + clientput "Device: ${response}" + clientput " Loop: [regexp -inline -all $pat [string trim ${response}]]" + } + } + proc read_sig {sct_controller} { + set pat {\m[A-Z]{1,}:[^:]{1,}} + set syscat [${sct_controller} transact READ:SYS:CAT] + set devs [regexp -inline -all {DEV:[DM][[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] + foreach dev [lsort ${devs}] { + set response [${sct_controller} transact READ:${dev}:SIG] + clientput "Device: ${response}" + clientput " Sig: [regexp -inline -all $pat [string trim ${response}]]" + } + } @END } } diff --git a/site_ansto/instrument/config/environment/temperature/oxford_mercury_sct.tcl b/site_ansto/instrument/config/environment/temperature/oxford_mercury_sct.tcl index b0a2408a..cd828a19 100644 --- a/site_ansto/instrument/config/environment/temperature/oxford_mercury_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/oxford_mercury_sct.tcl @@ -8,7 +8,7 @@ namespace eval ::scobj::oxford_mercury { proc make_config {sct_controller} { set syscat [${sct_controller} transact READ:SYS:CAT] set result "" - set devs [regexp -inline -all {DEV:D[[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] + set devs [regexp -inline -all {DEV:[DM][[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] foreach dev [lsort ${devs}] { set typ [string index [lindex [split ${dev} :] end] 0] set typ [string map {A V} ${typ}] @@ -18,6 +18,34 @@ namespace eval ::scobj::oxford_mercury { clientput "Result: ${result}" return ${result} } + proc read_all {sct_controller} { + set syscat [${sct_controller} transact READ:SYS:CAT] + set devs [regexp -inline -all {DEV:[DM][[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] + foreach dev [lsort ${devs}] { + set response [${sct_controller} transact READ:${dev}] + clientput "Device: ${response}" + } + } + proc read_loop {sct_controller} { + set pat {\m[A-Z]{1,}:[^:]{1,}} + set syscat [${sct_controller} transact READ:SYS:CAT] + set devs [regexp -inline -all {DEV:[DM][[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] + foreach dev [lsort ${devs}] { + set response [${sct_controller} transact READ:${dev}:LOOP] + clientput "Device: ${response}" + clientput " Loop: [regexp -inline -all $pat [string trim ${response}]]" + } + } + proc read_sig {sct_controller} { + set pat {\m[A-Z]{1,}:[^:]{1,}} + set syscat [${sct_controller} transact READ:SYS:CAT] + set devs [regexp -inline -all {DEV:[DM][[:alnum:]\.]*:[[:alnum:]]*} ${syscat}] + foreach dev [lsort ${devs}] { + set response [${sct_controller} transact READ:${dev}:SIG] + clientput "Device: ${response}" + clientput " Sig: [regexp -inline -all $pat [string trim ${response}]]" + } + } # preamble hook code ends } @@ -177,6 +205,43 @@ proc ::scobj::oxford_mercury::noResponse {tc_root} { handle_exception ${catch_status} ${catch_message} } +# function to parse the read of a parameter on a device +proc ::scobj::oxford_mercury::rdOnOff {tc_root} { + set catch_status [ catch { + debug_log ${tc_root} 1 "rdOnOff tc_root=${tc_root} sct=[sct] result=[sct result]" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set data [sct result] + set nextState "idle" + if {[string equal -nocase -length 7 ${data} "ASCERR:"]} { + # the protocol driver has reported an error + sct geterror "${data}" + error "[sct geterror]" + } +# rdOnOff hook code starts + scan [lindex [split "$data" ":"] end] "%s" data + if {[string equal -nocase ${data} "ON"]} { + set data 1 + } else { + set data 0 + } +# rdOnOff hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + if { ${data} != [sct oldval] } { + debug_log ${tc_root} 1 "[sct] changed to new:${data}, from old:[sct oldval]" + sct oldval ${data} + sct update ${data} + sct utime readtime + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + # function to parse the read of a parameter on a device proc ::scobj::oxford_mercury::rdText {tc_root} { set catch_status [ catch { @@ -225,18 +290,17 @@ proc ::scobj::oxford_mercury::rdValue {tc_root} { } # rdValue hook code starts 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 # rdValue hook code ends if { [hpropexists [sct] geterror] } { @@ -326,6 +390,40 @@ proc ::scobj::oxford_mercury::setValve {tc_root nextState cmd_str} { handle_exception ${catch_status} ${catch_message} } +# function to write a parameter value on a device +proc ::scobj::oxford_mercury::wrOnOff {tc_root nextState cmd_str} { + set catch_status [ catch { + debug_log ${tc_root} 1 "wrOnOff tc_root=${tc_root} sct=[sct] cmd=${cmd_str}" + if { [hpropexists [sct] geterror] } { + hdelprop [sct] geterror + } + set par [sct target] + set cmd "${cmd_str}${par}" +# wrOnOff hook code starts + if { ${par} == 1 } { + set cmd "${cmd_str}ON" + } else { + set cmd "${cmd_str}OFF" + } +# wrOnOff hook code ends + if { [hpropexists [sct] geterror] } { + debug_log ${tc_root} 9 "[sct] error: [sct geterror]" + error "[sct geterror]" + } + if { [hpropexists [sct] driving] } { + if { [hpropexists [sct] writestatus] && [sct writestatus] == "start" } { + sct driving 1 + } + } + debug_log ${tc_root} 1 "wrOnOff sct send ${cmd}" + if {![string equal -nocase -length 10 ${cmd} "@@NOSEND@@"]} { + sct send "${cmd}" + } + return ${nextState} + } catch_message ] + handle_exception ${catch_status} ${catch_message} +} + proc ::scobj::oxford_mercury::mkDriver { sct_controller name device_class simulation_flag ip_address tcp_port id {cards NNNNNNNN} {assoc 00000000} {ttol 1} {ptol 5} {vtol 5} } { ::scobj::oxford_mercury::sics_log 9 "::scobj::oxford_mercury::mkDriver ${sct_controller} ${name} ${device_class} ${simulation_flag} ${ip_address} ${tcp_port} ${id} ${cards} ${assoc} ${ttol} ${ptol} ${vtol}" set ns "[namespace current]" @@ -333,6 +431,7 @@ proc ::scobj::oxford_mercury::mkDriver { sct_controller name device_class simula MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver oxford_mercury sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -345,1100 +444,1557 @@ proc ::scobj::oxford_mercury::mkDriver { sct_controller name device_class simula hsetprop ${scobj_hpath} type "part" if {[string equal -nocase [string index ${cards} 4] L]} { - hfactory ${scobj_hpath}/Level plain spy none + hfactory ${scobj_hpath}/level plain spy none - hfactory ${scobj_hpath}/Level/Helium plain user float - hsetprop ${scobj_hpath}/Level/Helium read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.L1:LVL:SIG:HEL:LEV} - hsetprop ${scobj_hpath}/Level/Helium rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Level/Helium control true - hsetprop ${scobj_hpath}/Level/Helium data true - hsetprop ${scobj_hpath}/Level/Helium mutable true - hsetprop ${scobj_hpath}/Level/Helium nxsave true - hsetprop ${scobj_hpath}/Level/Helium permlink data_set "T[format "%02d" ${id}]He" - hsetprop ${scobj_hpath}/Level/Helium @description "T[format "%02d" ${id}]He" - hsetprop ${scobj_hpath}/Level/Helium oldval 0.0 - hsetprop ${scobj_hpath}/Level/Helium klass "parameter" - hsetprop ${scobj_hpath}/Level/Helium sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Level/Helium type "part" - hsetprop ${scobj_hpath}/Level/Helium nxalias "${name}_Level_Helium" + hfactory ${scobj_hpath}/level/helium plain user float + hsetprop ${scobj_hpath}/level/helium read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.L1:LVL:SIG:HEL:LEV} + hsetprop ${scobj_hpath}/level/helium rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/level/helium control true + hsetprop ${scobj_hpath}/level/helium data true + hsetprop ${scobj_hpath}/level/helium mutable true + hsetprop ${scobj_hpath}/level/helium nxsave true + hsetprop ${scobj_hpath}/level/helium permlink data_set "T[format "%02d" ${id}]He" + hsetprop ${scobj_hpath}/level/helium @description "T[format "%02d" ${id}]He" + hsetprop ${scobj_hpath}/level/helium oldval 0.0 + hsetprop ${scobj_hpath}/level/helium klass "parameter" + hsetprop ${scobj_hpath}/level/helium sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/level/helium type "part" + hsetprop ${scobj_hpath}/level/helium nxalias "${name}_level_helium" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Level/Helium 15 - hsetprop ${scobj_hpath}/Level/Helium simulated false + ${sct_controller} poll ${scobj_hpath}/level/helium 15 + hsetprop ${scobj_hpath}/level/helium simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Level/Helium simulated true + hsetprop ${scobj_hpath}/level/helium simulated true } - hfactory ${scobj_hpath}/Level/Nitrogen plain user float - hsetprop ${scobj_hpath}/Level/Nitrogen read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.L1:LVL:SIG:NIT:LEV} - hsetprop ${scobj_hpath}/Level/Nitrogen rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Level/Nitrogen control true - hsetprop ${scobj_hpath}/Level/Nitrogen data true - hsetprop ${scobj_hpath}/Level/Nitrogen mutable true - hsetprop ${scobj_hpath}/Level/Nitrogen nxsave true - hsetprop ${scobj_hpath}/Level/Nitrogen permlink data_set "T[format "%02d" ${id}]N2" - hsetprop ${scobj_hpath}/Level/Nitrogen @description "T[format "%02d" ${id}]N2" - hsetprop ${scobj_hpath}/Level/Nitrogen oldval 0.0 - hsetprop ${scobj_hpath}/Level/Nitrogen klass "parameter" - hsetprop ${scobj_hpath}/Level/Nitrogen sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Level/Nitrogen type "part" - hsetprop ${scobj_hpath}/Level/Nitrogen nxalias "${name}_Level_Nitrogen" + hfactory ${scobj_hpath}/level/nick plain user text + hsetprop ${scobj_hpath}/level/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB5.L1:LVL:NICK} + hsetprop ${scobj_hpath}/level/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/level/nick control true + hsetprop ${scobj_hpath}/level/nick data true + hsetprop ${scobj_hpath}/level/nick mutable true + hsetprop ${scobj_hpath}/level/nick nxsave true + hsetprop ${scobj_hpath}/level/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/level/nick klass "parameter" + hsetprop ${scobj_hpath}/level/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/level/nick type "part" + hsetprop ${scobj_hpath}/level/nick nxalias "${name}_level_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Level/Nitrogen 15 - hsetprop ${scobj_hpath}/Level/Nitrogen simulated false + ${sct_controller} poll ${scobj_hpath}/level/nick 15 + hsetprop ${scobj_hpath}/level/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Level/Nitrogen simulated true + hsetprop ${scobj_hpath}/level/nick simulated true } - hfactory ${scobj_hpath}/Level/nick plain user text - hsetprop ${scobj_hpath}/Level/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB5.L1:LVL:NICK} - hsetprop ${scobj_hpath}/Level/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Level/nick control true - hsetprop ${scobj_hpath}/Level/nick data true - hsetprop ${scobj_hpath}/Level/nick mutable true - hsetprop ${scobj_hpath}/Level/nick nxsave true - hsetprop ${scobj_hpath}/Level/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Level/nick klass "parameter" - hsetprop ${scobj_hpath}/Level/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Level/nick type "part" - hsetprop ${scobj_hpath}/Level/nick nxalias "${name}_Level_nick" + hfactory ${scobj_hpath}/level/nitrogen plain user float + hsetprop ${scobj_hpath}/level/nitrogen read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.L1:LVL:SIG:NIT:LEV} + hsetprop ${scobj_hpath}/level/nitrogen rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/level/nitrogen control true + hsetprop ${scobj_hpath}/level/nitrogen data true + hsetprop ${scobj_hpath}/level/nitrogen mutable true + hsetprop ${scobj_hpath}/level/nitrogen nxsave true + hsetprop ${scobj_hpath}/level/nitrogen permlink data_set "T[format "%02d" ${id}]N2" + hsetprop ${scobj_hpath}/level/nitrogen @description "T[format "%02d" ${id}]N2" + hsetprop ${scobj_hpath}/level/nitrogen oldval 0.0 + hsetprop ${scobj_hpath}/level/nitrogen klass "parameter" + hsetprop ${scobj_hpath}/level/nitrogen sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/level/nitrogen type "part" + hsetprop ${scobj_hpath}/level/nitrogen nxalias "${name}_level_nitrogen" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Level/nick 15 - hsetprop ${scobj_hpath}/Level/nick simulated false + ${sct_controller} poll ${scobj_hpath}/level/nitrogen 15 + hsetprop ${scobj_hpath}/level/nitrogen simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Level/nick simulated true + hsetprop ${scobj_hpath}/level/nitrogen simulated true } - hsetprop ${scobj_hpath}/Level data "true" - hsetprop ${scobj_hpath}/Level klass "@none" - hsetprop ${scobj_hpath}/Level type "part" + hsetprop ${scobj_hpath}/level data "true" + hsetprop ${scobj_hpath}/level klass "@none" + hsetprop ${scobj_hpath}/level type "part" } if {[string equal -nocase [string index ${cards} 4] P]} { - hfactory ${scobj_hpath}/Pres5 plain spy none - - hfactory ${scobj_hpath}/Pres5/nick plain user text - hsetprop ${scobj_hpath}/Pres5/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB5.P1:PRES:NICK} - hsetprop ${scobj_hpath}/Pres5/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/nick control true - hsetprop ${scobj_hpath}/Pres5/nick data true - hsetprop ${scobj_hpath}/Pres5/nick mutable true - hsetprop ${scobj_hpath}/Pres5/nick nxsave true - hsetprop ${scobj_hpath}/Pres5/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Pres5/nick klass "parameter" - hsetprop ${scobj_hpath}/Pres5/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Pres5/nick type "part" - hsetprop ${scobj_hpath}/Pres5/nick nxalias "${name}_Pres5_nick" - - if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Pres5/nick 15 - hsetprop ${scobj_hpath}/Pres5/nick simulated false - } else { - ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Pres5/nick simulated true - } - - hfactory ${scobj_hpath}/Pres5/sensor plain user float - hsetprop ${scobj_hpath}/Pres5/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.P1:PRES:SIG:PRES} - hsetprop ${scobj_hpath}/Pres5/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/sensor control true - hsetprop ${scobj_hpath}/Pres5/sensor data true - hsetprop ${scobj_hpath}/Pres5/sensor mutable true - hsetprop ${scobj_hpath}/Pres5/sensor nxsave true - hsetprop ${scobj_hpath}/Pres5/sensor units mB - hsetprop ${scobj_hpath}/Pres5/sensor permlink data_set "P[format "%02d" ${id}]PS05" - hsetprop ${scobj_hpath}/Pres5/sensor @description "P[format "%02d" ${id}]PS05" - hsetprop ${scobj_hpath}/Pres5/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Pres5/sensor klass "parameter" - hsetprop ${scobj_hpath}/Pres5/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Pres5/sensor type "part" - hsetprop ${scobj_hpath}/Pres5/sensor nxalias "${name}_Pres5_sensor" - - if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Pres5/sensor 1 - hsetprop ${scobj_hpath}/Pres5/sensor simulated false - } else { - ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Pres5/sensor simulated true - } + hfactory ${scobj_hpath}/pres5 plain spy none if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]} { - hfactory ${scobj_hpath}/Pres5/setpoint plain user float - hsetprop ${scobj_hpath}/Pres5/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.P1:PRES:LOOP:TSET} - hsetprop ${scobj_hpath}/Pres5/setpoint rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB8.P1:PRES:LOOP:TSET:} - hsetprop ${scobj_hpath}/Pres5/setpoint noResponse ${ns}::noResponse ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/setpoint check ${ns}::checkrange ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/setpoint driving 0 - hsetprop ${scobj_hpath}/Pres5/setpoint checklimits ${ns}::checklimits ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/setpoint halt ${ns}::halt ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/setpoint driveable Pres5/sensor - hsetprop ${scobj_hpath}/Pres5/setpoint control true - hsetprop ${scobj_hpath}/Pres5/setpoint data true - hsetprop ${scobj_hpath}/Pres5/setpoint mutable true - hsetprop ${scobj_hpath}/Pres5/setpoint nxsave true - hsetprop ${scobj_hpath}/Pres5/setpoint lowerlimit 0 - hsetprop ${scobj_hpath}/Pres5/setpoint upperlimit 333 - hsetprop ${scobj_hpath}/Pres5/setpoint tolerance ${ptol} - hsetprop ${scobj_hpath}/Pres5/setpoint units mB - hsetprop ${scobj_hpath}/Pres5/setpoint permlink data_set "P[format "%02d" ${id}]PSP05" - hsetprop ${scobj_hpath}/Pres5/setpoint @description "P[format "%02d" ${id}]PSP05" - hsetprop ${scobj_hpath}/Pres5/setpoint oldval 0.0 - hsetprop ${scobj_hpath}/Pres5/setpoint klass "parameter" - hsetprop ${scobj_hpath}/Pres5/setpoint sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Pres5/setpoint settle_time "15" - hsetprop ${scobj_hpath}/Pres5/setpoint type "drivable" - hsetprop ${scobj_hpath}/Pres5/setpoint nxalias "${name}_Pres5_setpoint" + hfactory ${scobj_hpath}/pres5/auto plain user int + hsetprop ${scobj_hpath}/pres5/auto read ${ns}::getValue ${scobj_hpath} rdOnOff {READ:DEV:DB5.P1:PRES:LOOP:FAUT} + hsetprop ${scobj_hpath}/pres5/auto rdOnOff ${ns}::rdOnOff ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/auto write ${ns}::wrOnOff ${scobj_hpath} noResponse {SET:DEV:DB5.P1:PRES:LOOP:FAUT:} + hsetprop ${scobj_hpath}/pres5/auto noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/auto check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/auto control true + hsetprop ${scobj_hpath}/pres5/auto data true + hsetprop ${scobj_hpath}/pres5/auto mutable true + hsetprop ${scobj_hpath}/pres5/auto nxsave true + hsetprop ${scobj_hpath}/pres5/auto values 0,1 + hsetprop ${scobj_hpath}/pres5/auto oldval 0 + hsetprop ${scobj_hpath}/pres5/auto klass "parameter" + hsetprop ${scobj_hpath}/pres5/auto sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres5/auto type "part" + hsetprop ${scobj_hpath}/pres5/auto nxalias "${name}_pres5_auto" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Pres5/setpoint 5 - ${sct_controller} write ${scobj_hpath}/Pres5/setpoint - hsetprop ${scobj_hpath}/Pres5/setpoint simulated false + ${sct_controller} poll ${scobj_hpath}/pres5/auto 5 + ${sct_controller} write ${scobj_hpath}/pres5/auto + hsetprop ${scobj_hpath}/pres5/auto simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Pres5/setpoint simulated true + hsetprop ${scobj_hpath}/pres5/auto simulated true } } if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]} { - hfactory ${scobj_hpath}/Pres5/valve plain user float - hsetprop ${scobj_hpath}/Pres5/valve read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.G1:AUX:SIG:OPEN} - hsetprop ${scobj_hpath}/Pres5/valve rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres5/valve control true - hsetprop ${scobj_hpath}/Pres5/valve data true - hsetprop ${scobj_hpath}/Pres5/valve mutable true - hsetprop ${scobj_hpath}/Pres5/valve nxsave true - hsetprop ${scobj_hpath}/Pres5/valve oldval 0.0 - hsetprop ${scobj_hpath}/Pres5/valve klass "parameter" - hsetprop ${scobj_hpath}/Pres5/valve sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Pres5/valve type "part" - hsetprop ${scobj_hpath}/Pres5/valve nxalias "${name}_Pres5_valve" + hfactory ${scobj_hpath}/pres5/enab plain user int + hsetprop ${scobj_hpath}/pres5/enab read ${ns}::getValue ${scobj_hpath} rdOnOff {READ:DEV:DB5.P1:PRES:LOOP:ENAB} + hsetprop ${scobj_hpath}/pres5/enab rdOnOff ${ns}::rdOnOff ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/enab write ${ns}::wrOnOff ${scobj_hpath} noResponse {SET:DEV:DB5.P1:PRES:LOOP:ENAB:} + hsetprop ${scobj_hpath}/pres5/enab noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/enab check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/enab control true + hsetprop ${scobj_hpath}/pres5/enab data true + hsetprop ${scobj_hpath}/pres5/enab mutable true + hsetprop ${scobj_hpath}/pres5/enab nxsave true + hsetprop ${scobj_hpath}/pres5/enab values 0,1 + hsetprop ${scobj_hpath}/pres5/enab oldval 0 + hsetprop ${scobj_hpath}/pres5/enab klass "parameter" + hsetprop ${scobj_hpath}/pres5/enab sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres5/enab type "part" + hsetprop ${scobj_hpath}/pres5/enab nxalias "${name}_pres5_enab" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Pres5/valve 5 - hsetprop ${scobj_hpath}/Pres5/valve simulated false + ${sct_controller} poll ${scobj_hpath}/pres5/enab 5 + ${sct_controller} write ${scobj_hpath}/pres5/enab + hsetprop ${scobj_hpath}/pres5/enab simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Pres5/valve simulated true + hsetprop ${scobj_hpath}/pres5/enab simulated true } } - hsetprop ${scobj_hpath}/Pres5 data "true" - hsetprop ${scobj_hpath}/Pres5 klass "@none" - hsetprop ${scobj_hpath}/Pres5 type "part" + + hfactory ${scobj_hpath}/pres5/fset plain user float + hsetprop ${scobj_hpath}/pres5/fset read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.P1:PRES:LOOP:FSET} + hsetprop ${scobj_hpath}/pres5/fset rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/fset write ${ns}::setValue ${scobj_hpath} noResponse {SET:DEV:DB5.P1:PRES:LOOP:FSET:} + hsetprop ${scobj_hpath}/pres5/fset noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/fset check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/fset control true + hsetprop ${scobj_hpath}/pres5/fset data true + hsetprop ${scobj_hpath}/pres5/fset mutable true + hsetprop ${scobj_hpath}/pres5/fset nxsave true + hsetprop ${scobj_hpath}/pres5/fset lowerlimit 0 + hsetprop ${scobj_hpath}/pres5/fset upperlimit 100 + hsetprop ${scobj_hpath}/pres5/fset oldval 0.0 + hsetprop ${scobj_hpath}/pres5/fset klass "parameter" + hsetprop ${scobj_hpath}/pres5/fset sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres5/fset type "part" + hsetprop ${scobj_hpath}/pres5/fset nxalias "${name}_pres5_fset" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres5/fset 5 + ${sct_controller} write ${scobj_hpath}/pres5/fset + hsetprop ${scobj_hpath}/pres5/fset simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres5/fset simulated true + } + + hfactory ${scobj_hpath}/pres5/nick plain user text + hsetprop ${scobj_hpath}/pres5/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB5.P1:PRES:NICK} + hsetprop ${scobj_hpath}/pres5/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/nick control true + hsetprop ${scobj_hpath}/pres5/nick data true + hsetprop ${scobj_hpath}/pres5/nick mutable true + hsetprop ${scobj_hpath}/pres5/nick nxsave true + hsetprop ${scobj_hpath}/pres5/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/pres5/nick klass "parameter" + hsetprop ${scobj_hpath}/pres5/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres5/nick type "part" + hsetprop ${scobj_hpath}/pres5/nick nxalias "${name}_pres5_nick" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres5/nick 15 + hsetprop ${scobj_hpath}/pres5/nick simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres5/nick simulated true + } + + hfactory ${scobj_hpath}/pres5/sensor plain user float + hsetprop ${scobj_hpath}/pres5/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.P1:PRES:SIG:PRES} + hsetprop ${scobj_hpath}/pres5/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/sensor control true + hsetprop ${scobj_hpath}/pres5/sensor data true + hsetprop ${scobj_hpath}/pres5/sensor mutable true + hsetprop ${scobj_hpath}/pres5/sensor nxsave true + hsetprop ${scobj_hpath}/pres5/sensor units mB + hsetprop ${scobj_hpath}/pres5/sensor permlink data_set "P[format "%02d" ${id}]PS05" + hsetprop ${scobj_hpath}/pres5/sensor @description "P[format "%02d" ${id}]PS05" + hsetprop ${scobj_hpath}/pres5/sensor oldval 0.0 + hsetprop ${scobj_hpath}/pres5/sensor klass "parameter" + hsetprop ${scobj_hpath}/pres5/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres5/sensor type "part" + hsetprop ${scobj_hpath}/pres5/sensor nxalias "${name}_pres5_sensor" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres5/sensor 1 + hsetprop ${scobj_hpath}/pres5/sensor simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres5/sensor simulated true + } + if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]} { - ansto_makesctdrive ${name}_Pres5_setpoint ${scobj_hpath}/Pres5/setpoint ${scobj_hpath}/Pres5/sensor ${sct_controller} + hfactory ${scobj_hpath}/pres5/setpoint plain user float + hsetprop ${scobj_hpath}/pres5/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.P1:PRES:LOOP:TSET} + hsetprop ${scobj_hpath}/pres5/setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB8.P1:PRES:LOOP:TSET:} + hsetprop ${scobj_hpath}/pres5/setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/setpoint driving 0 + hsetprop ${scobj_hpath}/pres5/setpoint checklimits ${ns}::checklimits ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/setpoint halt ${ns}::halt ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/setpoint driveable pres5/sensor + hsetprop ${scobj_hpath}/pres5/setpoint control true + hsetprop ${scobj_hpath}/pres5/setpoint data true + hsetprop ${scobj_hpath}/pres5/setpoint mutable true + hsetprop ${scobj_hpath}/pres5/setpoint nxsave true + hsetprop ${scobj_hpath}/pres5/setpoint lowerlimit 0 + hsetprop ${scobj_hpath}/pres5/setpoint upperlimit 333 + hsetprop ${scobj_hpath}/pres5/setpoint tolerance ${ptol} + hsetprop ${scobj_hpath}/pres5/setpoint units mB + hsetprop ${scobj_hpath}/pres5/setpoint permlink data_set "P[format "%02d" ${id}]PSP05" + hsetprop ${scobj_hpath}/pres5/setpoint @description "P[format "%02d" ${id}]PSP05" + hsetprop ${scobj_hpath}/pres5/setpoint oldval 0.0 + hsetprop ${scobj_hpath}/pres5/setpoint klass "parameter" + hsetprop ${scobj_hpath}/pres5/setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres5/setpoint settle_time "15" + hsetprop ${scobj_hpath}/pres5/setpoint type "drivable" + hsetprop ${scobj_hpath}/pres5/setpoint nxalias "${name}_pres5_setpoint" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres5/setpoint 5 + ${sct_controller} write ${scobj_hpath}/pres5/setpoint + hsetprop ${scobj_hpath}/pres5/setpoint simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres5/setpoint simulated true + } + } + + if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]} { + hfactory ${scobj_hpath}/pres5/valve plain user float + hsetprop ${scobj_hpath}/pres5/valve read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.G1:AUX:SIG:PERC} + hsetprop ${scobj_hpath}/pres5/valve rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/pres5/valve control true + hsetprop ${scobj_hpath}/pres5/valve data true + hsetprop ${scobj_hpath}/pres5/valve mutable true + hsetprop ${scobj_hpath}/pres5/valve nxsave true + hsetprop ${scobj_hpath}/pres5/valve oldval 0.0 + hsetprop ${scobj_hpath}/pres5/valve klass "parameter" + hsetprop ${scobj_hpath}/pres5/valve sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres5/valve type "part" + hsetprop ${scobj_hpath}/pres5/valve nxalias "${name}_pres5_valve" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres5/valve 5 + hsetprop ${scobj_hpath}/pres5/valve simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres5/valve simulated true + } + } + hsetprop ${scobj_hpath}/pres5 data "true" + hsetprop ${scobj_hpath}/pres5 klass "@none" + hsetprop ${scobj_hpath}/pres5 type "part" + if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 4] 4]} { + ansto_makesctdrive ${name}_pres5_setpoint ${scobj_hpath}/pres5/setpoint ${scobj_hpath}/pres5/sensor ${sct_controller} } } if {[string equal -nocase [string index ${cards} 7] P]} { - hfactory ${scobj_hpath}/Pres8 plain spy none - - hfactory ${scobj_hpath}/Pres8/nick plain user text - hsetprop ${scobj_hpath}/Pres8/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB8.P1:PRES:NICK} - hsetprop ${scobj_hpath}/Pres8/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/nick control true - hsetprop ${scobj_hpath}/Pres8/nick data true - hsetprop ${scobj_hpath}/Pres8/nick mutable true - hsetprop ${scobj_hpath}/Pres8/nick nxsave true - hsetprop ${scobj_hpath}/Pres8/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Pres8/nick klass "parameter" - hsetprop ${scobj_hpath}/Pres8/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Pres8/nick type "part" - hsetprop ${scobj_hpath}/Pres8/nick nxalias "${name}_Pres8_nick" - - if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Pres8/nick 15 - hsetprop ${scobj_hpath}/Pres8/nick simulated false - } else { - ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Pres8/nick simulated true - } - - hfactory ${scobj_hpath}/Pres8/sensor plain user float - hsetprop ${scobj_hpath}/Pres8/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.P1:PRES:SIG:PRES} - hsetprop ${scobj_hpath}/Pres8/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/sensor control true - hsetprop ${scobj_hpath}/Pres8/sensor data true - hsetprop ${scobj_hpath}/Pres8/sensor mutable true - hsetprop ${scobj_hpath}/Pres8/sensor nxsave true - hsetprop ${scobj_hpath}/Pres8/sensor units mB - hsetprop ${scobj_hpath}/Pres8/sensor permlink data_set "P[format "%02d" ${id}]PS08" - hsetprop ${scobj_hpath}/Pres8/sensor @description "P[format "%02d" ${id}]PS08" - hsetprop ${scobj_hpath}/Pres8/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Pres8/sensor klass "parameter" - hsetprop ${scobj_hpath}/Pres8/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Pres8/sensor type "part" - hsetprop ${scobj_hpath}/Pres8/sensor nxalias "${name}_Pres8_sensor" - - if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Pres8/sensor 1 - hsetprop ${scobj_hpath}/Pres8/sensor simulated false - } else { - ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Pres8/sensor simulated true - } + hfactory ${scobj_hpath}/pres8 plain spy none if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]} { - hfactory ${scobj_hpath}/Pres8/setpoint plain user float - hsetprop ${scobj_hpath}/Pres8/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.P1:PRES:LOOP:TSET} - hsetprop ${scobj_hpath}/Pres8/setpoint rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB8.P1:PRES:LOOP:TSET:} - hsetprop ${scobj_hpath}/Pres8/setpoint noResponse ${ns}::noResponse ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/setpoint check ${ns}::checkrange ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/setpoint driving 0 - hsetprop ${scobj_hpath}/Pres8/setpoint checklimits ${ns}::checklimits ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/setpoint halt ${ns}::halt ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/setpoint driveable Pres8/sensor - hsetprop ${scobj_hpath}/Pres8/setpoint control true - hsetprop ${scobj_hpath}/Pres8/setpoint data true - hsetprop ${scobj_hpath}/Pres8/setpoint mutable true - hsetprop ${scobj_hpath}/Pres8/setpoint nxsave true - hsetprop ${scobj_hpath}/Pres8/setpoint lowerlimit 0 - hsetprop ${scobj_hpath}/Pres8/setpoint upperlimit 333 - hsetprop ${scobj_hpath}/Pres8/setpoint tolerance ${ptol} - hsetprop ${scobj_hpath}/Pres8/setpoint units mB - hsetprop ${scobj_hpath}/Pres8/setpoint permlink data_set "P[format "%02d" ${id}]PSP08" - hsetprop ${scobj_hpath}/Pres8/setpoint @description "P[format "%02d" ${id}]PSP08" - hsetprop ${scobj_hpath}/Pres8/setpoint oldval 0.0 - hsetprop ${scobj_hpath}/Pres8/setpoint klass "parameter" - hsetprop ${scobj_hpath}/Pres8/setpoint sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Pres8/setpoint settle_time "15" - hsetprop ${scobj_hpath}/Pres8/setpoint type "drivable" - hsetprop ${scobj_hpath}/Pres8/setpoint nxalias "${name}_Pres8_setpoint" + hfactory ${scobj_hpath}/pres8/auto plain user int + hsetprop ${scobj_hpath}/pres8/auto read ${ns}::getValue ${scobj_hpath} rdOnOff {READ:DEV:DB8.P1:PRES:LOOP:FAUT} + hsetprop ${scobj_hpath}/pres8/auto rdOnOff ${ns}::rdOnOff ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/auto write ${ns}::wrOnOff ${scobj_hpath} noResponse {SET:DEV:DB8.P1:PRES:LOOP:FAUT:} + hsetprop ${scobj_hpath}/pres8/auto noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/auto check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/auto control true + hsetprop ${scobj_hpath}/pres8/auto data true + hsetprop ${scobj_hpath}/pres8/auto mutable true + hsetprop ${scobj_hpath}/pres8/auto nxsave true + hsetprop ${scobj_hpath}/pres8/auto values 0,1 + hsetprop ${scobj_hpath}/pres8/auto oldval 0 + hsetprop ${scobj_hpath}/pres8/auto klass "parameter" + hsetprop ${scobj_hpath}/pres8/auto sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres8/auto type "part" + hsetprop ${scobj_hpath}/pres8/auto nxalias "${name}_pres8_auto" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Pres8/setpoint 5 - ${sct_controller} write ${scobj_hpath}/Pres8/setpoint - hsetprop ${scobj_hpath}/Pres8/setpoint simulated false + ${sct_controller} poll ${scobj_hpath}/pres8/auto 5 + ${sct_controller} write ${scobj_hpath}/pres8/auto + hsetprop ${scobj_hpath}/pres8/auto simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Pres8/setpoint simulated true + hsetprop ${scobj_hpath}/pres8/auto simulated true } } if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]} { - hfactory ${scobj_hpath}/Pres8/valve plain user float - hsetprop ${scobj_hpath}/Pres8/valve read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.G1:AUX:SIG:OPEN} - hsetprop ${scobj_hpath}/Pres8/valve rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Pres8/valve control true - hsetprop ${scobj_hpath}/Pres8/valve data true - hsetprop ${scobj_hpath}/Pres8/valve mutable true - hsetprop ${scobj_hpath}/Pres8/valve nxsave true - hsetprop ${scobj_hpath}/Pres8/valve oldval 0.0 - hsetprop ${scobj_hpath}/Pres8/valve klass "parameter" - hsetprop ${scobj_hpath}/Pres8/valve sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Pres8/valve type "part" - hsetprop ${scobj_hpath}/Pres8/valve nxalias "${name}_Pres8_valve" + hfactory ${scobj_hpath}/pres8/enab plain user int + hsetprop ${scobj_hpath}/pres8/enab read ${ns}::getValue ${scobj_hpath} rdOnOff {READ:DEV:DB8.P1:PRES:LOOP:ENAB} + hsetprop ${scobj_hpath}/pres8/enab rdOnOff ${ns}::rdOnOff ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/enab write ${ns}::wrOnOff ${scobj_hpath} noResponse {SET:DEV:DB8.P1:PRES:LOOP:ENAB:} + hsetprop ${scobj_hpath}/pres8/enab noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/enab check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/enab control true + hsetprop ${scobj_hpath}/pres8/enab data true + hsetprop ${scobj_hpath}/pres8/enab mutable true + hsetprop ${scobj_hpath}/pres8/enab nxsave true + hsetprop ${scobj_hpath}/pres8/enab values 0,1 + hsetprop ${scobj_hpath}/pres8/enab oldval 0 + hsetprop ${scobj_hpath}/pres8/enab klass "parameter" + hsetprop ${scobj_hpath}/pres8/enab sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres8/enab type "part" + hsetprop ${scobj_hpath}/pres8/enab nxalias "${name}_pres8_enab" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Pres8/valve 5 - hsetprop ${scobj_hpath}/Pres8/valve simulated false + ${sct_controller} poll ${scobj_hpath}/pres8/enab 5 + ${sct_controller} write ${scobj_hpath}/pres8/enab + hsetprop ${scobj_hpath}/pres8/enab simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Pres8/valve simulated true + hsetprop ${scobj_hpath}/pres8/enab simulated true } } - hsetprop ${scobj_hpath}/Pres8 data "true" - hsetprop ${scobj_hpath}/Pres8 klass "@none" - hsetprop ${scobj_hpath}/Pres8 type "part" + + hfactory ${scobj_hpath}/pres8/fset plain user float + hsetprop ${scobj_hpath}/pres8/fset read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.P1:PRES:LOOP:FSET} + hsetprop ${scobj_hpath}/pres8/fset rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/fset write ${ns}::setValue ${scobj_hpath} noResponse {SET:DEV:DB8.P1:PRES:LOOP:FSET:} + hsetprop ${scobj_hpath}/pres8/fset noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/fset check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/fset control true + hsetprop ${scobj_hpath}/pres8/fset data true + hsetprop ${scobj_hpath}/pres8/fset mutable true + hsetprop ${scobj_hpath}/pres8/fset nxsave true + hsetprop ${scobj_hpath}/pres8/fset lowerlimit 0 + hsetprop ${scobj_hpath}/pres8/fset upperlimit 100 + hsetprop ${scobj_hpath}/pres8/fset oldval 0.0 + hsetprop ${scobj_hpath}/pres8/fset klass "parameter" + hsetprop ${scobj_hpath}/pres8/fset sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres8/fset type "part" + hsetprop ${scobj_hpath}/pres8/fset nxalias "${name}_pres8_fset" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres8/fset 5 + ${sct_controller} write ${scobj_hpath}/pres8/fset + hsetprop ${scobj_hpath}/pres8/fset simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres8/fset simulated true + } + + hfactory ${scobj_hpath}/pres8/nick plain user text + hsetprop ${scobj_hpath}/pres8/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB8.P1:PRES:NICK} + hsetprop ${scobj_hpath}/pres8/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/nick control true + hsetprop ${scobj_hpath}/pres8/nick data true + hsetprop ${scobj_hpath}/pres8/nick mutable true + hsetprop ${scobj_hpath}/pres8/nick nxsave true + hsetprop ${scobj_hpath}/pres8/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/pres8/nick klass "parameter" + hsetprop ${scobj_hpath}/pres8/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres8/nick type "part" + hsetprop ${scobj_hpath}/pres8/nick nxalias "${name}_pres8_nick" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres8/nick 15 + hsetprop ${scobj_hpath}/pres8/nick simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres8/nick simulated true + } + + hfactory ${scobj_hpath}/pres8/sensor plain user float + hsetprop ${scobj_hpath}/pres8/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.P1:PRES:SIG:PRES} + hsetprop ${scobj_hpath}/pres8/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/sensor control true + hsetprop ${scobj_hpath}/pres8/sensor data true + hsetprop ${scobj_hpath}/pres8/sensor mutable true + hsetprop ${scobj_hpath}/pres8/sensor nxsave true + hsetprop ${scobj_hpath}/pres8/sensor units mB + hsetprop ${scobj_hpath}/pres8/sensor permlink data_set "P[format "%02d" ${id}]PS08" + hsetprop ${scobj_hpath}/pres8/sensor @description "P[format "%02d" ${id}]PS08" + hsetprop ${scobj_hpath}/pres8/sensor oldval 0.0 + hsetprop ${scobj_hpath}/pres8/sensor klass "parameter" + hsetprop ${scobj_hpath}/pres8/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres8/sensor type "part" + hsetprop ${scobj_hpath}/pres8/sensor nxalias "${name}_pres8_sensor" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres8/sensor 1 + hsetprop ${scobj_hpath}/pres8/sensor simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres8/sensor simulated true + } + if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]} { - ansto_makesctdrive ${name}_Pres8_setpoint ${scobj_hpath}/Pres8/setpoint ${scobj_hpath}/Pres8/sensor ${sct_controller} + hfactory ${scobj_hpath}/pres8/setpoint plain user float + hsetprop ${scobj_hpath}/pres8/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.P1:PRES:LOOP:TSET} + hsetprop ${scobj_hpath}/pres8/setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB8.P1:PRES:LOOP:TSET:} + hsetprop ${scobj_hpath}/pres8/setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/setpoint driving 0 + hsetprop ${scobj_hpath}/pres8/setpoint checklimits ${ns}::checklimits ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/setpoint halt ${ns}::halt ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/setpoint driveable pres8/sensor + hsetprop ${scobj_hpath}/pres8/setpoint control true + hsetprop ${scobj_hpath}/pres8/setpoint data true + hsetprop ${scobj_hpath}/pres8/setpoint mutable true + hsetprop ${scobj_hpath}/pres8/setpoint nxsave true + hsetprop ${scobj_hpath}/pres8/setpoint lowerlimit 0 + hsetprop ${scobj_hpath}/pres8/setpoint upperlimit 333 + hsetprop ${scobj_hpath}/pres8/setpoint tolerance ${ptol} + hsetprop ${scobj_hpath}/pres8/setpoint units mB + hsetprop ${scobj_hpath}/pres8/setpoint permlink data_set "P[format "%02d" ${id}]PSP08" + hsetprop ${scobj_hpath}/pres8/setpoint @description "P[format "%02d" ${id}]PSP08" + hsetprop ${scobj_hpath}/pres8/setpoint oldval 0.0 + hsetprop ${scobj_hpath}/pres8/setpoint klass "parameter" + hsetprop ${scobj_hpath}/pres8/setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres8/setpoint settle_time "15" + hsetprop ${scobj_hpath}/pres8/setpoint type "drivable" + hsetprop ${scobj_hpath}/pres8/setpoint nxalias "${name}_pres8_setpoint" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres8/setpoint 5 + ${sct_controller} write ${scobj_hpath}/pres8/setpoint + hsetprop ${scobj_hpath}/pres8/setpoint simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres8/setpoint simulated true + } + } + + if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]} { + hfactory ${scobj_hpath}/pres8/valve plain user float + hsetprop ${scobj_hpath}/pres8/valve read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.G1:AUX:SIG:PERC} + hsetprop ${scobj_hpath}/pres8/valve rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/pres8/valve control true + hsetprop ${scobj_hpath}/pres8/valve data true + hsetprop ${scobj_hpath}/pres8/valve mutable true + hsetprop ${scobj_hpath}/pres8/valve nxsave true + hsetprop ${scobj_hpath}/pres8/valve oldval 0.0 + hsetprop ${scobj_hpath}/pres8/valve klass "parameter" + hsetprop ${scobj_hpath}/pres8/valve sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/pres8/valve type "part" + hsetprop ${scobj_hpath}/pres8/valve nxalias "${name}_pres8_valve" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/pres8/valve 5 + hsetprop ${scobj_hpath}/pres8/valve simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/pres8/valve simulated true + } + } + hsetprop ${scobj_hpath}/pres8 data "true" + hsetprop ${scobj_hpath}/pres8 klass "@none" + hsetprop ${scobj_hpath}/pres8 type "part" + if {[string equal -nocase [string index ${cards} 3] V] && [string equal -nocase [string index ${assoc} 7] 4]} { + ansto_makesctdrive ${name}_pres8_setpoint ${scobj_hpath}/pres8/setpoint ${scobj_hpath}/pres8/sensor ${sct_controller} } } - hfactory ${scobj_hpath}/Temp0 plain spy none + hfactory ${scobj_hpath}/temp0 plain spy none - hfactory ${scobj_hpath}/Temp0/nick plain user text - hsetprop ${scobj_hpath}/Temp0/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:MB1.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp0/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/nick control true - hsetprop ${scobj_hpath}/Temp0/nick data true - hsetprop ${scobj_hpath}/Temp0/nick mutable true - hsetprop ${scobj_hpath}/Temp0/nick nxsave true - hsetprop ${scobj_hpath}/Temp0/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp0/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp0/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp0/nick type "part" - hsetprop ${scobj_hpath}/Temp0/nick nxalias "${name}_Temp0_nick" + hfactory ${scobj_hpath}/temp0/auto plain user int + hsetprop ${scobj_hpath}/temp0/auto read ${ns}::getValue ${scobj_hpath} rdOnOff {READ:DEV:MB1.T1:TEMP:LOOP:ENAB} + hsetprop ${scobj_hpath}/temp0/auto rdOnOff ${ns}::rdOnOff ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/auto write ${ns}::wrOnOff ${scobj_hpath} noResponse {SET:DEV:MB1.T1:TEMP:LOOP:ENAB:} + hsetprop ${scobj_hpath}/temp0/auto noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/auto check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/auto control true + hsetprop ${scobj_hpath}/temp0/auto data true + hsetprop ${scobj_hpath}/temp0/auto mutable true + hsetprop ${scobj_hpath}/temp0/auto nxsave true + hsetprop ${scobj_hpath}/temp0/auto values 0,1 + hsetprop ${scobj_hpath}/temp0/auto oldval 0 + hsetprop ${scobj_hpath}/temp0/auto klass "parameter" + hsetprop ${scobj_hpath}/temp0/auto sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp0/auto type "part" + hsetprop ${scobj_hpath}/temp0/auto nxalias "${name}_temp0_auto" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp0/nick 15 - hsetprop ${scobj_hpath}/Temp0/nick simulated false + ${sct_controller} poll ${scobj_hpath}/temp0/auto 5 + ${sct_controller} write ${scobj_hpath}/temp0/auto + hsetprop ${scobj_hpath}/temp0/auto simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp0/nick simulated true + hsetprop ${scobj_hpath}/temp0/auto simulated true } - hfactory ${scobj_hpath}/Temp0/power plain user float - hsetprop ${scobj_hpath}/Temp0/power read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:MB0.H1:HTR:SIG:POWR} - hsetprop ${scobj_hpath}/Temp0/power rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/power control true - hsetprop ${scobj_hpath}/Temp0/power data true - hsetprop ${scobj_hpath}/Temp0/power mutable true - hsetprop ${scobj_hpath}/Temp0/power nxsave true - hsetprop ${scobj_hpath}/Temp0/power oldval 0.0 - hsetprop ${scobj_hpath}/Temp0/power klass "parameter" - hsetprop ${scobj_hpath}/Temp0/power sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp0/power type "part" - hsetprop ${scobj_hpath}/Temp0/power nxalias "${name}_Temp0_power" + hfactory ${scobj_hpath}/temp0/nick plain user text + hsetprop ${scobj_hpath}/temp0/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:MB1.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp0/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/nick control true + hsetprop ${scobj_hpath}/temp0/nick data true + hsetprop ${scobj_hpath}/temp0/nick mutable true + hsetprop ${scobj_hpath}/temp0/nick nxsave true + hsetprop ${scobj_hpath}/temp0/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp0/nick klass "parameter" + hsetprop ${scobj_hpath}/temp0/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp0/nick type "part" + hsetprop ${scobj_hpath}/temp0/nick nxalias "${name}_temp0_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp0/power 5 - hsetprop ${scobj_hpath}/Temp0/power simulated false + ${sct_controller} poll ${scobj_hpath}/temp0/nick 15 + hsetprop ${scobj_hpath}/temp0/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp0/power simulated true + hsetprop ${scobj_hpath}/temp0/nick simulated true } - hfactory ${scobj_hpath}/Temp0/sensor plain user float - hsetprop ${scobj_hpath}/Temp0/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:MB1.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp0/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/sensor control true - hsetprop ${scobj_hpath}/Temp0/sensor data true - hsetprop ${scobj_hpath}/Temp0/sensor mutable true - hsetprop ${scobj_hpath}/Temp0/sensor nxsave true - hsetprop ${scobj_hpath}/Temp0/sensor permlink data_set "T[format "%02d" ${id}]S00" - hsetprop ${scobj_hpath}/Temp0/sensor @description "T[format "%02d" ${id}]S00" - hsetprop ${scobj_hpath}/Temp0/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp0/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp0/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp0/sensor type "part" - hsetprop ${scobj_hpath}/Temp0/sensor nxalias "${name}_Temp0_sensor" + hfactory ${scobj_hpath}/temp0/sensor plain user float + hsetprop ${scobj_hpath}/temp0/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:MB1.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp0/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/sensor control true + hsetprop ${scobj_hpath}/temp0/sensor data true + hsetprop ${scobj_hpath}/temp0/sensor mutable true + hsetprop ${scobj_hpath}/temp0/sensor nxsave true + hsetprop ${scobj_hpath}/temp0/sensor permlink data_set "T[format "%02d" ${id}]S00" + hsetprop ${scobj_hpath}/temp0/sensor @description "T[format "%02d" ${id}]S00" + hsetprop ${scobj_hpath}/temp0/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp0/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp0/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp0/sensor type "part" + hsetprop ${scobj_hpath}/temp0/sensor nxalias "${name}_temp0_sensor" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp0/sensor 1 - hsetprop ${scobj_hpath}/Temp0/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp0/sensor 1 + hsetprop ${scobj_hpath}/temp0/sensor simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp0/sensor simulated true + hsetprop ${scobj_hpath}/temp0/sensor simulated true } - hfactory ${scobj_hpath}/Temp0/setpoint plain user float - hsetprop ${scobj_hpath}/Temp0/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:MB1.T1:TEMP:LOOP:TSET} - hsetprop ${scobj_hpath}/Temp0/setpoint rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:MB1.T1:TEMP:LOOP:TSET:} - hsetprop ${scobj_hpath}/Temp0/setpoint noResponse ${ns}::noResponse ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/setpoint check ${ns}::checkrange ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/setpoint driving 0 - hsetprop ${scobj_hpath}/Temp0/setpoint checklimits ${ns}::checklimits ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/setpoint halt ${ns}::halt ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp0/setpoint driveable Temp0/sensor - hsetprop ${scobj_hpath}/Temp0/setpoint control true - hsetprop ${scobj_hpath}/Temp0/setpoint data true - hsetprop ${scobj_hpath}/Temp0/setpoint mutable true - hsetprop ${scobj_hpath}/Temp0/setpoint nxsave true - hsetprop ${scobj_hpath}/Temp0/setpoint lowerlimit 0 - hsetprop ${scobj_hpath}/Temp0/setpoint upperlimit 333 - hsetprop ${scobj_hpath}/Temp0/setpoint tolerance ${ttol} - hsetprop ${scobj_hpath}/Temp0/setpoint permlink data_set "T[format "%02d" ${id}]SP00" - hsetprop ${scobj_hpath}/Temp0/setpoint @description "T[format "%02d" ${id}]SP00" - hsetprop ${scobj_hpath}/Temp0/setpoint oldval 0.0 - hsetprop ${scobj_hpath}/Temp0/setpoint klass "parameter" - hsetprop ${scobj_hpath}/Temp0/setpoint sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp0/setpoint settle_time "15" - hsetprop ${scobj_hpath}/Temp0/setpoint type "drivable" - hsetprop ${scobj_hpath}/Temp0/setpoint nxalias "${name}_Temp0_setpoint" + hfactory ${scobj_hpath}/temp0/setpoint plain user float + hsetprop ${scobj_hpath}/temp0/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:MB1.T1:TEMP:LOOP:TSET} + hsetprop ${scobj_hpath}/temp0/setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:MB1.T1:TEMP:LOOP:TSET:} + hsetprop ${scobj_hpath}/temp0/setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/setpoint driving 0 + hsetprop ${scobj_hpath}/temp0/setpoint checklimits ${ns}::checklimits ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/setpoint halt ${ns}::halt ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/setpoint driveable temp0/sensor + hsetprop ${scobj_hpath}/temp0/setpoint control true + hsetprop ${scobj_hpath}/temp0/setpoint data true + hsetprop ${scobj_hpath}/temp0/setpoint mutable true + hsetprop ${scobj_hpath}/temp0/setpoint nxsave true + hsetprop ${scobj_hpath}/temp0/setpoint lowerlimit 0 + hsetprop ${scobj_hpath}/temp0/setpoint upperlimit 333 + hsetprop ${scobj_hpath}/temp0/setpoint tolerance ${ttol} + hsetprop ${scobj_hpath}/temp0/setpoint permlink data_set "T[format "%02d" ${id}]SP00" + hsetprop ${scobj_hpath}/temp0/setpoint @description "T[format "%02d" ${id}]SP00" + hsetprop ${scobj_hpath}/temp0/setpoint oldval 0.0 + hsetprop ${scobj_hpath}/temp0/setpoint klass "parameter" + hsetprop ${scobj_hpath}/temp0/setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp0/setpoint settle_time "15" + hsetprop ${scobj_hpath}/temp0/setpoint type "drivable" + hsetprop ${scobj_hpath}/temp0/setpoint nxalias "${name}_temp0_setpoint" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp0/setpoint 5 - ${sct_controller} write ${scobj_hpath}/Temp0/setpoint - hsetprop ${scobj_hpath}/Temp0/setpoint simulated false + ${sct_controller} poll ${scobj_hpath}/temp0/setpoint 5 + ${sct_controller} write ${scobj_hpath}/temp0/setpoint + hsetprop ${scobj_hpath}/temp0/setpoint simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp0/setpoint simulated true + hsetprop ${scobj_hpath}/temp0/setpoint simulated true } - hsetprop ${scobj_hpath}/Temp0 data "true" - hsetprop ${scobj_hpath}/Temp0 klass "@none" - hsetprop ${scobj_hpath}/Temp0 type "part" - ansto_makesctdrive ${name}_Temp0_setpoint ${scobj_hpath}/Temp0/setpoint ${scobj_hpath}/Temp0/sensor ${sct_controller} + hsetprop ${scobj_hpath}/temp0 data "true" + hsetprop ${scobj_hpath}/temp0 klass "@none" + hsetprop ${scobj_hpath}/temp0 type "part" + + hfactory ${scobj_hpath}/temp0/heater plain spy none + + hfactory ${scobj_hpath}/temp0/heater/hset plain user float + hsetprop ${scobj_hpath}/temp0/heater/hset read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:MB1.T1:TEMP:LOOP:HSET} + hsetprop ${scobj_hpath}/temp0/heater/hset rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/heater/hset write ${ns}::setValue ${scobj_hpath} noResponse {SET:DEV:MB1.T1:TEMP:LOOP:HSET:} + hsetprop ${scobj_hpath}/temp0/heater/hset noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/heater/hset check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/heater/hset control true + hsetprop ${scobj_hpath}/temp0/heater/hset data true + hsetprop ${scobj_hpath}/temp0/heater/hset mutable true + hsetprop ${scobj_hpath}/temp0/heater/hset nxsave true + hsetprop ${scobj_hpath}/temp0/heater/hset lowerlimit 0 + hsetprop ${scobj_hpath}/temp0/heater/hset upperlimit 100 + hsetprop ${scobj_hpath}/temp0/heater/hset oldval 0.0 + hsetprop ${scobj_hpath}/temp0/heater/hset klass "parameter" + hsetprop ${scobj_hpath}/temp0/heater/hset sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp0/heater/hset type "part" + hsetprop ${scobj_hpath}/temp0/heater/hset nxalias "${name}_temp0_heater_hset" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp0/heater/hset 5 + ${sct_controller} write ${scobj_hpath}/temp0/heater/hset + hsetprop ${scobj_hpath}/temp0/heater/hset simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp0/heater/hset simulated true + } + + hfactory ${scobj_hpath}/temp0/heater/perc plain user float + hsetprop ${scobj_hpath}/temp0/heater/perc read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:MB0.H1:HTR:SIG:PERC} + hsetprop ${scobj_hpath}/temp0/heater/perc rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/heater/perc control true + hsetprop ${scobj_hpath}/temp0/heater/perc data true + hsetprop ${scobj_hpath}/temp0/heater/perc mutable true + hsetprop ${scobj_hpath}/temp0/heater/perc nxsave true + hsetprop ${scobj_hpath}/temp0/heater/perc oldval 0.0 + hsetprop ${scobj_hpath}/temp0/heater/perc klass "parameter" + hsetprop ${scobj_hpath}/temp0/heater/perc sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp0/heater/perc type "part" + hsetprop ${scobj_hpath}/temp0/heater/perc nxalias "${name}_temp0_heater_perc" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp0/heater/perc 5 + hsetprop ${scobj_hpath}/temp0/heater/perc simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp0/heater/perc simulated true + } + + hfactory ${scobj_hpath}/temp0/heater/power plain user float + hsetprop ${scobj_hpath}/temp0/heater/power read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:MB0.H1:HTR:SIG:POWR} + hsetprop ${scobj_hpath}/temp0/heater/power rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp0/heater/power control true + hsetprop ${scobj_hpath}/temp0/heater/power data true + hsetprop ${scobj_hpath}/temp0/heater/power mutable true + hsetprop ${scobj_hpath}/temp0/heater/power nxsave true + hsetprop ${scobj_hpath}/temp0/heater/power oldval 0.0 + hsetprop ${scobj_hpath}/temp0/heater/power klass "parameter" + hsetprop ${scobj_hpath}/temp0/heater/power sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp0/heater/power type "part" + hsetprop ${scobj_hpath}/temp0/heater/power nxalias "${name}_temp0_heater_power" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp0/heater/power 5 + hsetprop ${scobj_hpath}/temp0/heater/power simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp0/heater/power simulated true + } + hsetprop ${scobj_hpath}/temp0/heater data "true" + hsetprop ${scobj_hpath}/temp0/heater klass "@none" + hsetprop ${scobj_hpath}/temp0/heater type "part" + ansto_makesctdrive ${name}_temp0_setpoint ${scobj_hpath}/temp0/setpoint ${scobj_hpath}/temp0/sensor ${sct_controller} if {[string equal -nocase [string index ${cards} 0] T]} { - hfactory ${scobj_hpath}/Temp1 plain spy none + hfactory ${scobj_hpath}/temp1 plain spy none - hfactory ${scobj_hpath}/Temp1/nick plain user text - hsetprop ${scobj_hpath}/Temp1/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB1.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp1/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp1/nick control true - hsetprop ${scobj_hpath}/Temp1/nick data true - hsetprop ${scobj_hpath}/Temp1/nick mutable true - hsetprop ${scobj_hpath}/Temp1/nick nxsave true - hsetprop ${scobj_hpath}/Temp1/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp1/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp1/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp1/nick type "part" - hsetprop ${scobj_hpath}/Temp1/nick nxalias "${name}_Temp1_nick" + hfactory ${scobj_hpath}/temp1/nick plain user text + hsetprop ${scobj_hpath}/temp1/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB1.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp1/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp1/nick control true + hsetprop ${scobj_hpath}/temp1/nick data true + hsetprop ${scobj_hpath}/temp1/nick mutable true + hsetprop ${scobj_hpath}/temp1/nick nxsave true + hsetprop ${scobj_hpath}/temp1/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp1/nick klass "parameter" + hsetprop ${scobj_hpath}/temp1/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp1/nick type "part" + hsetprop ${scobj_hpath}/temp1/nick nxalias "${name}_temp1_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp1/nick 15 - hsetprop ${scobj_hpath}/Temp1/nick simulated false + ${sct_controller} poll ${scobj_hpath}/temp1/nick 15 + hsetprop ${scobj_hpath}/temp1/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp1/nick simulated true + hsetprop ${scobj_hpath}/temp1/nick simulated true } - hfactory ${scobj_hpath}/Temp1/sensor plain user float - hsetprop ${scobj_hpath}/Temp1/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB1.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp1/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp1/sensor control true - hsetprop ${scobj_hpath}/Temp1/sensor data true - hsetprop ${scobj_hpath}/Temp1/sensor mutable true - hsetprop ${scobj_hpath}/Temp1/sensor nxsave true - hsetprop ${scobj_hpath}/Temp1/sensor permlink data_set "T[format "%02d" ${id}]S01" - hsetprop ${scobj_hpath}/Temp1/sensor @description "T[format "%02d" ${id}]S01" - hsetprop ${scobj_hpath}/Temp1/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp1/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp1/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp1/sensor type "part" - hsetprop ${scobj_hpath}/Temp1/sensor nxalias "${name}_Temp1_sensor" + hfactory ${scobj_hpath}/temp1/sensor plain user float + hsetprop ${scobj_hpath}/temp1/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB1.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp1/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp1/sensor control true + hsetprop ${scobj_hpath}/temp1/sensor data true + hsetprop ${scobj_hpath}/temp1/sensor mutable true + hsetprop ${scobj_hpath}/temp1/sensor nxsave true + hsetprop ${scobj_hpath}/temp1/sensor permlink data_set "T[format "%02d" ${id}]S01" + hsetprop ${scobj_hpath}/temp1/sensor @description "T[format "%02d" ${id}]S01" + hsetprop ${scobj_hpath}/temp1/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp1/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp1/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp1/sensor type "part" + hsetprop ${scobj_hpath}/temp1/sensor nxalias "${name}_temp1_sensor" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp1/sensor 1 - hsetprop ${scobj_hpath}/Temp1/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp1/sensor 1 + hsetprop ${scobj_hpath}/temp1/sensor simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp1/sensor simulated true + hsetprop ${scobj_hpath}/temp1/sensor simulated true } - hsetprop ${scobj_hpath}/Temp1 data "true" - hsetprop ${scobj_hpath}/Temp1 klass "@none" - hsetprop ${scobj_hpath}/Temp1 type "part" + hsetprop ${scobj_hpath}/temp1 data "true" + hsetprop ${scobj_hpath}/temp1 klass "@none" + hsetprop ${scobj_hpath}/temp1 type "part" } if {[string equal -nocase [string index ${cards} 1] T]} { - hfactory ${scobj_hpath}/Temp2 plain spy none + hfactory ${scobj_hpath}/temp2 plain spy none - hfactory ${scobj_hpath}/Temp2/nick plain user text - hsetprop ${scobj_hpath}/Temp2/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB2.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp2/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp2/nick control true - hsetprop ${scobj_hpath}/Temp2/nick data true - hsetprop ${scobj_hpath}/Temp2/nick mutable true - hsetprop ${scobj_hpath}/Temp2/nick nxsave true - hsetprop ${scobj_hpath}/Temp2/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp2/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp2/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp2/nick type "part" - hsetprop ${scobj_hpath}/Temp2/nick nxalias "${name}_Temp2_nick" + hfactory ${scobj_hpath}/temp2/nick plain user text + hsetprop ${scobj_hpath}/temp2/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB2.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp2/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp2/nick control true + hsetprop ${scobj_hpath}/temp2/nick data true + hsetprop ${scobj_hpath}/temp2/nick mutable true + hsetprop ${scobj_hpath}/temp2/nick nxsave true + hsetprop ${scobj_hpath}/temp2/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp2/nick klass "parameter" + hsetprop ${scobj_hpath}/temp2/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp2/nick type "part" + hsetprop ${scobj_hpath}/temp2/nick nxalias "${name}_temp2_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp2/nick 15 - hsetprop ${scobj_hpath}/Temp2/nick simulated false + ${sct_controller} poll ${scobj_hpath}/temp2/nick 15 + hsetprop ${scobj_hpath}/temp2/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp2/nick simulated true + hsetprop ${scobj_hpath}/temp2/nick simulated true } - hfactory ${scobj_hpath}/Temp2/sensor plain user float - hsetprop ${scobj_hpath}/Temp2/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB2.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp2/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp2/sensor control true - hsetprop ${scobj_hpath}/Temp2/sensor data true - hsetprop ${scobj_hpath}/Temp2/sensor mutable true - hsetprop ${scobj_hpath}/Temp2/sensor nxsave true - hsetprop ${scobj_hpath}/Temp2/sensor permlink data_set "T[format "%02d" ${id}]S02" - hsetprop ${scobj_hpath}/Temp2/sensor @description "T[format "%02d" ${id}]S02" - hsetprop ${scobj_hpath}/Temp2/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp2/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp2/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp2/sensor type "part" - hsetprop ${scobj_hpath}/Temp2/sensor nxalias "${name}_Temp2_sensor" + hfactory ${scobj_hpath}/temp2/sensor plain user float + hsetprop ${scobj_hpath}/temp2/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB2.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp2/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp2/sensor control true + hsetprop ${scobj_hpath}/temp2/sensor data true + hsetprop ${scobj_hpath}/temp2/sensor mutable true + hsetprop ${scobj_hpath}/temp2/sensor nxsave true + hsetprop ${scobj_hpath}/temp2/sensor permlink data_set "T[format "%02d" ${id}]S02" + hsetprop ${scobj_hpath}/temp2/sensor @description "T[format "%02d" ${id}]S02" + hsetprop ${scobj_hpath}/temp2/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp2/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp2/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp2/sensor type "part" + hsetprop ${scobj_hpath}/temp2/sensor nxalias "${name}_temp2_sensor" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp2/sensor 1 - hsetprop ${scobj_hpath}/Temp2/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp2/sensor 1 + hsetprop ${scobj_hpath}/temp2/sensor simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp2/sensor simulated true + hsetprop ${scobj_hpath}/temp2/sensor simulated true } - hsetprop ${scobj_hpath}/Temp2 data "true" - hsetprop ${scobj_hpath}/Temp2 klass "@none" - hsetprop ${scobj_hpath}/Temp2 type "part" + hsetprop ${scobj_hpath}/temp2 data "true" + hsetprop ${scobj_hpath}/temp2 klass "@none" + hsetprop ${scobj_hpath}/temp2 type "part" } if {[string equal -nocase [string index ${cards} 2] T]} { - hfactory ${scobj_hpath}/Temp3 plain spy none + hfactory ${scobj_hpath}/temp3 plain spy none - hfactory ${scobj_hpath}/Temp3/nick plain user text - hsetprop ${scobj_hpath}/Temp3/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB3.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp3/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp3/nick control true - hsetprop ${scobj_hpath}/Temp3/nick data true - hsetprop ${scobj_hpath}/Temp3/nick mutable true - hsetprop ${scobj_hpath}/Temp3/nick nxsave true - hsetprop ${scobj_hpath}/Temp3/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp3/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp3/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp3/nick type "part" - hsetprop ${scobj_hpath}/Temp3/nick nxalias "${name}_Temp3_nick" + hfactory ${scobj_hpath}/temp3/nick plain user text + hsetprop ${scobj_hpath}/temp3/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB3.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp3/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp3/nick control true + hsetprop ${scobj_hpath}/temp3/nick data true + hsetprop ${scobj_hpath}/temp3/nick mutable true + hsetprop ${scobj_hpath}/temp3/nick nxsave true + hsetprop ${scobj_hpath}/temp3/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp3/nick klass "parameter" + hsetprop ${scobj_hpath}/temp3/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp3/nick type "part" + hsetprop ${scobj_hpath}/temp3/nick nxalias "${name}_temp3_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp3/nick 15 - hsetprop ${scobj_hpath}/Temp3/nick simulated false + ${sct_controller} poll ${scobj_hpath}/temp3/nick 15 + hsetprop ${scobj_hpath}/temp3/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp3/nick simulated true + hsetprop ${scobj_hpath}/temp3/nick simulated true } - hfactory ${scobj_hpath}/Temp3/sensor plain user float - hsetprop ${scobj_hpath}/Temp3/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB3.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp3/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp3/sensor control true - hsetprop ${scobj_hpath}/Temp3/sensor data true - hsetprop ${scobj_hpath}/Temp3/sensor mutable true - hsetprop ${scobj_hpath}/Temp3/sensor nxsave true - hsetprop ${scobj_hpath}/Temp3/sensor permlink data_set "T[format "%02d" ${id}]S03" - hsetprop ${scobj_hpath}/Temp3/sensor @description "T[format "%02d" ${id}]S03" - hsetprop ${scobj_hpath}/Temp3/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp3/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp3/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp3/sensor type "part" - hsetprop ${scobj_hpath}/Temp3/sensor nxalias "${name}_Temp3_sensor" + hfactory ${scobj_hpath}/temp3/sensor plain user float + hsetprop ${scobj_hpath}/temp3/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB3.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp3/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp3/sensor control true + hsetprop ${scobj_hpath}/temp3/sensor data true + hsetprop ${scobj_hpath}/temp3/sensor mutable true + hsetprop ${scobj_hpath}/temp3/sensor nxsave true + hsetprop ${scobj_hpath}/temp3/sensor permlink data_set "T[format "%02d" ${id}]S03" + hsetprop ${scobj_hpath}/temp3/sensor @description "T[format "%02d" ${id}]S03" + hsetprop ${scobj_hpath}/temp3/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp3/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp3/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp3/sensor type "part" + hsetprop ${scobj_hpath}/temp3/sensor nxalias "${name}_temp3_sensor" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp3/sensor 1 - hsetprop ${scobj_hpath}/Temp3/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp3/sensor 1 + hsetprop ${scobj_hpath}/temp3/sensor simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp3/sensor simulated true + hsetprop ${scobj_hpath}/temp3/sensor simulated true } - hsetprop ${scobj_hpath}/Temp3 data "true" - hsetprop ${scobj_hpath}/Temp3 klass "@none" - hsetprop ${scobj_hpath}/Temp3 type "part" + hsetprop ${scobj_hpath}/temp3 data "true" + hsetprop ${scobj_hpath}/temp3 klass "@none" + hsetprop ${scobj_hpath}/temp3 type "part" } if {[string equal -nocase [string index ${cards} 3] T]} { - hfactory ${scobj_hpath}/Temp4 plain spy none + hfactory ${scobj_hpath}/temp4 plain spy none - hfactory ${scobj_hpath}/Temp4/nick plain user text - hsetprop ${scobj_hpath}/Temp4/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB4.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp4/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp4/nick control true - hsetprop ${scobj_hpath}/Temp4/nick data true - hsetprop ${scobj_hpath}/Temp4/nick mutable true - hsetprop ${scobj_hpath}/Temp4/nick nxsave true - hsetprop ${scobj_hpath}/Temp4/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp4/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp4/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp4/nick type "part" - hsetprop ${scobj_hpath}/Temp4/nick nxalias "${name}_Temp4_nick" + hfactory ${scobj_hpath}/temp4/nick plain user text + hsetprop ${scobj_hpath}/temp4/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB4.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp4/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp4/nick control true + hsetprop ${scobj_hpath}/temp4/nick data true + hsetprop ${scobj_hpath}/temp4/nick mutable true + hsetprop ${scobj_hpath}/temp4/nick nxsave true + hsetprop ${scobj_hpath}/temp4/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp4/nick klass "parameter" + hsetprop ${scobj_hpath}/temp4/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp4/nick type "part" + hsetprop ${scobj_hpath}/temp4/nick nxalias "${name}_temp4_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp4/nick 15 - hsetprop ${scobj_hpath}/Temp4/nick simulated false + ${sct_controller} poll ${scobj_hpath}/temp4/nick 15 + hsetprop ${scobj_hpath}/temp4/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp4/nick simulated true + hsetprop ${scobj_hpath}/temp4/nick simulated true } - hfactory ${scobj_hpath}/Temp4/sensor plain user float - hsetprop ${scobj_hpath}/Temp4/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp4/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp4/sensor control true - hsetprop ${scobj_hpath}/Temp4/sensor data true - hsetprop ${scobj_hpath}/Temp4/sensor mutable true - hsetprop ${scobj_hpath}/Temp4/sensor nxsave true - hsetprop ${scobj_hpath}/Temp4/sensor permlink data_set "T[format "%02d" ${id}]S04" - hsetprop ${scobj_hpath}/Temp4/sensor @description "T[format "%02d" ${id}]S04" - hsetprop ${scobj_hpath}/Temp4/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp4/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp4/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp4/sensor type "part" - hsetprop ${scobj_hpath}/Temp4/sensor nxalias "${name}_Temp4_sensor" + hfactory ${scobj_hpath}/temp4/sensor plain user float + hsetprop ${scobj_hpath}/temp4/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp4/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp4/sensor control true + hsetprop ${scobj_hpath}/temp4/sensor data true + hsetprop ${scobj_hpath}/temp4/sensor mutable true + hsetprop ${scobj_hpath}/temp4/sensor nxsave true + hsetprop ${scobj_hpath}/temp4/sensor permlink data_set "T[format "%02d" ${id}]S04" + hsetprop ${scobj_hpath}/temp4/sensor @description "T[format "%02d" ${id}]S04" + hsetprop ${scobj_hpath}/temp4/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp4/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp4/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp4/sensor type "part" + hsetprop ${scobj_hpath}/temp4/sensor nxalias "${name}_temp4_sensor" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp4/sensor 1 - hsetprop ${scobj_hpath}/Temp4/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp4/sensor 1 + hsetprop ${scobj_hpath}/temp4/sensor simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp4/sensor simulated true + hsetprop ${scobj_hpath}/temp4/sensor simulated true } - hsetprop ${scobj_hpath}/Temp4 data "true" - hsetprop ${scobj_hpath}/Temp4 klass "@none" - hsetprop ${scobj_hpath}/Temp4 type "part" + hsetprop ${scobj_hpath}/temp4 data "true" + hsetprop ${scobj_hpath}/temp4 klass "@none" + hsetprop ${scobj_hpath}/temp4 type "part" } if {[string equal -nocase [string index ${cards} 4] T]} { - hfactory ${scobj_hpath}/Temp5 plain spy none + hfactory ${scobj_hpath}/temp5 plain spy none - hfactory ${scobj_hpath}/Temp5/nick plain user text - hsetprop ${scobj_hpath}/Temp5/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB5.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp5/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp5/nick control true - hsetprop ${scobj_hpath}/Temp5/nick data true - hsetprop ${scobj_hpath}/Temp5/nick mutable true - hsetprop ${scobj_hpath}/Temp5/nick nxsave true - hsetprop ${scobj_hpath}/Temp5/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp5/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp5/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp5/nick type "part" - hsetprop ${scobj_hpath}/Temp5/nick nxalias "${name}_Temp5_nick" + hfactory ${scobj_hpath}/temp5/nick plain user text + hsetprop ${scobj_hpath}/temp5/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB5.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp5/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp5/nick control true + hsetprop ${scobj_hpath}/temp5/nick data true + hsetprop ${scobj_hpath}/temp5/nick mutable true + hsetprop ${scobj_hpath}/temp5/nick nxsave true + hsetprop ${scobj_hpath}/temp5/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp5/nick klass "parameter" + hsetprop ${scobj_hpath}/temp5/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp5/nick type "part" + hsetprop ${scobj_hpath}/temp5/nick nxalias "${name}_temp5_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp5/nick 15 - hsetprop ${scobj_hpath}/Temp5/nick simulated false + ${sct_controller} poll ${scobj_hpath}/temp5/nick 15 + hsetprop ${scobj_hpath}/temp5/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp5/nick simulated true + hsetprop ${scobj_hpath}/temp5/nick simulated true } - hfactory ${scobj_hpath}/Temp5/sensor plain user float - hsetprop ${scobj_hpath}/Temp5/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp5/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp5/sensor control true - hsetprop ${scobj_hpath}/Temp5/sensor data true - hsetprop ${scobj_hpath}/Temp5/sensor mutable true - hsetprop ${scobj_hpath}/Temp5/sensor nxsave true - hsetprop ${scobj_hpath}/Temp5/sensor permlink data_set "T[format "%02d" ${id}]S05" - hsetprop ${scobj_hpath}/Temp5/sensor @description "T[format "%02d" ${id}]S05" - hsetprop ${scobj_hpath}/Temp5/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp5/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp5/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp5/sensor type "part" - hsetprop ${scobj_hpath}/Temp5/sensor nxalias "${name}_Temp5_sensor" + hfactory ${scobj_hpath}/temp5/sensor plain user float + hsetprop ${scobj_hpath}/temp5/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB5.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp5/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp5/sensor control true + hsetprop ${scobj_hpath}/temp5/sensor data true + hsetprop ${scobj_hpath}/temp5/sensor mutable true + hsetprop ${scobj_hpath}/temp5/sensor nxsave true + hsetprop ${scobj_hpath}/temp5/sensor permlink data_set "T[format "%02d" ${id}]S05" + hsetprop ${scobj_hpath}/temp5/sensor @description "T[format "%02d" ${id}]S05" + hsetprop ${scobj_hpath}/temp5/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp5/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp5/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp5/sensor type "part" + hsetprop ${scobj_hpath}/temp5/sensor nxalias "${name}_temp5_sensor" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp5/sensor 1 - hsetprop ${scobj_hpath}/Temp5/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp5/sensor 1 + hsetprop ${scobj_hpath}/temp5/sensor simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp5/sensor simulated true + hsetprop ${scobj_hpath}/temp5/sensor simulated true } - hsetprop ${scobj_hpath}/Temp5 data "true" - hsetprop ${scobj_hpath}/Temp5 klass "@none" - hsetprop ${scobj_hpath}/Temp5 type "part" + hsetprop ${scobj_hpath}/temp5 data "true" + hsetprop ${scobj_hpath}/temp5 klass "@none" + hsetprop ${scobj_hpath}/temp5 type "part" } if {[string equal -nocase [string index ${cards} 5] T]} { - hfactory ${scobj_hpath}/Temp6 plain spy none - - hfactory ${scobj_hpath}/Temp6/nick plain user text - hsetprop ${scobj_hpath}/Temp6/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB6.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp6/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/nick control true - hsetprop ${scobj_hpath}/Temp6/nick data true - hsetprop ${scobj_hpath}/Temp6/nick mutable true - hsetprop ${scobj_hpath}/Temp6/nick nxsave true - hsetprop ${scobj_hpath}/Temp6/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp6/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp6/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp6/nick type "part" - hsetprop ${scobj_hpath}/Temp6/nick nxalias "${name}_Temp6_nick" - - if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp6/nick 15 - hsetprop ${scobj_hpath}/Temp6/nick simulated false - } else { - ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp6/nick simulated true - } + hfactory ${scobj_hpath}/temp6 plain spy none if {[string equal -nocase [string index ${cards} 0] H] && [string equal -nocase [string index ${assoc} 5] 1]} { - hfactory ${scobj_hpath}/Temp6/power plain user float - hsetprop ${scobj_hpath}/Temp6/power read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB1.H1:HTR:SIG:POWR} - hsetprop ${scobj_hpath}/Temp6/power rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/power control true - hsetprop ${scobj_hpath}/Temp6/power data true - hsetprop ${scobj_hpath}/Temp6/power mutable true - hsetprop ${scobj_hpath}/Temp6/power nxsave true - hsetprop ${scobj_hpath}/Temp6/power oldval 0.0 - hsetprop ${scobj_hpath}/Temp6/power klass "parameter" - hsetprop ${scobj_hpath}/Temp6/power sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp6/power type "part" - hsetprop ${scobj_hpath}/Temp6/power nxalias "${name}_Temp6_power" + hfactory ${scobj_hpath}/temp6/auto plain user int + hsetprop ${scobj_hpath}/temp6/auto read ${ns}::getValue ${scobj_hpath} rdOnOff {READ:DEV:DB6.T1:TEMP:LOOP:ENAB} + hsetprop ${scobj_hpath}/temp6/auto rdOnOff ${ns}::rdOnOff ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/auto write ${ns}::wrOnOff ${scobj_hpath} noResponse {SET:DEV:DB6.T1:TEMP:LOOP:ENAB:} + hsetprop ${scobj_hpath}/temp6/auto noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/auto check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/auto control true + hsetprop ${scobj_hpath}/temp6/auto data true + hsetprop ${scobj_hpath}/temp6/auto mutable true + hsetprop ${scobj_hpath}/temp6/auto nxsave true + hsetprop ${scobj_hpath}/temp6/auto values 0,1 + hsetprop ${scobj_hpath}/temp6/auto oldval 0 + hsetprop ${scobj_hpath}/temp6/auto klass "parameter" + hsetprop ${scobj_hpath}/temp6/auto sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp6/auto type "part" + hsetprop ${scobj_hpath}/temp6/auto nxalias "${name}_temp6_auto" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp6/power 5 - hsetprop ${scobj_hpath}/Temp6/power simulated false + ${sct_controller} poll ${scobj_hpath}/temp6/auto 5 + ${sct_controller} write ${scobj_hpath}/temp6/auto + hsetprop ${scobj_hpath}/temp6/auto simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp6/power simulated true + hsetprop ${scobj_hpath}/temp6/auto simulated true } } - hfactory ${scobj_hpath}/Temp6/sensor plain user float - hsetprop ${scobj_hpath}/Temp6/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB6.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp6/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/sensor control true - hsetprop ${scobj_hpath}/Temp6/sensor data true - hsetprop ${scobj_hpath}/Temp6/sensor mutable true - hsetprop ${scobj_hpath}/Temp6/sensor nxsave true - hsetprop ${scobj_hpath}/Temp6/sensor permlink data_set "T[format "%02d" ${id}]S06" - hsetprop ${scobj_hpath}/Temp6/sensor @description "T[format "%02d" ${id}]S06" - hsetprop ${scobj_hpath}/Temp6/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp6/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp6/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp6/sensor type "part" - hsetprop ${scobj_hpath}/Temp6/sensor nxalias "${name}_Temp6_sensor" + hfactory ${scobj_hpath}/temp6/nick plain user text + hsetprop ${scobj_hpath}/temp6/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB6.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp6/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/nick control true + hsetprop ${scobj_hpath}/temp6/nick data true + hsetprop ${scobj_hpath}/temp6/nick mutable true + hsetprop ${scobj_hpath}/temp6/nick nxsave true + hsetprop ${scobj_hpath}/temp6/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp6/nick klass "parameter" + hsetprop ${scobj_hpath}/temp6/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp6/nick type "part" + hsetprop ${scobj_hpath}/temp6/nick nxalias "${name}_temp6_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp6/sensor 1 - hsetprop ${scobj_hpath}/Temp6/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp6/nick 15 + hsetprop ${scobj_hpath}/temp6/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp6/sensor simulated true + hsetprop ${scobj_hpath}/temp6/nick simulated true + } + + hfactory ${scobj_hpath}/temp6/sensor plain user float + hsetprop ${scobj_hpath}/temp6/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB6.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp6/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/sensor control true + hsetprop ${scobj_hpath}/temp6/sensor data true + hsetprop ${scobj_hpath}/temp6/sensor mutable true + hsetprop ${scobj_hpath}/temp6/sensor nxsave true + hsetprop ${scobj_hpath}/temp6/sensor permlink data_set "T[format "%02d" ${id}]S06" + hsetprop ${scobj_hpath}/temp6/sensor @description "T[format "%02d" ${id}]S06" + hsetprop ${scobj_hpath}/temp6/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp6/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp6/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp6/sensor type "part" + hsetprop ${scobj_hpath}/temp6/sensor nxalias "${name}_temp6_sensor" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp6/sensor 1 + hsetprop ${scobj_hpath}/temp6/sensor simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp6/sensor simulated true } if {[string equal -nocase [string index ${cards} 0] H] && [string equal -nocase [string index ${assoc} 5] 1]} { - hfactory ${scobj_hpath}/Temp6/setpoint plain user float - hsetprop ${scobj_hpath}/Temp6/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB6.T1:TEMP:LOOP:TSET} - hsetprop ${scobj_hpath}/Temp6/setpoint rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB6.T1:TEMP:LOOP:TSET:} - hsetprop ${scobj_hpath}/Temp6/setpoint noResponse ${ns}::noResponse ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/setpoint check ${ns}::checkrange ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/setpoint driving 0 - hsetprop ${scobj_hpath}/Temp6/setpoint checklimits ${ns}::checklimits ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/setpoint halt ${ns}::halt ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp6/setpoint driveable Temp6/sensor - hsetprop ${scobj_hpath}/Temp6/setpoint control true - hsetprop ${scobj_hpath}/Temp6/setpoint data true - hsetprop ${scobj_hpath}/Temp6/setpoint mutable true - hsetprop ${scobj_hpath}/Temp6/setpoint nxsave true - hsetprop ${scobj_hpath}/Temp6/setpoint lowerlimit 0 - hsetprop ${scobj_hpath}/Temp6/setpoint upperlimit 333 - hsetprop ${scobj_hpath}/Temp6/setpoint tolerance ${ttol} - hsetprop ${scobj_hpath}/Temp6/setpoint permlink data_set "T[format "%02d" ${id}]SP06" - hsetprop ${scobj_hpath}/Temp6/setpoint @description "T[format "%02d" ${id}]SP06" - hsetprop ${scobj_hpath}/Temp6/setpoint oldval 0.0 - hsetprop ${scobj_hpath}/Temp6/setpoint klass "parameter" - hsetprop ${scobj_hpath}/Temp6/setpoint sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp6/setpoint settle_time "15" - hsetprop ${scobj_hpath}/Temp6/setpoint type "drivable" - hsetprop ${scobj_hpath}/Temp6/setpoint nxalias "${name}_Temp6_setpoint" + hfactory ${scobj_hpath}/temp6/setpoint plain user float + hsetprop ${scobj_hpath}/temp6/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB6.T1:TEMP:LOOP:TSET} + hsetprop ${scobj_hpath}/temp6/setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB6.T1:TEMP:LOOP:TSET:} + hsetprop ${scobj_hpath}/temp6/setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/setpoint driving 0 + hsetprop ${scobj_hpath}/temp6/setpoint checklimits ${ns}::checklimits ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/setpoint halt ${ns}::halt ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/setpoint driveable temp6/sensor + hsetprop ${scobj_hpath}/temp6/setpoint control true + hsetprop ${scobj_hpath}/temp6/setpoint data true + hsetprop ${scobj_hpath}/temp6/setpoint mutable true + hsetprop ${scobj_hpath}/temp6/setpoint nxsave true + hsetprop ${scobj_hpath}/temp6/setpoint lowerlimit 0 + hsetprop ${scobj_hpath}/temp6/setpoint upperlimit 333 + hsetprop ${scobj_hpath}/temp6/setpoint tolerance ${ttol} + hsetprop ${scobj_hpath}/temp6/setpoint permlink data_set "T[format "%02d" ${id}]SP06" + hsetprop ${scobj_hpath}/temp6/setpoint @description "T[format "%02d" ${id}]SP06" + hsetprop ${scobj_hpath}/temp6/setpoint oldval 0.0 + hsetprop ${scobj_hpath}/temp6/setpoint klass "parameter" + hsetprop ${scobj_hpath}/temp6/setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp6/setpoint settle_time "15" + hsetprop ${scobj_hpath}/temp6/setpoint type "drivable" + hsetprop ${scobj_hpath}/temp6/setpoint nxalias "${name}_temp6_setpoint" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp6/setpoint 5 - ${sct_controller} write ${scobj_hpath}/Temp6/setpoint - hsetprop ${scobj_hpath}/Temp6/setpoint simulated false + ${sct_controller} poll ${scobj_hpath}/temp6/setpoint 5 + ${sct_controller} write ${scobj_hpath}/temp6/setpoint + hsetprop ${scobj_hpath}/temp6/setpoint simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp6/setpoint simulated true + hsetprop ${scobj_hpath}/temp6/setpoint simulated true } } - hsetprop ${scobj_hpath}/Temp6 data "true" - hsetprop ${scobj_hpath}/Temp6 klass "@none" - hsetprop ${scobj_hpath}/Temp6 type "part" + hsetprop ${scobj_hpath}/temp6 data "true" + hsetprop ${scobj_hpath}/temp6 klass "@none" + hsetprop ${scobj_hpath}/temp6 type "part" + if {[string equal -nocase [string index ${cards} 0] H] && [string equal -nocase [string index ${assoc} 5] 1]} { - ansto_makesctdrive ${name}_Temp6_setpoint ${scobj_hpath}/Temp6/setpoint ${scobj_hpath}/Temp6/sensor ${sct_controller} + hfactory ${scobj_hpath}/temp6/heater plain spy none + + hfactory ${scobj_hpath}/temp6/heater/hset plain user float + hsetprop ${scobj_hpath}/temp6/heater/hset read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB6.T1:TEMP:LOOP:HSET} + hsetprop ${scobj_hpath}/temp6/heater/hset rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/heater/hset write ${ns}::setValue ${scobj_hpath} noResponse {SET:DEV:DB6.T1:TEMP:LOOP:HSET:} + hsetprop ${scobj_hpath}/temp6/heater/hset noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/heater/hset check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/heater/hset control true + hsetprop ${scobj_hpath}/temp6/heater/hset data true + hsetprop ${scobj_hpath}/temp6/heater/hset mutable true + hsetprop ${scobj_hpath}/temp6/heater/hset nxsave true + hsetprop ${scobj_hpath}/temp6/heater/hset lowerlimit 0 + hsetprop ${scobj_hpath}/temp6/heater/hset upperlimit 100 + hsetprop ${scobj_hpath}/temp6/heater/hset oldval 0.0 + hsetprop ${scobj_hpath}/temp6/heater/hset klass "parameter" + hsetprop ${scobj_hpath}/temp6/heater/hset sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp6/heater/hset type "part" + hsetprop ${scobj_hpath}/temp6/heater/hset nxalias "${name}_temp6_heater_hset" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp6/heater/hset 5 + ${sct_controller} write ${scobj_hpath}/temp6/heater/hset + hsetprop ${scobj_hpath}/temp6/heater/hset simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp6/heater/hset simulated true + } + + hfactory ${scobj_hpath}/temp6/heater/perc plain user float + hsetprop ${scobj_hpath}/temp6/heater/perc read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB1.H1:HTR:SIG:PERC} + hsetprop ${scobj_hpath}/temp6/heater/perc rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/heater/perc control true + hsetprop ${scobj_hpath}/temp6/heater/perc data true + hsetprop ${scobj_hpath}/temp6/heater/perc mutable true + hsetprop ${scobj_hpath}/temp6/heater/perc nxsave true + hsetprop ${scobj_hpath}/temp6/heater/perc oldval 0.0 + hsetprop ${scobj_hpath}/temp6/heater/perc klass "parameter" + hsetprop ${scobj_hpath}/temp6/heater/perc sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp6/heater/perc type "part" + hsetprop ${scobj_hpath}/temp6/heater/perc nxalias "${name}_temp6_heater_perc" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp6/heater/perc 5 + hsetprop ${scobj_hpath}/temp6/heater/perc simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp6/heater/perc simulated true + } + + hfactory ${scobj_hpath}/temp6/heater/power plain user float + hsetprop ${scobj_hpath}/temp6/heater/power read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB1.H1:HTR:SIG:POWR} + hsetprop ${scobj_hpath}/temp6/heater/power rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp6/heater/power control true + hsetprop ${scobj_hpath}/temp6/heater/power data true + hsetprop ${scobj_hpath}/temp6/heater/power mutable true + hsetprop ${scobj_hpath}/temp6/heater/power nxsave true + hsetprop ${scobj_hpath}/temp6/heater/power oldval 0.0 + hsetprop ${scobj_hpath}/temp6/heater/power klass "parameter" + hsetprop ${scobj_hpath}/temp6/heater/power sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp6/heater/power type "part" + hsetprop ${scobj_hpath}/temp6/heater/power nxalias "${name}_temp6_heater_power" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp6/heater/power 5 + hsetprop ${scobj_hpath}/temp6/heater/power simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp6/heater/power simulated true + } + hsetprop ${scobj_hpath}/temp6/heater data "true" + hsetprop ${scobj_hpath}/temp6/heater klass "@none" + hsetprop ${scobj_hpath}/temp6/heater type "part" + } + if {[string equal -nocase [string index ${cards} 0] H] && [string equal -nocase [string index ${assoc} 5] 1]} { + ansto_makesctdrive ${name}_temp6_setpoint ${scobj_hpath}/temp6/setpoint ${scobj_hpath}/temp6/sensor ${sct_controller} } } if {[string equal -nocase [string index ${cards} 6] T]} { - hfactory ${scobj_hpath}/Temp7 plain spy none - - hfactory ${scobj_hpath}/Temp7/nick plain user text - hsetprop ${scobj_hpath}/Temp7/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB7.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp7/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/nick control true - hsetprop ${scobj_hpath}/Temp7/nick data true - hsetprop ${scobj_hpath}/Temp7/nick mutable true - hsetprop ${scobj_hpath}/Temp7/nick nxsave true - hsetprop ${scobj_hpath}/Temp7/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp7/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp7/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp7/nick type "part" - hsetprop ${scobj_hpath}/Temp7/nick nxalias "${name}_Temp7_nick" - - if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp7/nick 15 - hsetprop ${scobj_hpath}/Temp7/nick simulated false - } else { - ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp7/nick simulated true - } + hfactory ${scobj_hpath}/temp7 plain spy none if {[string equal -nocase [string index ${cards} 1] H] && [string equal -nocase [string index ${assoc} 6] 2]} { - hfactory ${scobj_hpath}/Temp7/power plain user float - hsetprop ${scobj_hpath}/Temp7/power read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB2.H1:HTR:SIG:POWR} - hsetprop ${scobj_hpath}/Temp7/power rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/power control true - hsetprop ${scobj_hpath}/Temp7/power data true - hsetprop ${scobj_hpath}/Temp7/power mutable true - hsetprop ${scobj_hpath}/Temp7/power nxsave true - hsetprop ${scobj_hpath}/Temp7/power oldval 0.0 - hsetprop ${scobj_hpath}/Temp7/power klass "parameter" - hsetprop ${scobj_hpath}/Temp7/power sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp7/power type "part" - hsetprop ${scobj_hpath}/Temp7/power nxalias "${name}_Temp7_power" + hfactory ${scobj_hpath}/temp7/auto plain user int + hsetprop ${scobj_hpath}/temp7/auto read ${ns}::getValue ${scobj_hpath} rdOnOff {READ:DEV:DB7.T1:TEMP:LOOP:ENAB} + hsetprop ${scobj_hpath}/temp7/auto rdOnOff ${ns}::rdOnOff ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/auto write ${ns}::wrOnOff ${scobj_hpath} noResponse {SET:DEV:DB7.T1:TEMP:LOOP:ENAB:} + hsetprop ${scobj_hpath}/temp7/auto noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/auto check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/auto control true + hsetprop ${scobj_hpath}/temp7/auto data true + hsetprop ${scobj_hpath}/temp7/auto mutable true + hsetprop ${scobj_hpath}/temp7/auto nxsave true + hsetprop ${scobj_hpath}/temp7/auto values 0,1 + hsetprop ${scobj_hpath}/temp7/auto oldval 0 + hsetprop ${scobj_hpath}/temp7/auto klass "parameter" + hsetprop ${scobj_hpath}/temp7/auto sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp7/auto type "part" + hsetprop ${scobj_hpath}/temp7/auto nxalias "${name}_temp7_auto" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp7/power 5 - hsetprop ${scobj_hpath}/Temp7/power simulated false + ${sct_controller} poll ${scobj_hpath}/temp7/auto 5 + ${sct_controller} write ${scobj_hpath}/temp7/auto + hsetprop ${scobj_hpath}/temp7/auto simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp7/power simulated true + hsetprop ${scobj_hpath}/temp7/auto simulated true } } - hfactory ${scobj_hpath}/Temp7/sensor plain user float - hsetprop ${scobj_hpath}/Temp7/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB7.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp7/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/sensor control true - hsetprop ${scobj_hpath}/Temp7/sensor data true - hsetprop ${scobj_hpath}/Temp7/sensor mutable true - hsetprop ${scobj_hpath}/Temp7/sensor nxsave true - hsetprop ${scobj_hpath}/Temp7/sensor permlink data_set "T[format "%02d" ${id}]S07" - hsetprop ${scobj_hpath}/Temp7/sensor @description "T[format "%02d" ${id}]S07" - hsetprop ${scobj_hpath}/Temp7/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp7/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp7/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp7/sensor type "part" - hsetprop ${scobj_hpath}/Temp7/sensor nxalias "${name}_Temp7_sensor" + hfactory ${scobj_hpath}/temp7/nick plain user text + hsetprop ${scobj_hpath}/temp7/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB7.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp7/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/nick control true + hsetprop ${scobj_hpath}/temp7/nick data true + hsetprop ${scobj_hpath}/temp7/nick mutable true + hsetprop ${scobj_hpath}/temp7/nick nxsave true + hsetprop ${scobj_hpath}/temp7/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp7/nick klass "parameter" + hsetprop ${scobj_hpath}/temp7/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp7/nick type "part" + hsetprop ${scobj_hpath}/temp7/nick nxalias "${name}_temp7_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp7/sensor 1 - hsetprop ${scobj_hpath}/Temp7/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp7/nick 15 + hsetprop ${scobj_hpath}/temp7/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp7/sensor simulated true + hsetprop ${scobj_hpath}/temp7/nick simulated true + } + + hfactory ${scobj_hpath}/temp7/sensor plain user float + hsetprop ${scobj_hpath}/temp7/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB7.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp7/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/sensor control true + hsetprop ${scobj_hpath}/temp7/sensor data true + hsetprop ${scobj_hpath}/temp7/sensor mutable true + hsetprop ${scobj_hpath}/temp7/sensor nxsave true + hsetprop ${scobj_hpath}/temp7/sensor permlink data_set "T[format "%02d" ${id}]S07" + hsetprop ${scobj_hpath}/temp7/sensor @description "T[format "%02d" ${id}]S07" + hsetprop ${scobj_hpath}/temp7/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp7/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp7/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp7/sensor type "part" + hsetprop ${scobj_hpath}/temp7/sensor nxalias "${name}_temp7_sensor" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp7/sensor 1 + hsetprop ${scobj_hpath}/temp7/sensor simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp7/sensor simulated true } if {[string equal -nocase [string index ${cards} 1] H] && [string equal -nocase [string index ${assoc} 6] 2]} { - hfactory ${scobj_hpath}/Temp7/setpoint plain user float - hsetprop ${scobj_hpath}/Temp7/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB7.T1:TEMP:LOOP:TSET} - hsetprop ${scobj_hpath}/Temp7/setpoint rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB7.T1:TEMP:LOOP:TSET:} - hsetprop ${scobj_hpath}/Temp7/setpoint noResponse ${ns}::noResponse ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/setpoint check ${ns}::checkrange ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/setpoint driving 0 - hsetprop ${scobj_hpath}/Temp7/setpoint checklimits ${ns}::checklimits ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/setpoint halt ${ns}::halt ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp7/setpoint driveable Temp7/sensor - hsetprop ${scobj_hpath}/Temp7/setpoint control true - hsetprop ${scobj_hpath}/Temp7/setpoint data true - hsetprop ${scobj_hpath}/Temp7/setpoint mutable true - hsetprop ${scobj_hpath}/Temp7/setpoint nxsave true - hsetprop ${scobj_hpath}/Temp7/setpoint lowerlimit 0 - hsetprop ${scobj_hpath}/Temp7/setpoint upperlimit 333 - hsetprop ${scobj_hpath}/Temp7/setpoint tolerance ${ttol} - hsetprop ${scobj_hpath}/Temp7/setpoint permlink data_set "T[format "%02d" ${id}]SP07" - hsetprop ${scobj_hpath}/Temp7/setpoint @description "T[format "%02d" ${id}]SP07" - hsetprop ${scobj_hpath}/Temp7/setpoint oldval 0.0 - hsetprop ${scobj_hpath}/Temp7/setpoint klass "parameter" - hsetprop ${scobj_hpath}/Temp7/setpoint sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp7/setpoint settle_time "15" - hsetprop ${scobj_hpath}/Temp7/setpoint type "drivable" - hsetprop ${scobj_hpath}/Temp7/setpoint nxalias "${name}_Temp7_setpoint" + hfactory ${scobj_hpath}/temp7/setpoint plain user float + hsetprop ${scobj_hpath}/temp7/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB7.T1:TEMP:LOOP:TSET} + hsetprop ${scobj_hpath}/temp7/setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB7.T1:TEMP:LOOP:TSET:} + hsetprop ${scobj_hpath}/temp7/setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/setpoint driving 0 + hsetprop ${scobj_hpath}/temp7/setpoint checklimits ${ns}::checklimits ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/setpoint halt ${ns}::halt ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/setpoint driveable temp7/sensor + hsetprop ${scobj_hpath}/temp7/setpoint control true + hsetprop ${scobj_hpath}/temp7/setpoint data true + hsetprop ${scobj_hpath}/temp7/setpoint mutable true + hsetprop ${scobj_hpath}/temp7/setpoint nxsave true + hsetprop ${scobj_hpath}/temp7/setpoint lowerlimit 0 + hsetprop ${scobj_hpath}/temp7/setpoint upperlimit 333 + hsetprop ${scobj_hpath}/temp7/setpoint tolerance ${ttol} + hsetprop ${scobj_hpath}/temp7/setpoint permlink data_set "T[format "%02d" ${id}]SP07" + hsetprop ${scobj_hpath}/temp7/setpoint @description "T[format "%02d" ${id}]SP07" + hsetprop ${scobj_hpath}/temp7/setpoint oldval 0.0 + hsetprop ${scobj_hpath}/temp7/setpoint klass "parameter" + hsetprop ${scobj_hpath}/temp7/setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp7/setpoint settle_time "15" + hsetprop ${scobj_hpath}/temp7/setpoint type "drivable" + hsetprop ${scobj_hpath}/temp7/setpoint nxalias "${name}_temp7_setpoint" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp7/setpoint 5 - ${sct_controller} write ${scobj_hpath}/Temp7/setpoint - hsetprop ${scobj_hpath}/Temp7/setpoint simulated false + ${sct_controller} poll ${scobj_hpath}/temp7/setpoint 5 + ${sct_controller} write ${scobj_hpath}/temp7/setpoint + hsetprop ${scobj_hpath}/temp7/setpoint simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp7/setpoint simulated true + hsetprop ${scobj_hpath}/temp7/setpoint simulated true } } - hsetprop ${scobj_hpath}/Temp7 data "true" - hsetprop ${scobj_hpath}/Temp7 klass "@none" - hsetprop ${scobj_hpath}/Temp7 type "part" + hsetprop ${scobj_hpath}/temp7 data "true" + hsetprop ${scobj_hpath}/temp7 klass "@none" + hsetprop ${scobj_hpath}/temp7 type "part" + if {[string equal -nocase [string index ${cards} 1] H] && [string equal -nocase [string index ${assoc} 6] 2]} { - ansto_makesctdrive ${name}_Temp7_setpoint ${scobj_hpath}/Temp7/setpoint ${scobj_hpath}/Temp7/sensor ${sct_controller} + hfactory ${scobj_hpath}/temp7/heater plain spy none + + hfactory ${scobj_hpath}/temp7/heater/hset plain user float + hsetprop ${scobj_hpath}/temp7/heater/hset read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB7.T1:TEMP:LOOP:HSET} + hsetprop ${scobj_hpath}/temp7/heater/hset rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/heater/hset write ${ns}::setValue ${scobj_hpath} noResponse {SET:DEV:DB7.T1:TEMP:LOOP:HSET:} + hsetprop ${scobj_hpath}/temp7/heater/hset noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/heater/hset check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/heater/hset control true + hsetprop ${scobj_hpath}/temp7/heater/hset data true + hsetprop ${scobj_hpath}/temp7/heater/hset mutable true + hsetprop ${scobj_hpath}/temp7/heater/hset nxsave true + hsetprop ${scobj_hpath}/temp7/heater/hset lowerlimit 0 + hsetprop ${scobj_hpath}/temp7/heater/hset upperlimit 100 + hsetprop ${scobj_hpath}/temp7/heater/hset oldval 0.0 + hsetprop ${scobj_hpath}/temp7/heater/hset klass "parameter" + hsetprop ${scobj_hpath}/temp7/heater/hset sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp7/heater/hset type "part" + hsetprop ${scobj_hpath}/temp7/heater/hset nxalias "${name}_temp7_heater_hset" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp7/heater/hset 5 + ${sct_controller} write ${scobj_hpath}/temp7/heater/hset + hsetprop ${scobj_hpath}/temp7/heater/hset simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp7/heater/hset simulated true + } + + hfactory ${scobj_hpath}/temp7/heater/perc plain user float + hsetprop ${scobj_hpath}/temp7/heater/perc read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB2.H1:HTR:SIG:PERC} + hsetprop ${scobj_hpath}/temp7/heater/perc rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/heater/perc control true + hsetprop ${scobj_hpath}/temp7/heater/perc data true + hsetprop ${scobj_hpath}/temp7/heater/perc mutable true + hsetprop ${scobj_hpath}/temp7/heater/perc nxsave true + hsetprop ${scobj_hpath}/temp7/heater/perc oldval 0.0 + hsetprop ${scobj_hpath}/temp7/heater/perc klass "parameter" + hsetprop ${scobj_hpath}/temp7/heater/perc sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp7/heater/perc type "part" + hsetprop ${scobj_hpath}/temp7/heater/perc nxalias "${name}_temp7_heater_perc" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp7/heater/perc 5 + hsetprop ${scobj_hpath}/temp7/heater/perc simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp7/heater/perc simulated true + } + + hfactory ${scobj_hpath}/temp7/heater/power plain user float + hsetprop ${scobj_hpath}/temp7/heater/power read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB2.H1:HTR:SIG:POWR} + hsetprop ${scobj_hpath}/temp7/heater/power rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp7/heater/power control true + hsetprop ${scobj_hpath}/temp7/heater/power data true + hsetprop ${scobj_hpath}/temp7/heater/power mutable true + hsetprop ${scobj_hpath}/temp7/heater/power nxsave true + hsetprop ${scobj_hpath}/temp7/heater/power oldval 0.0 + hsetprop ${scobj_hpath}/temp7/heater/power klass "parameter" + hsetprop ${scobj_hpath}/temp7/heater/power sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp7/heater/power type "part" + hsetprop ${scobj_hpath}/temp7/heater/power nxalias "${name}_temp7_heater_power" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp7/heater/power 5 + hsetprop ${scobj_hpath}/temp7/heater/power simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp7/heater/power simulated true + } + hsetprop ${scobj_hpath}/temp7/heater data "true" + hsetprop ${scobj_hpath}/temp7/heater klass "@none" + hsetprop ${scobj_hpath}/temp7/heater type "part" + } + if {[string equal -nocase [string index ${cards} 1] H] && [string equal -nocase [string index ${assoc} 6] 2]} { + ansto_makesctdrive ${name}_temp7_setpoint ${scobj_hpath}/temp7/setpoint ${scobj_hpath}/temp7/sensor ${sct_controller} } } if {[string equal -nocase [string index ${cards} 7] T]} { - hfactory ${scobj_hpath}/Temp8 plain spy none - - hfactory ${scobj_hpath}/Temp8/nick plain user text - hsetprop ${scobj_hpath}/Temp8/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB8.T1:TEMP:NICK} - hsetprop ${scobj_hpath}/Temp8/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/nick control true - hsetprop ${scobj_hpath}/Temp8/nick data true - hsetprop ${scobj_hpath}/Temp8/nick mutable true - hsetprop ${scobj_hpath}/Temp8/nick nxsave true - hsetprop ${scobj_hpath}/Temp8/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Temp8/nick klass "parameter" - hsetprop ${scobj_hpath}/Temp8/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp8/nick type "part" - hsetprop ${scobj_hpath}/Temp8/nick nxalias "${name}_Temp8_nick" - - if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp8/nick 15 - hsetprop ${scobj_hpath}/Temp8/nick simulated false - } else { - ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp8/nick simulated true - } + hfactory ${scobj_hpath}/temp8 plain spy none if {[string equal -nocase [string index ${cards} 2] H] && [string equal -nocase [string index ${assoc} 7] 3]} { - hfactory ${scobj_hpath}/Temp8/power plain user float - hsetprop ${scobj_hpath}/Temp8/power read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB3.H1:HTR:SIG:POWR} - hsetprop ${scobj_hpath}/Temp8/power rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/power control true - hsetprop ${scobj_hpath}/Temp8/power data true - hsetprop ${scobj_hpath}/Temp8/power mutable true - hsetprop ${scobj_hpath}/Temp8/power nxsave true - hsetprop ${scobj_hpath}/Temp8/power oldval 0.0 - hsetprop ${scobj_hpath}/Temp8/power klass "parameter" - hsetprop ${scobj_hpath}/Temp8/power sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp8/power type "part" - hsetprop ${scobj_hpath}/Temp8/power nxalias "${name}_Temp8_power" + hfactory ${scobj_hpath}/temp8/auto plain user int + hsetprop ${scobj_hpath}/temp8/auto read ${ns}::getValue ${scobj_hpath} rdOnOff {READ:DEV:DB8.T1:TEMP:LOOP:ENAB} + hsetprop ${scobj_hpath}/temp8/auto rdOnOff ${ns}::rdOnOff ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/auto write ${ns}::wrOnOff ${scobj_hpath} noResponse {SET:DEV:DB8.T1:TEMP:LOOP:ENAB:} + hsetprop ${scobj_hpath}/temp8/auto noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/auto check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/auto control true + hsetprop ${scobj_hpath}/temp8/auto data true + hsetprop ${scobj_hpath}/temp8/auto mutable true + hsetprop ${scobj_hpath}/temp8/auto nxsave true + hsetprop ${scobj_hpath}/temp8/auto values 0,1 + hsetprop ${scobj_hpath}/temp8/auto oldval 0 + hsetprop ${scobj_hpath}/temp8/auto klass "parameter" + hsetprop ${scobj_hpath}/temp8/auto sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp8/auto type "part" + hsetprop ${scobj_hpath}/temp8/auto nxalias "${name}_temp8_auto" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp8/power 5 - hsetprop ${scobj_hpath}/Temp8/power simulated false + ${sct_controller} poll ${scobj_hpath}/temp8/auto 5 + ${sct_controller} write ${scobj_hpath}/temp8/auto + hsetprop ${scobj_hpath}/temp8/auto simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp8/power simulated true + hsetprop ${scobj_hpath}/temp8/auto simulated true } } - hfactory ${scobj_hpath}/Temp8/sensor plain user float - hsetprop ${scobj_hpath}/Temp8/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.T1:TEMP:SIG:TEMP} - hsetprop ${scobj_hpath}/Temp8/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/sensor control true - hsetprop ${scobj_hpath}/Temp8/sensor data true - hsetprop ${scobj_hpath}/Temp8/sensor mutable true - hsetprop ${scobj_hpath}/Temp8/sensor nxsave true - hsetprop ${scobj_hpath}/Temp8/sensor permlink data_set "T[format "%02d" ${id}]S08" - hsetprop ${scobj_hpath}/Temp8/sensor @description "T[format "%02d" ${id}]S08" - hsetprop ${scobj_hpath}/Temp8/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Temp8/sensor klass "parameter" - hsetprop ${scobj_hpath}/Temp8/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp8/sensor type "part" - hsetprop ${scobj_hpath}/Temp8/sensor nxalias "${name}_Temp8_sensor" + hfactory ${scobj_hpath}/temp8/nick plain user text + hsetprop ${scobj_hpath}/temp8/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB8.T1:TEMP:NICK} + hsetprop ${scobj_hpath}/temp8/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/nick control true + hsetprop ${scobj_hpath}/temp8/nick data true + hsetprop ${scobj_hpath}/temp8/nick mutable true + hsetprop ${scobj_hpath}/temp8/nick nxsave true + hsetprop ${scobj_hpath}/temp8/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/temp8/nick klass "parameter" + hsetprop ${scobj_hpath}/temp8/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp8/nick type "part" + hsetprop ${scobj_hpath}/temp8/nick nxalias "${name}_temp8_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp8/sensor 1 - hsetprop ${scobj_hpath}/Temp8/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/temp8/nick 15 + hsetprop ${scobj_hpath}/temp8/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp8/sensor simulated true + hsetprop ${scobj_hpath}/temp8/nick simulated true + } + + hfactory ${scobj_hpath}/temp8/sensor plain user float + hsetprop ${scobj_hpath}/temp8/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.T1:TEMP:SIG:TEMP} + hsetprop ${scobj_hpath}/temp8/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/sensor control true + hsetprop ${scobj_hpath}/temp8/sensor data true + hsetprop ${scobj_hpath}/temp8/sensor mutable true + hsetprop ${scobj_hpath}/temp8/sensor nxsave true + hsetprop ${scobj_hpath}/temp8/sensor permlink data_set "T[format "%02d" ${id}]S08" + hsetprop ${scobj_hpath}/temp8/sensor @description "T[format "%02d" ${id}]S08" + hsetprop ${scobj_hpath}/temp8/sensor oldval 0.0 + hsetprop ${scobj_hpath}/temp8/sensor klass "parameter" + hsetprop ${scobj_hpath}/temp8/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp8/sensor type "part" + hsetprop ${scobj_hpath}/temp8/sensor nxalias "${name}_temp8_sensor" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp8/sensor 1 + hsetprop ${scobj_hpath}/temp8/sensor simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp8/sensor simulated true } if {[string equal -nocase [string index ${cards} 2] H] && [string equal -nocase [string index ${assoc} 7] 3]} { - hfactory ${scobj_hpath}/Temp8/setpoint plain user float - hsetprop ${scobj_hpath}/Temp8/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.T1:TEMP:LOOP:TSET} - hsetprop ${scobj_hpath}/Temp8/setpoint rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB8.T1:TEMP:LOOP:TSET:} - hsetprop ${scobj_hpath}/Temp8/setpoint noResponse ${ns}::noResponse ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/setpoint check ${ns}::checkrange ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/setpoint driving 0 - hsetprop ${scobj_hpath}/Temp8/setpoint checklimits ${ns}::checklimits ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/setpoint halt ${ns}::halt ${scobj_hpath} - hsetprop ${scobj_hpath}/Temp8/setpoint driveable Temp8/sensor - hsetprop ${scobj_hpath}/Temp8/setpoint control true - hsetprop ${scobj_hpath}/Temp8/setpoint data true - hsetprop ${scobj_hpath}/Temp8/setpoint mutable true - hsetprop ${scobj_hpath}/Temp8/setpoint nxsave true - hsetprop ${scobj_hpath}/Temp8/setpoint lowerlimit 0 - hsetprop ${scobj_hpath}/Temp8/setpoint upperlimit 333 - hsetprop ${scobj_hpath}/Temp8/setpoint tolerance ${ttol} - hsetprop ${scobj_hpath}/Temp8/setpoint permlink data_set "T[format "%02d" ${id}]SP08" - hsetprop ${scobj_hpath}/Temp8/setpoint @description "T[format "%02d" ${id}]SP08" - hsetprop ${scobj_hpath}/Temp8/setpoint oldval 0.0 - hsetprop ${scobj_hpath}/Temp8/setpoint klass "parameter" - hsetprop ${scobj_hpath}/Temp8/setpoint sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Temp8/setpoint settle_time "15" - hsetprop ${scobj_hpath}/Temp8/setpoint type "drivable" - hsetprop ${scobj_hpath}/Temp8/setpoint nxalias "${name}_Temp8_setpoint" + hfactory ${scobj_hpath}/temp8/setpoint plain user float + hsetprop ${scobj_hpath}/temp8/setpoint read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.T1:TEMP:LOOP:TSET} + hsetprop ${scobj_hpath}/temp8/setpoint rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/setpoint write ${ns}::setPoint ${scobj_hpath} noResponse {SET:DEV:DB8.T1:TEMP:LOOP:TSET:} + hsetprop ${scobj_hpath}/temp8/setpoint noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/setpoint check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/setpoint driving 0 + hsetprop ${scobj_hpath}/temp8/setpoint checklimits ${ns}::checklimits ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/setpoint halt ${ns}::halt ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/setpoint driveable temp8/sensor + hsetprop ${scobj_hpath}/temp8/setpoint control true + hsetprop ${scobj_hpath}/temp8/setpoint data true + hsetprop ${scobj_hpath}/temp8/setpoint mutable true + hsetprop ${scobj_hpath}/temp8/setpoint nxsave true + hsetprop ${scobj_hpath}/temp8/setpoint lowerlimit 0 + hsetprop ${scobj_hpath}/temp8/setpoint upperlimit 333 + hsetprop ${scobj_hpath}/temp8/setpoint tolerance ${ttol} + hsetprop ${scobj_hpath}/temp8/setpoint permlink data_set "T[format "%02d" ${id}]SP08" + hsetprop ${scobj_hpath}/temp8/setpoint @description "T[format "%02d" ${id}]SP08" + hsetprop ${scobj_hpath}/temp8/setpoint oldval 0.0 + hsetprop ${scobj_hpath}/temp8/setpoint klass "parameter" + hsetprop ${scobj_hpath}/temp8/setpoint sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp8/setpoint settle_time "15" + hsetprop ${scobj_hpath}/temp8/setpoint type "drivable" + hsetprop ${scobj_hpath}/temp8/setpoint nxalias "${name}_temp8_setpoint" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Temp8/setpoint 5 - ${sct_controller} write ${scobj_hpath}/Temp8/setpoint - hsetprop ${scobj_hpath}/Temp8/setpoint simulated false + ${sct_controller} poll ${scobj_hpath}/temp8/setpoint 5 + ${sct_controller} write ${scobj_hpath}/temp8/setpoint + hsetprop ${scobj_hpath}/temp8/setpoint simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Temp8/setpoint simulated true + hsetprop ${scobj_hpath}/temp8/setpoint simulated true } } - hsetprop ${scobj_hpath}/Temp8 data "true" - hsetprop ${scobj_hpath}/Temp8 klass "@none" - hsetprop ${scobj_hpath}/Temp8 type "part" + hsetprop ${scobj_hpath}/temp8 data "true" + hsetprop ${scobj_hpath}/temp8 klass "@none" + hsetprop ${scobj_hpath}/temp8 type "part" + if {[string equal -nocase [string index ${cards} 2] H] && [string equal -nocase [string index ${assoc} 7] 3]} { - ansto_makesctdrive ${name}_Temp8_setpoint ${scobj_hpath}/Temp8/setpoint ${scobj_hpath}/Temp8/sensor ${sct_controller} + hfactory ${scobj_hpath}/temp8/heater plain spy none + + hfactory ${scobj_hpath}/temp8/heater/hset plain user float + hsetprop ${scobj_hpath}/temp8/heater/hset read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB8.T1:TEMP:LOOP:HSET} + hsetprop ${scobj_hpath}/temp8/heater/hset rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/heater/hset write ${ns}::setValue ${scobj_hpath} noResponse {SET:DEV:DB8.T1:TEMP:LOOP:HSET:} + hsetprop ${scobj_hpath}/temp8/heater/hset noResponse ${ns}::noResponse ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/heater/hset check ${ns}::checkrange ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/heater/hset control true + hsetprop ${scobj_hpath}/temp8/heater/hset data true + hsetprop ${scobj_hpath}/temp8/heater/hset mutable true + hsetprop ${scobj_hpath}/temp8/heater/hset nxsave true + hsetprop ${scobj_hpath}/temp8/heater/hset lowerlimit 0 + hsetprop ${scobj_hpath}/temp8/heater/hset upperlimit 100 + hsetprop ${scobj_hpath}/temp8/heater/hset oldval 0.0 + hsetprop ${scobj_hpath}/temp8/heater/hset klass "parameter" + hsetprop ${scobj_hpath}/temp8/heater/hset sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp8/heater/hset type "part" + hsetprop ${scobj_hpath}/temp8/heater/hset nxalias "${name}_temp8_heater_hset" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp8/heater/hset 5 + ${sct_controller} write ${scobj_hpath}/temp8/heater/hset + hsetprop ${scobj_hpath}/temp8/heater/hset simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp8/heater/hset simulated true + } + + hfactory ${scobj_hpath}/temp8/heater/perc plain user float + hsetprop ${scobj_hpath}/temp8/heater/perc read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB3.H1:HTR:SIG:PERC} + hsetprop ${scobj_hpath}/temp8/heater/perc rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/heater/perc control true + hsetprop ${scobj_hpath}/temp8/heater/perc data true + hsetprop ${scobj_hpath}/temp8/heater/perc mutable true + hsetprop ${scobj_hpath}/temp8/heater/perc nxsave true + hsetprop ${scobj_hpath}/temp8/heater/perc oldval 0.0 + hsetprop ${scobj_hpath}/temp8/heater/perc klass "parameter" + hsetprop ${scobj_hpath}/temp8/heater/perc sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp8/heater/perc type "part" + hsetprop ${scobj_hpath}/temp8/heater/perc nxalias "${name}_temp8_heater_perc" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp8/heater/perc 5 + hsetprop ${scobj_hpath}/temp8/heater/perc simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp8/heater/perc simulated true + } + + hfactory ${scobj_hpath}/temp8/heater/power plain user float + hsetprop ${scobj_hpath}/temp8/heater/power read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB3.H1:HTR:SIG:POWR} + hsetprop ${scobj_hpath}/temp8/heater/power rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/temp8/heater/power control true + hsetprop ${scobj_hpath}/temp8/heater/power data true + hsetprop ${scobj_hpath}/temp8/heater/power mutable true + hsetprop ${scobj_hpath}/temp8/heater/power nxsave true + hsetprop ${scobj_hpath}/temp8/heater/power oldval 0.0 + hsetprop ${scobj_hpath}/temp8/heater/power klass "parameter" + hsetprop ${scobj_hpath}/temp8/heater/power sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/temp8/heater/power type "part" + hsetprop ${scobj_hpath}/temp8/heater/power nxalias "${name}_temp8_heater_power" + + if {[string equal -nocase "${simulation_flag}" "false"]} { + ${sct_controller} poll ${scobj_hpath}/temp8/heater/power 5 + hsetprop ${scobj_hpath}/temp8/heater/power simulated false + } else { + ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" + hsetprop ${scobj_hpath}/temp8/heater/power simulated true + } + hsetprop ${scobj_hpath}/temp8/heater data "true" + hsetprop ${scobj_hpath}/temp8/heater klass "@none" + hsetprop ${scobj_hpath}/temp8/heater type "part" + } + if {[string equal -nocase [string index ${cards} 2] H] && [string equal -nocase [string index ${assoc} 7] 3]} { + ansto_makesctdrive ${name}_temp8_setpoint ${scobj_hpath}/temp8/setpoint ${scobj_hpath}/temp8/sensor ${sct_controller} } } if {[string equal -nocase [string index ${cards} 3] V]} { - hfactory ${scobj_hpath}/Valve plain spy none + hfactory ${scobj_hpath}/valve plain spy none - hfactory ${scobj_hpath}/Valve/nick plain user text - hsetprop ${scobj_hpath}/Valve/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB4.G1:AUX:NICK} - hsetprop ${scobj_hpath}/Valve/nick rdText ${ns}::rdText ${scobj_hpath} - hsetprop ${scobj_hpath}/Valve/nick control true - hsetprop ${scobj_hpath}/Valve/nick data true - hsetprop ${scobj_hpath}/Valve/nick mutable true - hsetprop ${scobj_hpath}/Valve/nick nxsave true - hsetprop ${scobj_hpath}/Valve/nick oldval UNKNOWN - hsetprop ${scobj_hpath}/Valve/nick klass "parameter" - hsetprop ${scobj_hpath}/Valve/nick sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Valve/nick type "part" - hsetprop ${scobj_hpath}/Valve/nick nxalias "${name}_Valve_nick" + hfactory ${scobj_hpath}/valve/nick plain user text + hsetprop ${scobj_hpath}/valve/nick read ${ns}::getValue ${scobj_hpath} rdText {READ:DEV:DB4.G1:AUX:NICK} + hsetprop ${scobj_hpath}/valve/nick rdText ${ns}::rdText ${scobj_hpath} + hsetprop ${scobj_hpath}/valve/nick control true + hsetprop ${scobj_hpath}/valve/nick data true + hsetprop ${scobj_hpath}/valve/nick mutable true + hsetprop ${scobj_hpath}/valve/nick nxsave true + hsetprop ${scobj_hpath}/valve/nick oldval UNKNOWN + hsetprop ${scobj_hpath}/valve/nick klass "parameter" + hsetprop ${scobj_hpath}/valve/nick sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/valve/nick type "part" + hsetprop ${scobj_hpath}/valve/nick nxalias "${name}_valve_nick" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Valve/nick 15 - hsetprop ${scobj_hpath}/Valve/nick simulated false + ${sct_controller} poll ${scobj_hpath}/valve/nick 15 + hsetprop ${scobj_hpath}/valve/nick simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Valve/nick simulated true + hsetprop ${scobj_hpath}/valve/nick simulated true } - hfactory ${scobj_hpath}/Valve/sensor plain user float - hsetprop ${scobj_hpath}/Valve/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.G1:AUX:SIG:OPEN} - hsetprop ${scobj_hpath}/Valve/sensor rdValue ${ns}::rdValue ${scobj_hpath} - hsetprop ${scobj_hpath}/Valve/sensor control true - hsetprop ${scobj_hpath}/Valve/sensor data true - hsetprop ${scobj_hpath}/Valve/sensor mutable true - hsetprop ${scobj_hpath}/Valve/sensor nxsave true - hsetprop ${scobj_hpath}/Valve/sensor oldval 0.0 - hsetprop ${scobj_hpath}/Valve/sensor klass "parameter" - hsetprop ${scobj_hpath}/Valve/sensor sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Valve/sensor type "part" - hsetprop ${scobj_hpath}/Valve/sensor nxalias "${name}_Valve_sensor" + hfactory ${scobj_hpath}/valve/sensor plain user float + hsetprop ${scobj_hpath}/valve/sensor read ${ns}::getValue ${scobj_hpath} rdValue {READ:DEV:DB4.G1:AUX:SIG:PERC} + hsetprop ${scobj_hpath}/valve/sensor rdValue ${ns}::rdValue ${scobj_hpath} + hsetprop ${scobj_hpath}/valve/sensor control true + hsetprop ${scobj_hpath}/valve/sensor data true + hsetprop ${scobj_hpath}/valve/sensor mutable true + hsetprop ${scobj_hpath}/valve/sensor nxsave true + hsetprop ${scobj_hpath}/valve/sensor oldval 0.0 + hsetprop ${scobj_hpath}/valve/sensor klass "parameter" + hsetprop ${scobj_hpath}/valve/sensor sdsinfo "::nexus::scobj::sdsinfo" + hsetprop ${scobj_hpath}/valve/sensor type "part" + hsetprop ${scobj_hpath}/valve/sensor nxalias "${name}_valve_sensor" if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} poll ${scobj_hpath}/Valve/sensor 5 - hsetprop ${scobj_hpath}/Valve/sensor simulated false + ${sct_controller} poll ${scobj_hpath}/valve/sensor 5 + hsetprop ${scobj_hpath}/valve/sensor simulated false } else { ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Valve/sensor simulated true + hsetprop ${scobj_hpath}/valve/sensor simulated true } - - hfactory ${scobj_hpath}/Valve/setpoint plain user float - hsetprop ${scobj_hpath}/Valve/setpoint write ${ns}::setValve ${scobj_hpath} noResponse {SET:DEV:DB4.G1:AUX:SIG:OPEN:} - hsetprop ${scobj_hpath}/Valve/setpoint noResponse ${ns}::noResponse ${scobj_hpath} - hsetprop ${scobj_hpath}/Valve/setpoint check ${ns}::checkrange ${scobj_hpath} - hsetprop ${scobj_hpath}/Valve/setpoint driving 0 - hsetprop ${scobj_hpath}/Valve/setpoint checklimits ${ns}::checklimits ${scobj_hpath} - hsetprop ${scobj_hpath}/Valve/setpoint checkstatus ${ns}::checkstatus ${scobj_hpath} - hsetprop ${scobj_hpath}/Valve/setpoint halt ${ns}::halt ${scobj_hpath} - hsetprop ${scobj_hpath}/Valve/setpoint driveable Valve/sensor - hsetprop ${scobj_hpath}/Valve/setpoint control true - hsetprop ${scobj_hpath}/Valve/setpoint data true - hsetprop ${scobj_hpath}/Valve/setpoint mutable true - hsetprop ${scobj_hpath}/Valve/setpoint nxsave true - hsetprop ${scobj_hpath}/Valve/setpoint lowerlimit 0 - hsetprop ${scobj_hpath}/Valve/setpoint upperlimit 100 - hsetprop ${scobj_hpath}/Valve/setpoint tolerance ${vtol} - hsetprop ${scobj_hpath}/Valve/setpoint oldval 0.0 - hsetprop ${scobj_hpath}/Valve/setpoint klass "parameter" - hsetprop ${scobj_hpath}/Valve/setpoint sdsinfo "::nexus::scobj::sdsinfo" - hsetprop ${scobj_hpath}/Valve/setpoint settle_time "30" - hsetprop ${scobj_hpath}/Valve/setpoint type "drivable" - hsetprop ${scobj_hpath}/Valve/setpoint nxalias "${name}_Valve_setpoint" - - if {[string equal -nocase "${simulation_flag}" "false"]} { - ${sct_controller} write ${scobj_hpath}/Valve/setpoint - hsetprop ${scobj_hpath}/Valve/setpoint simulated false - } else { - ::scobj::oxford_mercury::sics_log 9 "simulation_flag=${simulation_flag} => No poll/write for oxford_mercury" - hsetprop ${scobj_hpath}/Valve/setpoint simulated true - } - hsetprop ${scobj_hpath}/Valve data "true" - hsetprop ${scobj_hpath}/Valve klass "@none" - hsetprop ${scobj_hpath}/Valve type "part" - ansto_makesctdrive ${name}_Valve_setpoint ${scobj_hpath}/Valve/setpoint ${scobj_hpath}/Valve/sensor ${sct_controller} + hsetprop ${scobj_hpath}/valve data "true" + hsetprop ${scobj_hpath}/valve klass "@none" + hsetprop ${scobj_hpath}/valve type "part" } + hsetprop ${scobj_hpath} driver oxford_mercury hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/pfeiffer_hg_sct.tcl b/site_ansto/instrument/config/environment/temperature/pfeiffer_hg_sct.tcl index 3ae698b9..e7e6adef 100644 --- a/site_ansto/instrument/config/environment/temperature/pfeiffer_hg_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/pfeiffer_hg_sct.tcl @@ -387,6 +387,7 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver pfeiffer_hg sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -477,6 +478,7 @@ proc ::scobj::pfeiffer_hg::mkDriver { sct_controller name device_class simulatio hsetprop ${scobj_hpath}/pressure klass "@none" hsetprop ${scobj_hpath}/pressure type "part" ansto_makesctdrive ${name}_pressure_setpoint ${scobj_hpath}/pressure/setpoint ${scobj_hpath}/pressure/sensor ${sct_controller} + hsetprop ${scobj_hpath} driver pfeiffer_hg hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/sct_eurotherm_3200.tcl b/site_ansto/instrument/config/environment/temperature/sct_eurotherm_3200.tcl index b4e7aea2..c6c25d26 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_eurotherm_3200.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_eurotherm_3200.tcl @@ -239,6 +239,7 @@ proc ::scobj::eurotherm_3200::mkDriver { sct_controller name device_class simula MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver eurotherm_3200 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -564,6 +565,7 @@ proc ::scobj::eurotherm_3200::mkDriver { sct_controller name device_class simula hsetprop ${scobj_hpath}/util data "false" hsetprop ${scobj_hpath}/util klass "@none" hsetprop ${scobj_hpath}/util type "part" + hsetprop ${scobj_hpath} driver eurotherm_3200 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/sct_srs_sr630.tcl b/site_ansto/instrument/config/environment/temperature/sct_srs_sr630.tcl index da3e1158..fa341f1a 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_srs_sr630.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_srs_sr630.tcl @@ -201,6 +201,7 @@ proc ::scobj::srs_sr630::mkDriver { sct_controller name device_class simulation_ MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver srs_sr630 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -399,6 +400,7 @@ proc ::scobj::srs_sr630::mkDriver { sct_controller name device_class simulation_ hsetprop ${scobj_hpath} data "true" hsetprop ${scobj_hpath} klass "@none" hsetprop ${scobj_hpath} type "part" + hsetprop ${scobj_hpath} driver srs_sr630 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/sct_west_6100.tcl b/site_ansto/instrument/config/environment/temperature/sct_west_6100.tcl index 5a818e53..2b8ff35e 100644 --- a/site_ansto/instrument/config/environment/temperature/sct_west_6100.tcl +++ b/site_ansto/instrument/config/environment/temperature/sct_west_6100.tcl @@ -350,6 +350,7 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_ MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver west_6100 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -630,6 +631,7 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_ hsetprop ${scobj_hpath}/aux data "false" hsetprop ${scobj_hpath}/aux klass "@none" hsetprop ${scobj_hpath}/aux type "part" + hsetprop ${scobj_hpath} driver west_6100 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/srs_sr630_sct.tcl b/site_ansto/instrument/config/environment/temperature/srs_sr630_sct.tcl index d0b655b4..6ae64919 100644 --- a/site_ansto/instrument/config/environment/temperature/srs_sr630_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/srs_sr630_sct.tcl @@ -201,6 +201,7 @@ proc ::scobj::srs_sr630::mkDriver { sct_controller name device_class simulation_ MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver srs_sr630 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -399,6 +400,7 @@ proc ::scobj::srs_sr630::mkDriver { sct_controller name device_class simulation_ hsetprop ${scobj_hpath} data "true" hsetprop ${scobj_hpath} klass "@none" hsetprop ${scobj_hpath} type "part" + hsetprop ${scobj_hpath} driver srs_sr630 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/watlow_mpm_sct.tcl b/site_ansto/instrument/config/environment/temperature/watlow_mpm_sct.tcl index 59bc5028..44cd913a 100644 --- a/site_ansto/instrument/config/environment/temperature/watlow_mpm_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/watlow_mpm_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::watlow_mpm::mkDriver { sct_controller name device_class simulation MakeSICSObj ${name} SCT_OBJECT user float + sicslist setatt ${name} driver watlow_mpm sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver watlow_mpm hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/watlow_mrm_sct.tcl b/site_ansto/instrument/config/environment/temperature/watlow_mrm_sct.tcl index 1d7f839b..2c654f46 100644 --- a/site_ansto/instrument/config/environment/temperature/watlow_mrm_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/watlow_mrm_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::watlow_mrm::mkDriver { sct_controller name device_class simulation MakeSICSObj ${name} SCT_OBJECT user float + sicslist setatt ${name} driver watlow_mrm sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver watlow_mrm hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/watlow_mst4_sct.tcl b/site_ansto/instrument/config/environment/temperature/watlow_mst4_sct.tcl index 06381702..2213d7a3 100644 --- a/site_ansto/instrument/config/environment/temperature/watlow_mst4_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/watlow_mst4_sct.tcl @@ -37,10 +37,12 @@ proc ::scobj::watlow_mst4::mkDriver { sct_controller name device_class simulatio MakeSICSObj ${name} SCT_OBJECT user float + sicslist setatt ${name} driver watlow_mst4 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} set scobj_hpath /sics/${name} + hsetprop ${scobj_hpath} driver watlow_mst4 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/environment/temperature/west4100_sct.tcl b/site_ansto/instrument/config/environment/temperature/west4100_sct.tcl index 4b7a6286..a9b2e5d3 100644 --- a/site_ansto/instrument/config/environment/temperature/west4100_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/west4100_sct.tcl @@ -99,6 +99,8 @@ proc ::scobj::west4100::read_config {} { } if { [string equal -nocase [dict get $v "driver"] "west4100"] } { ::scobj::west4100::sics_log 9 "No sctcontroller for west4100" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] set arg_list [list] set missing_list [list] foreach arg {dev_id} { diff --git a/site_ansto/instrument/config/environment/temperature/west_6100_sct.tcl b/site_ansto/instrument/config/environment/temperature/west_6100_sct.tcl index 4d7c7199..20f59e06 100644 --- a/site_ansto/instrument/config/environment/temperature/west_6100_sct.tcl +++ b/site_ansto/instrument/config/environment/temperature/west_6100_sct.tcl @@ -350,6 +350,7 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_ MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver west_6100 sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -630,6 +631,7 @@ proc ::scobj::west_6100::mkDriver { sct_controller name device_class simulation_ hsetprop ${scobj_hpath}/aux data "false" hsetprop ${scobj_hpath}/aux klass "@none" hsetprop ${scobj_hpath}/aux type "part" + hsetprop ${scobj_hpath} driver west_6100 hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/config/robots/epson_pandp_sct.tcl b/site_ansto/instrument/config/robots/epson_pandp_sct.tcl index 30313b68..c56c8c6d 100644 --- a/site_ansto/instrument/config/robots/epson_pandp_sct.tcl +++ b/site_ansto/instrument/config/robots/epson_pandp_sct.tcl @@ -100,6 +100,8 @@ proc ::scobj::epson_pandp::read_config {} { } if { [string equal -nocase [dict get $v "driver"] "epson_pandp"] } { ::scobj::epson_pandp::sics_log 9 "No sctcontroller for epson_pandp" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] set arg_list [list] set missing_list [list] foreach arg {robot_name} { diff --git a/site_ansto/instrument/config/robots/sct_epson_pandp.tcl b/site_ansto/instrument/config/robots/sct_epson_pandp.tcl index ae97c235..8fd3c362 100644 --- a/site_ansto/instrument/config/robots/sct_epson_pandp.tcl +++ b/site_ansto/instrument/config/robots/sct_epson_pandp.tcl @@ -100,6 +100,8 @@ proc ::scobj::epson_pandp::read_config {} { } if { [string equal -nocase [dict get $v "driver"] "epson_pandp"] } { ::scobj::epson_pandp::sics_log 9 "No sctcontroller for epson_pandp" + set ip_address [dict get $v ip] + set tcp_port [dict get $v port] set arg_list [list] set missing_list [list] foreach arg {robot_name} { diff --git a/site_ansto/instrument/config/source/reactor_status_sct.tcl b/site_ansto/instrument/config/source/reactor_status_sct.tcl index 39637cdf..815bdc0c 100644 --- a/site_ansto/instrument/config/source/reactor_status_sct.tcl +++ b/site_ansto/instrument/config/source/reactor_status_sct.tcl @@ -226,6 +226,7 @@ proc ::scobj::reactor_status::mkDriver { sct_controller name device_class simula MakeSICSObj ${name} SCT_OBJECT + sicslist setatt ${name} driver reactor_status sicslist setatt ${name} klass ${device_class} sicslist setatt ${name} long_name ${name} @@ -310,6 +311,7 @@ proc ::scobj::reactor_status::mkDriver { sct_controller name device_class simula hsetprop ${scobj_hpath} data "true" hsetprop ${scobj_hpath} klass "@none" hsetprop ${scobj_hpath} type "part" + hsetprop ${scobj_hpath} driver reactor_status hsetprop ${scobj_hpath} klass ${device_class} hsetprop ${scobj_hpath} data true hsetprop ${scobj_hpath} debug_threshold 5 diff --git a/site_ansto/instrument/hipd/util/sics_config.ini b/site_ansto/instrument/hipd/util/sics_config.ini index 4f0cdd40..24c16a72 100644 --- a/site_ansto/instrument/hipd/util/sics_config.ini +++ b/site_ansto/instrument/hipd/util/sics_config.ini @@ -131,7 +131,6 @@ desc = "Function Generator" driver = agilent_33220A imptype = function_generator ip = 10.157.205.16 -name = pulser port = 5025 [eularian_cradle] @@ -254,27 +253,44 @@ ip = 10.157.205.42 port = 4001 tol = 1.0 -[mercury_scpi_01] -desc = "Oxford Mercury temperature controller in Mercury mode" -driver = "mercury_scpi" +[mercury_01] +assoc = 00000124 +cards = HHHVLTTP +desc = "Oxford Mercury temperature controller (12T)" +driver = "oxford_mercury" imptype = temperature ip = 10.157.205.5 -permlink = LT port = 7020 -terminator = \r\n -tol = 1.0 -valve_tol = 2 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 -[mercury_scpi_02] -desc = "Oxford Mercury temperature controller in Mercury mode" -driver = "mercury_scpi" +[mercury_02] +assoc = 00000124 +cards = HHTVTTTP +desc = "Oxford Mercury temperature controller (CF10)" +driver = "oxford_mercury" +imptype = temperature +ip = 10.157.205.46 +port = 7020 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 + +[mercury_03] +assoc = 00000123 +cards = HHHNNTTT +desc = "Oxford Mercury temperature controller ()" +driver = "oxford_mercury" imptype = temperature ip = 10.157.205.47 -permlink = LT port = 7020 -terminator = \r\n -tol = 1.0 -valve_tol = 2 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 [normal_sample_stage] desc = "This is the default sample stage configuration with xy translation and phi and chi tilt stages" diff --git a/site_ansto/instrument/hipd/wombat_configuration.tcl b/site_ansto/instrument/hipd/wombat_configuration.tcl index 13bd920b..5a06208e 100644 --- a/site_ansto/instrument/hipd/wombat_configuration.tcl +++ b/site_ansto/instrument/hipd/wombat_configuration.tcl @@ -40,7 +40,6 @@ fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl fileeval $cfPath(environment)/temperature/ls340_sct.tcl fileeval $cfPath(environment)/temperature/sct_lakeshore_370.tcl fileeval $cfPath(environment)/temperature/lakeshore_m370_sct.tcl -fileeval $cfPath(environment)/temperature/sct_oxford_itc.tcl fileeval $cfPath(environment)/temperature/sct_oxford_mercury.tcl fileeval $cfPath(environment)/sct_protek_common.tcl fileeval $cfPath(environment)/protekmm_sct.tcl diff --git a/site_ansto/instrument/hrpd/echidna_configuration.tcl b/site_ansto/instrument/hrpd/echidna_configuration.tcl index c5fb83ba..2aeaca4f 100644 --- a/site_ansto/instrument/hrpd/echidna_configuration.tcl +++ b/site_ansto/instrument/hrpd/echidna_configuration.tcl @@ -40,7 +40,6 @@ fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl fileeval $cfPath(environment)/temperature/sct_ls340.tcl fileeval $cfPath(environment)/temperature/sct_lakeshore_370.tcl fileeval $cfPath(environment)/temperature/sct_lakeshore_m370.tcl -fileeval $cfPath(environment)/temperature/sct_oxford_itc.tcl fileeval $cfPath(environment)/temperature/sct_oxford_mercury.tcl fileeval $cfPath(environment)/sct_protek_common.tcl fileeval $cfPath(environment)/sct_protekmm.tcl diff --git a/site_ansto/instrument/hrpd/util/sics_config.ini b/site_ansto/instrument/hrpd/util/sics_config.ini index 5cfd4c2a..2f652325 100644 --- a/site_ansto/instrument/hrpd/util/sics_config.ini +++ b/site_ansto/instrument/hrpd/util/sics_config.ini @@ -233,27 +233,44 @@ ip = 10.157.205.42 port = 4001 tol = 1.0 -[mercury_scpi_01] -desc = "Oxford Mercury temperature controller in Mercury mode" -driver = "mercury_scpi" +[mercury_01] +assoc = 00000124 +cards = HHHVLTTP +desc = "Oxford Mercury temperature controller (12T)" +driver = "oxford_mercury" imptype = temperature ip = 10.157.205.5 -permlink = LT port = 7020 -terminator = \r\n -tol = 1.0 -valve_tol = 2 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 -[mercury_scpi_02] -desc = "Oxford Mercury temperature controller in Mercury mode" -driver = "mercury_scpi" +[mercury_02] +assoc = 00000124 +cards = HHTVTTTP +desc = "Oxford Mercury temperature controller (CF10)" +driver = "oxford_mercury" +imptype = temperature +ip = 10.157.205.46 +port = 7020 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 + +[mercury_03] +assoc = 00000123 +cards = HHHNNTTT +desc = "Oxford Mercury temperature controller ()" +driver = "oxford_mercury" imptype = temperature ip = 10.157.205.47 -permlink = LT port = 7020 -terminator = \r\n -tol = 1.0 -valve_tol = 2 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 [normal_sample_stage] desc = "This is the default sample stage configuration with xy translation and phi and chi tilt stages" diff --git a/site_ansto/instrument/pelican/config/motors/motor_configuration.tcl b/site_ansto/instrument/pelican/config/motors/motor_configuration.tcl index 6e3fd7c6..a330b820 100644 --- a/site_ansto/instrument/pelican/config/motors/motor_configuration.tcl +++ b/site_ansto/instrument/pelican/config/motors/motor_configuration.tcl @@ -910,7 +910,7 @@ proc get_vei {} { proc set_vwi {wavelength} { set dd 3.35416 set theta [expr (180.0 / 3.141592654) * asin($wavelength / (2.0 * $dd))] - set result [format "moma=%f,momb=%f,momc=%f,mtth=%f" $theta $theta $theta [expr 2.0 * $theta]] + set result [format "moma=%f,momb=%f,momc=%f,mtth=%f" -$theta -$theta -$theta [expr 2.0 * $theta]] return $result } @@ -930,10 +930,15 @@ vwi drivescript set_vwi sicslist setatt vwi units Angstrom sicslist setatt vwi klass crystal sicslist setatt vwi long_name wavelength +sicslist setatt vwi hdbchain mtth MakeConfigurableMotor vei vei readscript get_vei vei drivescript set_vei +sicslist setatt vei units mEv +sicslist setatt vei klass crystal +sicslist setatt vei long_name energy +sicslist setatt vei hdbchain mtth publish get_vwi user publish set_vwi user diff --git a/site_ansto/instrument/pelican/pelican_configuration.tcl b/site_ansto/instrument/pelican/pelican_configuration.tcl index 0f7487b1..a6ccaf0b 100644 --- a/site_ansto/instrument/pelican/pelican_configuration.tcl +++ b/site_ansto/instrument/pelican/pelican_configuration.tcl @@ -42,7 +42,6 @@ fileeval $cfPath(environment)/temperature/sct_lakeshore_340.tcl fileeval $cfPath(environment)/temperature/ls340_sct.tcl fileeval $cfPath(environment)/temperature/sct_lakeshore_370.tcl fileeval $cfPath(environment)/temperature/lakeshore_m370_sct.tcl -fileeval $cfPath(environment)/temperature/sct_oxford_itc.tcl fileeval $cfPath(environment)/temperature/sct_oxford_mercury.tcl fileeval $cfPath(environment)/sct_protek_common.tcl fileeval $cfPath(environment)/protekmm_sct.tcl diff --git a/site_ansto/instrument/pelican/util/sics_config.ini b/site_ansto/instrument/pelican/util/sics_config.ini index e2576474..accb4617 100644 --- a/site_ansto/instrument/pelican/util/sics_config.ini +++ b/site_ansto/instrument/pelican/util/sics_config.ini @@ -250,27 +250,44 @@ terminator = \r\n tol1 = 1.0 tol2 = 1.0 -[mercury_scpi_01] -desc = "Oxford Mercury temperature controller with three temperature loops." -driver = "mercury_base" +[mercury_01] +assoc = 00000124 +cards = HHHVLTTP +desc = "Oxford Mercury temperature controller (12T)" +driver = "oxford_mercury" imptype = temperature ip = 10.157.205.5 -permlink = LT port = 7020 -terminator = \r\n -tol = 1.0 -valve_tol = 2 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 -[mercury_scpi_02] -desc = "Oxford Mercury temperature controller with four temperature loops and needle valve control" -driver = "mercury_scpi" +[mercury_02] +assoc = 00000124 +cards = HHTVTTTP +desc = "Oxford Mercury temperature controller (CF10)" +driver = "oxford_mercury" +imptype = temperature +ip = 10.157.205.46 +port = 7020 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 + +[mercury_03] +assoc = 00000123 +cards = HHHNNTTT +desc = "Oxford Mercury temperature controller ()" +driver = "oxford_mercury" imptype = temperature ip = 10.157.205.47 -permlink = LT port = 7020 -terminator = \r\n -tol = 1.0 -valve_tol = 2 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 [normal_sample_stage] desc = "This is the default sample stage configuration" diff --git a/site_ansto/instrument/tas/taipan_configuration.tcl b/site_ansto/instrument/tas/taipan_configuration.tcl index 870ca4e1..68b2b2aa 100644 --- a/site_ansto/instrument/tas/taipan_configuration.tcl +++ b/site_ansto/instrument/tas/taipan_configuration.tcl @@ -49,9 +49,9 @@ fileeval $cfPath(environment)/temperature/sct_lakeshore_370.tcl fileeval $cfPath(environment)/temperature/sct_oxford_itc.tcl fileeval $cfPath(environment)/temperature/sct_oxford_mercury.tcl fileeval $cfPath(environment)/temperature/west400.tcl -fileeval $cfPath(environment)/he3/sct_he3.tcl fileeval $cfPath(environment)/magneticField/oxford_labview.tcl fileeval $cfPath(environment)/magneticField/sct_oxford12tlv.tcl +fileeval $cfPath(environment)/he3/sct_he3.tcl fileeval config/load_setup.tcl fileeval log.tcl publish logbook spy diff --git a/site_ansto/instrument/tas/util/sics_config.ini b/site_ansto/instrument/tas/util/sics_config.ini index 4ca3248b..42de7fd6 100644 --- a/site_ansto/instrument/tas/util/sics_config.ini +++ b/site_ansto/instrument/tas/util/sics_config.ini @@ -124,7 +124,6 @@ desc = "Function Generator" driver = agilent_33220A imptype = function_generator ip = 10.157.205.16 -name = pulser port = 5025 [ls336_01] @@ -235,27 +234,44 @@ terminator = \r\n tol1 = 1.0 tol2 = 1.0 -[mercury_scpi_01] -desc = "Oxford Mercury temperature controller with three temperature loops." -driver = "mercury_base" +[mercury_01] +assoc = 00000124 +cards = HHHVLTTP +desc = "Oxford Mercury temperature controller (12T)" +driver = "oxford_mercury" imptype = temperature ip = 10.157.205.5 -permlink = LT port = 7020 -terminator = \r\n -tol = 1.0 -valve_tol = 2 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 -[mercury_scpi_02] -desc = "Oxford Mercury temperature controller with four temperature loops and needle valve control" -driver = "mercury_scpi" +[mercury_02] +assoc = 00000124 +cards = HHTVTTTP +desc = "Oxford Mercury temperature controller (CF10)" +driver = "oxford_mercury" +imptype = temperature +ip = 10.157.205.46 +port = 7020 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 + +[mercury_03] +assoc = 00000123 +cards = HHHNNTTT +desc = "Oxford Mercury temperature controller ()" +driver = "oxford_mercury" imptype = temperature ip = 10.157.205.47 -permlink = LT port = 7020 -terminator = \r\n -tol = 1.0 -valve_tol = 2 +ptol = 5 +terminator = \n +ttol = 1.0 +vtol = 5 [normal_sample_stage] desc = "This is the default sample stage configuration" diff --git a/site_ansto/instrument/util/gen_sct.py b/site_ansto/instrument/util/gen_sct.py index dfa279c2..a6219afc 100755 --- a/site_ansto/instrument/util/gen_sct.py +++ b/site_ansto/instrument/util/gen_sct.py @@ -1628,6 +1628,7 @@ def put_mkDriver(MyDriver): ms_line = ' MakeSICSObj ${name} SCT_OBJECT' txt += [ms_line] txt += [''] + txt += [' sicslist setatt ${name} driver %s' % MyDriver['name']] txt += [' sicslist setatt ${name} klass ${device_class}'] txt += [' sicslist setatt ${name} long_name ${name}'] if 'DriverProperty' in MyDriver: @@ -1639,6 +1640,7 @@ def put_mkDriver(MyDriver): for group in sorted(MyDriver['Groups']): txt += put_group(MyDriver, MyDriver['Groups'][group]) + txt += [' hsetprop ${scobj_hpath} driver %s' % MyDriver['name']] txt += [' hsetprop ${scobj_hpath} klass ${device_class}'] txt += [' hsetprop ${scobj_hpath} data true'] txt += [' hsetprop ${scobj_hpath} debug_threshold %s' % str(MyDriver['debug_threshold'])] @@ -1785,6 +1787,8 @@ def put_read_config(MyDriver): txt += [' if { [string equal -nocase [dict get $v "driver"] "%s"] } {' % MyDriver['name']] if ('WrapperProperty' in MyDriver) and ('nosctcontroller' in MyDriver['WrapperProperty']): txt += [' %s::sics_log 9 "No sctcontroller for %s"' % (MyDriver['namespace'], MyDriver['name'])] + txt += [' set ip_address [dict get $v ip]'] + txt += [' set tcp_port [dict get $v port]'] else: txt += [' if { ![string equal -nocase "${simulation_flag}" "false"] } {'] txt += [' set asyncqueue "null"']