SlideShare a Scribd company logo
1 of 5
Download to read offline
Module 11 – Introduction to LabView Programming
Including Arduino Toolkit
Carey Williamson
1. Develop a basic processing loop.
a. Start LabVIEW 2011. Select New Blank VI. Save the file.
b. Place a button on the front panel
c. Place an LED on the front panel
d. Switch to the block diagram and create a while loop (located in the express -> structures
pallet) around the two Boolean VI’s.
e. Wire the two Boolean VIs together.
f. Run the VI. Observe the operation. The Boolean indicator should illuminate when the
Boolean button is pressed.
g. Open the computer Task Manager and note the CPU usage here _________ . We will use
this value in section 3.
h. Press stop button to stop the loop.
i. Add an Arduino INIT VI, Set Pin Mode VI, and a Close VI outside the loop.
j. Add an Arduino Digital Write Pin VI inside the loop.
k. Add controls and constants as shown in the following image.
l. Add a Boolean To (0,1) VI inside the loop and connect it’s input and output as shown.
m. Connect the Arduino to the computer and an LED/resistor to pin 2 I/O and ground.
n. Run the VI. Observe the operation. Press the stop button to stop the loop.
o. Save the file.
2. Read the state of an input pin and control an output based upon that state.
a. Add another Arduino Set Pin Mode VI in line with the first one.
b. Add a Arduino Digital Write VI following the Set Pin Mode VIs. This enables a built-in pull-up
resistor in the Arduino.
c. Add an Arduino Digital Read Pin VI inside the loop in line with the Digital Write VI.
d. Add controls and constants as shown in the following image.
e. Delete the Boolean button and the Boolean To (0,1) VI.
f. Connect the Arduino Digital Read Pin VI output to the Arduino Digital Write Pin input.
g. Add a Not Equal To 0? VI and connect it as shown
h. On the Arduino, add a normally closed pushbutton switch connected to pin 3 and ground.
i. Run the VI. Press the switch. Observe the operation. The connected LED and Boolean
indicator will illuminate as the pushbutton is pressed. Press the stop button to stop the
loop.
j. Save the file.
3. Incorporate a delay timer in the processing loop.
a. Add a Wait (ms) VI inside the loop.
b. Give it a constant value of 100 as shown.
c. Run the VI and note the CPU usage here _______. Compare this to the value to the one
found in 1g. The wait conserves CPU utilization.
d. Adjust the Wait (ms) VI constant value to 3000.
e. Run the VI and observe the affect. The loop only runs once every 3 seconds. Press stop
button to stop the loop.
f. Set the Wait (ms) VI constant value to 100.
g. Add a Time Delay VI in-between the Digital Read Pin VI and Digital Write Pin VI, connecting
the Error In and Error Out in line.
h. Give the Time Delay VI a constant of 1 as shown.
i. Run the VI and observe the affect. This adds a time delay between the Digital Read Pin and
the Digital Write Pin. Press the stop button to stop the loop.
j. Adjust the Time Delay VI constant to 3.
k. Run the VI and observe the affect. Press the stop button to stop the loop.
l. Save the File
4. Add a sub-VI to the processing loop.
a. Delete the Time Delay VI and its constant.
b. Add the given push_on_off.vi to the loop.
c. Add another Not Equal To 0? to the output of the Digital Read Pin VI and to the input of the
push_on_off VI. Wire the output to the Digital Write Pin input as shown.
d. Open the push_on_off VI and inspect the subroutine. This subroutine finds the
instantaneous moment the switch is pressed and maintains that state until the switch is
pressed again.
e. Note the Terminal Pane on the Front Panel. This is how this VI interfaces with main program
loop. Also note the VI icon and the ability to customize it.
f. Run the main VI. Press the switch. Observe the operation. Press the stop button to stop the
loop.
g. Save the file.

More Related Content

Similar to Module 11 handout by Carey Williamson

CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   llflowe
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   bellflower42
 
CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.combellflower82
 
California State University, Fullerton College of Engineerin.docx
California State University, Fullerton College of Engineerin.docxCalifornia State University, Fullerton College of Engineerin.docx
California State University, Fullerton College of Engineerin.docxhumphrieskalyn
 
