Experiment 11: Setup of Labview Interface For Arduino Safety Precautions

November 23, 2022 | Author: Anonymous | Category: N/A
Share Embed Donate


Short Description

Download Experiment 11: Setup of Labview Interface For Arduino Safety Precautions...

Description

 

National University of Sciences & Technology Course: MTS- 336 Instrumentation and Measurements  Lab Manual 11 Instructor: LE Muhammad Umar Masood

Experiment 11: Setup of LabVIEW Interface for Arduino Safety Precautions:   Do not harm your computer while interfacing external devices. Double check the external device



if it is electrically working.    While stopping the program program,, do not use st stop op button of VI. I may leave the co communication mmunication ports ports busy which might not be usable next time you run the program.



Introduction/Motivation:  To interface Arduino Arduino (   www.arduino.com ) boards  ) boards with LabVIEW for real time operation (Acquisition and Actuation)

Procedure: 1.  Download and install NI LabVIEW http://www.ni.com/download/labview-developm http://www.ni.com/downlo ad/labview-development-system-201 ent-system-2015/5314/en/ 5/5314/en/   2.  Download and install NI VISA 15.0 http://download.ni.com/support/softl http://download.ni.com/su pport/softlib/visa/NI-VISA/15.0.1/ ib/visa/NI-VISA/15.0.1/NIVISA1501full.ex NIVISA1501full.exee  3.  Download and install VI Package Manager http://ftp.ni.com/evaluatio n/labview/lvtn/toolkits/jki/vip oolkits/jki/vipm-windows.exe m-windows.exe   http://ftp.ni.com/evaluation/labview/lvtn/t 4.  Install the latest version of LIFA (v2.2.0.79) using VIPM. You must have an active internet connection on target machine. Complete the following steps: a.  Make sure you have the most recent version of VI Package Manager (VIPM) installed on your system. You can download VIPM Community Edition for free at  at External Link: VI Package Manager. Manager.  b.  Launch VIPM. If VIPM fails to launch, there is most likely a problem with the VI Server setting in LabVIEW. See  See Knowledgebase 60EEQC1Z: Why Can't VI Package Manager (VIPM) LabVIEW?  for troubleshooting steps. Connect to LabVIEW?

Department of Mechatronics Engineering College of EME NUST Page 1 of 7 

 

National University of Sciences & Technology Course: MTS- 336 Instrumentation and Measurements  Lab Manual 11 Instructor: LE Muhammad Umar Masood

c.  Browse to LabVIEW Interface for Arduino in the list of packages. (Check for the latest version)

d.  Click the Install &Upgrade Packages button.

e.  Click Continue.

Department of Mechatronics Engineering College of EME NUST Page 2 of 7 

 

National University of Sciences & Technology Course: MTS- 336 Instrumentation and Measurements  Lab Manual 11 Instructor: LE Muhammad Umar Masood

f.   You will see a screen indicating indicating that L LabVIEW abVIEW will be rrestarted. estarted. When you cclick lick okay, LabVIEW will prompt you to save any open VIs as it is restarted. g.  Click Finish.

h.   The LabVIEW Interface Interface for Ar Arduino duino is now ins installed talled on your syst system. em. Once the too toolkit lkit is installed you can use VIPM to check for updates for it. When there is an update to the toolkit the icon in VIPM will change to look like the image below. Clicking the Upgrade Packages button will update the toolkit to the latest version.

 You will no now wh have ave access to tthe he Ard Arduino uino palette in LabVIEW. You can use this palette tto o interface  with the LabVIEW LabVIEW Interface for Arduino Fir Firmware mware once it has been loaded onto your Arduino.  Alternative for step 4: Follow th thee link below http://www.myclassbook.org/lab view-interface-for-arduino/ r-arduino/ http://www.myclassbook.org/labview-interface-fo

Department of Mechatronics Engineering College of EME NUST Page 3 of 7 

 

National University of Sciences & Technology Course: MTS- 336 Instrumentation and Measurements  Lab Manual 11 Instructor: LE Muhammad Umar Masood

5.  Now you have to program the LIFA Firmware in Arduino to make it remote device. For that purpose follow these steps (You can skip step 5 if you already have firmware installed in  Arduino) a.  Download Arduino IDE v1.0.5 http://arduino.googlecode.com /files/arduino-1.0.5-r2-windows.exe -r2-windows.exe   http://arduino.googlecode.com/files/arduino-1.0.5 if you already have some latest version of Arduino installed in your target machine, it  won’t allow you to install old vers version ion unless you uninstall uninstall the latest one. one.  One way of solving this problem is to use standalone version of this release of Arduino IDE. http://downloads.arduino.cc/ardu ino-1.0.5-r2-windows.zip ndows.zip   http://downloads.arduino.cc/arduino-1.0.5-r2-wi b.  Follow these steps to install firmware in Arduino i.  Connect the Arduino Uno / Mega to your PC as described in  in KnowledgeBase PC?.  5INA7UYG: How do I Connect an Arduino Uno to my PC?. ii.  Install the LabVIEW Interface for Arduino toolkit as described in  in  KnowledgeBase 5L38JQYG: How do I Install the LabVIEW Interface for Arduino Toolkit Using  VIPM?..   VIPM? iii.  Open the Arduino IDE by browsing to the folder that you extracted in step 1 and double clicking arduino.exe

iv.   The Arduino IDE IDE will open. Click File»Open and browse to LIFA_Base.ino found in C:\Program Files\National Instruments\LabVIEW 201x\vi.lib\LabVIEW 201x\vi.lib\LabVIE W Interface for Arduino\Firmw Arduino\Firmware\LIFA_Base are\LIFA_Base

Department of Mechatronics Engineering College of EME NUST Page 4 of 7 

 

National University of Sciences & Technology Course: MTS- 336 Instrumentation and Measurements  Lab Manual 11 Instructor: LE Muhammad Umar Masood

 v.  Choose the Arduino board type by clicking  Tools»Boar  Tools»Board»Arduin d»Arduino o Uno

 vi.  Choose the COM port by clicking Tools»Serial Port and choosing the COM port that corresponds to your Arduino Uno.

Department of Mechatronics Engineering College of EME NUST Page 5 of 7 

 

National University of Sciences & Technology Course: MTS- 336 Instrumentation and Measurements  Lab Manual 11 Instructor: LE Muhammad Umar Masood

 vii.   You can determine determine the COM p port ort that corr corresponds esponds to your A Arduino rduino Uno using the device manager by clicking Start»Control Panel»Device Manager and expanding Ports(LPT & COM).  viii.  Click the Upload button to upload the firmware to the Arduino Uno.

Department of Mechatronics Engineering College of EME NUST Page 6 of 7 

 

National University of Sciences & Technology Course: MTS- 336 Instrumentation and Measurements  Lab Manual 11 Instructor: LE Muhammad Umar Masood

ix.   The Arduino IDE IDE should repor reportt Done Uploading when the firmware firmware has been successfully uploaded to the Arduino.

x.   You are now ready ready to use the Arduino Arduino Uno with the LabVIEW In Interface terface for  Arduino Uno. Uno. The LIFA too toolkit lkit contains a numb number er of examples wh which ich can be accessed through the functions palette; palette; this is a great place to start. 6.  Run LabVIEW on your machine. If you have done all the above steps correctly you will see the following menu added in LabVIEW block diagram like this

7.  It is done. Now you can program pretty much everything on Arduino using LabVIEW’s block diagram coding. As a startup try this code

Department of Mechatronics Engineering College of EME NUST Page 7 of 7 

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF