change command names
r3701 | jgn | 2012-08-20 15:54:34 +1000 (Mon, 20 Aug 2012) | 1 line
This commit is contained in:
committed by
Douglas Clowes
parent
e10bb049fd
commit
f4a240c377
@@ -801,179 +801,76 @@ proc ::scobj::ag1010::mkAG {argList} {
|
|||||||
|
|
||||||
namespace import ::scobj::ag1010::par
|
namespace import ::scobj::ag1010::par
|
||||||
|
|
||||||
proc LFSetLimitsFPL {para} {
|
proc LFPAGC {{para ""} args} {
|
||||||
|
|
||||||
set HEAD 0x96
|
if {$para == ""} {
|
||||||
set LEN 10
|
broadcast "[hget /sics/ag1010/AGC/PAGC] dW"
|
||||||
set CTRL 2
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
|
|
||||||
if {$para > 10040 || $para < 0} {
|
|
||||||
broadcast "Error: The Limit for the Forward Power is 0~10040 dW"
|
|
||||||
} else {
|
} else {
|
||||||
set RPL [hval $ns/limits/ReversePower]
|
set HEAD 0x96
|
||||||
set data [format %04x%04x%04x%04x $newPara $RPL 0 0]
|
set LEN 4
|
||||||
|
set CTRL 3
|
||||||
|
set CRC 0
|
||||||
|
|
||||||
|
set ns /sics/ag1010
|
||||||
|
set newPara [string trim $para " "]
|
||||||
|
|
||||||
|
set data [format %04x $newPara]
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
||||||
|
|
||||||
broadcast "Set Forward Power Limits to $newPara dW"
|
broadcast "Set Power Level for AGC mode to $newPara dW"
|
||||||
sct_ag1010 send "$cmd"
|
sct_ag1010 send "$cmd"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc LFSetLimitsRPL {para} {
|
proc LFPMGC {{para ""} args} {
|
||||||
|
|
||||||
set HEAD 0x96
|
if {$para == ""} {
|
||||||
set LEN 10
|
broadcast "[hget /sics/ag1010/MGC/PMGC] dW"
|
||||||
set CTRL 2
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
|
|
||||||
if {$para > 1630 || $para < 0} {
|
|
||||||
broadcast "Error: The Limit for the Reflected Power is 0~1630 dW"
|
|
||||||
} else {
|
} else {
|
||||||
set FPL [hval $ns/limits/ForwardPower]
|
set HEAD 0x96
|
||||||
set data [format %04x%04x%04x%04x $FPL $newPara 0 0]
|
set LEN 4
|
||||||
|
set CTRL 4
|
||||||
|
set CRC 0
|
||||||
|
|
||||||
|
set ns /sics/ag1010
|
||||||
|
set newPara [string trim $para " "]
|
||||||
|
|
||||||
|
set data [format %04x $newPara]
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
||||||
|
|
||||||
broadcast "Set Reverse Power Limits to $newPara dW"
|
broadcast "Set Power Level for MGC mode to $newPara dW"
|
||||||
sct_ag1010 send "$cmd"
|
sct_ag1010 send "$cmd"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc LFSetPAGC {para} {
|
proc LFFREQ {{para ""} args} {
|
||||||
|
|
||||||
set HEAD 0x96
|
if {$para == ""} {
|
||||||
set LEN 4
|
broadcast "[hget /sics/ag1010/FRE/FREQ] Hz"
|
||||||
set CTRL 3
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
|
|
||||||
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"
|
|
||||||
sct_ag1010 send "$cmd"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFSetPMGC {para} {
|
|
||||||
|
|
||||||
set HEAD 0x96
|
|
||||||
set LEN 4
|
|
||||||
set CTRL 4
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
|
|
||||||
set data [format %04x $newPara]
|
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
|
||||||
|
|
||||||
broadcast "Set Power Level for MGC mode to $newPara dW"
|
|
||||||
sct_ag1010 send "$cmd"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFSetFREQ {para} {
|
|
||||||
|
|
||||||
set HEAD 0x96
|
|
||||||
set LEN 6
|
|
||||||
set CTRL 5
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
|
|
||||||
if {$para < 0.02 || $para > 2000000} {
|
|
||||||
broadcast "Error: Freqence shall be set between 0.02 Hz and 2 MHz"
|
|
||||||
} else {
|
} else {
|
||||||
set Freq [expr $newPara / 1000]
|
set HEAD 0x96
|
||||||
set FreqHz [expr $newPara % 1000]
|
set LEN 6
|
||||||
set data [format %04x%04x $Freq $FreqHz]
|
set CTRL 5
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
set CRC 0
|
||||||
|
|
||||||
broadcast "Set Frequency to $newPara Hz"
|
set ns /sics/ag1010
|
||||||
sct_ag1010 send "$cmd"
|
set newPara [string trim $para " "]
|
||||||
|
|
||||||
|
if {$para < 0.02 || $para > 2000000} {
|
||||||
|
broadcast "Error: Freqence shall be set between 0.02 Hz and 2 MHz"
|
||||||
|
} else {
|
||||||
|
set Freq [expr $newPara / 1000]
|
||||||
|
set FreqHz [expr $newPara % 1000]
|
||||||
|
set data [format %04x%04x $Freq $FreqHz]
|
||||||
|
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
||||||
|
|
||||||
|
broadcast "Set Frequency to $newPara Hz"
|
||||||
|
sct_ag1010 send "$cmd"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc LFSetBurstMode {para} {
|
proc LFSweepRun {startF stepF scyc {mode 2} args} {
|
||||||
|
|
||||||
set HEAD 0x96
|
|
||||||
set LEN 7
|
|
||||||
set CTRL 8
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
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 BRepTime [hval $ns/BurstPar/BRepTime]
|
|
||||||
set TimeOfPower [hval $ns/BurstPar/TimeOfPower]
|
|
||||||
set data [format %02x%04x%04x $BurstMode $BRepTime $TimeOfPower]
|
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
|
||||||
|
|
||||||
if {$BurstMode == 0} {
|
|
||||||
set mode "Set Burst Mode to OFF"
|
|
||||||
} elseif {$BurstMode == 1} {
|
|
||||||
set mode "Set Burtst Mode to Internal Mode"
|
|
||||||
} elseif {$BurstMode == 2} {
|
|
||||||
set mode "Set Burst Mode to Change Burst Parameters without Changing Burst On/Off"
|
|
||||||
} else {
|
|
||||||
set mode "Set Burst Mode to External Mode"
|
|
||||||
}
|
|
||||||
|
|
||||||
broadcast "$mode"
|
|
||||||
sct_ag1010 send "$cmd"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFSetBRepTime {para} {
|
|
||||||
|
|
||||||
set HEAD 0x96
|
|
||||||
set LEN 7
|
|
||||||
set CTRL 8
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
|
|
||||||
set BurstMode 2
|
|
||||||
set TimeOfPower [hval $ns/BurstPar/TimeOfPower]
|
|
||||||
set data [format %02x%04x%04x $BurstMode $newPara $TimeOfPower]
|
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
|
||||||
|
|
||||||
broadcast "Set Repetition Period Burst Cycle to $newPara ms"
|
|
||||||
sct_ag1010 send "$cmd"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFSetBTimeOfPower {para} {
|
|
||||||
|
|
||||||
set HEAD 0x96
|
|
||||||
set LEN 7
|
|
||||||
set CTRL 8
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
|
|
||||||
set BurstMode 2
|
|
||||||
set BRepTime [hval $ns/BurstPar/BRepTime]
|
|
||||||
set data [format %02x%04x%04x $BurstMode $BRepTime $newPara]
|
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
|
||||||
|
|
||||||
broadcast "Set Time of Power in Burst Cycle to $newPara us"
|
|
||||||
sct_ag1010 send "$cmd"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFSetSweep {startF stepF scyc {mode 2} args} {
|
|
||||||
|
|
||||||
if {$mode<0 || $mode>2} {
|
if {$mode<0 || $mode>2} {
|
||||||
return -code error "Error in setValue: only allowed input values for SweepMode are {0,1,2}"
|
return -code error "Error in setValue: only allowed input values for SweepMode are {0,1,2}"
|
||||||
@@ -998,172 +895,181 @@ proc LFSetSweep {startF stepF scyc {mode 2} args} {
|
|||||||
sct_ag1010 send "$cmd"
|
sct_ag1010 send "$cmd"
|
||||||
}
|
}
|
||||||
|
|
||||||
proc LFSetSweepMode {para} {
|
proc LFLimits {args} {
|
||||||
|
|
||||||
set HEAD 0x96
|
if {$args == ""} {
|
||||||
set LEN 13
|
broadcast "[hget /sics/ag1010/limits/ForwardPower] dW"
|
||||||
set CTRL 9
|
broadcast "[hget /sics/ag1010/limits/ReversePower] dW"
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
if {$newPara<0 || $newPara>2} {
|
|
||||||
return -code error "Error in setValue: only allowed input values for SweepMode are {0,1,2}"
|
|
||||||
} else {
|
|
||||||
set SweepMode $newPara
|
|
||||||
}
|
|
||||||
|
|
||||||
set SStr [expr [hval $ns/SweepPar/StartFreq] / 1000]
|
|
||||||
set SStrHz [expr [hval $ns/SweepPar/StartFreq] % 1000]
|
|
||||||
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 cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
|
||||||
|
|
||||||
if {$SweepMode == 0} {
|
|
||||||
set mode "Turn Off Sweep Mode"
|
|
||||||
} elseif {$SweepMode == 1} {
|
|
||||||
set mode "Turn On Sweep Mode"
|
|
||||||
} else {
|
} else {
|
||||||
set mode "Set Sweep Mode to Change Sweep Mode Parameters Without Changing Sweep Mode On/Off"
|
set HEAD 0x96
|
||||||
}
|
set LEN 10
|
||||||
|
set CTRL 2
|
||||||
|
set CRC 0
|
||||||
|
|
||||||
broadcast "$mode"
|
set ns /sics/ag1010
|
||||||
sct_ag1010 send "$cmd"
|
|
||||||
|
foreach {arg val} $args {
|
||||||
|
switch $arg {
|
||||||
|
"FPL" { if {$val > 10040 || $val < 0} {
|
||||||
|
broadcast "Error: The Limit for the Forward Power is 0~10040 dW"
|
||||||
|
} else {
|
||||||
|
set RPL [hval $ns/limits/ReversePower]
|
||||||
|
set data [format %04x%04x%04x%04x $val $RPL 0 0]
|
||||||
|
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
||||||
|
|
||||||
|
broadcast "Set Forward Power Limits to $val dW"
|
||||||
|
sct_ag1010 send "$cmd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"RPL" { if {$val > 1630 || $val < 0} {
|
||||||
|
broadcast "Error: The Limit for the Reflected Power is 0~1630 dW"
|
||||||
|
} else {
|
||||||
|
set FPL [hval $ns/limits/ForwardPower]
|
||||||
|
set data [format %04x%04x%04x%04x $FPL $val 0 0]
|
||||||
|
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
||||||
|
|
||||||
|
broadcast "Set Reverse Power Limits to $val dW"
|
||||||
|
sct_ag1010 send "$cmd"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default { error "ERROR: $arg should be 'FPL' or 'RPL'" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc LFSetSStartFreq {para} {
|
proc LFBurst {args} {
|
||||||
|
|
||||||
set HEAD 0x96
|
if {$args == ""} {
|
||||||
set LEN 13
|
broadcast "[hget /sics/ag1010/BurstPar/BurstMode]"
|
||||||
set CTRL 9
|
broadcast "[hget /sics/ag1010/BurstPar/BRepTime] ms"
|
||||||
set CRC 0
|
broadcast "[hget /sics/ag1010/BurstPar/TimeOfPower] us"
|
||||||
|
} else {
|
||||||
|
set HEAD 0x96
|
||||||
|
set LEN 7
|
||||||
|
set CTRL 8
|
||||||
|
set CRC 0
|
||||||
|
|
||||||
set ns /sics/ag1010
|
set ns /sics/ag1010
|
||||||
set newPara [string trim $para " "]
|
|
||||||
set SweepMode 2
|
|
||||||
set SStr [expr $newPara / 1000]
|
|
||||||
set SStrHz [expr $newPara % 1000]
|
|
||||||
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 cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
|
||||||
|
|
||||||
broadcast "Set Start Frequency in Sweep Mode to $newPara Hz"
|
set BurstMode 2
|
||||||
sct_ag1010 send "$cmd"
|
set BRepTime [hval $ns/BurstPar/BRepTime]
|
||||||
|
set TimeOfPower [hval $ns/BurstPar/TimeOfPower]
|
||||||
|
|
||||||
|
foreach {arg val} $args {
|
||||||
|
switch $arg {
|
||||||
|
"mode" { if {$val<0 || $val>3} {
|
||||||
|
return -code error "Error in setValue: only allowed input values for BurstMode are {0,1,2,3}"
|
||||||
|
} else {
|
||||||
|
set BurstMode $val
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$BurstMode == 0} {
|
||||||
|
set MODE "Set Burst Mode to OFF"
|
||||||
|
} elseif {$BurstMode == 1} {
|
||||||
|
set MODE "Set Burtst Mode to Internal Mode"
|
||||||
|
} elseif {$BurstMode == 2} {
|
||||||
|
set MODE "Set Burst Mode to Change Burst Parameters without Changing Burst On/Off"
|
||||||
|
} else {
|
||||||
|
set MODE "Set Burst Mode to External Mode"
|
||||||
|
}
|
||||||
|
|
||||||
|
broadcast "$MODE"
|
||||||
|
}
|
||||||
|
"rtime" { set BRepTime $val
|
||||||
|
broadcast "Set Repetition Period Burst Cycle to $val ms"
|
||||||
|
}
|
||||||
|
"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'" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set data [format %02x%04x%04x $BurstMode $BRepTime $TimeOfPower]
|
||||||
|
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
||||||
|
sct_ag1010 send "$cmd"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc LFSetSStepFreq {para} {
|
proc LFSweep {args} {
|
||||||
|
|
||||||
set HEAD 0x96
|
if {$args == ""} {
|
||||||
set LEN 13
|
broadcast "[hget /sics/ag1010/SweepPar/SweepMode]"
|
||||||
set CTRL 9
|
broadcast "[hget /sics/ag1010/SweepPar/StartFreq] Hz"
|
||||||
set CRC 0
|
broadcast "[hget /sics/ag1010/SweepPar/StepFreq] Hz"
|
||||||
|
broadcast "[hget /sics/ag1010/SweepPar/SCyc]"
|
||||||
|
} else {
|
||||||
|
set HEAD 0x96
|
||||||
|
set LEN 13
|
||||||
|
set CTRL 9
|
||||||
|
set CRC 0
|
||||||
|
|
||||||
set ns /sics/ag1010
|
set ns /sics/ag1010
|
||||||
set newPara [string trim $para " "]
|
|
||||||
set SweepMode 2
|
set SweepMode 2
|
||||||
set SStr [expr [hval $ns/SweepPar/StartFreq] / 1000]
|
set SStr [expr [hval $ns/SweepPar/StartFreq] / 1000]
|
||||||
set SStrHz [expr [hval $ns/SweepPar/StartFreq] % 1000]
|
set SStrHz [expr [hval $ns/SweepPar/StartFreq] % 1000]
|
||||||
set SStp [expr $newPara / 1000]
|
set SStp [expr [hval $ns/SweepPar/StepFreq] / 1000]
|
||||||
set SStpHz [expr $newPara % 1000]
|
set SStpHz [expr [hval $ns/SweepPar/StepFreq] % 1000]
|
||||||
set SCyc [hval $ns/SweepPar/SCyc]
|
set SCyc [hval $ns/SweepPar/SCyc]
|
||||||
set data [format %02x%02x%02x%02x%02x%02x $SweepMode $SStr $SStp $SCyc $SStrHz $SStpHz]
|
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
|
||||||
|
|
||||||
broadcast "Set Step Frequency in Sweep Mode to $newPara Hz"
|
foreach {arg val} $args {
|
||||||
sct_ag1010 send "$cmd"
|
switch $arg {
|
||||||
|
"mode" { if {$val<0 || $val>2} {
|
||||||
|
return -code error "Error in setValue: only allowed input values for SweepMode are {0,1,2}"
|
||||||
|
} else {
|
||||||
|
set SweepMode $val
|
||||||
|
}
|
||||||
|
|
||||||
|
if {$SweepMode == 0} {
|
||||||
|
set MODE "Turn Off Sweep Mode"
|
||||||
|
} elseif {$SweepMode == 1} {
|
||||||
|
set MODE "Turn On Sweep Mode"
|
||||||
|
} else {
|
||||||
|
set MODE "Set Sweep Mode to Change Sweep Mode Parameters Without Changing Sweep Mode On/Off"
|
||||||
|
}
|
||||||
|
|
||||||
|
broadcast "$MODE"
|
||||||
|
}
|
||||||
|
"startF" { set SStr [expr $val / 1000]
|
||||||
|
set SStrHz [expr $val % 1000]
|
||||||
|
|
||||||
|
broadcast "Set Start Frequency in Sweep Mode to $val Hz"
|
||||||
|
}
|
||||||
|
"stepF" { set SStp [expr $val / 1000]
|
||||||
|
set SStpHz [expr $val % 1000]
|
||||||
|
|
||||||
|
broadcast "Set Step Frequency in Sweep Mode to $val Hz"
|
||||||
|
}
|
||||||
|
"scyc" { set SCyc $val
|
||||||
|
|
||||||
|
broadcast "Set Number of Steps in Full Sweep Cycle to $val"
|
||||||
|
}
|
||||||
|
default { error "ERROR: $arg should be 'mode', 'startF', 'stepF' or 'scyc'" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
set data [format %02x%02x%02x%02x%02x%02x $SweepMode $SStr $SStp $SCyc $SStrHz $SStpHz]
|
||||||
|
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
||||||
|
sct_ag1010 send "$cmd"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
proc LFSetSSCyc {para} {
|
proc LFMEAS {} {
|
||||||
|
|
||||||
set HEAD 0x96
|
|
||||||
set LEN 13
|
|
||||||
set CTRL 9
|
|
||||||
set CRC 0
|
|
||||||
|
|
||||||
set ns /sics/ag1010
|
|
||||||
set newPara [string trim $para " "]
|
|
||||||
set SweepMode 2
|
|
||||||
set SStr [expr [hval $ns/SweepPar/StartFreq] / 1000]
|
|
||||||
set SStrHz [expr [hval $ns/SweepPar/StartFreq] % 1000]
|
|
||||||
set SStp [expr [hval $ns/SweepPar/StepFreq] / 1000]
|
|
||||||
set SStpHz [expr [hval $ns/SweepPar/StepFreq] % 1000]
|
|
||||||
set SCyc $newPara
|
|
||||||
set data [format %02x%02x%02x%02x%02x%02x $SweepMode $SStr $SStp $SCyc $SStrHz $SStpHz]
|
|
||||||
set cmd [format %02x%02x%02x%s%02x $HEAD $LEN $CTRL $data $CRC]
|
|
||||||
|
|
||||||
broadcast "Set Number of Steps in Full Sweep Cycle to $newPara"
|
|
||||||
sct_ag1010 send "$cmd"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFGetLimits {} {
|
|
||||||
|
|
||||||
broadcast "[hget /sics/ag1010/limits/ForwardPower] dW"
|
|
||||||
broadcast "[hget /sics/ag1010/limits/ReversePower] dW"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFGetPAGC {} {
|
|
||||||
|
|
||||||
broadcast "[hget /sics/ag1010/AGC/PAGC] dW"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFGetPMGC {} {
|
|
||||||
|
|
||||||
broadcast "[hget /sics/ag1010/MGC/PMGC] dW"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFGetFREQ {} {
|
|
||||||
|
|
||||||
broadcast "[hget /sics/ag1010/FRE/FREQ] Hz"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFGetBurstPar {} {
|
|
||||||
|
|
||||||
broadcast "[hget /sics/ag1010/BurstPar/BurstMode]"
|
|
||||||
broadcast "[hget /sics/ag1010/BurstPar/BRepTime] ms"
|
|
||||||
broadcast "[hget /sics/ag1010/BurstPar/TimeOfPower] us"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFGetSweepPar {} {
|
|
||||||
|
|
||||||
broadcast "[hget /sics/ag1010/SweepPar/SweepMode]"
|
|
||||||
broadcast "[hget /sics/ag1010/SweepPar/StartFreq] Hz"
|
|
||||||
broadcast "[hget /sics/ag1010/SweepPar/StepFreq] Hz"
|
|
||||||
broadcast "[hget /sics/ag1010/SweepPar/SCyc]"
|
|
||||||
}
|
|
||||||
|
|
||||||
proc LFGetMEAS {} {
|
|
||||||
|
|
||||||
broadcast "[hget /sics/ag1010/MEAS/ForwardPower] dW"
|
broadcast "[hget /sics/ag1010/MEAS/ForwardPower] dW"
|
||||||
broadcast "[hget /sics/ag1010/MEAS/ReversePower] dW"
|
broadcast "[hget /sics/ag1010/MEAS/ReversePower] dW"
|
||||||
broadcast "[hget /sics/ag1010/MEAS/Temperature] Degree"
|
broadcast "[hget /sics/ag1010/MEAS/Temperature] Degree"
|
||||||
}
|
}
|
||||||
|
|
||||||
publish LFSetLimitsFPL user
|
publish LFLimits user
|
||||||
publish LFSetLimitsRPL user
|
publish LFPAGC user
|
||||||
publish LFSetPAGC user
|
publish LFPMGC user
|
||||||
publish LFSetPMGC user
|
publish LFFREQ user
|
||||||
publish LFSetFREQ user
|
publish LFMEAS user
|
||||||
publish LFSetBurstMode user
|
publish LFBurst user
|
||||||
publish LFSetBRepTime user
|
publish LFSweepRun user
|
||||||
publish LFSetBTimeOfPower user
|
publish LFSweep user
|
||||||
publish LFSetSweep user
|
|
||||||
publish LFSetSweepMode user
|
|
||||||
publish LFSetSStartFreq user
|
|
||||||
publish LFSetSStepFreq user
|
|
||||||
publish LFSetSSCyc user
|
|
||||||
|
|
||||||
publish LFGetLimits user
|
|
||||||
publish LFGetPAGC user
|
|
||||||
publish LFGetPMGC user
|
|
||||||
publish LFGetFREQ user
|
|
||||||
publish LFGetBurstPar user
|
|
||||||
publish LFGetSweepPar user
|
|
||||||
publish LFGetMEAS user
|
|
||||||
|
|
||||||
|
|
||||||
# Main process call
|
# Main process call
|
||||||
# @param name short name for the AG1010 Amplifier/Generator
|
# @param name short name for the AG1010 Amplifier/Generator
|
||||||
|
|||||||
Reference in New Issue
Block a user