Files
sics/site_ansto/instrument/rsd/config/hmm/hmm_configuration.tcl
Ferdi Franceschini d9da95a5df sct_protek608.c
Implements a protocol handler for the protek  608 multimeters which just allows us to read the display.
It reports all elements of the display including the bar graph, it does not provide remote control of the multimeter.  The protocol handler broadcasts a warning to all clients if the auto-off function is enabled.

sct_rfamp.c
This is a protocol handler for the Mirrortron 35V 7A AC Generator (ANSFR-83B).

sinqhttpprot.c
Copied the PSI script context http protocol handler.

sct_orhvpsprot.c
Ordela high voltage power supply protocol handler now catches unknown commands.

sct_eurotherm_2000.tcl
Eurotherm controller for the kowari load frame by Douglas Clowes.

sct_lakeshore_3xx.tcl
Latest update from Arndt.  The two control loops are now independent, settletime and tolerance now work properly.

common_instrument_dictionary.tcl
Make instrument/status saveable.

sct_orhvps_common.tcl
Provides voltage ramping and implements the dhv1 command for the Ordela HVPS via the sct_orhpsprot.c protocol handler.

hmm_configuration_common_1.tcl
Adds new "histmem clockscale" subcommand to get and set the clock scale from the fat_clock_scale FAT parameter.
You can now upload the FAT FRAME_BUFFER and FRAME_DUTYCYCLE parameters to the histogram memory.
The veto commands are now "histmem veto on" and "histmem veto off".

hmm_object.tcl
The axis order for the histmem object has been restore to t,y,x

sct_positmotor_common.tcl
Code has been simplified.

nxscripts_common_1.tcl
Removed obsolete ::nexus::data function.  TOF axis now correctly report time_of_flight instead of "time".

plc_common_1.tcl
Make PLC info saveable.

scan_common_1.tcl
SICS-385 The scan command should check the final scan variable value against he soft upper and lower limits, not against the hard limits.
Make sure that the scan variable axis is saved.

platypus, kowari, quokka hmm_configuration.tcl
Use the HOR and VER entries in the new histmem_axes hash to select the horizontal and vertical axes for the histmem.

kowari motor_configuration.tcl secondary_slit_configuration.tcl
Flatten slits motor structure to match old layout in data files.

quokka commands.tcl
SICS-380 EApPosYmm -> EApPosY

quokka detector.tcl
Use new script context controller for Ordela HVPS

quokka hmm_configuration.tcl
Set detector height to 5.08*192 the same as the width

quokka motor_configuration.tcl
Code cleanup

quokka positmotor_configuration.tcl
Use new positmotor code.

quokka aperture_configuration.tcl
Added attenuation factor column to AttRotLookupTable

quokka parameters.tcl
SICS-380 Refactor nexus, remove redundant parameters.

site_ansto.c
Added the following protocols, Httpl, Protek608, aand RFAmp.

scriptcontext.c
SICS-386 SctActionHandler: set "send" string to NULL when a chain of scripts completes with state=idle.
It turns out that if none of the scripts in the "read chain" call [sct send] each time the chain is executed, then SICS will hammer the device with calls to AsconWrite(). This can be avoided if SctActionHandler sets the 'send' string to NULL before "goto finish" in the idle state. This will be safer and still let you have chains with multiple [sct send] and read scripts.

asyncprotocol.c
Fix platypus memory leak.

devser.c
SICS-387 Started adding code to pass signals on to script context drivers.

ascon.c
AsconTask(): Make sure we return to the AsconIdle state when sending a command which expect no response, also only reconnect if there is a Timeout when there has been an error.

r2888 | ffr | 2010-04-19 14:04:41 +1000 (Mon, 19 Apr 2010) | 90 lines
2012-11-15 17:00:29 +11:00

104 lines
3.2 KiB
Tcl

