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
974e0152
Commit
974e0152
authored
Apr 24, 2014
by
Matthieu Cattin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test41: Fix hex2signed function, selects right box output channel.
parent
652fe9d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
test41.py
test/fmcadc100m14b4cha/python/test41.py
+6
-2
No files found.
test/fmcadc100m14b4cha/python/test41.py
View file @
974e0152
...
@@ -88,9 +88,9 @@ def fmc_adc_init(spec, fmc):
...
@@ -88,9 +88,9 @@ def fmc_adc_init(spec, fmc):
# Converts two's complement hex to signed
# Converts two's complement hex to signed
def
hex2signed
(
value
):
def
hex2signed
(
value
):
if
(
value
&
0x8000
):
if
(
value
&
0x8000
):
return
-
((
~
value
&
0xFFF
C
)
+
1
)
return
-
((
~
value
&
0xFFF
F
)
+
1
)
else
:
else
:
return
(
value
&
0xFFF
C
)
return
(
value
&
0xFFF
F
)
# Converts digital value to volts
# Converts digital value to volts
def
digital2volt
(
value
,
full_scale
,
nb_bit
):
def
digital2volt
(
value
,
full_scale
,
nb_bit
):
...
@@ -325,6 +325,10 @@ def main (default_directory='.'):
...
@@ -325,6 +325,10 @@ def main (default_directory='.'):
fmc
.
set_input_term
(
CHANNEL
,
IN_TERM
)
fmc
.
set_input_term
(
CHANNEL
,
IN_TERM
)
time
.
sleep
(
SSR_SET_SLEEP
)
time
.
sleep
(
SSR_SET_SLEEP
)
# connect AWG to current channel
box
.
select_output_ch
(
CHANNEL
)
time
.
sleep
(
BOX_SET_SLEEP
)
##################################################
##################################################
# Apply gain and offset correction
# Apply gain and offset correction
##################################################
##################################################
...
...
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