0% found this document useful (0 votes)
77 views4 pages

Data Acquisition Using Ni-Daqmx: Instructor'S Portion

This document provides instructions for a lab experiment on using NI-DAQmx software to acquire voltage signals from the NI-ELVIS workstation in LabVIEW. Students will create two VIs - one for acquiring a finite number of samples and one for continuous sampling. The VIs will display the acquired signals in graphs and charts and save the data for analysis. The document covers setting up the virtual channels and timing, starting and reading data acquisition, and clearing the task in LabVIEW using NI-DAQmx VIs.

Uploaded by

DIm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views4 pages

Data Acquisition Using Ni-Daqmx: Instructor'S Portion

This document provides instructions for a lab experiment on using NI-DAQmx software to acquire voltage signals from the NI-ELVIS workstation in LabVIEW. Students will create two VIs - one for acquiring a finite number of samples and one for continuous sampling. The VIs will display the acquired signals in graphs and charts and save the data for analysis. The document covers setting up the virtual channels and timing, starting and reading data acquisition, and clearing the task in LabVIEW using NI-DAQmx VIs.

Uploaded by

DIm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4

Data Acquisition Using NI-DAQmx

WeiLin
DepartmentofBiomedicalEngineering
StonyBrookUniversity

Instructors Portion
Summary
ThisexperimentrequiresthestudenttouseNIDAQmxtoacquirevoltage
signals.StudentsshouldbefamiliarwiththefollowingLabVIEW
programmingtechnique
1.
2.
3.
4.

NIDAQmx
LabVIEWapplicationfordataacquisition
LabVIEWgraphandchart
LabVIEWwriteLabVIEWmeasurementfileexpressVI

Uses
Thislectureappliestoallcoursesofvirtualinstrumentation.

Equipment List

Computers

LabVIEW7Express

NIELVISbenchtopworkstation

LabVIEW Users Manual. April 2003

LabVIEW Introduction Course - Six Hours.

LabVIEW Introduction Course - Three Hours

LectureSlidesofLabVIEWProgramming,PartIV

References

SubmittinganExperiment

Students Portion
Introduction
ThestudentsshouldlearnthebasicLabVIEWprogrammingtechniques
forthedataacquisitionusingNIDAQmx.TheywillcreatetwoVIs,one
forfinitesamplesandtheotherforcontinuoussamples.Studentswilluse
graphandchartindicatortodisplayacquiredsignalsonthescreenand
savethedatainfilesforfutureanalysis.

Objectives

NIDAQmx
DataacquisitionprogrammingusingNIDAQmx
LabVIEWgraphandchart

Theory
NI-DAQmx is the next generation drivers for the data acquisition hardware
from National Instruments. It is easy to use and has many new features such
as improved ease of use, faster development time, multithreaded
measurements and increased accuracy of measurements. The data acquisition
application in LabVIEW and NI-DAQmx is quite straightforward. The
following are the steps for creating such an application.
1. CreateavirtualchannelandtaskusingtheNIDAQmxCreate
VirtualChannelVI.
2. Setthesamplingfrequencyandsamplingmode,continuousor
finitesamplesusingNIDAQmxTimingVI.
3. SetthetriggerusingNIDAQmxTriggerVI.Thisstepisoptional.
4. StartthedataacquisitionprocessusingNIDAQmxStartVI.
5. ReadtheacquireddatausingNIDAQmxReadVI.
6. ClearthedataacquisitiontaskusingtheNIDAQmxClearVI.
AlltheNIDAQmxVIsarelinkedthroughtaskinandtaskoutterminaland
theerrorclusterchain.Forcontinuoussamplesmode,theNIDAQmxRead
VIshouldbeplacedwithinawhileloop.

SubmittinganExperiment

Lab Procedure
Experiment1,CreateaLabVIEWdataacquisitionapplicationof
finitesamples:
1. LaunchLabVIEW.
2. CreateablankVI.
3. Thefrontpanelshouldhavethefollowingnumericcontrols:
minimumvalue,maximumvalue,samplefrequencyandnumberof
samples.ItshouldalsohavetheNIDAQmxphysicalchannel
controlanderrorclustercontrol.
4. DroptheNIDAQmxCreateVirtualChannelVItotheblock
diagramandchooseAIvoltage.Connectcontrolsofminimum
value,maximumvalue,physicalchannelanderrorclustertothe
respectiveterminals.Wireanumericalconstant10083tothe
inputterminalconfigurationterminal.Thisconfigurestheinput
asreferencedsingleendedterminal.
5. DroptheNIDAQmxtimingVItotheblockdiagramandchoose
Sampleclock.Connectcontrolsofsamplingfrequencyandthe
numberofsamplestotherespectiveterminal.Connectanumeric
constantof10178tothesamplemodeterminal.Thisconfigures
thefinitesamplemood.
6. DroptheNIDAQmxStartVItotheblockdiagram.
7. DroptheNIDAQmxreadVItotheblockdiagram.Select
analog1DWfmNChaNSampandconnectthecontrolofthe
numberofsamplestotheterminalnumberofsamplesper
channel.
8. DroptheNIDAQmxClearVItotheblockdiagram.
9. Dropawaveformindicatoronthefrontpanel.Connecttheoutput
fromtheterminaldataofNIDAQmxreadVItothewaveform
indicator.
10. ConnecttheNIDAQmxVIsthroughtaskinandtaskout
terminalsanderrorclusterinputandoutputterminals.
11. DropaGeneralErrorHandlerVItotheblockdiagramand
connecttheerroroutputoftheNIDAQmxClearVItoit.
12. DropaWriteLabVIEWMeasurementFileexpressVItothe
blockdiagramandconnecttheacquireddatatoit.
13. KeeptheELVISunitoff.Connecttheoutputoffunctiongenerator
FUNCOUTtoACH0usingconnectionwireontheprototype
board.
14. TurnELVISunitonincludingtheprototypeboard.
15. LaunchELVISapplicationandchoosefunctiongenerator.
16. Selectthefrequency,waveformtypeandamplitudeofthefunction
generatorandturniton.

SubmittinganExperiment

17. EntertheparametersforthecontrolsoftheLabVIEWdata
acquisitioncontrolsandrun.
18. Saveacquiredsignalforlabreport.

Experiment2,CreateaLabVIEWdataacquisitionapplicationof
continuoussamples:
1. ModifytheLabVIEWcodeofpreviousexperimentbychanging
thesamplemodeconstantforNIDAQmxtimingVIto10083
forcontinuoussampling.Removethewireconnectingthenumber
ofsamplescontroltothisVI.
2. Changethewaveformindicatortochartindicator.
3. UsingWHILElooptoenclosetheNIDAQmxreadVI.
4. RemovetheWriteLabVIEWMeasurementFileexpressVI.
5. Runtheapplicationasdescribedinthepreviousexperiment.

Lab Report
Thelabreportshouldcontainthefollowing:
1.
2.
3.
4.
5.

Theexperimenttitle
Theexperimentobjective
Theexperimentprocedureandtheory
Discussion
Youmayaddyourlabdesignintothisproject.

Pleasesubmitthereportthroughemail.

SubmittinganExperiment

You might also like