Professional Documents
Culture Documents
Lab 1-5
Lab 1-5
Labs 1 5
Balint Seeber
Ettus Research
Version 1.0 (1
th
!"ril #01$%
&o''ents ( su))etions *elco'e+
balint,ettus.co'
,s"enchdotnet
Lab 1
Run 0)nuradio1co'"anion0
Lab 1
Lo) *indo* 2ee" an e3e on this4 as *ell as 3our ter'inal5
Bloc2 list
/ress
&TRL67 to
search 8or a
na'e
&an9as (the 8lo*)ra"h
construction area%
:ra) bloc2s 8ro'
the Bloc2 list
onto the can9as.
&onnect "orts b3 clic2in) on the chosen "ort o8 one
bloc24 and then clic2 on the "ort o8 the other bloc2.
;ou can delete connections b3 clic2in) on the
connection0s line and "ressin) the :elete 2e3.
Lab 1
&reate a sine *a9e ( ins"ect the )enerated
sa'"les *ith a (ti'e1do'ain% Sco"e Sin2
Lab 1
0-"tions0 bloc2 is used
to set )lobal "ara'eters
(double clic2%
Lab 1
Na'e o8 )enerated /3thon 8ile
Title o8 'ain GU< *indo*4 or na'e o8 Hierarchical bloc2
GR& can9as si=e
T3"e o8 code to )enerate (see ne>t%
?o* to start ( sto" the 8lo*)ra"h
<8 code is run as 0root0 (e.). *ith 0sudo0%
as2 -S 2ernel to "rioritise this "rocess
!d9anced+ li'it the nu'ber o8 sa'"les out"ut
8ro' each iteration o8 e9er3 bloc20s *or2 8unction
Lab 1
GU< a"" usin) @A tool2it
(use @A GU< bloc2s%
GU< a"" usin) Bt tool2it
(use Bt GU< bloc2s%
&o''and1line a"" *ithout GU<
(te>t1based4 run in a console%
&reate a Hierarchical bloc2
that *ill a""ear in the bloc2 list
(a reusable co'"onent4 not an a""
use /ad Source.Sin2 bloc2s to
e>"ose "orts4 and /ara'eter bloc2s
to e>"ose con8i)uration 9ariables%
Lab 1
!uto'aticall3 start 8lo*)ra"h
:o not auto'aticall3 start 8lo*)ra"h
Lab 1
@ill auto'aticall3 e>it i8.*hen done
/ressin) ENTER *ill e>it
Lab 1
Variable+ a bloc2 that contains an arbitrar3 /3thon
e>"ression.
;ou can re8er to it in another bloc2 b3 its ID.
0sa'"Crate0 is al*a3s added
b3 de8ault in a ne* 8lo*)ra"h
Lab 1
(double clic2%
ID+ (/3thon% 9ariable na'e
Value+ arbitrar3 /3thon e>"ression4 e.).
D#000 (the de8ault%+ an inte)er
D#eE+ D#000.0 (8loatin)1"oint nu'ber%
int(D#eE%+ D#000 (inte)er cast o8 8loatin)1
"oint nu'ber%
Lab 1
(double clic2%
!nother e>a'"le o8 a si'"le arbitrar3
/3thon e>"ression.
?o9er the cursor o9er an3 "ara'eter
8ield and the toolti" *ill sho* 3ou the
e>"ression0s evaluated result
(here 5 6 E F 11%
Note: arbitrar3 e>"ressions can only be
*ritten into 8ields that ha9e a *hite
bac2)round (0ra*0 8ields%.
0'3C9ar0 is Gust 8or sho* here
(it doesn0t actuall3 do an3thin)
use8ul in this 8lo*)ra"h%.
Lab 1
GU< *id)et to control
the )enerated 8reHuenc3
GU< *id)et to "lot sa'"les
in the ti'e1do'ain
@ill throttle the rate at *hich
sa'"les "ass throu)h this bloc2
(thus settin) the rate at *hich
sa'"les "ass throu)h the *hole
8lo* )ra"h%.
S3nthesises a sine *a9e
Lab 1
T3"e o8 sa'"le (sets "ort colour%
!n3 processing bloc20s
0Sa'"le Rate0 "ara'eter is
used 8or :S/ calculation4 not
8or controllin) the rate at *hich
sa'"les are "roduced.
This is distinct 8ro' a hardware
(or Throttle% bloc2 *here it is
used to control sa'"le 8lo*.
T3"e o8 si)nal
7reHuenc3 (here it0s lin2ed to the slider
/hase o88set
!n underline indicates chan)in)
the "ara'eter 9ia an3
de"endent 9ariable *ill cause
the bloc2 to tri))er an internal
callbac2 and u"date its state
(i.e. "er8or' a real1ti'e
"ara'eter chan)e%
Sa'"le Rate (:S/%
Valid ran)es+
<8 3ou see lots o8 the letter 0U0 in the console4 the
trans'it chain o8 the USR/ is e>"eriencin)
underruns+ sa'"les cannot be "roduced Huic2l3
enou)h b3 the host.
int(sa'"Crate J 1.0%
int(sa'"Crate J 1.01%