SICS-294 anstohttp.c

Histmem now only calls TaskYield after SICS has finished initalising, this stops the statusfile task from being called early and overwriting the status file. Created ANSTO_MakeHistMemory command to install ANSTO_HistAction
Added veto functions.  Mapped the HistDriver interface Pause() and Continue() commands to AnstoHttpVeto and AnstoHttpNoVeto. Implemented an ANSTO_Histaction to call AnstoHttpPause when sent a "pause" subcommand.

hmcontrol_ansto.c
Call AnstoHttpPause() directly when Pause_HM_After_Count is set to preserver current behaviour.

counterdriv.c
Now sends the correct "SICS RESUME" command to resume a paused count.

ansto_sctdriveadapter.c NEW
This lets you create driveable objects from script-context controllers which have one node for setting a parameter and another node for reading the parameter (eg temperature controllers, choppers, velocity selectors)

sctemonadapter.c NEW
This generates an environment monitor interface for script-context controllers so that the emon object in SICS will be able to pause counters if the controller goes out of tolerance.

sct_usbtmcprot.c, usbtmc.h NEW
First attempt at a protocol handler for USB Test and Measurement Class devices

sct_julabo_lh45.tcl NEW
Implements script-context controller for the Julabo LH45 temperature controller.

Makefile
Added ansto_sctdriveadapter and sctemonadapter

hardsup/makefile
Added velocity selector and usbtmc protocol handlers

hardsup/sct_velselprot.c
Simplified, don't worry about trying to implement a login handler for now, just implement a "Reading" handler.

site_ansto.c
Add the velocity selector and USBTMC protocol handlers.
Added the ANSTO_MakeHM command

instrument/config/hipadaba/common_instrument_dictionary.tcl
Added support for auxiliary data, ie extra meta-data entries in the "data" group of the nexus file.
Add new NXvelocity_selector object under /instrument.

instrument/config/hipadaba/hipadaba_configuration_common.tcl
Add the new "sct_object" script-context controller objects to the hdb tree.

instrument/config/hipadaba/instdict_specification.tcl
Define the new sct_object controllers.

instrument/config/hmm/hmm_configuration_common_1.tcl
Use the new ANSTO_MakeHM command to create histmem drivers which support veto.
Define allowed attributes and elements for the BAT_TABLE and FAT_TABLE
Stop between counts instead of pausing because setting pause now sends a veto.

instrument/config/motors/sct_jogmotor_common.tcl
You now need to specify klass when creating a jogmotor.

instrument/config/motors/sct_positmotor_common.tcl
You can now specify an optional function which calculates the instrument parameter (eg attenuation) from a posit table entry when defining a posit motor.

instrument/config/nexus/nxscripts_common_1.tcl
Report file status info in the /experiment section of the hdb tree.  Add auxiliary data to data file.
Handle saving data from script-context controller objects.

instrument/util/script_context_util.tcl
Added procedure to set required properties  for saving script-context object data.

instrument/util/utility.tcl
Added set_sct_object_attributes proc to automatically set required attributes on SCT_OBJECTs
Fixed hlistplainprop to deal with empty property fields on hdb nodes.

instrument/server_config.tcl
Call the new nexus initialisation command and set attributes on sct objects.

hrpd/config/motors/motor_configuration.tcl
New absenc home readings for mchi and mphi. New absenc home and range for mf1

hipd/config/commands/commands.tcl
Exported and published the new ajscmds so that they can be used in batch files.

hipd/config/motors/motor_configuration.tcl
New mchi absenc home

rsd/config/hmm/hmm_configuration.tcl
Provide support for saving corrected hmm data

rsd/config/motors/motor_configuration.tcl
Use simple names for motors.

SICS-329

sans/config/INSTCFCOMMON.TXT
Added julabo and lakeshore configuration files to list.

sans/config/optics/guide_configuration.tcl
Added entrance aperture positions to the configuration table and the cn_maps which map the index to the component ID.

