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
f8913bdf
Commit
f8913bdf
authored
Mar 08, 2013
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fmc_adc_demo: Display the number of points * nb of shot in multishot mode.
parent
ddcaab02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
fmc_adc_demo.py
test/fmcadc100m14b4cha/python/fmc_adc_demo.py
+4
-2
No files found.
test/fmcadc100m14b4cha/python/fmc_adc_demo.py
View file @
f8913bdf
...
...
@@ -84,9 +84,11 @@ def acq_plot():
print
(
'trig_pos:
%.8
X (
%
d) pre_trig:
%.8
X (
%
d)'
)
%
(
trig_pos
,
trig_pos
,
pre_trig
,
pre_trig
)
print
(
'carrier addr:
%.8
X (
%
d)'
)
%
(
carrier_addr
,
carrier_addr
)
channels_data
=
carrier
.
get_data
(
carrier_addr
,
(
NB_POINTS
*
8
))
nb_point_disp
=
NB_POINTS
else
:
print
(
'Multi-shot acq'
)
channels_data
=
carrier
.
get_data
(
0
,
(
NB_POINTS
*
8
))
channels_data
=
carrier
.
get_data
(
0
,
(
NB_POINTS
*
8
*
m
.
nb_shot
.
value
()))
nb_point_disp
=
NB_POINTS
*
m
.
nb_shot
.
value
()
channels_data
=
[
hex2signed
(
item
)
for
item
in
channels_data
]
channels_data
=
[
digital2volt
(
item
,
ADC_FS
,
ADC_NBITS
)
for
item
in
channels_data
]
...
...
@@ -100,7 +102,7 @@ def acq_plot():
m
.
mpl_acq
.
canvas
.
ax
.
plot
(
sample
,
channels_data
[
1
::
4
],
'g'
,
label
=
'Channel 2'
)
m
.
mpl_acq
.
canvas
.
ax
.
plot
(
sample
,
channels_data
[
2
::
4
],
'r'
,
label
=
'Channel 3'
)
m
.
mpl_acq
.
canvas
.
ax
.
plot
(
sample
,
channels_data
[
3
::
4
],
'c'
,
label
=
'Channel 4'
)
m
.
mpl_acq
.
canvas
.
ax
.
set_xlim
(
0
,
NB_POINTS
)
m
.
mpl_acq
.
canvas
.
ax
.
set_xlim
(
0
,
nb_point_disp
)
m
.
mpl_acq
.
canvas
.
ax
.
set_ylim
(
-
(
ADC_FS
/
2
)
-
(
ADC_FS
/
10
),
(
ADC_FS
/
2
)
+
(
ADC_FS
/
10
))
m
.
mpl_acq
.
canvas
.
ax
.
legend
()
m
.
mpl_acq
.
canvas
.
draw
()
...
...
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