add progress reminder at changing temperature and field
r3399 | jgn | 2012-02-27 12:13:47 +1100 (Mon, 27 Feb 2012) | 1 line
This commit is contained in:
committed by
Douglas Clowes
parent
a24420bf69
commit
5b4b52c627
@@ -70,6 +70,7 @@ proc ::scobj::magnetic::rdFieldStateFunc {basePath} {
|
|||||||
} elseif {[string first "read timeout" $replyStr] != -1} {
|
} elseif {[string first "read timeout" $replyStr] != -1} {
|
||||||
broadcast "Error: read timeout on the connectiion to the Oxford Labview server"
|
broadcast "Error: read timeout on the connectiion to the Oxford Labview server"
|
||||||
} else {
|
} else {
|
||||||
|
debug_log "Magnetic Current: $replyStr"
|
||||||
debug_log [expr $replyStr/10.0]
|
debug_log [expr $replyStr/10.0]
|
||||||
hset $basePath/magneticField $replyStr
|
hset $basePath/magneticField $replyStr
|
||||||
}
|
}
|
||||||
@@ -108,6 +109,16 @@ proc ::scobj::magnetic::rdTempStateFunc {basePath} {
|
|||||||
return idle
|
return idle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
proc OxfordSetTemp {temp} {
|
||||||
|
set NAME "magnetic"
|
||||||
|
hset /sics/$NAME/TempSetTarget $temp
|
||||||
|
|
||||||
|
set comm "setT $temp\r\n"
|
||||||
|
sct_magnetic send $comm
|
||||||
|
}
|
||||||
|
|
||||||
|
publish OxfordSetTemp user
|
||||||
|
|
||||||
##
|
##
|
||||||
# @brief Make a Magnetic Controller
|
# @brief Make a Magnetic Controller
|
||||||
#
|
#
|
||||||
@@ -148,9 +159,37 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
|
|||||||
hfactory /sics/$pa(NAME)/start_temperature_s3 plain user float
|
hfactory /sics/$pa(NAME)/start_temperature_s3 plain user float
|
||||||
hfactory /sics/$pa(NAME)/end_temperature_s3 plain user float
|
hfactory /sics/$pa(NAME)/end_temperature_s3 plain user float
|
||||||
|
|
||||||
|
# Setting Magnetic field
|
||||||
hfactory /sics/$pa(NAME)/setPoint plain user float
|
hfactory /sics/$pa(NAME)/setPoint plain user float
|
||||||
hfactory /sics/$pa(NAME)/setRate plain user float
|
hfactory /sics/$pa(NAME)/setRate plain user float
|
||||||
hfactory /sics/$pa(NAME)/setTemp plain user float
|
|
||||||
|
# Setting Temperature
|
||||||
|
hfactory /sics/$pa(NAME)/TempSetTarget plain user float
|
||||||
|
hfactory /sics/$pa(NAME)/TempSetPoint plain user float
|
||||||
|
|
||||||
|
# Initialise properties required for generating the API for GumTree and to save data
|
||||||
|
::scobj::hinitprops $pa(NAME) start_magnetic end_magnetic magneticField
|
||||||
|
::scobj::hinitprops $pa(NAME) start_temperature_s1 end_temperature_s1 Temp_s1
|
||||||
|
::scobj::hinitprops $pa(NAME) start_temperature_s2 end_temperature_s2 Temp_s2
|
||||||
|
::scobj::hinitprops $pa(NAME) start_temperature_s3 end_temperature_s3 Temp_s3
|
||||||
|
|
||||||
|
sicslist setatt $pa(NAME) klass environment
|
||||||
|
|
||||||
|
# proc ::histogram_memory::pre_count "{fPath $pa(NAME)}" {
|
||||||
|
# hset /sics/$fPath/start_magnetic [hval /sics/$fPath/magneticField]
|
||||||
|
|
||||||
|
# hset /sics/$fPath/start_temperature_s1 [hval /sics/$fPath/Temp_s1]
|
||||||
|
# hset /sics/$fPath/start_temperature_s2 [hval /sics/$fPath/Temp_s2]
|
||||||
|
# hset /sics/$fPath/start_temperature_s3 [hval /sics/$fPath/Temp_s3]
|
||||||
|
# }
|
||||||
|
|
||||||
|
# proc ::histogram_memory::post_count "{fPath $pa(NAME)}" {
|
||||||
|
# hset /sics/$fPath/end_magnetic [hval /sics/$fPath/magneticField]
|
||||||
|
|
||||||
|
# hset /sics/$fPath/end_temperature_s1 [hval /sics/$fPath/Temp_s1]
|
||||||
|
# hset /sics/$fPath/end_temperature_s2 [hval /sics/$fPath/Temp_s2]
|
||||||
|
# hset /sics/$fPath/end_temperature_s3 [hval /sics/$fPath/Temp_s3]
|
||||||
|
# }
|
||||||
|
|
||||||
# Initialise properties required for generating the API for GumTree and to save data
|
# Initialise properties required for generating the API for GumTree and to save data
|
||||||
::scobj::hinitprops $pa(NAME) start_magnetic end_magnetic magneticField
|
::scobj::hinitprops $pa(NAME) start_magnetic end_magnetic magneticField
|
||||||
@@ -205,12 +244,19 @@ proc ::scobj::magnetic::mkMagnetic {argList} {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
proc OxfordSetField {setPoint} {
|
proc OxfordSetField {setPoint {mode ""} args} {
|
||||||
set NAME "magnetic"
|
set NAME "magnetic"
|
||||||
hset /sics/$NAME/setPoint $setPoint
|
hset /sics/$NAME/setPoint $setPoint
|
||||||
|
|
||||||
set comm "setF $setPoint\r\n"
|
if {$mode == ""} {
|
||||||
sct_magnetic send $comm
|
set comm "setF $setPoint\r\n"
|
||||||
|
sct_magnetic send $comm
|
||||||
|
} elseif {$mode == "P"} {
|
||||||
|
set comm "setF $setPoint Pers\r\n"
|
||||||
|
sct_magnetic send $comm
|
||||||
|
} else {
|
||||||
|
broadcast "Wrong parameters being provided, check!"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc OxfordSetRate {setRate} {
|
proc OxfordSetRate {setRate} {
|
||||||
@@ -221,16 +267,6 @@ proc OxfordSetRate {setRate} {
|
|||||||
sct_magnetic send $comm
|
sct_magnetic send $comm
|
||||||
}
|
}
|
||||||
|
|
||||||
proc OxfordSetTemp {temp} {
|
|
||||||
set NAME "magnetic"
|
|
||||||
hset /sics/$NAME/setTemp $temp
|
|
||||||
|
|
||||||
set comm "setT $temp\r\n"
|
|
||||||
sct_magnetic send $comm
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
publish OxfordSetField user
|
publish OxfordSetField user
|
||||||
publish OxfordSetRate user
|
publish OxfordSetRate user
|
||||||
publish OxfordSetTemp user
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user