際際滷

際際滷Share a Scribd company logo
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 VIs. 
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 its 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

Viewers also liked (6)

Labview -USB
Labview -USB Labview -USB
Labview -USB
Jabez Winston
Arduino+lab viewArduino+lab view
Arduino+lab view
francisco javier
Getting started with arduino
Getting started with arduinoGetting started with arduino
Getting started with arduino
Dr. Pranav Rathi
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
Varun Kambrath
Water level controller
Water level controllerWater level controller
Water level controller
Shekhar Gehlaut
Virtual instrumentation (LabVIEW)
Virtual instrumentation (LabVIEW)Virtual instrumentation (LabVIEW)
Virtual instrumentation (LabVIEW)
Manipal University Jaipur
Arduino+lab viewArduino+lab view
Arduino+lab view
francisco javier
Getting started with arduino
Getting started with arduinoGetting started with arduino
Getting started with arduino
Dr. Pranav Rathi
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
REAL TIME MONITORING OF INDUSTRIAL ENVIRONMENT USING LABVIEW.
Varun Kambrath
Water level controller
Water level controllerWater level controller
Water level controller
Shekhar Gehlaut

Similar to 00 lab view arduino (20)

ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ransayo
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
govendaagoovenda
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
noahjamessss
Devry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting startedDevry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting started
shyaminfo04
Devry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting startedDevry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting started
ash52393
ALU.ppt
ALU.pptALU.ppt
ALU.ppt
JAGDISHKUMARGANTA
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com
amaranthbeg143
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.com
bellflower82
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
humphrieskalyn
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
CIS321
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manual
tamil arasan
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
Bartholomew19
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
felicidaddinwoodie
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.com
jonhson110
CIS 170 Education Specialist / snaptutorial.com
CIS 170  Education Specialist / snaptutorial.comCIS 170  Education Specialist / snaptutorial.com
CIS 170 Education Specialist / snaptutorial.com
McdonaldRyan138
Scrap Shedding - DynaForm_Tutorial II.pdf
Scrap Shedding - DynaForm_Tutorial II.pdfScrap Shedding - DynaForm_Tutorial II.pdf
Scrap Shedding - DynaForm_Tutorial II.pdf
keansheng
Cis 170 Education Organization -- snaptutorial.com
Cis 170   Education Organization -- snaptutorial.comCis 170   Education Organization -- snaptutorial.com
Cis 170 Education Organization -- snaptutorial.com
DavisMurphyB99
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docxABC Consolidated Financial InfoABC Companys current financial inf.docx
ABC Consolidated Financial InfoABC Companys current financial inf.docx
ransayo
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
govendaagoovenda
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
noahjamessss
Devry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting startedDevry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting started
shyaminfo04
Devry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting startedDevry cis 170 c i lab 1 of 7 getting started
Devry cis 170 c i lab 1 of 7 getting started
ash52393
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com
amaranthbeg143
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.com
bellflower82
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
humphrieskalyn
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
CIS321
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manual
tamil arasan
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
Bartholomew19
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
felicidaddinwoodie
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.com
jonhson110
CIS 170 Education Specialist / snaptutorial.com
CIS 170  Education Specialist / snaptutorial.comCIS 170  Education Specialist / snaptutorial.com
CIS 170 Education Specialist / snaptutorial.com
McdonaldRyan138
Scrap Shedding - DynaForm_Tutorial II.pdf
Scrap Shedding - DynaForm_Tutorial II.pdfScrap Shedding - DynaForm_Tutorial II.pdf
Scrap Shedding - DynaForm_Tutorial II.pdf
keansheng
Cis 170 Education Organization -- snaptutorial.com
Cis 170   Education Organization -- snaptutorial.comCis 170   Education Organization -- snaptutorial.com
Cis 170 Education Organization -- snaptutorial.com
DavisMurphyB99

Recently uploaded (20)