Cis 170 c ilab 1 of 7 getting started
Cis 170 c ilab 1 of 7 getting startedCis 170 c ilab 1 of 7 getting started
Cis 170 c ilab 1 of 7 getting startedCIS321
 
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manualtamil arasan
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comBartholomew19
 
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docxfelicidaddinwoodie
 
Lenovo Ideapad 310 (15" Touch) user guide manual PDF (English)
  Lenovo Ideapad 310 (15" Touch) user guide manual PDF (English)  Lenovo Ideapad 310 (15" Touch) user guide manual PDF (English)
Lenovo Ideapad 310 (15" Touch) user guide manual PDF (English)manualsheet
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.comjonhson110
 
Scrap Shedding - DynaForm_Tutorial II.pdf
Scrap Shedding - DynaForm_Tutorial II.pdfScrap Shedding - DynaForm_Tutorial II.pdf
Scrap Shedding - DynaForm_Tutorial II.pdfkeansheng
 
CIS 170 Education Specialist / snaptutorial.com
CIS 170  Education Specialist / snaptutorial.comCIS 170  Education Specialist / snaptutorial.com
CIS 170 Education Specialist / snaptutorial.comMcdonaldRyan138
 
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterKatrina Little
 
Cis 170 Education Organization -- snaptutorial.com
Cis 170   Education Organization -- snaptutorial.comCis 170   Education Organization -- snaptutorial.com
Cis 170 Education Organization -- snaptutorial.comDavisMurphyB99
 
Cis 170 c Enhance teaching / snaptutorial.com
Cis 170 c  Enhance teaching / snaptutorial.comCis 170 c  Enhance teaching / snaptutorial.com
Cis 170 c Enhance teaching / snaptutorial.comHarrisGeorg51
 
CIS 170 Exceptional Education - snaptutorial.com
CIS 170   Exceptional Education - snaptutorial.comCIS 170   Exceptional Education - snaptutorial.com
CIS 170 Exceptional Education - snaptutorial.comDavisMurphyB33
 
Cis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.comCis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.comBaileya126
 

Similar to Module 11 handout by Carey Williamson (20)

CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   
 
CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.com
 
California State University, Fullerton College of Engineerin.docx
California State University, Fullerton College of Engineerin.docxCalifornia State University, Fullerton College of Engineerin.docx
California State University, Fullerton College of Engineerin.docx
 
Cis 170 c ilab 1 of 7 getting started
Cis 170 c ilab 1 of 7 getting startedCis 170 c ilab 1 of 7 getting started
Cis 170 c ilab 1 of 7 getting started
 
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manual
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
 
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
15LLP108_Demo4_LedBlinking.pdf1. Introduction In D.docx
 
Lenovo Ideapad 310 (15" Touch) user guide manual PDF (English)
  Lenovo Ideapad 310 (15" Touch) user guide manual PDF (English)  Lenovo Ideapad 310 (15" Touch) user guide manual PDF (English)
Lenovo Ideapad 310 (15" Touch) user guide manual PDF (English)
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
 
Scrap Shedding - DynaForm_Tutorial II.pdf
Scrap Shedding - DynaForm_Tutorial II.pdfScrap Shedding - DynaForm_Tutorial II.pdf
Scrap Shedding - DynaForm_Tutorial II.pdf
 
CIS 170 Education Specialist / snaptutorial.com
CIS 170  Education Specialist / snaptutorial.comCIS 170  Education Specialist / snaptutorial.com
CIS 170 Education Specialist / snaptutorial.com
 
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
 
Cis 170 Education Organization -- snaptutorial.com
Cis 170   Education Organization -- snaptutorial.comCis 170   Education Organization -- snaptutorial.com
Cis 170 Education Organization -- snaptutorial.com
 
Cis 170 c Enhance teaching / snaptutorial.com
Cis 170 c  Enhance teaching / snaptutorial.comCis 170 c  Enhance teaching / snaptutorial.com
Cis 170 c Enhance teaching / snaptutorial.com
 
CIS 170 Exceptional Education - snaptutorial.com
CIS 170   Exceptional Education - snaptutorial.comCIS 170   Exceptional Education - snaptutorial.com
CIS 170 Exceptional Education - snaptutorial.com
 
Cis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.comCis 170 Education Organization / snaptutorial.com
Cis 170 Education Organization / snaptutorial.com
 
Operating System
Operating SystemOperating System
Operating System
 
Hysys123
Hysys123Hysys123
Hysys123
 
U310 u410 ug_en
U310 u410 ug_enU310 u410 ug_en
U310 u410 ug_en
 

Recently uploaded

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Module 11 handout by Carey Williamson

  • 1. Module 11 – Introduction to LabView Programming Including Arduino Toolkit Carey Williamson 1. Develop a basic processing loop. a. Start LabVIEW 2011. Select New Blank VI. Save the file. b. Place a button on the front panel c. Place an LED on the front panel d. Switch to the block diagram and create a while loop (located in the express -> structures pallet) around the two Boolean VI’s. e. Wire the two Boolean VIs together. f. Run the VI. Observe the operation. The Boolean indicator should illuminate when the Boolean button is pressed. g. Open the computer Task Manager and note the CPU usage here _________ . We will use this value in section 3. h. Press stop button to stop the loop. i. Add an Arduino INIT VI, Set Pin Mode VI, and a Close VI outside the loop. j. Add an Arduino Digital Write Pin VI inside the loop.
  • 2. k. Add controls and constants as shown in the following image. l. Add a Boolean To (0,1) VI inside the loop and connect it’s input and output as shown. m. Connect the Arduino to the computer and an LED/resistor to pin 2 I/O and ground. n. Run the VI. Observe the operation. Press the stop button to stop the loop. o. Save the file. 2. Read the state of an input pin and control an output based upon that state. a. Add another Arduino Set Pin Mode VI in line with the first one. b. Add a Arduino Digital Write VI following the Set Pin Mode VIs. This enables a built-in pull-up resistor in the Arduino. c. Add an Arduino Digital Read Pin VI inside the loop in line with the Digital Write VI. d. Add controls and constants as shown in the following image. e. Delete the Boolean button and the Boolean To (0,1) VI. f. Connect the Arduino Digital Read Pin VI output to the Arduino Digital Write Pin input.
  • 3. g. Add a Not Equal To 0? VI and connect it as shown h. On the Arduino, add a normally closed pushbutton switch connected to pin 3 and ground. i. Run the VI. Press the switch. Observe the operation. The connected LED and Boolean indicator will illuminate as the pushbutton is pressed. Press the stop button to stop the loop. j. Save the file. 3. Incorporate a delay timer in the processing loop. a. Add a Wait (ms) VI inside the loop. b. Give it a constant value of 100 as shown. c. Run the VI and note the CPU usage here _______. Compare this to the value to the one found in 1g. The wait conserves CPU utilization. d. Adjust the Wait (ms) VI constant value to 3000. e. Run the VI and observe the affect. The loop only runs once every 3 seconds. Press stop button to stop the loop. f. Set the Wait (ms) VI constant value to 100. g. Add a Time Delay VI in-between the Digital Read Pin VI and Digital Write Pin VI, connecting the Error In and Error Out in line.
  • 4. h. Give the Time Delay VI a constant of 1 as shown. i. Run the VI and observe the affect. This adds a time delay between the Digital Read Pin and the Digital Write Pin. Press the stop button to stop the loop. j. Adjust the Time Delay VI constant to 3. k. Run the VI and observe the affect. Press the stop button to stop the loop. l. Save the File 4. Add a sub-VI to the processing loop. a. Delete the Time Delay VI and its constant. b. Add the given push_on_off.vi to the loop. c. Add another Not Equal To 0? to the output of the Digital Read Pin VI and to the input of the push_on_off VI. Wire the output to the Digital Write Pin input as shown. d. Open the push_on_off VI and inspect the subroutine. This subroutine finds the instantaneous moment the switch is pressed and maintains that state until the switch is pressed again.
  • 5. e. Note the Terminal Pane on the Front Panel. This is how this VI interfaces with main program loop. Also note the VI icon and the ability to customize it. f. Run the main VI. Press the switch. Observe the operation. Press the stop button to stop the loop. g. Save the file.