SICS-697 Make named links to data group using new typed naming system.
This commit is contained in:
committed by
Ferdi Franceschini
parent
6692a1a2bb
commit
093479f808
@@ -1755,7 +1755,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
|
|||||||
# @param tempobj short name for the temperature controller scriptcontext object (typ. tc1 or tc2)
|
# @param tempobj short name for the temperature controller scriptcontext object (typ. tc1 or tc2)
|
||||||
# @param tol temperature tolerance in Kelvin (typ. 1)
|
# @param tol temperature tolerance in Kelvin (typ. 1)
|
||||||
# @return nothing (well, the sct object)
|
# @return nothing (well, the sct object)
|
||||||
proc mk_sct_lakeshore_340 {sct_controller klasse tempobj LSmodel tol1 tol2 verbose} {
|
proc mk_sct_lakeshore_340 {sct_controller klasse tempobj CID CTYPE LSmodel tol1 tol2 verbose} {
|
||||||
if {[ catch {
|
if {[ catch {
|
||||||
set ::scobj::ls340::ls340_driveTolerance1 $tol1
|
set ::scobj::ls340::ls340_driveTolerance1 $tol1
|
||||||
set ::scobj::ls340::ls340_driveTolerance2 $tol2
|
set ::scobj::ls340::ls340_driveTolerance2 $tol2
|
||||||
@@ -2050,6 +2050,13 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
|
|||||||
# Problem: Does not write non-numbers to the hdf file unless told differently - but how?
|
# Problem: Does not write non-numbers to the hdf file unless told differently - but how?
|
||||||
# How can I make it write the NAME (or any character/string variable) to the hdf file?
|
# How can I make it write the NAME (or any character/string variable) to the hdf file?
|
||||||
# ::scobj::hinitprops $tempobj/sensor sampleSensor
|
# ::scobj::hinitprops $tempobj/sensor sampleSensor
|
||||||
|
hsetprop $scobj_hpath/sensor/setpoint1 permlink data_set ${CTYPE}${CID}SP1
|
||||||
|
hsetprop $scobj_hpath/sensor/setpoint2 permlink data_set ${CTYPE}${CID}SP2
|
||||||
|
|
||||||
|
hsetprop $scobj_hpath/sensor/sensorValueA permlink data_set ${CTYPE}${CID}S1
|
||||||
|
hsetprop $scobj_hpath/sensor/sensorValueB permlink data_set ${CTYPE}${CID}S2
|
||||||
|
hsetprop $scobj_hpath/sensor/sensorValueC permlink data_set ${CTYPE}${CID}S3
|
||||||
|
hsetprop $scobj_hpath/sensor/sensorValueD permlink data_set ${CTYPE}${CID}S4
|
||||||
|
|
||||||
hsetprop $scobj_hpath/sensor/setpoint1 type drivable
|
hsetprop $scobj_hpath/sensor/setpoint1 type drivable
|
||||||
hsetprop $scobj_hpath/sensor/setpoint2 type drivable
|
hsetprop $scobj_hpath/sensor/setpoint2 type drivable
|
||||||
@@ -2077,7 +2084,7 @@ proc createNode {scobj_hpath sct_controller cmdGroup varName readable writable p
|
|||||||
# @param port port number on the moxabox (typ. 4001, 4002, 4003, or 4004)
|
# @param port port number on the moxabox (typ. 4001, 4002, 4003, or 4004)
|
||||||
# @param tol temperature tolerance in Kelvin (typ. 1)
|
# @param tol temperature tolerance in Kelvin (typ. 1)
|
||||||
# @return nothing (well, the sct object)
|
# @return nothing (well, the sct object)
|
||||||
proc add_sct_ls340 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {_verbose 0} } {
|
proc add_sct_ls340 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {CID 1} {CTYPE T} {_verbose 0} } {
|
||||||
# ffr 2009-11-09, Don't create a temperature controller for the script validator, this causes the
|
# ffr 2009-11-09, Don't create a temperature controller for the script validator, this causes the
|
||||||
# lakeshore to lock up.
|
# lakeshore to lock up.
|
||||||
# NOTE: I put this outside the catch block because "return" raises an exception
|
# NOTE: I put this outside the catch block because "return" raises an exception
|
||||||
@@ -2091,9 +2098,9 @@ proc add_sct_ls340 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {_verbose 0}
|
|||||||
makesctcontroller sct_ls340_$name aqadapter ${port}
|
makesctcontroller sct_ls340_$name aqadapter ${port}
|
||||||
} else {
|
} else {
|
||||||
puts "\nadd_ls340: makesctcontroller sct_ls340_$name std ${IP}:$port $terminator for Lakeshore model 340"
|
puts "\nadd_ls340: makesctcontroller sct_ls340_$name std ${IP}:$port $terminator for Lakeshore model 340"
|
||||||
makesctcontroller sct_ls340_$name std ${IP}:$port $terminator
|
makesctcontroller sct_ls340_$name std ${IP}:$port {*}$terminator
|
||||||
}
|
}
|
||||||
mk_sct_lakeshore_340 sct_ls340_$name environment $name $_ls340_LSmodel $_tol1 $_tol2 $_verbose
|
::scobj::ls340::mk_sct_lakeshore_340 sct_ls340_$name environment $name $CID $CTYPE $_ls340_LSmodel $_tol1 $_tol2 $_verbose
|
||||||
makesctemon $name /sics/$name/emon/monMode_Lp1 /sics/$name/emon/isInTolerance_Lp1 /sics/$name/emon/errhandler
|
makesctemon $name /sics/$name/emon/monMode_Lp1 /sics/$name/emon/isInTolerance_Lp1 /sics/$name/emon/errhandler
|
||||||
# set m2 "_2"
|
# set m2 "_2"
|
||||||
# makesctemon $name$m2 /sics/$name/emon/monMode_Lp2 /sics/$name/emon/isInTolerance_Lp2 /sics/$name/emon/errhandler
|
# makesctemon $name$m2 /sics/$name/emon/monMode_Lp2 /sics/$name/emon/isInTolerance_Lp2 /sics/$name/emon/errhandler
|
||||||
@@ -2102,16 +2109,22 @@ proc add_sct_ls340 {name IP port terminator {_tol1 1.0} {_tol2 1.0} {_verbose 0}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if {[ catch {
|
||||||
if { [ info exists ::config_dict ] } {
|
if { [ info exists ::config_dict ] } {
|
||||||
if { [ dict get $::config_dict ls340_1 enabled ] } {
|
if { [ dict get $::config_dict ls340_1 enabled ] } {
|
||||||
set IP [dict get $::config_dict ls340_1 ip]
|
set IP [dict get $::config_dict ls340_1 ip]
|
||||||
set PORT [dict get $::config_dict ls340_1 port]
|
set PORT [dict get $::config_dict ls340_1 port]
|
||||||
set name [dict get $::config_dict ls340_1 name]
|
set name [dict get $::config_dict ls340_1 name]
|
||||||
set term [dict get $::config_dict ls340_1 terminator]
|
set ctype [dict get $::config_dict ls340_1 type]
|
||||||
set tol1 [dict get $::config_dict ls340_1 tol1]
|
set cid [dict get $::config_dict ls340_1 id]
|
||||||
set tol2 [dict get $::config_dict ls340_1 tol2]
|
set term [dict get $::config_dict ls340_1 terminator]
|
||||||
|
set tol1 [dict get $::config_dict ls340_1 tol1]
|
||||||
|
set tol2 [dict get $::config_dict ls340_1 tol2]
|
||||||
|
|
||||||
add_sct_ls340 $name $IP $PORT $term $tol1 $tol2
|
add_sct_ls340 $name $IP $PORT $term $tol1 $tol2 $cid $ctype
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
} message ]} {
|
||||||
|
puts "ERROR: $message"
|
||||||
}
|
}
|
||||||
namespace import ::scobj::ls340::*
|
namespace import ::scobj::ls340::*
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ enabled = False
|
|||||||
group = environment:magnet
|
group = environment:magnet
|
||||||
ip = 10.157.205.3
|
ip = 10.157.205.3
|
||||||
name = magnetic
|
name = magnetic
|
||||||
|
type = B
|
||||||
|
id = 1
|
||||||
port = 55001
|
port = 55001
|
||||||
|
|
||||||
[12tmagnet_setup]
|
[12tmagnet_setup]
|
||||||
@@ -17,8 +19,10 @@ enabled = False
|
|||||||
group = environment:temperature
|
group = environment:temperature
|
||||||
ip = 137.157.203.137
|
ip = 137.157.203.137
|
||||||
name = tc1
|
name = tc1
|
||||||
|
type = T
|
||||||
|
id = 1
|
||||||
port = 4001
|
port = 4001
|
||||||
terminator = "\r\n"
|
terminator = \r\n
|
||||||
tol1 = 1.0
|
tol1 = 1.0
|
||||||
tol2 = 1.0
|
tol2 = 1.0
|
||||||
|
|
||||||
@@ -28,8 +32,10 @@ enabled = False
|
|||||||
group = environment:temperature
|
group = environment:temperature
|
||||||
ip = 137.157.203.137
|
ip = 137.157.203.137
|
||||||
name = tc2
|
name = tc2
|
||||||
|
type = T
|
||||||
|
id = 2
|
||||||
port = 4003
|
port = 4003
|
||||||
terminator = "\r\n"
|
terminator = \r\n
|
||||||
tol = 2.0
|
tol = 2.0
|
||||||
|
|
||||||
[mercury_itc500]
|
[mercury_itc500]
|
||||||
@@ -39,6 +45,8 @@ enabled = False
|
|||||||
group = environment:temperature
|
group = environment:temperature
|
||||||
ip = 10.157.205.5
|
ip = 10.157.205.5
|
||||||
name = tc9
|
name = tc9
|
||||||
|
type = T
|
||||||
|
id = 9
|
||||||
offifon = mercury_scipi
|
offifon = mercury_scipi
|
||||||
port = 7020
|
port = 7020
|
||||||
tol = 2.0
|
tol = 2.0
|
||||||
@@ -49,6 +57,8 @@ enabled = False
|
|||||||
group = environment:temperature
|
group = environment:temperature
|
||||||
ip = 10.157.205.5
|
ip = 10.157.205.5
|
||||||
name = tc9
|
name = tc9
|
||||||
|
type = T
|
||||||
|
id = 9
|
||||||
offifon = mercury_itc500
|
offifon = mercury_itc500
|
||||||
port = 7020
|
port = 7020
|
||||||
tol = 2.0
|
tol = 2.0
|
||||||
@@ -64,3 +74,5 @@ enabled = False
|
|||||||
group = environment:temperature
|
group = environment:temperature
|
||||||
ip = 137.157.203.141
|
ip = 137.157.203.141
|
||||||
name = tc1
|
name = tc1
|
||||||
|
type = T
|
||||||
|
id = 1
|
||||||
|
|||||||
Reference in New Issue
Block a user