Essentials of a Good PMO, presented by Aalok Sonawala
Essentials of a Good PMO, presented by Aalok SonawalaEssentials of a Good PMO, presented by Aalok Sonawala
Essentials of a Good PMO, presented by Aalok Sonawala
Association for Project Management
ITI Turner Question Paper MCQ E-Book Free Download
ITI Turner Question Paper MCQ E-Book Free DownloadITI Turner Question Paper MCQ E-Book Free Download
ITI Turner Question Paper MCQ E-Book Free Download
SONU HEETSON
Azure Data Engineer Interview Questions By ScholarHat
Azure Data Engineer Interview Questions By ScholarHatAzure Data Engineer Interview Questions By ScholarHat
Azure Data Engineer Interview Questions By ScholarHat
Scholarhat
Rest API Interview Questions PDF By ScholarHat
Rest API Interview Questions PDF By ScholarHatRest API Interview Questions PDF By ScholarHat
Rest API Interview Questions PDF By ScholarHat
Scholarhat
Annex-C-1_COT-Rubric-for-Proficient-Teacher-_1_.ppt
Annex-C-1_COT-Rubric-for-Proficient-Teacher-_1_.pptAnnex-C-1_COT-Rubric-for-Proficient-Teacher-_1_.ppt
Annex-C-1_COT-Rubric-for-Proficient-Teacher-_1_.ppt
joan dalilis
Meeting the needs of modern students?, Selina McCoy
Meeting the needs of modern students?, Selina McCoyMeeting the needs of modern students?, Selina McCoy
Meeting the needs of modern students?, Selina McCoy
Economic and Social Research Institute
Azure Solution Architect Interview Questions By ScholarHat
Azure Solution Architect Interview Questions By ScholarHatAzure Solution Architect Interview Questions By ScholarHat
Azure Solution Architect Interview Questions By ScholarHat
Scholarhat
Effective Product Variant Management in Odoo 18
Effective Product Variant Management in Odoo 18Effective Product Variant Management in Odoo 18
Effective Product Variant Management in Odoo 18
Celine George
Chapter 2. Strategic Management: Corporate Governance.pdf
Chapter 2. Strategic Management: Corporate Governance.pdfChapter 2. Strategic Management: Corporate Governance.pdf
Chapter 2. Strategic Management: Corporate Governance.pdf
Rommel Regala
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
Cyrus_Kelisha_SMM_PB1_2024-November.pptx
Cyrus_Kelisha_SMM_PB1_2024-November.pptxCyrus_Kelisha_SMM_PB1_2024-November.pptx
Cyrus_Kelisha_SMM_PB1_2024-November.pptx
KelishaCyrus
lklklklklklklklklklklklklklklklklklklklklklklklklklklklk
lklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklk
lklklklklklklklklklklklklklklklklklklklklklklklklklklklk
preetheshparmar
How to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 EmployeeHow to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 Employee
Celine George
The Constitution, Government and Law making bodies .
The Constitution, Government and Law making bodies .The Constitution, Government and Law making bodies .
The Constitution, Government and Law making bodies .
saanidhyapatel09
Year 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptxYear 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptx
mansk2
How to Configure Deliver Content by Email in Odoo 18 Sales
How to Configure Deliver Content by Email in Odoo 18 SalesHow to Configure Deliver Content by Email in Odoo 18 Sales
How to Configure Deliver Content by Email in Odoo 18 Sales
Celine George
GRADE-1-QUARTER 4-MATHEMATICS-WEEK-3.pptx
GRADE-1-QUARTER 4-MATHEMATICS-WEEK-3.pptxGRADE-1-QUARTER 4-MATHEMATICS-WEEK-3.pptx
GRADE-1-QUARTER 4-MATHEMATICS-WEEK-3.pptx
AngellieMaeDoce
ASP.NET Interview Questions PDF By ScholarHat
ASP.NET  Interview Questions PDF By ScholarHatASP.NET  Interview Questions PDF By ScholarHat
ASP.NET Interview Questions PDF By ScholarHat
Scholarhat
Annex-A_PMES-Tool-for-Proficient-Teachers-SY-2024-2025.ppt
Annex-A_PMES-Tool-for-Proficient-Teachers-SY-2024-2025.pptAnnex-A_PMES-Tool-for-Proficient-Teachers-SY-2024-2025.ppt
Annex-A_PMES-Tool-for-Proficient-Teachers-SY-2024-2025.ppt
joan dalilis
MELC: Follows ethical standards in writing related literature
MELC: Follows ethical standards in writing related literatureMELC: Follows ethical standards in writing related literature
MELC: Follows ethical standards in writing related literature
joverlynbalansag1
ITI Turner Question Paper MCQ E-Book Free Download
ITI Turner Question Paper MCQ E-Book Free DownloadITI Turner Question Paper MCQ E-Book Free Download
ITI Turner Question Paper MCQ E-Book Free Download
SONU HEETSON
Azure Data Engineer Interview Questions By ScholarHat
Azure Data Engineer Interview Questions By ScholarHatAzure Data Engineer Interview Questions By ScholarHat
Azure Data Engineer Interview Questions By ScholarHat
Scholarhat
Rest API Interview Questions PDF By ScholarHat
Rest API Interview Questions PDF By ScholarHatRest API Interview Questions PDF By ScholarHat
Rest API Interview Questions PDF By ScholarHat
Scholarhat
Annex-C-1_COT-Rubric-for-Proficient-Teacher-_1_.ppt
Annex-C-1_COT-Rubric-for-Proficient-Teacher-_1_.pptAnnex-C-1_COT-Rubric-for-Proficient-Teacher-_1_.ppt
Annex-C-1_COT-Rubric-for-Proficient-Teacher-_1_.ppt
joan dalilis
Azure Solution Architect Interview Questions By ScholarHat
Azure Solution Architect Interview Questions By ScholarHatAzure Solution Architect Interview Questions By ScholarHat
Azure Solution Architect Interview Questions By ScholarHat
Scholarhat
Effective Product Variant Management in Odoo 18
Effective Product Variant Management in Odoo 18Effective Product Variant Management in Odoo 18
Effective Product Variant Management in Odoo 18
Celine George
Chapter 2. Strategic Management: Corporate Governance.pdf
Chapter 2. Strategic Management: Corporate Governance.pdfChapter 2. Strategic Management: Corporate Governance.pdf
Chapter 2. Strategic Management: Corporate Governance.pdf
Rommel Regala
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
Cyrus_Kelisha_SMM_PB1_2024-November.pptx
Cyrus_Kelisha_SMM_PB1_2024-November.pptxCyrus_Kelisha_SMM_PB1_2024-November.pptx
Cyrus_Kelisha_SMM_PB1_2024-November.pptx
KelishaCyrus
lklklklklklklklklklklklklklklklklklklklklklklklklklklklk
lklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklklk
lklklklklklklklklklklklklklklklklklklklklklklklklklklklk
preetheshparmar
How to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 EmployeeHow to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 Employee
Celine George
The Constitution, Government and Law making bodies .
The Constitution, Government and Law making bodies .The Constitution, Government and Law making bodies .
The Constitution, Government and Law making bodies .
saanidhyapatel09
Year 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptxYear 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptx
mansk2
How to Configure Deliver Content by Email in Odoo 18 Sales
How to Configure Deliver Content by Email in Odoo 18 SalesHow to Configure Deliver Content by Email in Odoo 18 Sales
How to Configure Deliver Content by Email in Odoo 18 Sales
Celine George
GRADE-1-QUARTER 4-MATHEMATICS-WEEK-3.pptx
GRADE-1-QUARTER 4-MATHEMATICS-WEEK-3.pptxGRADE-1-QUARTER 4-MATHEMATICS-WEEK-3.pptx
GRADE-1-QUARTER 4-MATHEMATICS-WEEK-3.pptx
AngellieMaeDoce
ASP.NET Interview Questions PDF By ScholarHat
ASP.NET  Interview Questions PDF By ScholarHatASP.NET  Interview Questions PDF By ScholarHat
ASP.NET Interview Questions PDF By ScholarHat
Scholarhat
Annex-A_PMES-Tool-for-Proficient-Teachers-SY-2024-2025.ppt
Annex-A_PMES-Tool-for-Proficient-Teachers-SY-2024-2025.pptAnnex-A_PMES-Tool-for-Proficient-Teachers-SY-2024-2025.ppt
Annex-A_PMES-Tool-for-Proficient-Teachers-SY-2024-2025.ppt
joan dalilis
MELC: Follows ethical standards in writing related literature
MELC: Follows ethical standards in writing related literatureMELC: Follows ethical standards in writing related literature
MELC: Follows ethical standards in writing related literature
joverlynbalansag1

00 lab view arduino

  • 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 VIs. 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 its 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.