sans/commands/commands.tcl
The "guide" command now set EApPosYmm after driving the guides in place.
The indexed position to component maps (cn_map) have been moved to the guide_configuration.tcl file.

sans/motors/motor_configuration.tcl
Set samy home to 56.1mm

sans/config/velsel/sct_velsel.tc NEW
Implements script-context controller object for the NVS40 velocity selector. TODO tilt-angle control, driveable interface.

sans/config/hmm/hmm_configuration.tcl
Set 5.08mm spacing on detector width. Use pixel-offset for vertical and horizontal detector axes.

sans/config/motors/motor_configuration.tcl
Swap directions of beamstops 4 and 5 (the two smallest)
New config parameters for samx, samthet, apx, det, detoff, bsz,

sans/config/motors/positmotor_configuration.tcl
Added descriptive headers to positmotor configuration tables and new synstax for the make positmotor command.

sans/config/nexus/nxscripts.tcl
Implemented initialisation command.

sans/config/parameters/parameters.tcl
Added SampleThickness and TransmissionFlag.  Calculate SamplePosYmm from samy and SamyOffsetmm.
Added beamstops to hdb tree.

reflectometer/config/nexus/nxscripts.tcl
Implement the initialisation procedure.

r2767 | ffr | 2009-03-31 10:16:54 +1100 (Tue, 31 Mar 2009) | 123 lines
This commit is contained in:
Ferdi Franceschini
2009-03-31 10:16:54 +11:00
committed by Douglas Clowes
parent eec824f98a
commit d2f57e4615
39 changed files with 2026 additions and 557 deletions

View File

