Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha - Testing
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
FMC ADC 100M 14b 4cha - Testing
Commits
ce74dfb8
Commit
ce74dfb8
authored
Oct 25, 2011
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test the two LEDs together.
parent
9d450bda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
49 deletions
+11
-49
test03.py
test/fmcadc100m14b4cha/python/test03.py
+11
-49
No files found.
test/fmcadc100m14b4cha/python/test03.py
View file @
ce74dfb8
...
...
@@ -48,92 +48,54 @@ def main (default_directory='.'):
sys
.
stdin
=
sys
.
__stdin__
;
# Initialize error variable, disable triggers and make sure no acquisition is running
errors
=
[
0
,
0
,
0
,
0
]
errors
=
[
0
,
0
]
fmc
.
set_trig_config
(
1
,
0
,
0
,
0
,
0
,
0
,
0
)
fmc
.
stop_acq
()
############################################################################
# Test
TRIG LED
ON
# Test
LEDs
ON
fmc
.
trig_led
(
1
)
fmc
.
acq_led
(
0
)
fmc
.
acq_led
(
1
)
ask
=
""
;
while
((
ask
!=
"Y"
)
and
(
ask
!=
"N"
))
:
print
"-------------------------------------------------------------"
ask
=
raw_input
(
"
Is the front panel LED TRIG
switched ON? [Y/N]"
)
ask
=
raw_input
(
"
Are the front panel LEDs (TRIG and ACQ)
switched ON? [Y/N]"
)
ask
=
ask
.
upper
()
#print "-------------------------------------------------------------"
print
" "
if
(
ask
==
"N"
):
#
TRIG
LED ON fail
# LED ON fail
errors
[
0
]
=
1
############################################################################
# Test
TRIG LED
OFF
# Test
LEDs
OFF
fmc
.
trig_led
(
0
)
fmc
.
acq_led
(
0
)
ask
=
""
;
while
((
ask
!=
"Y"
)
and
(
ask
!=
"N"
))
:
print
"-------------------------------------------------------------"
ask
=
raw_input
(
"
Is the front panel LED TRIG
switched OFF? [Y/N]"
)
ask
=
raw_input
(
"
Are the front panel LEDs (TRIG and ACQ)
switched OFF? [Y/N]"
)
ask
=
ask
.
upper
()
#print "-------------------------------------------------------------"
print
" "
if
(
ask
==
"N"
):
#
TRIG
LED OFF fail
# LED OFF fail
errors
[
1
]
=
1
############################################################################
# Test ACQ LED ON
fmc
.
trig_led
(
0
)
fmc
.
acq_led
(
1
)
ask
=
""
;
while
((
ask
!=
"Y"
)
and
(
ask
!=
"N"
))
:
print
"-------------------------------------------------------------"
ask
=
raw_input
(
"Is the front panel LED ACQ switched ON? [Y/N]"
)
ask
=
ask
.
upper
()
#print "-------------------------------------------------------------"
print
" "
if
(
ask
==
"N"
):
# ACQ LED ON fail
errors
[
2
]
=
1
############################################################################
# Test ACQ LED OFF
fmc
.
trig_led
(
0
)
fmc
.
acq_led
(
0
)
ask
=
""
;
while
((
ask
!=
"Y"
)
and
(
ask
!=
"N"
))
:
print
"-------------------------------------------------------------"
ask
=
raw_input
(
"Is the front panel LED ACQ switched OFF? [Y/N]"
)
ask
=
ask
.
upper
()
#print "-------------------------------------------------------------"
print
" "
if
(
ask
==
"N"
):
# ACQ LED OFF fail
errors
[
3
]
=
1
# Standard in/out redirection
sys
.
stdout
=
tmp_stdout
;
sys
.
stdin
=
tmp_stdin
;
# Check for errors in LED tests
if
(
errors
!=
([
0
]
*
4
)):
if
(
errors
!=
([
0
]
*
2
)):
if
(
errors
[
0
]
==
1
):
print
(
"
TRIG LED not switching ON. Check for soldering or connection problem
."
)
print
(
"
One or both LEDs not switching ON. Check for soldering or connection problem, grounded control line
."
)
if
(
errors
[
1
]
==
1
):
print
(
"TRIG LED not switching OFF. Check for short-cut (grounded control line)."
)
if
(
errors
[
2
]
==
1
):
print
(
"ACQ LED not switching ON. Check for soldering or connection problem."
)
if
(
errors
[
3
]
==
1
):
print
(
"ACQ LED not switching OFF. Check for short-cut (grounded control line)."
)
print
(
"One or both LEDs not switching OFF. Check for short-cut."
)
raise
PtsError
(
"There is a problem with the LEDs"
);
...
...
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