0% found this document useful (0 votes)
93 views2 pages

LabVIEW PDF

This document provides instructions for a LabVIEW exercise to sample and digitize an analog signal. The exercise involves creating two sine waves, adding them together, and displaying the original signal. It then resamples the signal, converts it to digital with an analog-to-digital converter, and converts it back to analog with a digital-to-analog converter, observing the effects of changing the sample rate and resolution. The goal is to observe the effects of sampling and quantization on the output waveform.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views2 pages

LabVIEW PDF

This document provides instructions for a LabVIEW exercise to sample and digitize an analog signal. The exercise involves creating two sine waves, adding them together, and displaying the original signal. It then resamples the signal, converts it to digital with an analog-to-digital converter, and converts it back to analog with a digital-to-analog converter, observing the effects of changing the sample rate and resolution. The goal is to observe the effects of sampling and quantization on the output waveform.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

LabVIEW

 Exercise:  Sampling  and  Digitizing  a  Signal  

1. Open  a  new  VI.    Create  two  sine  waves  using  the  Signal  Express    Create  Signals    
Create  Analog  Signal  block  as  in  the  demo.    The  first  sine  wave  should  500Hz  with  a  
1V  magnitude,  a  50K  sampling  rate  and  200  block  size.    The  second  sine  wave  is  
3KHz  with  a  0.2V  amplitude  and  the  same  sampling  rate  and  block  size.  

2. Add  the  two  signals  together  and  display  the  waveform  on  a  Modern    Graph  
Waveform  GRAPH.    Change  the  name  of  the  display  to  Original  Signal.    Run  the  VI  
and  confirm  that  it  works.    Stop  the  simulation.  

3. Find  Align  and  Resample  block  under  Express  Signal  Manipulation  and  place  it  on  
the  block  diagram.    A  window  will  open  to  set  up  this  block.    Leave  all  of  the  default  
settings  except  for  the  Rate.    Select  “specific  dt”  and  change  the  value  to  2E-­‐5.    Recall  
that  the  sample  rate  on  the  sine  waves  was  50K  samples/sec.    Does  this  correspond  
to  a  time  interval  of  2E-­‐5?  

4. Add  a  second  Waveform  Graph  to  the  block  diagram.    Name  the  graph  Resampled  
Signal.  

5. Connect  the  output  of  the  add  block  to  the  Signals  input  of  the  Align  and  Resample  
block  and  connect  the  Resampled  output  of  that  block  to  the  new  Waveform  Graph.    
Run  the  VI.    You  should  observe  that  both  graphs  are  the  same.      

6. Stop  the  simulation  and  change  the  sample  rate  (specific  dt)  to  2E-­‐4.    Re-­‐run  and  
note  how  that  changes  the  output.  

7. Add  a  horizontal  slider  to  the  front  panel  and  label  it  Sample  Time.    Set  the  scale  to  
have  a  range  between  2e-­‐5  and  1e-­‐3.    Run  the  simulation  and  set  the  slider  value  to  
2E-­‐5.    Note  that  the  slider  is  NOT  connected  yet.    Stop  the  simulation  and  right  click  
the  slider  and  select  Data  OperationsMake  Current  Value  Default  Value.  

8. Connect  the  output  of  the  slider  to  the  “dt”  input  of  the  Align  and  Resample  block.      

9. Run  the  simulation  and  verify  that  the  slider  controls  the  sample  time  of  the  signal.  
10. In  the  block  diagram,  add  Signal  Express  Processing  Analog  SignalsConvert  
Analog  to  Digital  to  the  right  of  the  Align  and  Resample  block.    Set  the  Analog  full  
scale  to  3,  the  resolution  to  8,  and  the  digital  data  format  to  2’s  complement.  

11. Add  Signal  Express  Processing  Digital  SignalsConvert  Digital  to  Analog  to  the  
right  of  the  Analog  to  Digital  block.      Set  the  Analog  full  scale  value  to  3  and  the  
Digital  data  form  to  2’s  complement  to  match  the  previous  block.  

12. Reconnect  the  second  waveform  graph  to  the  output  of  the  Digital  to  Analog  block.    
Connect  the  output  of  the  Align  and  Resample  to  the  Convert  Analog  to  Digital  block  
and  the  digital  waveform  output  of  the  Convert  Analog  to  Digital  block  to  the  input  
of  the  Convert  Digital  to  Analog  block.      Run  the  simulation.    The  results  should  be  
the  same  as  those  observed  previously.  

13. Stop  the  simulation  and  modify  the  resolution  in  the  Analog  to  Digital  block  from  8  
down  to  4.    Re-­‐run  the  simulation.    Continue  to  reduce  the  resolution  to  view  its  
effect  on  the  output.  

14. Use  this  VI  to  observe  the  effect  of  sampling  and  quantization  on  the  output  
waveform.      

15. Spend  some  time  experimenting  with  the  other  features  of  LabVIEW.  

You might also like