Build a Light Intensity Logger LV DAQ

download Build a Light Intensity Logger LV DAQ

of 33

Transcript of Build a Light Intensity Logger LV DAQ

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    1/33

    Build a Light Intensity Logger 

    October 2008 © 2008 Emant Pte Ltd www.emant.com 1

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    2/33

    able o! "ontentsIm#ortant $ote......................................................................................................................................2

    Learning Ob%ecti&es..............................................................................................................................'

    Introduction.......................................................................................................................................... (

    E)ercise 1 * +sing a "om#uter based Light Intensity ,ata logger......................................................-E)ercise 2 * Build a I and ,ata /cuisition....................................................................................10E)ercise ' * Loo# e)am#le and chart.................................................................................................1'

    "reate a sub I................................................................................................................................... 1

    E)ercise ( * ulti#lot "hart and /larm............................................................................................ 1-

    E)ercise * 3tatistics and Log to !ile................................................................................................ 20

    E)ercise 4 * Build your Light Intensity Logger 5o#tional e)ercise6...................................................2'

    E)ercise - * 3/7s outbrea...............................................................................................................2E)ercise 8 * Pedestrian "rossing........................................................................................................29

    E)ercise 9 * Im#ro&ed /irconditioning "ontrol 5challenge e)ercise6............................................... ''

    Important Note

    he P" must be correctly setu# in order !or you to com#lete the e)ercises in this instructional guide.

    I! you ha&e not setu# the raining :it; #lease do so using the installation guide and run the

    diagnostic be!ore #roceeding.

    his instructional guide had been re&ised !or LabIE< &er 8 and later.

    October 2008 © 2008 Emant Pte Ltd www.emant.com 2

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    3/33

    Learning Objectives

    =ollowing our ste# by ste# Instruction >uide; the user will create a Light Intensity Logger; a 3/73

    detector and Pedestrian "rossing 5ra!!ic Lights6. /!ter com#letion o! these e)ercises; the user

    would ha&e learnt the !ollowing

    Sensor / Actuator

    • Photodiode

    • 3witch

    • LE,

    • hermistor 

    Data Acquisition (DAQ)

    • /nalog In#ut

    • /nalog Out#ut 5"urrent6

    • ,igital In#ut

    • ,igital Out#ut

    LabVIEW 

    • Build I; sub I

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    4/33

    Introduction

    ?In #roblem@based learning; the starting #oint !or learning should be a #roblem; a uery or a #uAAle

    that the learner wishes to sol&eBoud. ,; 199; #.1'. Enhancing Learning through 3el! /ssessment

    Types of problems tat are sol!e" by measurin# li#t intensity

    • In #hotogra#hy or !ilm #roduction; creati&e mani#ulation o! light can create stunning images

    !rom a low cost consumer camcorder; while #oor lighting will cri##le the most e)#ensi&e; state@o!@the@art broadcast camera.

    • Light intensity is an im#ortant management !actor !or breeder ty#e #oultry. here is e&idence

    suggesting a minimum threshold intensity is needed to obtain o#timal re#roduction #er!ormance.

    • he amount o! light recei&ed by a #lant is an im#ortant !actor; because #lantsC growth may su!!eri! they do not recei&e su!!icient light. hey may lose their characteristic sha#e and grow thin;

    leggy stems. $ew lea&es may also be smaller and turn yellow. 3ome #lants may lose their color

    or turn dar green. Plants e)#osed to e)cessi&e light; on the other hand; may not !lower #ro#erly

    or may turn #ale green. ,i!!erent s#ecies o! #lants reuire di!!erent amounts o! light.

    Light intensity decreases dramatically with distance !rom the light source. /n ob%ect located 1 cm

    !rom two (0@watt !luorescent lam#s recei&e about 9'00 lu); but only (00 lu) i! they are '0 cm

    !rom the lam#s.

    he human eye is a &ery #oor DinstrumentD !or measuring light intensity; because the #u#il ad%ustsconstantly in res#onse to the amount o! light it recei&es. o accurately measure the light intensity in

    a gi&en s#ot; it is best to use a light meter.

    Light intensity may be measured in lu) 5metric system6 or !oot@candles 5Im#erial system6. $ote that

    1 !oot@candle 10.-4 lu)

    o #ro&ide some #oints o! re!erenceF

    • =ull sunlight 11000 lu)

    • orning sunlight 4000 lu)

    • / bright o!!ice has about (00 lu)

    • oonlight re#resents about 1 lu)

    October 2008 © 2008 Emant Pte Ltd www.emant.com (

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    5/33

    / com#uter based light intensity logger is made u# o! the !ollowing com#onents

    • 3ensor @ a #hotodiode 5BP

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    6/33

    =or an 2(@bit /," o#erating o&er a 2. range; the accuracy you obtain cannot be better than

    2.J14---214 or 0.1 u. Gowe&er due to noise; this is only achie&able through care!ul wiring.In a ty#ical a##lication; a noise !loor o! about 18 bits or 9 u is usually achie&able.

    he ,/ module used 5the E/$'00 or E/$'806 has u# to 4 di!!erential /," channels;one 8 bit current ,/" channel; 8 digital IJOs and either a 14 bit P

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    7/33

    Exercise 1 – Using a Computer based Light Intensity Dataogger 

    $b%ecti!e

    o learn how to use a com#uter based measurement system

    O&er the ne)t !ew e)ercises; you will learn how to use

    LabIEo to the

    Learn DAQ and LabVIEW !older and choose Light System Demo.vi. his will o#en

    the Light 3ystem ,emo I =ront Panel.

    October 2008 © 2008 Emant Pte Ltd www.emant.com -

    Bluetooth

    ,/ module

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    8/33

    +sin# te Li#t Intensity Lo##er

    In LabIE

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    9/33

    8. =or data loggers; it is &ery common to include alarms whene&er limits allowed are e)ceeded. +se

    the O#erating tool to change the Gigh Limit. ou can use the increment or decrement arrows

    on the control; or drag the #ointer to the desired &alues.

    9. I! you are using a torchlight to increase the light intensity; set the Gigh Limit abo&e the ambient

    &alue. I! you are blocing the ambient light; set the Gigh Limit lower. Obser&e the Limit LE,. Itchanges color when the Gigh Limit is e)ceeded.

    10.ou may be logging data !rom #eriods as short as minutes to as long as days. "hanging the

    u#date #eriod 5how o!ten the light intensity is measured6 is a &ery common !eature. +se the

    O#erating tool to change the +#date Period and obser&e the change. he ,/ card you are

    using has a ma)imum acuisition rate o! 100 sam#lesJsec so this will limit the lower end o! the+#date Period.

    11.Press to sto# the I. I! you are using the +3B ,/; tae note o! the &omm 0ort assi#ne".It is gi&en here.

    12.I! this data logger were used in a greenhouse; it may be use!ul to now the ma)imum and

    minimum light intensities measured during the measurement #eriod. 3tatistic !unctions in

    LabIE< allow the user to read o!! these &alues. In this e)am#le; the results are dis#layed only

    when the #rogram ends.

    1'."lose the I and do not sa&e changes.

    En" of Eercise 1

    October 2008 © 2008 Emant Pte Ltd www.emant.com 9

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    10/33

    Exercise ! – "uid a #I and Data $c%uisition

    $b%ecti!e

    • =amiliariAe with the LabIE< de&elo#ment en&ironment

    • Build a I

    • Learn /nalog In#ut and con&ersion

    "om#lete the !ollowing ste#s to create a I that read the &oltage across the #hotodiode and con&ertit to a light intensity &alue in Lu).

    1. 3tart LabIE

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    11/33

    Be!ore continuing; lets acuaint oursel&es with the tools #alette; controls #alette and the !unctions

     #alette. ou will ha&e to use these #alettes o!ten.

    ,ront 0anel

    he !ront #anel is the user inter!ace. It should loo lie the !ollowing

     

    October 2008 © 2008 Emant Pte Ltd www.emant.com 11

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    12/33

    .loc- Dia#ram

     $ow we will create the !ollowing bloc diagram that reads in the &oltage using the ,/ card and

    con&erts the &oltage to light intensity in Lu) 5see #age !or euation6.

    o learn how to create the =ront Panel and Bloc ,iagram; &iew E 7 &ideo. >oto the &ideo

    !older; o#en inde).html and clic on the E) 2 &ideo lin.

    he !ollowing I are used.

    1. EA!"#$$ %ead Analog.VI  !rom the I library EA!"#$$.llb !ound in the

    Driver & Example VI older. his I reads the &oltage across the 10:ohm

    resistor.5see #age !or schematic6

    2. EA!"#$$ Initialisation.VI  maes the connection to the ,/ module

    '. EA!"#$$ 'lose.VI  closes the connection to the ,/ module

    (. numeric constant !rom ,unctions230ro#rammin#23'umeric  #alette

    . ulti#ly !rom ,unctions230ro#rammin#23'umeric  #alette

    4. "lic the 7un button to run the I. ust lie in e)ercise 1; mae sure that the com #ort

    setting is correct and clic O:. 7un the I se&eral times and shine a torch light to the #hotodiode

    to create di!!erent light intensity and obser&e the result

    -. 3elect ,ile23Sa!e 3a&e the I in the Working VI !older because you will use this I in

    subseuent e)ercises. $ame the !ile Data A()*isition Ex +.vi  "lose the I.

    ,id you see this insteadQ It is a Broen 7un button. It indicates that the I cannot run due toerrors.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    13/33

    Exercise & – Loop exampe and chart

    $b%ecti!e

    • Learn how to mae re#etiti&e measurements

    • Learn about charts

    • Learn how to #rogram timed measurements

    • "reate a sub I

    In the last e)ercise; you ha&e to re#etiti&ely run the #rogram to mae di!!erent measurements. In thise)ercise; you will mae use o! the

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    14/33

    .loc- Dia#ram

    "om#lete the diagram as shown

    o learn how to create the =ront Panel and Bloc ,iagram; &iew E  &ideo.

    he !ollowing I are used.

    1. Wile Loop  !rom ,unctions230ro#rammin#23Structures  #alette.

    =rom LabIE< Gel#

    While Loop repeats the subdiagram inside it until the conditional terminal receives a

     particular Boolean value. The Boolean value depends on the continuation behavior of the

    While Loop.

    o enclose the Is in a

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    15/33

    (. 'umeric &onstant  !rom ,unctions230ro#rammin#23'umeric  #alette.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    16/33

    1. he Is that reads the analog &oltage and con&erts the &oltage to Lu) has shrun into a subI.

    he bene!it is that in the !uture i! you need to read the light intensity; you %ust need to insert this

    subI into your diagram.

    2. 3a&e the I. 3elect ,ile23Sa!e. he !ollowing dialog bo) will #o# u# reminding you that you did

    not sa&e your subI.

    '. "lic O:. >o to the Working VI !older. $ame the subI L*x.vi

    (. "lose the I.

     $oteF In this e)ercise; you ha&e created two Is.

    • o# le&el I called Loop Example Ex #.vi 

    • 3ubI called L*x.vi

    En" of Eercise

    October 2008 © 2008 Emant Pte Ltd www.emant.com 14

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    17/33

    Exercise ' – (utipot Chart and $arm

    $b%ecti!e

    • Learn how to #lot multi#le &alues

    • Learn about Boolean "om#arison

    • Learn about "lusters

    In the last e)ercise; you learnt how to create a trend chart with user de!ined delays. any times; you

    would lie the #rogram to warn the user i! certain threshold are reached. In our e)am#le; #lantse)#osed to e)cessi&e light may not !lower #ro#erly or may turn #ale green.

    ou may also want to com#are the measured intensity with the threshold &alue o&er time. In such

    instances; a multi #lot chart is use!ul. In this e)ercise; you will build on the #re&ious e)ercise to add

    the alarm and multi#le #lots to the chart.

    ,ront 0anel

    1. O#en an e)isting I. Loo !or Loop Example Ex #.vi  you sa&ed #re&iously. odi!y it to

    the !ollowing !ront #anel.

    2. Insert Square LED  !rom &ontrol23o"ern23.oolean  #alette. $ame it Alarm

    '. Insert 'umeric 8nob  !rom &ontrol23o"ern23'umeric  #alette. $ame it Limit.

    "hange the range to 1000. "lic on 10 and enter 1000

    October 2008 © 2008 Emant Pte Ltd www.emant.com 1-

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    18/33

    (. E)tend the Plot Legend to show two #lots and change the second #lot label to Limit.

    o&e the cursor o&er middle and bottom o! the Plot Legend.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    19/33

    8. "lic the 7un button to run the I. +se the O#erating tool to change the Limit. ou can

    drag the nob to the desired &alue. 3hine a torch light to the L,7 to create di!!erent light

    intensity and obser&e the result

    9. Press to sto# the I.

    10.3a&e the I. 3elect ,ile23Sa!e. "all the !ile *ltiplot 'hart and Alarm Ex ,.vi

    "lose the I.

    En" of Eercise ;

    October 2008 © 2008 Emant Pte Ltd www.emant.com 19

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    20/33

    Exercise ) – *tatistics and Log to +ie

    $b%ecti!e

    • Learn about arrays

    • Learn how to use the statistical Is

    • Learn how to sa&e the data to a !ile

    It is o!ten use!ul to now the ma)imum; minimum and a&erage light intensity that has been logged.

    ou will also ha&e noticed that once you sto# the I; the data is lost when you run the I again.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    21/33

    .loc- Dia#ram

    1. 3elect Win"o423So4 Dia#ram to dis#lay the bloc diagram. "om#lete the diagram as shown

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    22/33

    resol&e this; clic on the terminal shown below and select Enable Inde)ing. his will cause the

    single &alues to accumulate to !orm an array when the loo# e)its.

    -. o bac to the =ront Panel. "lic the 7un button to run the I. "o&er the #hotodiode tochange the light intensity and obser&e the result

    9. Press to sto# the I. / dialog bo) will a##ear. Enter the name o! the !ile to sa&e the

    s#readsheet.

    10.ou may now use $ote#ad to o#en the s#readsheet !ile sa&ed. his is in the "3 !ormat that can

     be read by te)t editors and s#readsheet #rograms lie E)cel.

    11.>o to the Learn DAQ and LabVIEW older and o#en the I called %ead LV -ile

    Ex a.vi 7un the #rogram !irst and then loo at the diagram to see what is reuired to read

     bac and dis#lay logged data.

    12."lose the I. ,o not sa&e.

    En" of Eercise =

    October 2008 © 2008 Emant Pte Ltd www.emant.com 22

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    23/33

    Exercise , – "uid your Light Intensity Logger -optionaexercise.

    $b%ecti!e

    • Learn ,ecoration controls

    ou will now use your nowledge o! LabIE< and ,ata /cuisition learnt !rom the #re&ious

    e)ercises to build the data logger that you ran in E)ercise 1.

    ,ront 0anel

    1. O#en a new I. Build the !ollowing !ront #anel.

    GintF o beauti!y the !ront #anel use the "ontrol@Rodern@R,ecorations #alette and the coloring

    ool !rom the ool Palette

    .loc- Dia#ram

    2. Build the diagram on your own. I! you run into di!!iculties; re!er to the #re&ious e)ercises or the

    LabIE< Gel#. /s a last resort; you can re!er to the Light System Demo.vi

    '.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    24/33

    (. "lic the 7un button to run the I and obser&e the results.

    . Press to sto# the I.

    4. "lose the I.

    En" of Eercise >

    October 2008 © 2008 Emant Pte Ltd www.emant.com 2(

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    25/33

    Exercise / – *$0s outbrea

    $b%ecti!e

    • Learn =ormula $ode

    • Learn /nalog Out#ut 5"urrent6

    • Learn how the hermistor measures tem#erature

    0roblem

    3e&ere acute res#iratory syndrome 53/736 is a res#iratory or airways in!ection that broe out in

    /sia in early 200'. It is highly in!ectious and death !rom the disease is not uncommon. =e&er is one

    o! the !irst signs o! 3/73. On une 1; 200'; in aiwan; a $ational em#erature onitoring"am#aign was launched. In the cam#aign; !e&er was de!ined as !orehead or a)illary tem#erature

    R'-S". ou ha&e been tased to create a !e&er detector.

    SolutionWarning" This is intended as proof of concept exercise and not intended for real life use.

    / thermistor will be used to measure the !orehead tem#erature. hermistors are widely used in

    industrial a##lications because o! their sensiti&ity; small siAe; ruggedness and low cost. hermistors

    ha&e an electrical resistance that &aries non@linearly with tem#erature. he 7@ characteristics o!

    most thermistors can be described by the 3teinhart@Gart euationF

    1J / T BH5Ln 76 T "H5Ln 76'

    is the absolute tem#erature 5in :el&in6 and /; B; and " are constants which can be determined bymeasuring three sets o! resistance and tem#erature &alues during calibration.

    ost thermistors ha&e a negati&e tem#erature coe!!icient 5$"6; their resistance decreases withincreasing tem#erature. hermistors are s#eci!ied according to its nominal resistance at 2 o" and

    commonly a&ailable thermistors range !rom 20 ohms to 100 ohms

    he thermistor that we are using has the !ollowing characteristics

    •  $ominal resistance U 2 o"F 10 ohms

    • negati&e tem#erature coe!!icient 5$"6

    • 3teinhart@Gart euation #arametersF• / 0.0011291(8

    • B 0.0002'(12

    • " 8.-4-(1E@8

    /s the ,/ module /nalog In#ut measures only &oltage; we will need to #ro&ide a current sourceto con&ert the resistance to &oltage. he E/$'00 has an 8 bit current ,/" 5digital to analog

    con&erter6. /s the ,/" has 8 bits resolution; we can dri&e the resistance !rom 0 to 1m/ in 2

    ste#s with increments o! about '9u/.

    October 2008 © 2008 Emant Pte Ltd www.emant.com 2

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    26/33

    • "onnect the thermistor to the Light /##lication /da#tor screw terminals labeled I,/" and

    />$,

    • "onnect a wire !rom I,/" to /I$'

    • "onnect a wire !rom />$, to /I$2

    ,ront 0anel

    O#en a new I. Build the !ollowing !ront #anel.

    1. Insert Stop .utton  !rom &ontrol23o"ern23.oolean  #alette

    2. Insert 'umeric In"icator  !rom &ontrol23o"ern23'umeric  #alette. $ame it hermistor

    7esistance 

    '. Insert Termometer &ontrol  !rom &ontrol23o"ern23'umeric  #alette. 7ight mouse

    clic on the thermometer and select Visible Items23Di#ital Display to enable the numeric

    indicator associated with the thermometer.

    October 2008 © 2008 Emant Pte Ltd www.emant.com 24

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    27/33

    .loc- Dia#ram

    3elect Win"o423So4 ,iagram to dis#lay the bloc diagram. "om#lete the diagram as shown 

    (. =rom the I library EA!"#$$.llb  !ound in the Driver & Example VI older.;

    insert the EA!"#$$ Write IDA'.VI his I sets the current o! the 8 bit current

    ,/"

    . Insert ,ormula 'o"e !rom ,unctions230ro#rammin#23Structures  #alette.

    / ,ormula 'o"e e&aluates mathematical !ormulae and e)#ressions similar to " on the blocdiagram. his is use!ul i! the mathematics is uite in&ol&ed and is clearer when im#lemented in

    te)t !orm rather than in a gra#hical manner.

    o create an in#ut; use the #osition tool; right clic on the le!t border o! the =ormula node. 3elect

    /dd in#ut !rom the #o#u# menu. $ame it o. $e)t right clic on the right border o! the =ormula

    node. 3elect /dd out#ut !rom the #o#u# menu. $ame it . /dd all the other nodes shown in the

    diagram. =inally select the e)t tool and clic on the =ormula $ode to enter the !ollowing!ormula

    %t / Vo01i2$.$$345" / 30 1a 6 ln1%t421b 6 (21ln1%t422+4445' / " 7 +8#.35

    he !irst line calculates the hermistor resistance. he ne)t line con&erts !rom resistance to

    tem#erature in :el&in and !inally con&erts the tem#erature !rom :el&in to "entigrade.

    8. Insert 'umeric &onstant !rom ,unctions230ro#rammin#23'umeric  #alette. ,o the same

    !or the remaining 'umeric &onstants

    October 2008 © 2008 Emant Pte Ltd www.emant.com 2-

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    28/33

    9. >o bac to the ,ront 0anel

    10."lic the 7un button to run the I. +se the O#erating tool to change the Gigh and Low

    hreshold.

    • Obser&e the ambient tem#erature

    • +se your !inger to touch the thermistor. he tem#erature should change to re!lect the

    higher tem#erature o! your body.

    1(.Press to sto# the I.

    1.3a&e the I. 3elect ,ile23Sa!e. "all the !ile SA%s and "hermistor.vi  "lose the I.

    En" of Eercise ?

    A""itional Eercises

    1. In the +3; =ahrenheit is a more common unit o! tem#erature measurement. odi!y the I to

    allow the user to select the reading in o= or o".

    2. odi!y the I to re!lect a tem#erature limit has been e)ceeded.

    '. It has been !ound that some #eo#le ha&e a normally higher body tem#erature and there!ore a rise

    in body tem#erature is a more a##ro#riate indication o! !e&er. Im#lement this in your #rogram.

    October 2008 © 2008 Emant Pte Ltd www.emant.com 28

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    29/33

    Exercise 2 – 3edestrian Crossing

    $b%ecti!e• Learn digital in#ut

    • Learn digital out#ut

    • Learn shi!t registers

    0roblem

    he #rinci#al decided to #rototy#e a #edestrian crossing outside the school that is controlled by a

    com#uter. Ge en&ision a system where e&entually the lights can be acti&ated !rom the o!!ice; &ia

    internet or 33. /s a !irst #art o! the #ro%ect; you ha&e been tased to de&elo# a basic crossingsolution.

    he lights will stay green until the button is #ressed.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    30/33

    he Light /##lication /da#tor has a 7ed; ellow; >reen LE, and switch connected as shown

    4. =rom the EA!"#$$.llb I library !ound in the Driver & Example VI older9

    insert the EA!"#$$ 'onig DI:.VI his I sets the con!iguration o! the ,IO. 8

     bits 51 byte6 determines the direction o! the digital IO. 3#eci!ying the corres#onding bit as 1

    con!igures that bit as in#ut and 0 as out#ut. 3ince ,0 * ,2 5see abo&e schematic6 are out#uts and,' is an in#ut we set the con!iguration byte to binary 0000 1000

    -. =rom the same I library; insert the EA!"#$$ Write Digital ;it.VI 3et the bit

    address and the bit state to dri&e the out#ut accordling. here!ore; i! we are interested to light u#the 7ed LE, then we set bit address2 and bit state=.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    31/33

    =rom LabIE< Gel#

    #se shift registers on $or Loops and While Loops to transfer values

     from one loop iteration to the next . %ou can create multiple shiftregister terminals on the left side of a loop to remember more than one previous value.

    he 3hi!t register is uniue to LabIE< because it is a gra#hical #rogramming language

    and data!low determines the seuence o! the #rogram. Witout te sift re#ister@ it 4oul"

    be impossible for pre!ious !alues in a loop to be store" an" use" in subsequent

    iterations5 

    In our solution; the shi!t register is used to store the state o! the lighted LE,. In normal

    o#eration; the switch is not closed and the >reen LE, is turned on. his means that

    ,0 ; ,' and the right shi!t register is .

    iteration n-2 n-1 n n+1 n+2 n+3 n+4

    right shift register T T $ T T T T  

     &' T T T $ T T T 

     &( T T T T $ T T 

     &) $ $ $ T T $ $ 

     &* T T $ + + T T 

     3u##ose at iteration n; the switch is closed. he 2 subseuent iterations see the = state

    cascaded to the le!t shi!t registers and ,1; ,2. ,0; the >reen light will be lighted u# only

    when both the 7ed and ellow LE,s are o!! as the result o! the $/$, o#eration.

    1'.Insert 'an"  !rom ,unctions230ro#rammin#23.oolean  #alette

    1(.Insert $r  !rom ,unctions230ro#rammin#23.oolean  #alette

    1.Insert Time Delay  !rom ,unctions230ro#rammin#23Timin#  #alette. 3et thedelay to 0.s

    14.Insert numeric constants !rom ,unctions 23 0ro#rammin#23'umeric #alette.

    /!ter inserting the constant; right mouse clic on it.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    32/33

    In the =ormat and Precision ab; choose Binary. "lic O:.

    1-.Insert the remainder o! the icons; which you ha&e used in the #re&ious e)ercises.

    18.+se the o bac to the ,ront 0anel

    20."lic the 7un button to run the I. he lights will stay green until the button is #ressed.

  • 8/17/2019 Build a Light Intensity Logger LV DAQ

    33/33

    Exercise 4 – Improved $irconditioning Contro -chaengeexercise.

    $b%ecti!e7ein!orce understanding o! 

    • analog in#ut

    • analog out#ut

    • sub I

    • digital out#ut

    0roblem