#--------------------------------------------------------------------------- # T C L D E F I N E D S I C S V A R I A B L E S set OM2T(omega) A3 set OM2T(2Theta) A6 proc OM2TDriv { } { return $Boerks } proc OM2TSet { f } { global OM2T set command "run " append command $OM2T(omega) " " [expr $f/2.] " " append command $OM2T(2Theta) " " $f " " set ret [catch {eval $command} msg] if { $ret == 1 } { ClientPut $msg error return 0 } else { return 1 } } proc OM2TStat { } { global OM2T set ret [SICSStatus $OM2T(omega)] if { ($ret == 1) || ($ret == 2) } { set ret [SICSStatus $OM2T(2Theta)] } return $ret } proc OM2TGet { } { global OM2T set res [$OM2T(2Theta) position] return $res } proc OM2TCheck { f } { global OM2T set ret [catch {SICSBounds $OM2T(omega) [expr $f/2.] } msg] if { $ret != 0 } { ClientPut $msg error return -code error -text $msg } set ret [catch {SICSBounds $OM2T(2Theta) $f } msg] if { $ret != 0 } { ClientPut $msg error return -code error -text $msg } return 1 } MakeTSVar OM2TH OM2TH isDrivable OM2TDriv OM2TH SetValue OM2TSet OM2TH CheckStatus OM2TStat OM2TH GetValue OM2TGet OM2TH CheckLimits OM2TCheck