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
This commit is contained in:
Ferdi Franceschini
2010-04-19 14:04:41 +10:00
committed by Douglas Clowes
parent aa6bb7f1da
commit d9da95a5df
35 changed files with 3936 additions and 2477 deletions

View File

@@ -8,6 +8,7 @@ config/hipadaba/instdict_specification.tcl
config/hmm/hmm_configuration_common_1.tcl
config/hmm/hmm_object.tcl
config/hmm/anstohm_linked.xml
config/hmm/sct_orhvps_common.tcl
config/scan/scan_common_1.hdd
config/scan/scan_common_1.tcl
config/nexus/nxscripts_common_1.tcl

View File

@@ -197,7 +197,7 @@ namespace eval optics {
}
::optics::guide -set feedback status BUSY
set msg [eval "drive $to_config"]
EApPosYmm $position
EApPosY $position
}
GuideConfig $configuration
} message ] {

View File

@@ -1,20 +1,6 @@
# Detector voltage controller
set sim_mode [SplitReply [detector_simulation]]
if {$::sim_mode == "true"} {
EvFactory new dhv1 sim
} else {
makeasyncqueue acq ORHVPS ca1-quokka 4001
evfactory new dhv1 orhvps acq
dhv1 lowerlimit 0
dhv1 upperlimit 2400
dhv1 tolerance 19
dhv1 max 2600
dhv1 rate 10
dhv1 debug 1
dhv1 unlock
dhv1 debug 0
# dhv1 lock
}
fileeval $cfPath(hmm)/sct_orhvps_common.tcl
::scobj::dethvps::init ca1-quokka 4001 4.1
dhv1 max 2600
dhv1 lower 19
dhv1 upper 57

View File

@@ -39,10 +39,10 @@ proc ::histogram_memory::isc_initialize {} {
FAT_TABLE -init
::histogram_memory::ic_initialize
detector_active_height_mm 980
detector_active_width_mm [expr 5.08 * 192]
detector_active_height_mm [expr 5.08 * 192]
detector_active_width_mm [expr 5.08 * 192]
detector_active_height_mm lock
detector_active_width_mm lock
detector_active_width_mm lock
# hmm configure FAT_SIMULATED_EVENT_Y0 $y_bb0
# hmm configure FAT_SIMULATED_EVENT_Y1 $ybbmax
@@ -51,8 +51,8 @@ proc ::histogram_memory::isc_initialize {} {
::histogram_memory::init_OAT_TABLE
::histogram_memory::upload_config Filler_defaults
::nexus::data alias ::histogram_memory::vertical_axis ::histogram_memory::y_pixel_offset
::nexus::data alias ::histogram_memory::horizontal_axis ::histogram_memory::x_pixel_offset
set ::histogram_memory::histmem_axes(HOR) /instrument/detector/x_pixel_offset
set ::histogram_memory::histmem_axes(VER) /instrument/detector/y_pixel_offset
} message ] {
return -code error $message
}

View File

@@ -840,7 +840,6 @@ bs1 softlowerlim 11
bs1 softupperlim 95
bs1 home 90
bs1 precision 0.05
sicslist setatt bs1 link parameters_group
Motor bs2 $motor_driver_type [params \
asyncqueue mc4\
@@ -861,7 +860,6 @@ bs2 softlowerlim 7
bs2 softupperlim 95
bs2 home 90
bs2 precision 0.05
sicslist setatt bs2 link parameters_group
Motor bs3 $motor_driver_type [params \
asyncqueue mc4\
@@ -882,7 +880,6 @@ bs3 softlowerlim 11
bs3 softupperlim 95
bs3 home 90
bs3 precision 0.05
sicslist setatt bs3 link parameters_group
Motor bs4 $motor_driver_type [params \
asyncqueue mc4\
@@ -903,7 +900,6 @@ bs4 softlowerlim 7
bs4 softupperlim 95
bs4 home 90
bs4 precision 0.05
sicslist setatt bs4 link parameters_group
Motor bs5 $motor_driver_type [params \
asyncqueue mc4\
@@ -924,7 +920,6 @@ bs5 softlowerlim 11
bs5 softupperlim 95
bs5 home 90
bs5 precision 0.05
sicslist setatt bs5 link parameters_group
Motor bs6 $motor_driver_type [params \
asyncqueue mc4\
@@ -945,7 +940,6 @@ bs6 softlowerlim 7
bs6 softupperlim 95
bs6 home 90
bs6 precision 0.05
sicslist setatt bs6 link parameters_group
# Polarizer Rotation
#Motor pol $motor_driver_type [params \

View File

@@ -10,8 +10,8 @@ makesctcontroller sct_mc3 std mc3:$port3
makesctcontroller sct_mc4 std mc4:$port4
# label pos
#index position
set 20sample_table {
index position
1 453.7
2 411.7
3 369.7
@@ -34,10 +34,10 @@ index position
20 -464.3
}
mk_sct_positmotor sct_mc1 parameter samx changer_position samplenum 20SAMPLES $20sample_table
mkPosit sct_mc1 sampleNum float samx sample $20sample_table
#diameter position
set auto_ap_table {
diameter position
2.5 0
5.0 -23
7.5 -47
@@ -49,5 +49,5 @@ diameter position
25.0 -215
30.0 -250
}
mk_sct_positmotor sct_mc3 parameter apx autoSampleAp aperture auto_ap $auto_ap_table
mkPosit sct_mc3 diameter float apx sample $auto_ap_table

View File

@@ -1,17 +1,17 @@
namespace eval optics {
array set AttRotLookupTable {
0 0.0
30 1.3
60 3.3
90 4.9
120 6.4
150 8.3
180 9.6
210 11.2
240 13.1
270 15.0
300 18.0
330 25.0
0 { 0.0 1 }
30 { 1.3 0.498782 }
60 { 3.3 0.176433 }
90 { 4.9 0.0761367 }
120 { 6.4 0.0353985 }
150 { 8.3 0.0137137 }
180 { 9.6 0.00614167 }
210 {11.2 0.00264554 }
240 {13.1 0.000994504 }
270 {15.0 0.000358897 }
300 {18.0 7.2845e-05 }
330 {25.0 1.67827e-06 }
}
array set EApLookupTable {
@@ -30,20 +30,29 @@ namespace eval optics {
}
}
proc ::optics::AttRotLookup {angle tol} {
proc ::optics::AttRotLookup {angle column tol} {
variable AttRotLookupTable
set foundit false
foreach vangle [array names AttRotLookupTable] {
if {$vangle >= [expr {$angle-$tol}] && $vangle <= [expr {$angle+$tol}]} {
set foundit true
break
}
}
if {$foundit == true} {
return [lindex $AttRotLookupTable($vangle) 0]
} else {
return -1
}
set catch_status [ catch {
set foundit false
foreach vangle [array names AttRotLookupTable] {
if {$vangle >= [expr {$angle-$tol}] && $vangle <= [expr {$angle+$tol}]} {
set foundit true
break
}
}
if {$foundit == true} {
switch $column {
"plex" { set index 0 }
"attfactor" { set index 1 }
default { error "$column is unknown, allowed values are plex or attfactor" }
}
return [lindex $AttRotLookupTable($vangle) $index]
} else {
return -1
}
} message ]
handle_exception $catch_status $message
}
proc ::optics::EApLookUp {angle param tol} {

View File

@@ -11,7 +11,6 @@ foreach {var lname type priv units klass} {
BeamCenterZ BeamCenterZ float user mm parameter
BeamStop BeamStop int user none parameter
BSdiam BSdiam float user mm parameter
DetPosYOffset DetPosYOffset float user mm parameter
EApPosY EApPosY float user mm parameter
EndFacePosY EndFacePosY float readonly mm parameter
GuideConfig GuideConfig text user none parameter
@@ -30,22 +29,19 @@ foreach {var lname type priv units klass} {
proc sicsmsgfmt {args} {return "[info level -1] = $args"}
::utility::macro::getset float SamplePosY {} {
set sy [SplitReply [samy]]
set syo [SplitReply [SamYOffset]]
return [sicsmsgfmt [expr {$sy+$syo}]]
}
sicslist setatt SamplePosY long_name SamplePosY
sicslist setatt SamplePosY klass parameter
sicslist setatt SamplePosY units mm
::utility::macro::getset float Plex {} {
return [sicsmsgfmt [ ::optics::AttRotLookup [SplitReply [att]] [SplitReply [att precision]] ]]
return [sicsmsgfmt [ ::optics::AttRotLookup [SplitReply [att]] "plex" [SplitReply [att precision]] ]]
}
sicslist setatt Plex units mm
sicslist setatt Plex long_name Plex
sicslist setatt Plex klass parameter
::utility::macro::getset float AttFactor {} {
return [sicsmsgfmt [ ::optics::AttRotLookup [SplitReply [att]] "attfactor" [SplitReply [att precision]] ]]
}
sicslist setatt AttFactor long_name AttFactor
sicslist setatt AttFactor klass parameter
::utility::macro::getset float EApX {} {
return [sicsmsgfmt [::optics::EApLookUp [SplitReply [srce]] "size" [SplitReply [srce precision]] ]]
}
@@ -69,7 +65,7 @@ sicslist setatt EApShape mutable false
::utility::macro::getset float L1 {} {
set efpy [SplitReply [EndFacePosY]]
set samposy [SplitReply [SamplePosY]]
set samposy [SplitReply [samy]]
set eapy [SplitReply [EApPosY]]
return [sicsmsgfmt [expr {$efpy + $samposy - $eapy}]]
}
@@ -79,9 +75,8 @@ sicslist setatt L1 units mm
::utility::macro::getset float L2 {} {
set detpy [SplitReply [det]]
set detpyos [SplitReply [DetPosYOffset]]
set sapy [SplitReply [SamplePosY]]
return [sicsmsgfmt [expr {$detpy + $detpyos - $sapy}]]
set sapy [SplitReply [samy]]
return [sicsmsgfmt [expr {$detpy - $sapy}]]
}
sicslist setatt L2 long_name L2
sicslist setatt L2 klass parameter
@@ -114,7 +109,6 @@ namespace eval parameters {
set paramlist {
AttFactor
BSdiam
DetPosYOffset
EApPosY
EApShape
EApX
@@ -124,7 +118,6 @@ namespace eval parameters {
L2
Plex
SamYOffset
SamplePosY
Transmission
}
}