update the driver

r3743 | jgn | 2012-09-24 09:56:27 +1000 (Mon, 24 Sep 2012) | 1 line
This commit is contained in:
Jing Chen
2012-09-24 09:56:27 +10:00
committed by Douglas Clowes
parent 5d5c6bed54
commit 5ceb583d26

View File

@@ -35,6 +35,7 @@ proc ::scobj::green::rqGreenMagnetFunc {basePath} {
set replyStr [sct result]
debug_log $replyStr
#broadcast "getT reply:$replyStr\n"
set pollNode 999
if {[string first "Error" $replyStr] != -1} {
broadcast "Error: cannot get the Magnetific Temperature value from the Oxford Labview server, check again!"
} elseif {[string first "failed" $replyStr] != -1} {
@@ -53,8 +54,14 @@ proc ::scobj::green::rqGreenMagnetFunc {basePath} {
hset $basePath/status $paraArr(Status)
hset $basePath/Bmax $paraArr(Bmax)
hset $basePath/msg $paraArr(Msg)
set pollNode $paraArr(Output)
}
if {$pollNode != [sct oldval]} {
sct oldval $pollNode
sct update $pollNode
sct utime readtime
}
return idle
}
@@ -92,14 +99,14 @@ proc ::scobj::green::mkGreen {argList} {
hfactory $scobj_hpath/pollNode plain user text
hsetprop $scobj_hpath/output units "V"
hsetprop $scobj_hpath/output uplimit 100
hsetprop $scobj_hpath/output lowlimit 0
hsetprop $scobj_hpath/output units "V"
hsetprop $scobj_hpath/output uplimit 100
hsetprop $scobj_hpath/output lowlimit 0
hsetprop $scobj_hpath/status values idle,busy
hset $scobj_hpath/status idle
hsetprop $scobj_hpath/status values idle,busy
hset $scobj_hpath/status idle
hsetprop $scobj_hpath tuning $pa(TUNING)
hsetprop $scobj_hpath tuning $pa(TUNING)
# Setting Green Magnet Voltage
hfactory $scobj_hpath/setPoint plain user float
@@ -133,6 +140,7 @@ proc ::scobj::green::mkGreen {argList} {
hsetprop $scobj_hpath/pollNode read ::scobj::green::queryGreenMagnetFunc
hsetprop $scobj_hpath/pollNode rdState ::scobj::green::rqGreenMagnetFunc /sics/$pa(NAME)
hsetprop $scobj_hpath/pollNode oldval "UNKNOWN"
#if {[SplitReply [environment_simulation]]=="false"} {
sct_green poll $scobj_hpath/pollNode $pa(INTERVAL)