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
9855959c
Commit
9855959c
authored
Oct 25, 2011
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LED test modified to independently check the LEDs and add switch OFF test.
parent
f80799c6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
8 deletions
+80
-8
test03.py
test/fmcadc100m14b4cha/python/test03.py
+80
-8
No files found.
test/fmcadc100m14b4cha/python/test03.py
View file @
9855959c
...
...
@@ -41,27 +41,99 @@ def main (default_directory='.'):
spec
=
rr
.
Gennum
()
# bind to the SPEC board
fmc
=
fmc_adc
.
CFmcAdc100Ms
(
spec
)
fmc
.
trig_led
(
1
)
fmc
.
acq_led
(
1
)
ask
=
""
;
# Standard in/out temporary redirection
tmp_stdout
=
sys
.
stdout
;
sys
.
stdout
=
sys
.
__stdout__
;
tmp_stdin
=
sys
.
stdin
;
sys
.
stdin
=
sys
.
__stdin__
;
# Initialize error variable
errors
=
[
0
,
0
,
0
,
0
]
############################################################################
# Test TRIG LED ON
fmc
.
trig_led
(
1
)
fmc
.
acq_led
(
0
)
ask
=
""
;
while
((
ask
!=
"Y"
)
and
(
ask
!=
"N"
))
:
print
"-------------------------------------------------------------"
ask
=
raw_input
(
"Is the front panel LED TRIG switched ON? [Y/N]"
)
ask
=
ask
.
upper
()
#print "-------------------------------------------------------------"
print
" "
if
(
ask
==
"N"
):
# TRIG LED ON fail
errors
[
0
]
=
1
############################################################################
# Test TRIG 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 TRIG switched OFF? [Y/N]"
)
ask
=
ask
.
upper
()
#print "-------------------------------------------------------------"
print
" "
if
(
ask
==
"N"
):
# TRIG 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
(
"
Are the front panel LEDs (TRIG and ACQ)
switched ON? [Y/N]"
)
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
;
if
(
ask
==
"N"
)
:
# Check for errors in LED tests
if
(
errors
!=
([
0
]
*
4
)):
if
(
errors
[
0
]
==
1
):
print
(
"TRIG LED not switching ON. Check for soldering or connection problem."
)
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)."
)
raise
PtsError
(
"There is a problem with the LEDs"
);
fmc
.
trig_led
(
0
)
fmc
.
acq_led
(
0
)
if
__name__
==
'__main__'
:
main
()
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