diff --git a/histmem.c b/histmem.c index b9717e25..f6b91730 100644 --- a/histmem.c +++ b/histmem.c @@ -1301,6 +1301,14 @@ int HistAction(SConnection * pCon, SicsInterp * pSics, void *pData, SCSendOK(pCon); return 1; } + else if (strcmp(argv[1], "astop") == 0) { + if (!SCMatchRights(pCon, usUser)) { + return 0; + } + self->pDriv->Halt(self->pDriv); + SCSendOK(pCon); + return 1; + } /* pause */ else if (strcmp(argv[1], "pause") == 0) { if (!SCMatchRights(pCon, usUser)) { diff --git a/network.c b/network.c index 5e4846e3..c63fcad0 100644 --- a/network.c +++ b/network.c @@ -678,7 +678,7 @@ int NETReadTillTerm(mkChannel * self, long timeout, status = NETAvailable(self, timeout - dif); }; }; - return status; + return bufPtr; } /*-------------------------------------------------------------------------*/ diff --git a/site_ansto/instrument/config/environment/temperature/west400.tcl b/site_ansto/instrument/config/environment/temperature/west400.tcl index c63855e3..310bc043 100644 --- a/site_ansto/instrument/config/environment/temperature/west400.tcl +++ b/site_ansto/instrument/config/environment/temperature/west400.tcl @@ -42,9 +42,15 @@ proc ::environment::temperature::add_west400 {IP} { tc1 tolerance 10 } - sicslist setatt tc1 environment_name tempone + sicslist setatt tc1 environment_name tc1 sicslist setatt tc1 long_name control_sensor_reading ::environment::mkenvinfo tc1 {ramprate {priv user} powerlimit {priv manager} } #::environment::mkenvinfo tc1 {heateron {priv user} range {priv manager} } } +if { [ info exists ::config_dict ] } { + if { [ dict get $::config_dict west4100 enabled ] } { + set IP [dict get $::config_dict west4100 ip] + ::environment::temperature::add_west400 $IP + } +} diff --git a/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl b/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl index 5643f557..c3627312 100644 --- a/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl +++ b/site_ansto/instrument/config/hmm/hmm_configuration_common_1.tcl @@ -50,6 +50,7 @@ namespace eval histogram_memory { hmm configure ratemap_xy_total 321 hmm configure maximum_period 0 hmm configure fat_frame_frequency 50 + hmm configure fat_clock_scale 1000 foreach bm $::counter::isc_beam_monitor_list { set bm_num [string index $bm end] if [string is integer $bm_num] { diff --git a/site_ansto/instrument/config/nexus/nxscripts_common_1.tcl b/site_ansto/instrument/config/nexus/nxscripts_common_1.tcl index 183c2fb8..03e8aed4 100644 --- a/site_ansto/instrument/config/nexus/nxscripts_common_1.tcl +++ b/site_ansto/instrument/config/nexus/nxscripts_common_1.tcl @@ -867,8 +867,8 @@ proc ::nexus::histmem::save {hm nxalias hpath data_type filestatus args} { nxscript updatedictvar pa_hmmrank [expr {$rank+1}] nxscript updatedictvar pa_hmmdimstr "-1,$dimstr" } else { - nxscript updatedictvar pa_hmmrank $rank - nxscript updatedictvar pa_hmmdimstr $dimstr + nxscript updatedictvar pa_hmmrank [expr {$rank+1}] + nxscript updatedictvar pa_hmmdimstr "1,$dimstr" } set max_period [SplitReply [$HMOBJ configure maximum_period]] set datsize $hmmperiodsize diff --git a/site_ansto/instrument/reflectometer/config/commands/commands.tcl b/site_ansto/instrument/reflectometer/config/commands/commands.tcl index 629b6d19..4d2684e8 100644 --- a/site_ansto/instrument/reflectometer/config/commands/commands.tcl +++ b/site_ansto/instrument/reflectometer/config/commands/commands.tcl @@ -80,6 +80,8 @@ proc ::exp_mode::omega_2theta { arg1 arg2 {s1vg 0} {s2vg 0} {s3vg 0} {s4vg 0}} { } errMsg ] } { omega -1 twotheta -1 + broadcast ERROR: omega_2theta command did not complete correctly + broadcast $errMsg return -code error $errMsg } if {![string is double $s1vg] || ![string is double $s2vg] || ![string is double $s3vg] || ![string is double $s4vg]} { diff --git a/site_ansto/instrument/reflectometer/config/parameters/parameters.tcl b/site_ansto/instrument/reflectometer/config/parameters/parameters.tcl index 66c7066f..fb53f515 100644 --- a/site_ansto/instrument/reflectometer/config/parameters/parameters.tcl +++ b/site_ansto/instrument/reflectometer/config/parameters/parameters.tcl @@ -35,6 +35,8 @@ foreach {vn klass units} { twotheta parameter degrees anal_distance polarizer mm anal_base polarizer mm + x_pixels_per_mm parameter mm + y_pixels_per_mm parameter mm } { ::utility::mkVar $vn float manager $vn true $klass true true sicslist setatt $vn units $units @@ -92,3 +94,5 @@ twotheta -1 guide_element NONE master 1 slave 3 +x_pixels_per_mm 1 +y_pixels_per_mm 1.177 diff --git a/site_ansto/instrument/reflectometer/hostport_config.tcl b/site_ansto/instrument/reflectometer/hostport_config.tcl index 9c43bb66..8a8d457c 100644 --- a/site_ansto/instrument/reflectometer/hostport_config.tcl +++ b/site_ansto/instrument/reflectometer/hostport_config.tcl @@ -13,6 +13,7 @@ foreach {mc host port} { foreach {bm host port} { MONITOR_1 das1-platypus 30000 MONITOR_2 das1-platypus 30001 + MONITOR_3 das1-platypus 30002 } { dict set MONITOR_HOSTPORT $bm HOST $host dict set MONITOR_HOSTPORT $bm PORT $port diff --git a/site_ansto/instrument/sans/config/motors/motor_configuration.tcl b/site_ansto/instrument/sans/config/motors/motor_configuration.tcl index 4c3023b4..7eebc213 100644 --- a/site_ansto/instrument/sans/config/motors/motor_configuration.tcl +++ b/site_ansto/instrument/sans/config/motors/motor_configuration.tcl @@ -874,7 +874,9 @@ bs1 long_name bs1 bs1 softlowerlim 11 bs1 softupperlim 95 bs1 home 90 -bs1 precision 0.05 +bs1 precision 1.5 +bs1 creep_precision 0.05 +bs1 creep_offset 1 Motor bs2 $motor_driver_type [params \ asyncqueue mc4\ @@ -895,7 +897,9 @@ bs2 long_name bs2 bs2 softlowerlim 7 bs2 softupperlim 95 bs2 home 90 -bs2 precision 0.05 +bs2 precision 1.5 +bs2 creep_precision 0.05 +bs2 creep_offset 1 Motor bs3 $motor_driver_type [params \ asyncqueue mc4\ @@ -916,7 +920,9 @@ bs3 long_name bs3 bs3 softlowerlim 11 bs3 softupperlim 95 bs3 home 90 -bs3 precision 0.05 +bs3 precision 1.5 +bs3 creep_precision 0.05 +bs3 creep_offset 1 Motor bs4 $motor_driver_type [params \ asyncqueue mc4\ @@ -937,7 +943,9 @@ bs4 long_name bs4 bs4 softlowerlim 7 bs4 softupperlim 95 bs4 home 90 -bs4 precision 0.05 +bs4 precision 1.5 +bs4 creep_precision 0.05 +bs4 creep_offset 1 Motor bs5 $motor_driver_type [params \ asyncqueue mc4\ @@ -958,7 +966,9 @@ bs5 long_name bs5 bs5 softlowerlim 11 bs5 softupperlim 95 bs5 home 90 -bs5 precision 0.05 +bs5 precision 1.5 +bs5 creep_precision 0.05 +bs5 creep_offset 1 Motor bs6 $motor_driver_type [params \ asyncqueue mc4\ @@ -979,7 +989,9 @@ bs6 long_name bs6 bs6 softlowerlim 7 bs6 softupperlim 95 bs6 home 90 -bs6 precision 0.05 +bs6 precision 1.5 +bs6 creep_precision 0.05 +bs6 creep_offset 1 # Polarizer Rotation #Motor pol $motor_driver_type [params \ diff --git a/site_ansto/instrument/sans/config/optics/guide_configuration.tcl b/site_ansto/instrument/sans/config/optics/guide_configuration.tcl index 021e2fda..a66f2b84 100644 --- a/site_ansto/instrument/sans/config/optics/guide_configuration.tcl +++ b/site_ansto/instrument/sans/config/optics/guide_configuration.tcl @@ -29,7 +29,7 @@ array set guide_configuration { ga {{MT A A A A A A A A } 675} mt {{MT MT MT MT MT MT MT MT MT} 675} lp {{MT MT MT MT MT MT MT MT LP} 675} - lens {{MT MT MT MT MT MT MT MT L } 675} + lens {{MT A A A A A A A L } 675} p1 {{P A MT MT MT MT MT MT MT} 4621} p1lp {{P A MT MT MT MT MT MT LP} 4621} p1lens {{P A MT MT MT MT MT MT L } 4621} diff --git a/site_ansto/instrument/sans/hostport_config_test.tcl b/site_ansto/instrument/sans/hostport_config_test.tcl index c65d2d3a..3c18c84f 100644 --- a/site_ansto/instrument/sans/hostport_config_test.tcl +++ b/site_ansto/instrument/sans/hostport_config_test.tcl @@ -42,8 +42,8 @@ foreach {key host port} { # VELOCITY SELECTOR HOST AND PORT foreach {key host port} { - NVS40 localhost 60001 - NVS43 localhost 60001 + NVS40 localhost 10000 + NVS43 localhost 10000 } { dict set VELSEL_HOSTPORT $key HOST $host dict set VELSEL_HOSTPORT $key PORT $port diff --git a/site_ansto/instrument/tas/util/sics_config.ini b/site_ansto/instrument/tas/util/sics_config.ini index ccc5ebcc..084591e9 100644 --- a/site_ansto/instrument/tas/util/sics_config.ini +++ b/site_ansto/instrument/tas/util/sics_config.ini @@ -58,3 +58,9 @@ desc = "s1 will be defined as the sample insert rotation. Sample stage will be r enabled = False group = motors +[west4100] +desc = "tc1: Blue furnace temperature controller" +enabled = False +group = environment:temperature +ip = 137.157.203.141 +name = tc1 diff --git a/site_ansto/safetyplc.c b/site_ansto/safetyplc.c index 03a18b07..d521e74f 100644 --- a/site_ansto/safetyplc.c +++ b/site_ansto/safetyplc.c @@ -349,7 +349,7 @@ static int PLC_Print(SConnection *pCon, SicsInterp *pSics, return 0; } else { snprintf(line, 132, "%s.%s = %s", name, param, plc_states[state]); - SCWrite(pCon, line, eStatus); + SCWrite(pCon, line, eValue); return OKOK; } } @@ -361,7 +361,7 @@ static int PLC_Action(SConnection *pCon, SicsInterp *pSics, pSafetyPLCController self = (pSafetyPLCController) pData; if (argc == 1) { snprintf(line, 132, "%s.iValue = %06X", argv[0], self->iValue & 0xffffff); - SCWrite(pCon, line, eStatus); + SCWrite(pCon, line, eValue); return OKOK; } else if (argc == 2) {