Merge from Wombat west400.tcl
This commit is contained in:
@ -15,12 +15,12 @@ proc ::environment::temperature::mkwest400sim {temp_sobj} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#WEST4100 tempcontroller creation
|
#WEST4100 tempcontroller creation
|
||||||
proc ::environment::temperature::mkwest400 {temp_sobj IP } {
|
proc ::environment::temperature::mkwest400 {temp_sobj IP ID} {
|
||||||
MakeRS232Controller sertemp $IP 502
|
MakeRS232Controller sertemp $IP 502
|
||||||
sertemp timeout 300
|
sertemp timeout 300
|
||||||
sertemp sendterminator 0x0
|
sertemp sendterminator 0x0
|
||||||
sertemp replyterminator 0x0
|
sertemp replyterminator 0x0
|
||||||
EvFactory new tc1 west4100 sertemp 1 2
|
EvFactory new tc1 west4100 sertemp $ID 2
|
||||||
|
|
||||||
sicslist setatt tc1 units kelvin
|
sicslist setatt tc1 units kelvin
|
||||||
sicslist setatt tc1 klass @none
|
sicslist setatt tc1 klass @none
|
||||||
@ -31,12 +31,12 @@ sicslist setatt tc1 klass @none
|
|||||||
# This must be called when the instrument configuration is loaded and before\n
|
# This must be called when the instrument configuration is loaded and before\n
|
||||||
# the buildHDB function is called. Currently there is no way to add and remove\n
|
# the buildHDB function is called. Currently there is no way to add and remove\n
|
||||||
# environment controllers and their hdb paths at runtime.
|
# environment controllers and their hdb paths at runtime.
|
||||||
proc ::environment::temperature::add_west400 {IP} {
|
proc ::environment::temperature::add_west400 {IP ID} {
|
||||||
set sim_mode [SplitReply [environment_simulation]]
|
set sim_mode [SplitReply [environment_simulation]]
|
||||||
if {$sim_mode == "true"} {
|
if {$sim_mode == "true"} {
|
||||||
::environment::temperature::mkwest400sim tc1
|
::environment::temperature::mkwest400sim tc1
|
||||||
} else {
|
} else {
|
||||||
::environment::temperature::mkwest400 tc1 $IP
|
::environment::temperature::mkwest400 tc1 $IP $ID
|
||||||
tc1 Upperlimit 1500
|
tc1 Upperlimit 1500
|
||||||
tc1 Lowerlimit 0
|
tc1 Lowerlimit 0
|
||||||
tc1 tolerance 10
|
tc1 tolerance 10
|
||||||
@ -49,8 +49,14 @@ proc ::environment::temperature::add_west400 {IP} {
|
|||||||
|
|
||||||
}
|
}
|
||||||
if { [ info exists ::config_dict ] } {
|
if { [ info exists ::config_dict ] } {
|
||||||
if { [ dict get $::config_dict west4100 enabled ] } {
|
if { [ dict get $::config_dict vf1-west4100 enabled ] } {
|
||||||
set IP [dict get $::config_dict west4100 ip]
|
set IP [dict get $::config_dict vf1-west4100 ip]
|
||||||
::environment::temperature::add_west400 $IP
|
set ID [dict get $::config_dict vf1-west4100 id]
|
||||||
|
::environment::temperature::add_west400 $IP $ID
|
||||||
|
}
|
||||||
|
if { [ dict get $::config_dict vf2-west4100 enabled ] } {
|
||||||
|
set IP [dict get $::config_dict vf2-west4100 ip]
|
||||||
|
set ID [dict get $::config_dict vf2-west4100 id]
|
||||||
|
::environment::temperature::add_west400 $IP $ID
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user