Remove superfluous trailing white space from TCL files

This commit is contained in:
Douglas Clowes
2014-05-16 12:30:51 +10:00
parent 89e4e37f9e
commit 92d3acb5d5
230 changed files with 1835 additions and 1835 deletions

View File

@@ -1,6 +1,6 @@
# Author: Ferdi Franceschini (ffr@ansto.gov.au)
source $cfPath(anticollider)/anticollider_common.tcl
source $cfPath(anticollider)/anticollider_common.tcl
# NOTE: This is called with a list of motorname target pairs
proc ::anticollider::enable {args} {

View File

@@ -11,7 +11,7 @@
# LF Amplifier/Generator
#
# @author: Jing Chen, ANSTO, 2012-06-26
# @brief: SICS driver for LF AG 1010 LF Amplifier/Generator
# @brief: SICS driver for LF AG 1010 LF Amplifier/Generator
#
# ----------------------------------------------------------------------------*/
@@ -26,14 +26,14 @@ namespace eval ::scobj::ag1010 {
variable CtrlSetBurstPar [format %02x 8]
variable CtrlSetSweepPar [format %02x 9]
variable CtrlGetLIMITS [format %02x 17]
variable CtrlGetPAGC [format %02x 19]
variable CtrlGetPMGC [format %02x 20]
variable CtrlGetFREQ [format %02x 21]
variable CtrlGetSKEY [format %02x 23]
variable CtrlGetLIMITS [format %02x 17]
variable CtrlGetPAGC [format %02x 19]
variable CtrlGetPMGC [format %02x 20]
variable CtrlGetFREQ [format %02x 21]
variable CtrlGetSKEY [format %02x 23]
variable CtrlGetBurstPar [format %02x 24]
variable CtrlGetSweepPar [format %02x 25]
variable CtrlGetSVER [format %02x 29]
variable CtrlGetSVER [format %02x 29]
variable CtrlGetMEAS [format %02x 30]
variable CtrlGetSTA [format %02x 31]
@@ -58,14 +58,14 @@ namespace eval ::scobj::ag1010 {
proc ::scobj::ag1010::getValue {tc_root nextState rdPara} {
if {[ catch {
set HEAD 0x96
set LEN [lindex $rdPara 0]
set LEN [lindex $rdPara 0]
set CTRL [lindex $rdPara 1]
set DATA 0
set CRC 0
if {[hpropexists [sct] geterror]} {
hdelprop [sct] geterror
}
}
if {$LEN < 2} {
return -code error "Error in LF AG1010 Setting: wrong data length provided."
} elseif {$LEN > 2} {
@@ -92,10 +92,10 @@ proc ::scobj::ag1010::setValue {tc_root nextState rdPara wrPara} {
# tc_root and idx are not being used - however, don't remove so we can use the
# same calling mask as for setPoint() or other $wrFunc
variable ForPowerLimit
variable RefPowerLimit
variable FreqUpLimit
variable FreqDownLimit
variable ForPowerLimit
variable RefPowerLimit
variable FreqUpLimit
variable FreqDownLimit
set ns /sics/ag1010
#set ns [sct]
@@ -142,7 +142,7 @@ proc ::scobj::ag1010::setValue {tc_root nextState rdPara wrPara} {
set data [format %04x%04x $Freq $FreqHz]
}
}
"SoftOn" {
"SoftOn" {
if {$newPara > 1 || $newPara < 0} {
return -code error "Error in setValue: only allowed input values for SoftKey are {0,1}."
} else {
@@ -266,13 +266,13 @@ proc ::scobj::ag1010::setValue {tc_root nextState rdPara wrPara} {
"BurstMode" { if {$newPara<0 || $newPara>3} {
return -code error "Error in setValue: only allowed input values for BurstMode are {0,1,2,3}"
} else {
set BurstMode $newPara
set BurstMode $newPara
}
set BRepTime [hval $ns/BurstPar/BRepTime]
set TimeOfPower [hval $ns/BurstPar/TimeOfPower]
set TimeOfPower [hval $ns/BurstPar/TimeOfPower]
set data [format %02x%04x%04x $BurstMode $BRepTime $TimeOfPower]
}
"BRepTime" {
"BRepTime" {
#set BurstMode [hval $ns/BurstPar/BurstMode]
#if {[string match -nocase $BurstMode "Mode OFF"]} {
# set BurstMode 0
@@ -287,7 +287,7 @@ proc ::scobj::ag1010::setValue {tc_root nextState rdPara wrPara} {
#}
# set mode to Changing Burst Parameters without Chanigng Burst Mode -- 2
set BurstMode 2
set BurstMode 2
set TimeOfPower [hval $ns/BurstPar/TimeOfPower]
set data [format %02x%04x%04x $BurstMode $newPara $TimeOfPower]
}
@@ -326,15 +326,15 @@ proc ::scobj::ag1010::setValue {tc_root nextState rdPara wrPara} {
set SStp [expr [hval $ns/SweepPar/StepFreq] / 1000]
set SStpHz [expr [hval $ns/SweepPar/StepFreq] % 1000]
set SCyc [hval $ns/SweepPar/SCyc]
set data [format %02x%02x%02x%02x%02x%02x $SweepMode $SStr $SStp $SCyc $SStrHz $SStpHz]
}
set data [format %02x%02x%02x%02x%02x%02x $SweepMode $SStr $SStp $SCyc $SStrHz $SStpHz]
}
"SSteF" { set SweepMode 2
set SStr [expr [hval $ns/SweepPar/StartFreq] / 1000]
set SStrHz [expr [hval $ns/SweepPar/StartFreq] % 1000]
set SStp [expr $newPara / 1000]
set SStpHz [expr $newPara % 1000]
set SCyc [hval $ns/SweepPar/SCyc]
set data [format %02x%02x%02x%02x%02x%02x $SweepMode $SStr $SStp $SCyc $SStrHz $SStpHz]
set data [format %02x%02x%02x%02x%02x%02x $SweepMode $SStr $SStp $SCyc $SStrHz $SStpHz]
}
"SSCyc" { set SweepMode 2
set SStr [expr [hval $ns/SweepPar/StartFreq] / 1000]
@@ -350,7 +350,7 @@ proc ::scobj::ag1010::setValue {tc_root nextState rdPara wrPara} {
sct send "$cmd"
} message ]} {
return -code error "Error in setValue: $message. While sending command"
}
}
return $nextState
}
@@ -397,7 +397,7 @@ proc ::scobj::ag1010::rdValue {} {
set ctrlCode [format %d 0x[string range $data 4 5]]
switch -glob $ctrlCode {
42 { return -code error "Error in rdValue()"
42 { return -code error "Error in rdValue()"
}
2 { set FPLH [string range $data 6 7]
set FPLL [string range $data 8 9]
@@ -428,9 +428,9 @@ proc ::scobj::ag1010::rdValue {} {
}
7 { set softKey 0x[string range $data 6 7]
if {[expr $softKey & 0x80] == 0} {
hset $ns/SKEY/SoftOn "Controller takes over the keyboard of controller"
hset $ns/SKEY/SoftOn "Controller takes over the keyboard of controller"
} else {
hset $ns/SKEY/SoftOn "Host takes over the keyboard of controller"
hset $ns/SKEY/SoftOn "Host takes over the keyboard of controller"
}
if {[expr $softKey & 0x08] == 0} {
hset $ns/SKEY/Key1 "Off"
@@ -463,11 +463,11 @@ proc ::scobj::ag1010::rdValue {} {
} elseif {$SCode == 3} {
hset $ns/BurstPar/BurstMode "External Burst Mode ON"
}
set BRepTH [string range $data 8 9]
set BRepTL [string range $data 10 11]
hset $ns/BurstPar/BRepTime [format %d [expr 0x$BRepTH$BRepTL]]
set BOnTH [string range $data 12 13]
set BOnTL [string range $data 14 15]
hset $ns/BurstPar/TimeOfPower [format %d [expr 0x$BOnTH$BOnTL]]
@@ -484,13 +484,13 @@ proc ::scobj::ag1010::rdValue {} {
set SStr [format %d 0x[string range $data 8 9]]
set SStrHz [format %d 0x[string range $data 14 15]]
hset $ns/SweepPar/StartFreq [expr $SStr * 1000 + $SStrHz]
set SStp [format %d 0x[string range $data 10 11]]
set SStpHz [format %d 0x[string range $data 16 17]]
hset $ns/SweepPar/StepFreq [expr $SStp * 1000 + $SStpHz]
set SCyc [format %d 0x[string range $data 12 13]]
hset $ns/SweepPar/SCyc $SCyc
hset $ns/SweepPar/SCyc $SCyc
}
13 { set SNH [string range $data 6 7]
set SNL [string range $data 8 9]
@@ -650,7 +650,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
}
}
if {$writable == 1} {
hsetprop $nodeName write ${ns}::setValue $scobj_hpath $rdFunc $rdPara $wrPara
hsetprop $nodeName write ${ns}::setValue $scobj_hpath $rdFunc $rdPara $wrPara
hsetprop $nodeName $rdFunc ${ns}::$rdFunc
if {$pollEnabled == 1} {
if {[SplitReply [environment_simulation]]=="false"} {
@@ -691,7 +691,7 @@ proc ::scobj::ag1010::mkAG {argList} {
}
MakeSICSObj $pa(NAME) SCT_OBJECT
sicslist setatt $pa(NAME) klass environment
sicslist setatt $pa(NAME) klass environment
sicslist setatt $pa(NAME) long_name $pa(NAME)
# Create a base node for all the state machines of this sics object
@@ -708,8 +708,8 @@ proc ::scobj::ag1010::mkAG {argList} {
# Nodes appear in gumtree in the order in which they are created here.
#
# Initialise the model-dependent list of supported device commands
#
# cmdGroup subdirectory in which the node is to be created, "P" means under top-parent node
#
# cmdGroup subdirectory in which the node is to be created, "P" means under top-parent node
# varName name of the actual node typically representing one device command
# readable set to 1 if the node represents a query command, 0 if it is not
# writable set to 1 if the node represents a request for a change in settings sent to the device
@@ -759,7 +759,7 @@ proc ::scobj::ag1010::mkAG {argList} {
MEAS ReversePower 0 0 0 1 float {W} user {} {} {} {}
MEAS Temperature 0 0 0 1 float {0C} user {} {} {} {}
P STA 1 0 1 1 none {} spy {2 31} {rdValue} {} {}
STA MainState 0 0 0 1 text {} user {} {} {} {}
STA MainState 0 0 0 1 text {} user {} {} {} {}
STA State 0 0 0 1 int {} user {} {} {} {}
STA/State FstRemote 0 0 0 1 text {} user {} {} {} {}
STA/State FStExtBurst 0 0 0 1 text {} user {} {} {} {}
@@ -783,7 +783,7 @@ proc ::scobj::ag1010::mkAG {argList} {
P SetPMGC 0 1 1 1 float {%} user {4 4} {rdValue} {PMGC} {}
P SetFREQ 0 1 1 1 int {Hz} user {6 5} {rdValue} {FREQ} {}
P SetSoftOn 0 1 1 1 int {} user {3 7} {rdValue} {SoftOn} {1,0}
P SetKey1 0 1 1 1 int {} user {3 7} {rdValue} {Key1} {1,0}
P SetKey1 0 1 1 1 int {} user {3 7} {rdValue} {Key1} {1,0}
P SetKey0 0 1 1 1 int {} user {3 7} {rdValue} {Key0} {1,0}
P SetKey2 0 1 1 1 int {} user {3 7} {rdValue} {Key2} {1,0}
P SetKey3 0 1 1 1 int {} user {3 7} {rdValue} {Key3} {1,0}
@@ -792,20 +792,20 @@ proc ::scobj::ag1010::mkAG {argList} {
P SetBTimeOfPower 0 1 1 1 int {us} user {7 8} {rdValue} {BTofP} {}
P SetSweepMode 0 1 1 1 int {} user {13 9} {rdValue} {SweepMode} {0,1,2}
P SetSStartFreq 0 1 1 1 int {Hz} user {13 9} {rdValue} {SStrF} {}
P SetSStepFreq 0 1 1 1 int {Hz} user {13 9} {rdValue} {SSteF} {}
P SetSStepFreq 0 1 1 1 int {Hz} user {13 9} {rdValue} {SSteF} {}
P SetSSCyc 0 1 1 1 int {} user {13 9} {rdValue} {SSCyc} {}
}
foreach {cmdGroup varName readable writable pollEnabled displayable dataType unit permission rdPara rdFunc wrPara allowedValues} \
$deviceCommandToplevel {
createNode $scobj_hpath sct_$pa(NAME) $cmdGroup $varName $readable $writable $pollEnabled $displayable $dataType $unit $permission $rdPara $rdFunc $wrPara $allowedValues
createNode $scobj_hpath sct_$pa(NAME) $cmdGroup $varName $readable $writable $pollEnabled $displayable $dataType $unit $permission $rdPara $rdFunc $wrPara $allowedValues
}
# add HDB structure here
::scobj::set_required_props $ns
foreach {hpath klass control data priv type} {
foreach {hpath klass control data priv type} {
/sics/ag1010 environment true true spy part
/sics/ag1010/MEAS NXsensor true true user NXsensor
/sics/ag1010/FRE NXsample true true user NXsample
@@ -856,13 +856,13 @@ proc lf_pagc {{para ""} args} {
set ns /sample/ag1010
set newPara [string trim $para " "]
# scale W to dW
set newPara [expr $newPara * 10]
set data [format %04x $newPara]
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
broadcast "Set Power Level for AGC mode to $newPara dW"
broadcast "Set Power Level for AGC mode to $newPara dW"
sct_ag1010 send "$cmd"
}
}
@@ -962,7 +962,7 @@ proc lf_limits {args} {
set RPL [expr $val * 10]
}
}
default { error "ERROR: $arg should be 'FPL' or 'RPL'"
default { error "ERROR: $arg should be 'FPL' or 'RPL'"
return idle
}
}
@@ -1016,7 +1016,7 @@ proc lf_burst {args} {
"rtime" { set BRepTime $val
broadcast "Set Repetition Period Burst Cycle to $val ms"
}
"top" { set TimeOfPower $val
"top" { set TimeOfPower $val
broadcast "Set Time of Power in Burst Cycle to $val us"
}
default { error "ERROR: $arg should be 'mode', 'rtime' or 'top'" }
@@ -1042,7 +1042,7 @@ proc lf_sweep {args} {
set CRC 0
set ns /sample/ag1010
set SweepMode 2
set SStr [expr [hval $ns/SweepPar/StartFreq] / 1000]
set SStrHz [expr [hval $ns/SweepPar/StartFreq] % 1000]
@@ -1073,12 +1073,12 @@ proc lf_sweep {args} {
broadcast "Set Start Frequency in Sweep Mode to $val Hz"
}
"stepF" { set SStp [expr $val / 1000]
"stepF" { set SStp [expr $val / 1000]
set SStpHz [expr $val % 1000]
broadcast "Set Step Frequency in Sweep Mode to $val Hz"
}
"np" { set np $val
"np" { set np $val
broadcast "Set Number of Steps in Full Sweep Cycle to $val"
}
@@ -1113,13 +1113,13 @@ publish lf_sweep user
# @param IP IP address of the device (e.g. IP of moxabox that hooks up to the AG1010)
# @param port port number on the moxabox (typ. 4001, 4002, 4003, or 4004)
# @param turning if the parameter is turnable and can be set from the Gumtree
# @internal time internal in polling the nodes
# @internal time internal in polling the nodes
# IP 137.157.202.219
::scobj::ag1010::mkAG {
name "ag1010"
IP 137.157.202.214
PORT 4003
IP 137.157.202.214
PORT 4003
tuning 1
interval 5
}

View File

@@ -112,7 +112,7 @@ namespace eval ::chopper {
21 22 23 24 25
26 27 28 29 30
} {
set speedMult($i) [expr double($mult)]
set speedMult($i) [expr double($mult)]
incr i
}
@@ -324,7 +324,7 @@ namespace eval ::chopper {
set propGain [lindex $row 1 1 $dir]
set intGain [lindex $row 1 2 $dir]
set phGain [lindex $row 1 3 $dir]
hset $hpath/$node/control/set_motor_dir $dir
hset $hpath/$node/control/set_vetowin50 [expr $vetowin/50.0]
hset $hpath/$node/control/set_prop_gain $propGain
@@ -497,7 +497,7 @@ namespace eval ::chopper {
proc imot_PhRun {hpath node addr name target} {
global SCode
hset $hpath/$node/control/set_ref_delay $target
hsetprop $hpath/$node/control timecheck -1
set readtime [hgetpropval $hpath read_time]
@@ -510,7 +510,7 @@ namespace eval ::chopper {
return $SCode(MOTFAIL)
}
proc get_phase_acc {ch} {
variable chPath

View File

@@ -194,7 +194,7 @@ namespace eval ::scobj::chopper {
hfactory $fermiPath/$chname/intlck_status/$field plain user int
}
hfactory $chPath/control plain user none
hfactory $chPath/control/device_error plain user text
@@ -251,7 +251,7 @@ namespace eval ::scobj::chopper {
hsetprop $fermiPath "RDGAINPHASE" ${scobjNS}::rdVal $fermiPath {prop_gain int_gain phase_gain}
hsetprop $fermiPath "RDSYNMOTDIR" ${scobjNS}::rdVal $fermiPath {ref_delay ref_period sync_srce motdir}
hsetprop $fermiPath "RDVETOINF" ${scobjNS}::rdVal $fermiPath {phase_veto_count phase_nonveto_count}
if {$sim_mode == "false"} {
sct_fermi poll $fermiPath $pollrate

View File

@@ -1,8 +1,8 @@
# Drive the 3 Monochromator blades as a "bunch"
# Drive the 3 Monochromator blades as a "bunch"
#
# Author: Jing Chen, jgn@ansto.gov.au
#
#
# Date: 11/11/2011
# get a specified parameter value of a motor
@@ -79,25 +79,25 @@ proc DriveMono {mot focus} {
set translateDis [expr $focus - [getSetting $mot position]]
# Determine if the movement is within the ranges of the three motors
if {[expr $mraPosition + $translateDis] > $mraSoftupperlim ||
[expr $mraPosition + $translateDis] < $mraSoftlowerlim} {
if {[expr $mraPosition + $translateDis] > $mraSoftupperlim ||
[expr $mraPosition + $translateDis] < $mraSoftlowerlim} {
broadcast "Error: the movement is out of the range limit of motor mra"
set moveFlag 0
}
if {[expr $mrbPosition + $translateDis] > $mrbSoftupperlim ||
if {[expr $mrbPosition + $translateDis] > $mrbSoftupperlim ||
[expr $mrbPosition + $translateDis] < $mrbSoftlowerlim} {
broadcast "Error: the movement is out of the range limit of motor mrb"
set moveFlag 0
}
if {[expr $mrcPosition + $translateDis] > $mrcSoftupperlim ||
if {[expr $mrcPosition + $translateDis] > $mrcSoftupperlim ||
[expr $mrcPosition + $translateDis] < $mrcSoftlowerlim} {
broadcast "Error: the movement is out of the range limit of motor mrc"
set moveFlag 0
}
# move the three motors
# move the three motors
if {$moveFlag == 1} {
# Unlock the three motors
mra fixed -1

View File

@@ -5,7 +5,7 @@ namespace eval counter {
variable isc_numchannels
variable isc_monitor_address
variable isc_portlist
variable isc_beam_monitor_list
variable isc_beam_monitor_list
proc set_sobj_attributes {} {
}
}

View File

@@ -40,7 +40,7 @@ proc ::histogram_memory::init_OAT_TABLE {} {
set tbb1 [expr $tbb0 + $tbinwidth_ns / $clock_scale]
OAT_TABLE -set X { 199.5 198.5 } NXC $xbins Y { -0.5 15.5 } NYC $ybins T "$tbb0 $tbb1" NTC $tbins
# Use the ::histogram_memory::clock_scale function to make sure that the value in the
# Use the ::histogram_memory::clock_scale function to make sure that the value in the
# time of flight channel width is consistent with its units
sicslist setatt tofw units [::histogram_memory::clock_scale units]
tofw [expr ($tbb1 - $tbb0) * [::histogram_memory::clock_scale]]
@@ -65,7 +65,7 @@ return {
</MESYTEC_MPSD8_CHANNEL_GAINS>
<MESYTEC_MPSD8_THRESHOLDS>
30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30
30 30 30 30 30 30 30 30
30 20 10 10 10 10 10 10
</MESYTEC_MPSD8_THRESHOLDS>
@@ -178,7 +178,7 @@ proc ::histogram_memory::isc_initialize {} {
::histogram_memory::ic_initialize
::histogram_memory::set_graphtype "two_theta" "boundaries"
# Width = 25mm spacing * 200 tubes = 5000mm (120 degree coverage)
# Width = 25mm spacing * 200 tubes = 5000mm (120 degree coverage)
# Height = 1015mm (tube length)
# Radius = 2400mm
detector_active_height_mm 1015

View File

@@ -1,17 +1,17 @@
###########################################################################################################################
# @file Proptocols between SICS and High Voltage Controller
# @file Proptocols between SICS and High Voltage Controller
#
# This is a driver for SICS to make following communication with the High Voltage Controller
#
#
# 1. SICS uses TCP/IP protocol to interact with the HV component who shall provide an IP address
# 1. SICS uses TCP/IP protocol to interact with the HV component who shall provide an IP address
# together with an port number.
#
# 2. Commands From SICS to HV component,
# 2. Commands From SICS to HV component,
# 1. HV_START hv1=xxx, i1=xxx, hv2=xxx, i2=xxx
# :: Responses from HV component back to SICS are either
# OK (if the system start correctly), or
# Error Message (if the system does not start normally, the error message shall indicate
# Error Message (if the system does not start normally, the error message shall indicate
# type of the errors)
#
# 2. HV_STOP (This will stop/shutdown the HV component totally)
@@ -22,10 +22,10 @@
# Error Message (if the system does not start normally, the error message will indicate type of the errors)
#
# 4. HV_STATUS (This command will send to HV component automatically and regularly, i.e. every 1 sec)
# :: Responses from HV component back to SICS is "hv1=xxx, i1=xxx, hv2=xxx, i2=xxx, system=rampingup;\n",
# :: Responses from HV component back to SICS is "hv1=xxx, i1=xxx, hv2=xxx, i2=xxx, system=rampingup;\n",
# SICS uses this information to update their values in the SICS system and on the Gumtree client as well.
#
# 3. HV parameters to be dsiaplyed on the Gumtree GUI are, hv1, i1, hv2, i2, system
# 3. HV parameters to be dsiaplyed on the Gumtree GUI are, hv1, i1, hv2, i2, system
#
# Author: Jing Chen (jgn@ansto.gov.au) July 2011
#
@@ -33,7 +33,7 @@
# ::scobj::hv::mkHV {
# name "hv"
# IP localhost
# PORT 55010
# PORT 55010
# tuning 1
# interval 1
#
@@ -92,7 +92,7 @@ proc ::scobj::hv:setting {field basePath} {
}
default {error "ERROR: illegal input command, type help for more info"
return idle
}
}
}
sct send $comm
@@ -115,7 +115,7 @@ proc ::scobj::hv::getHVStatusFunc {mode} {
"config" {set comm "get config\r\n"}
default {error "ERROR: illegal input command, type help for more info"
return idle
}
}
}
sct send $comm
@@ -153,7 +153,7 @@ proc ::scobj::hv::rdHVStatusFunc {basePath mode} {
hsetprop $basePath/status/DetectorLowPressure units [lindex $replyText 17]
hset $basePath/status/SampleLowPressure [lindex $replyText 19]
hsetprop $basePath/status/SampleLowPressure units [lindex $replyText 20]
hsetprop $basePath/status/SampleLowPressure units [lindex $replyText 20]
hset $basePath/status/pressure5 [lindex $replyText 22]
hsetprop $basePath/status/pressure5 units [lindex $replyText 23]
@@ -174,7 +174,7 @@ proc ::scobj::hv::rdHVStatusFunc {basePath mode} {
[lindex $replyText 4] [lindex $replyText 3]"
if {[string equal [hval $basePath/dataRecording] "ON"] == 1} {
debug_log $logdata
debug_log $logdata
}
} elseif {$mode == "config"} {
@@ -202,14 +202,14 @@ proc ::scobj::hv::rdHVStatusFunc {basePath mode} {
##
# @brief Make a HV Controller
#
# @param argList, {name "hv" IP localhost PORT 65123 tuning 1 interval 1}
#
# @param argList, {name "hv" IP localhost PORT 65123 tuning 1 interval 1}
#
# name: name of hv controller object
# IP: IP address of RF generator moxa box
# PORT: Port number assigned to the generator on the moxa-box
# tuning: boolean, set tuning=1 to allow instrument scientists to set the axe positions
# interval: polling and ramping interval in seconds.
# interval: polling and ramping interval in seconds.
proc ::scobj::hv::mkHV {argList} {
# Generate parameter array from the argument list
@@ -222,7 +222,7 @@ proc ::scobj::hv::mkHV {argList} {
sicslist setatt $pa(NAME) klass instrument
sicslist setatt $pa(NAME) long_name $pa(NAME)
set hvPath /sics/$pa(NAME)
set hvPath /sics/$pa(NAME)
foreach {hPath type priv datatype init } {
msg plain user text UNKNOW
@@ -236,7 +236,7 @@ proc ::scobj::hv::mkHV {argList} {
status/SampleLowPressure plain user float 0
status/pressure5 plain user float 0
status/pressure6 plain user float 0
status/state plain user text UNKNOW
status/PLC-S plain user text UNKNOW
status/PLC-H plain user text UNKNOW
@@ -254,9 +254,9 @@ proc ::scobj::hv::mkHV {argList} {
hset $hvPath/$hPath $init
}
hsetprop $hvPath/status oldval UNKNOWN
hsetprop $hvPath/status oldval UNKNOWN
hsetprop $hvPath/config oldval UNKNOWN
#makesctcontroller sct_hv rfamp $pa(IP):$pa(PORT)
makesctcontroller sct_hv std $pa(IP):$pa(PORT)
@@ -400,7 +400,7 @@ proc set_data_record {args} {
"on" {hset /instrument/hv/dataRecording "ON"}
"OFF" {hset /instrument/hv/dataRecording "OFF"}
"off" {hset /instrument/hv/dataRecording "OFF"}
default {error "ERROR: please enter 'on' or 'off' to set the switch"}
default {error "ERROR: please enter 'on' or 'off' to set the switch"}
}
}

View File

@@ -49,7 +49,7 @@ set momc_Home 2302
set mphi_Home 8389950
set mchi_Home 8383096
set mx_Home 8390604
set my_Home 8391084
set my_Home 8391084
set mom_Home 8389414
set rco_Home 33531098
@@ -256,7 +256,7 @@ mtth Creep_Precision 0.005000
# Motor Controller 2
# Motor Controller 2
############################
#
#
# mc2: Slits Set AB1- (After Beryllium Filter) (2 blades and 1 Motor & Encoder set)
set sv1StepRate [expr { 25000 / 0.635 / 2.0 }]
@@ -411,7 +411,7 @@ scor home 180
# Motor Controller 3
# Motor Controller 3
############################
#
#
# ROTATION STAGES 120:1 PLUS GEARBOX 8:1
# ROTATION STAGE RESOLVER 360:55
@@ -423,7 +423,7 @@ scor home 180
# 1 unit here is 1 degree
set monoRotateStepsPerUnit [expr 25000.0*8.0*120.0/360.0]
# Encode reading at the roation, 1 unit here is 1 degree
# Encode reading at the roation, 1 unit here is 1 degree
set MonoRotateCntsPerUnit [expr 4096.0*360.0/55.0/360.0]
# Setup Focus range as min = 0 and max = 1, working range = 0 to 1 (310 degrees)
@@ -442,7 +442,7 @@ set monoFocusMaxSpeed 0.083
# Precision setting turn/move, or 310*turn/move (degrees)
set monoFocusprecision 0.001
# mc3: Monochromator Focusing 1 - Focus
# mc3: Monochromator Focusing 1 - Focus
Motor mra $motor_driver_type [params \
asyncqueue mc3\
host mc3-pelican\
@@ -463,7 +463,7 @@ Motor mra $motor_driver_type [params \
mra speed $monoFocusSpeed
mra accel $monoFocusSpeed
mra decel $monoFocusSpeed
mra part crystal
mra part crystal
mra long_name mra
mra softlowerlim 0
mra softupperlim 1
@@ -598,7 +598,7 @@ momc home -45
# Motor Controller 4
# Motor Controller 4
############################
#
#
# mc4: Monochromator crystal stages tilt stage - G270
set mphiStepRate -25000
@@ -618,7 +618,7 @@ Motor mphi $motor_driver_type [params \
absEnc 1\
absEncHome $mphi_Home\
cntsPerX -4096]
mphi part crystal
mphi part crystal
mphi long_name mphi
mphi softlowerlim -2
mphi softupperlim 2
@@ -702,7 +702,7 @@ my softupperlim 10
my home 0
my speed 1.0
# mc4: Monochromator crystal stages Rotation stage - R275
# mc4: Monochromator crystal stages Rotation stage - R275
set momStepRate 12500
Motor mom $motor_driver_type [params \
@@ -733,7 +733,7 @@ mom home 0
# Motor Controller 6
# Motor Controller 6
############################
#
#
# mc6: Radial Collimator -- Oscillator
set rcoStepRate [expr { (1200.26 / 60.0) * (25000.0 / 360.0) * 49.0 }]

View File

@@ -1,5 +1,5 @@
set sim_mode [SplitReply [plc_simulation]]
if {$sim_mode == "false"} {
if {$sim_mode == "false"} {
# MakeAsyncQueue plc_chan SafetyPLC 137.157.204.79 31001
# MakeSafetyPLC plc plc_chan 0
}