source $cfPath(hmm)/hmm_configuration_common_1.tcl
set sim_mode [SplitReply [hmm_simulation]]
::utility::mkVar sample_to_detector_distance float manager sample_to_detector_distance true detector true true
sicslist setatt sample_to_detector_distance units mm
proc ::histogram_memory::init_OAT_TABLE {} {
# We don't need a MAX_CHAN parameter for time because the time channel
# is scaled by calling the ::histogram_memory::clock_scale function
OAT_TABLE X -setdata MAX_CHAN 421
OAT_TABLE Y -setdata MAX_CHAN 421
OAT_TABLE X -setdata BMIN -210.5
OAT_TABLE X -setdata BMAX 210.5
OAT_TABLE Y -setdata BMIN -210.5
OAT_TABLE Y -setdata BMAX 210.5
OAT_TABLE -set X { -210.5 -209.5 } NXC 421 Y { -210.5 -209.5 } NYC 421 T { 0 20000 } NTC 1
}
proc ::histogram_memory::pre_count {} {}
proc ::histogram_memory::post_count {} {}
##
# @brief Adds Kowari specific hmm data types
proc ::histogram_memory::is_select_read_type {type} {
variable HMOBJ
# Instrument specific X and Y dimension names
variable INST_NXC
variable INST_NYC
if [catch {
$HMOBJ configure read_data_period_number 0
switch [string toupper $type] {
"TOTAL_HISTOGRAM_X_CORRECTED" {
$HMOBJ configure rank 1
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
$HMOBJ configure READ_DATA_UNCAL_CAL CALIBRATED
$HMOBJ configure READ_DATA_TYPE TOTAL_HISTOGRAM_X
set hmm_ext "_total_x"
}
"TOTAL_HISTOGRAM_XY_CORRECTED" {
$HMOBJ configure rank 2
$HMOBJ configure dim0 [SplitReply [$HMOBJ configure $INST_NXC]]
$HMOBJ configure dim1 [SplitReply [$HMOBJ configure $INST_NYC]]
$HMOBJ configure READ_DATA_UNCAL_CAL CALIBRATED
$HMOBJ configure READ_DATA_TYPE TOTAL_HISTOGRAM_XY
set hmm_ext "_total_xy"
}
default {
$HMOBJ configure READ_DATA_UNCAL_CAL UNCALIBRATED
set hmm_ext "notfound"
}
}
} msg ] {
return -code error "([info level 0]) $msg"
}
return $hmm_ext
}
proc ::histogram_memory::isc_initialize {} {
# Instrument specific X and Y dimension names
variable INST_NXC "oat_nxc_eff"
variable INST_NYC "oat_nyc_eff"
if [ catch {
::histogram_memory::init_hmm_objs
if {$::sim_mode == "true"} {
hmm configure oat_ntc_eff 1
hmm configure $INST_NYC 421
hmm configure $INST_NXC 421
}
BAT_TABLE -init
CAT_TABLE -init
SAT_TABLE -init
OAT_TABLE -init
FAT_TABLE -init
detector_active_height_mm 280
detector_active_height_mm lock
detector_active_width_mm 280
detector_active_width_mm lock
::histogram_memory::ic_initialize
# hmm configure FAT_SIMULATED_EVENT_Y0 $y_bb0
# hmm configure FAT_SIMULATED_EVENT_Y1 $ybbmax
# hmm configure FAT_SIMULATED_EVENT_X0 $x_bb0
# hmm configure FAT_SIMULATED_EVENT_X1 $xbbmax
::histogram_memory::init_OAT_TABLE
::histogram_memory::upload_config Filler_defaults
set ::histogram_memory::histmem_axes(HOR) /instrument/detector/x_pixel_offset
set ::histogram_memory::histmem_axes(VER) /instrument/detector/y_pixel_offset
} message ] {
if {$::errorCode=="NONE"} {return $message}
return -code error $message
}
}
proc histmem {cmd args} {
eval "_histmem $cmd $args"
}
publish histmem user