Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Calibration
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
White Rabbit Calibration
Commits
8481bd05
Commit
8481bd05
authored
Sep 27, 2016
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rewrote average as c1 AverageSweeps (VBS command) instead of launching a Math Function
parent
9cd672c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
LeCroy8254.py
sw/ab_cal_scripts/lib/LeCroy8254.py
+9
-14
No files found.
sw/ab_cal_scripts/lib/LeCroy8254.py
View file @
8481bd05
...
...
@@ -86,21 +86,16 @@ def get_waveforms(scope, channels=[1,2,3,4],num_avg=1):
# First point (FP=0)
# Segment Number (SN=0: all segments)
src_str
=
"
F
"
src_str
=
"
C
"
scope
.
write
(
"TRIG_MODE STOP"
)
for
chan
in
channels
.
split
(
','
):
scope
.
write
(
src_str
+
str
(
chan
)
+
':TRACE ON'
)
# For Function or Channel
# Attention! LeCroy can set average in Channel Tab manually but not via
# script!? For this we need to setup a function!
# Also note that setting up a function does not mean that we need to
# administrate the triggers by script (see for loop below where each loop
# one sweep is armed and taken.
scope
.
write
(
"VBS 'app.Math."
+
src_str
+
str
(
chan
)
+
".View = True'"
)
scope
.
write
(
"VBS 'app.Math."
+
src_str
+
str
(
chan
)
+
".Source1 =
\"
C"
+
str
(
chan
)
+
"
\"
'"
)
scope
.
write
(
"VBS 'app.Math."
+
src_str
+
str
(
chan
)
+
".Operator1 =
\"
Average
\"
'"
)
scope
.
write
(
"VBS 'app.Math."
+
src_str
+
str
(
chan
)
+
".Operator1Setup.Sweeps = "
+
str
(
num_avg
))
scope
.
write
(
"VBS 'app.Math."
+
src_str
+
str
(
chan
)
+
".MathMode =
\"
OneOperator
\"
'"
)
scope
.
write
(
src_str
+
str
(
chan
)
+
':TRACE ON'
)
# For Function or Channel
# Note that setting an Average Sweep number does not mean that acquisition
# automatically takes the right number of sweeps. This needs to be
# administrated by the script (see for loop below where for each loop one
# sweep is armed and taken.
scope
.
write
(
"VBS 'app.Acquisition."
+
src_str
+
str
(
chan
)
+
".AverageSweeps = "
+
str
(
num_avg
)
+
"'"
)
scope
.
write
(
"CLEAR_SWEEPS"
)
scope
.
write
(
"TRIG_MODE SINGLE"
)
...
...
@@ -110,8 +105,8 @@ def get_waveforms(scope, channels=[1,2,3,4],num_avg=1):
scope
.
write
(
"ARM;WAIT"
)
while
(
'1'
not
in
scope
.
ask
(
"*OPC?"
)):
pass
print
(
cnt
)
cnt
=
cnt
+
1
#
print(cnt)
#
cnt = cnt +1
timestamp
=
time
.
localtime
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment