jr@fablab 2016

 

home about me grupal work assignments jr@fablab 2016
Table of Contents 1) Principles and practices &project management - 7 Jan 2016 2) Computer-aided design - 03 Feb 2016 3) Computer-controlled cutting 10 Feb 2016 4) Electronics production - 17 Feb 2016 5) 3D scan & print - 24 Feb 2016 6) Electronic design - 02 Mar 2016 7) Computer controlled machining 09 Mar 2016 8) Embedded programming - 16 Mar 2016 9) Mechanical design - 30 Mar 2016 10) Machine design - 06 Apr 2016 11) Input devices - 13 Apr 2016 12) Molding and casting - 20 Apr 2016 13) Output devices - 27 Apr 2016 14) Composites - 04 May 2016 15) Networking and communications 11 May 2016 16) Interface and application programming - 18 May 2016 17) Applications and implications 25 May 2016 18) Invention, intellectual property, and income - 01 Jun 2016 19) FINAL PROJECT

W16 - INTERFACE AND APPLICATION PROGRAMMING

Mission & initial concepts

Assignment

 Write an application that interfaces with an input &/or output device that you made, comparing as many tool options as possible

 

I will select the combination of:

 

LabView --- Arduino ---- INPUT : UltrasonicSensor

 

 

Technology

What Is LabVIEW?

http://www.ni.com/labview/

 

LabVIEW is your tool to solve today’s problems faster and more effectively with the capacity to evolve to meet your future challenges. LabVIEW offers unprecedented integration with all measurement hardware, existing legacy software, and IP while capitalizing on the latest computing technologies.

 

Procedure

Install, LabView, there is an Trial Option for 7 days

http://www.ni.com/download-labview/

Also you will need to install VISA (support for serial communication).

 

as a reference i use following tutorial

 

http://www.instructables.com/id/Arduino-and-LabVIEW/?ALLSTEPS

Procedure

At first i had to recreate the conectiviy of an RC-HSR04 (untrasound sensor) with Arduino. In order to connect them i use Trigger on Pin 11 an Echo on Pin 10

Before configuring LabView is important to document that Labview work with 2 screens:

- Front Panel : How will it look

- Block Diagram : How will it work

 

In order to have some kind of recipe i have documented each step of the conectivity via VISA between Labview and Arduino in order to capture serial output

IN FRONT PANEL

 

Step 1:

- Right click

- Search

- VISA Resource Name

 

Step 2:

- Right click

- Search

- String indicator (label as Read Buffer)

 

Step 3:

- Right click

- Search

- Control numeric indicator (label as distance)

 

Step 4:

- Right click

- Search

- Control Stop Button (Boolean)

 

Step 5:

- Right click

- Search

- Control Waveform Chart (you can change for other if you prefer)

 

IN BLOCK DIAGRAM

 

Step 6:

- Right click

- Search

-  VISA Configure Serial port

 

Step 7:

- Right click

- Search

-  VISA properties node

- Right click - Serial settings - Number of bytes at serial port

 

Step 8:

- Right click

- Search

- VISA REad serial

 

Step 7:

- Right click

- Search

-  String subset

 

Step 8:

- Right click

- Search

-  Numeric constant

 

Step 8:

- Right click

- Search

- Fract/Exp String to number

 

 

Step 9:

- Right click

- Search

- While loop with button

 

Step 10:

- Right click

- Search

- VISA Close serial

 

Step 11:

- Right click

- Search

- Wait(ms)

 

Step 12:

- Right click

- Search

- Numeric constant, state as 2000

When you connect the wires as show, you can run the VI and the buffer will be readed and shown in the graph.

Learning how to create almost anything - Fab Academy 2016