Introduction: Arduino and LabVIEW
In the previous guide we saw how to interface Arduino with LabVIEW (http://elettrizzatidiy.blogspot.it/2016/08/interfacciare-arduino-con-labview.html), but today we will see how to create a simple little project with this software, in detail we will develop an interface that will allow us to turn on a led through a click.
Step 1: Create the Circuit:
It was connected only LED connected between the pin 13 and GND as shown in figure.
Step 2: After Loading the LIFA_base Sketch on Our Arduino...
we proceed with the opening of LabVIEW and create a new project then: Create Project-> Blank VI. We find ourselves faced with two screens where the "Front Panel" will realize the interface and operating it will realize a block diagram in the "Block Diagram" screen.
Step 3: Realisation Block Diagram and Interface
By clicking on an empty space we will find ourselves in front of a window containing all the "features" done from the program.
1. In the "Block Diagram" we click with the right mouse button and drag in the section Arduino 'init' lock on a blank space to initialize communication with Arduino. 2. In section Arduino-> Low Level drag the block "Set Digital Pin Mode" and connect as in the photo below, creating a numeric variable and constant output. These last two operations are possible by simply clicking the right mouse button on the block "Digital Set Pin Mode" and clicking Create-> All controls and indicators. 3. Create a "While Loop" cycle from the "Structures" (was also added a control block for the loop) and inside the loop drag the block "Digital Write Pin" from the section Arduino-> Low Level. 4. In "Frontal Panel" window, create a switch doing right click on an empty space, and dragging the vertical toggle switch from the "Boolean". 5. After you create the switch will create a block in the block diagram window, this block is not compatible with the block "Digital Pin Write" then, still in dedicated to the block diagram window, click the right button and in the "Boolean" drag lock "Bool to (0.1)" and connect to the block that will control our pin. 6. Out of the loop will stop communicating with the Arduino through the "close" pack in the Arduino.
Step 4: Finish!
Now we just have to press play and test our first program by pressing on the switch!
For the video and more info visit! : http://elettrizzatidiy.blogspot.it/2016/08/primo-programma-con-arduino-e-labview.html