@@ -17,10 +17,36 @@ proc ::histogram_memory::init_OAT_TABLE {} {
proc ::histogram_memory::pre_count {} {}
proc ::histogram_memory::post_count {} {}
proc ::histogram_memory::mk_hmm_corrected {} {
if {$::sim_mode == "true"} {
MakeHM hmm_xy_corrected SIM
MakeHM hmm_x_corrected SIM
} else {
MakeHM hmm_xy_corrected anstohttp
MakeHM hmm_x_corrected anstohttp
}
hmm_xy_corrected configure rank 2
hmm_xy_corrected configure READ_DATA_UNCAL_CAL CALIBRATED
hmm_xy_corrected configure READ_DATA_TYPE TOTAL_HISTOGRAM_XY
hmm_xy_corrected configure dim0 421
hmm_xy_corrected configure dim1 421
hmm_xy_corrected configure init 0
hmm_xy_corrected init
hmm_x_corrected configure rank 1
hmm_x_corrected configure READ_DATA_UNCAL_CAL CALIBRATED
hmm_x_corrected configure READ_DATA_TYPE TOTAL_HISTOGRAM_X
hmm_x_corrected configure dim0 421
hmm_x_corrected configure init 0
hmm_x_corrected init
}
proc ::histogram_memory::isc_initialize {} {
if [ catch {
::histogram_memory::init_hmm_objs
::histogram_memory::mk_hmm_corrected
if {$::sim_mode == "true"} {
hmm configure oat_ntc_eff 1
hmm configure oat_nyc_eff 421

View File

@@ -161,7 +161,7 @@ mphi speed 1
mphi movecount $move_count
mphi precision 0.01
mphi part crystal
mphi long_name phi
mphi long_name mphi
# Monochromator chi, Tilt 2, lower
Motor mchi $motor_driver_type [params \
@@ -182,7 +182,7 @@ mchi speed 1
mchi movecount $move_count
mchi precision 0.01
mchi part crystal
mchi long_name chi
mchi long_name mchi
# Monochromator Trans 1, upper
Motor mx $motor_driver_type [params \
@@ -203,7 +203,7 @@ mx speed 1
mx movecount $move_count
mx precision 0.01
mx part crystal
mx long_name translate_y
mx long_name mx
# Monochromator Trans 2, lower
Motor my $motor_driver_type [params \
@@ -224,7 +224,7 @@ my speed 1
my movecount $move_count
my precision 0.01
my part crystal
my long_name translate_x
my long_name my
# Monochromator omega, rotate
# Ref pos has lower tilt dial facing mono drum door for mom=0
@@ -246,7 +246,7 @@ mom speed 1
mom movecount $move_count
mom precision 0.01
mom part crystal
mom long_name rotate
mom long_name mom
# Monochromator two-theta, flight-tube rotate
Motor mtth $motor_driver_type [params \
@@ -280,7 +280,7 @@ mtth blockage_check_interval 5
mtth blockage_thresh 0.10
mtth blockage_ratio 400
mtth part crystal
mtth long_name takeoff_angle
mtth long_name mtth
############################
# Motor Controller 2
@@ -315,7 +315,7 @@ sz blockage_ratio 5
sz Precision 0.1
sz Creep_Offset 1
sz Creep_Precision 0.01
sz long_name translate_z
sz long_name sz
# Sample Trans, vertical, second stage
#Motor sz2 $motor_driver_type [params \
@@ -332,7 +332,7 @@ sz long_name translate_z
#sz2 speed 1
#sz2 precision 0.01
#sz2 part sample.second
#sz2 long_name vertical_translation
#sz2 long_name sz2
} else {
# Temporary Tiny Translation Thingy
set sz_home 800000
@@ -359,7 +359,7 @@ sz backlash_offset -1
sz blockage_ratio 5
sz precision 0.025
sz creep_offset 0.1
sz long_name translate_z
sz long_name sz
}
# Sample Trans 1, upper, x
@@ -392,7 +392,7 @@ sx decel 1.0
sx movecount $move_count
sx precision 0.01
sx part sample
sx long_name translate_x
sx long_name sx
sx backlash_offset -5
sx creep_offset 0.5
@@ -432,7 +432,7 @@ sy decel 1.0
sy movecount $move_count
sy precision 0.01
sy part sample
sy long_name translate_y
sy long_name sy
sy backlash_offset -5
sy creep_offset 0.5
@@ -457,7 +457,7 @@ som accel 0.1
som decel 0.1
som precision 0.01
som part sample
som long_name rotate
som long_name som
# Sample two-theta, detector rotate
Motor stth $motor_driver_type [params \
@@ -482,7 +482,7 @@ stth movecount $move_count
stth precision 0.005
stth maxretry 6
stth part sample
stth long_name azimuthal_angle
stth long_name stth
stth Backlash_offset 0.3
@@ -517,7 +517,7 @@ mf1 speed 0.1
mf1 movecount $move_count
mf1 precision 0.01
mf1 part monochromator.focus
mf1 long_name horizontal
mf1 long_name mf1
mf1 creep_offset 1
mf1 Backlash_offset -0.03
@@ -542,7 +542,7 @@ mf2 speed 0.1
mf2 movecount $move_count
mf2 precision 0.01
mf2 part monochromator.focus
mf2 long_name vertical
mf2 long_name mf2
mf2 creep_offset 1
## Eulerian-chi
@@ -595,7 +595,7 @@ Motor psho $motor_driver_type [params \
psho speed 4
psho Backlash_offset -0.3
psho part slits.primary
psho long_name horizontal_offset
psho long_name psho
setHomeandRange -motor psho -home 0 -lowrange 0 -uprange 30
# Primary Slit, position 0-150mm (Y-axis)
@@ -615,7 +615,7 @@ Motor psp $motor_driver_type [params \
psp speed 4
psp Backlash_offset -0.3
psp part slits.primary
psp long_name position
psp long_name psp
setHomeandRange -motor psp -home 0 -lowrange 0 -uprange 150
# Primary Slit, width, 0-30mm
@@ -635,7 +635,7 @@ Motor psw $motor_driver_type [params \
psw speed 4
psw Backlash_offset 0.3
psw part slits.primary
psw long_name width
psw long_name psw
setHomeandRange -motor psw -home 0 -lowrange 0 -uprange 30
#--------------------------------------------------------
@@ -662,7 +662,7 @@ setHomeandRange -motor psw -home 0 -lowrange 0 -uprange 30
#eom movecount $move_count
#eom precision 0.01
#eom part sample
#eom long_name euler_omega
#eom long_name eom
# Sample Tilt 2, euler chi stage
#Motor echi $motor_driver_type [params \
@@ -686,7 +686,7 @@ setHomeandRange -motor psw -home 0 -lowrange 0 -uprange 30
#echi movecount $move_count
#echi precision 0.01
#echi part sample
#echi long_name euler_chi
#echi long_name echi
# Sample Tilt 2, euler phi stage
#Motor ephi $motor_driver_type [params \
@@ -710,7 +710,7 @@ setHomeandRange -motor psw -home 0 -lowrange 0 -uprange 30
#ephi movecount $move_count
#ephi precision 0.01
#ephi part sample
#ephi long_name euler_phi
#ephi long_name ephi
@@ -731,7 +731,7 @@ Motor ssho $motor_driver_type [params \
ssho speed 4
ssho Backlash_offset -0.3
ssho part slits.secondary
ssho long_name horizontal_offset
ssho long_name ssho
setHomeandRange -motor ssho -home 0 -lowrange 0 -uprange 30
# Secondary Slit, position
@@ -751,7 +751,7 @@ Motor ssp $motor_driver_type [params \
ssp speed 4
ssp Backlash_offset -0.3
ssp part slits.secondary
ssp long_name position
ssp long_name ssp
setHomeandRange -motor ssp -home 0 -lowrange 0 -uprange 150
# Secondary Slit, width
@@ -771,7 +771,7 @@ Motor ssw $motor_driver_type [params \
ssw speed 4
ssw Backlash_offset 0.3
ssw part slits.secondary
ssw long_name width
ssw long_name ssw
setHomeandRange -motor ssw -home 0 -lowrange 0 -uprange 30
## Primary Slit, height, 0-30mm
@@ -789,7 +789,7 @@ setHomeandRange -motor ssw -home 0 -lowrange 0 -uprange 30
# absenchome 542093\
# cntsPerX 8192]
#psh part slits.primary
#psh part long_name height
#psh long_name psh
#setHomeandRange -motor psh -home 0 -lowrange 0 -uprange 30
## Secondary Slit, height
@@ -807,7 +807,7 @@ setHomeandRange -motor ssw -home 0 -lowrange 0 -uprange 30
# absenchome 500000\
# cntsPerX 8192]
#ssh part slits.secondary
#ssh long_name height
#ssh long_name ssh
#setHomeandRange -motor ssh -home 0 -lowrange 0 -uprange 30
#--------------------------------------------------------
@@ -821,7 +821,7 @@ mth readscript mthGet
mth drivescript mthSet
sicslist setatt mth klass crystal
sicslist setatt mth units degrees
sicslist setatt mth long_name half_takeoff_angle
sicslist setatt mth long_name mth
proc sthGet {} { return [expr [SplitReply [stth]]/2.0]}
proc sthSet {val} { return "stth=[SplitReply [stth]]"}
@@ -832,7 +832,7 @@ sth readscript sthGet
sth drivescript sthSet
sicslist setatt sth klass sample
sicslist setatt sth units degrees
sicslist setatt sth long_name half_azimuthal_angle
sicslist setatt sth long_name sth
#--------------------------------------------------------

View File

@@ -1 +1,7 @@
source $cfPath(nexus)/nxscripts_common_1.tcl
proc ::nexus::isc_initialize {} {
variable histmem_filetype_spec
lappend histmem_filetype_spec(HISTOGRAM_XY) link {aux_data 3 hmm_xy_corrected}
lappend histmem_filetype_spec(HISTOGRAM_X) link {aux_data 3 hmm_x_corrected}
::nexus::ic_initialize
}