Commiting state after implementing gating etc before cleaning and refactoring
This commit is contained in:
@@ -46,18 +46,6 @@ writePresetMonitor {
|
||||
################################################################################
|
||||
# Count Commands
|
||||
|
||||
startWithCountPreset {
|
||||
out "MP %d";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
startWithTimePreset {
|
||||
out "TP %#.2f";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
pauseCount {
|
||||
out "PS";
|
||||
in;
|
||||
@@ -76,17 +64,65 @@ stopCount {
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
# setMinRate{
|
||||
# out "DL \$2 %.3f";
|
||||
# in;
|
||||
# @mismatch{in "%(\$1MsgTxt)s";}
|
||||
# }
|
||||
#
|
||||
# readMinRate{
|
||||
# out "DL \$2";
|
||||
# in "%f";
|
||||
# @mismatch{in "%(\$1MsgTxt)s";}
|
||||
# }
|
||||
clearTimer{
|
||||
# We first stop the count, as otherwise on the newest counterboxes
|
||||
# it starts counting again if a time preset was set.
|
||||
# Not a problem with the older boxes
|
||||
stopCount;
|
||||
out "CT";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
clearChannel{
|
||||
out "CC \$2";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
clearCounter4 {
|
||||
out "CC 1";
|
||||
in;
|
||||
out "CC 2";
|
||||
in;
|
||||
out "CC 3";
|
||||
in;
|
||||
out "CC 4";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
clearCounter8 {
|
||||
out "CC 5";
|
||||
in;
|
||||
out "CC 6";
|
||||
in;
|
||||
out "CC 7";
|
||||
in;
|
||||
out "CC 8";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
clearCounter10 {
|
||||
out "CC 9";
|
||||
in;
|
||||
out "CC 10";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
startWithCountPreset {
|
||||
out "MP %d";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
startWithTimePreset {
|
||||
out "TP %#.2f";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
setMinRate{
|
||||
out "DL %(\$1THRESHOLD-MONITOR_RBV)d %.3f";
|
||||
@@ -112,18 +148,6 @@ readRateMonitor{
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
clearTimer{
|
||||
out "CT";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
clearChannel{
|
||||
out "CC \$2";
|
||||
in;
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Read Values From Monitors
|
||||
|
||||
@@ -141,7 +165,13 @@ readAll8 {
|
||||
|
||||
readAll10 {
|
||||
out "RA";
|
||||
in "%(\$1ELAPSED-TIME)f %(\$1M1)d %(\$1M2)d %(\$1M3)d %(\$1M4)d %(\$1M5)d %(\$1M6)d %(\$1M7)d %(\$1M8)d %(\$1M9)d %(\$1M10)d";
|
||||
in "%(\$1ELAPSED-TIME)f %(\$1M1)d %(\$1M2)d %(\$1M3)d %(\$1M4)d %(\$1M5)d %(\$1M6)d %(\$1M7)d %(\$1M8)d";
|
||||
# At least on the sinqtest variant this is broken
|
||||
# requiring channels 9 and 10 to be manually queried
|
||||
out "RC 9";
|
||||
in "%(\$1M9)d";
|
||||
out "RC 10";
|
||||
in "%(\$1M10)d";
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
@@ -164,3 +194,76 @@ setTestSignal {
|
||||
out "TG 1 %(\$1TESTGEN-HIGHRATE)d %(\$1TESTGEN-LOWRATE)d";
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Gating Settings
|
||||
|
||||
getGateStatus {
|
||||
out "GT \$2";
|
||||
in "%d %(\$1GATE-ON-\$2_RBV)d";
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
setGateStatus {
|
||||
extrainput = ignore;
|
||||
out "GT \$2 %(\$1GATE-\$2)d %(\$1GATE-ON-\$2)d";
|
||||
in "Gate \$2";
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
setGate {
|
||||
out "GATE \$2 %d";
|
||||
in "";
|
||||
@mismatch{in "%(\$1MsgTxt)s";}
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# To clean
|
||||
|
||||
startWithCountPreset4 {
|
||||
clearTimer;
|
||||
clearCounter4;
|
||||
readAll4;
|
||||
startWithCountPreset;
|
||||
}
|
||||
|
||||
startWithCountPreset8 {
|
||||
clearTimer;
|
||||
clearCounter4;
|
||||
clearCounter8;
|
||||
readAll8;
|
||||
startWithCountPreset;
|
||||
}
|
||||
|
||||
startWithCountPreset10 {
|
||||
clearTimer;
|
||||
clearCounter4;
|
||||
clearCounter8;
|
||||
clearCounter10;
|
||||
readAll10;
|
||||
startWithCountPreset;
|
||||
}
|
||||
|
||||
startWithTimePreset4 {
|
||||
clearTimer;
|
||||
clearCounter4;
|
||||
readAll4;
|
||||
startWithTimePreset;
|
||||
}
|
||||
|
||||
startWithTimePreset8 {
|
||||
clearTimer;
|
||||
clearCounter4;
|
||||
clearCounter8;
|
||||
readAll8;
|
||||
startWithTimePreset;
|
||||
}
|
||||
|
||||
startWithTimePreset10 {
|
||||
clearTimer;
|
||||
clearCounter4;
|
||||
clearCounter8;
|
||||
clearCounter10;
|
||||
readAll10;
|
||||
startWithTimePreset;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user