GENERAL OBJETIVE:
Interface and Application Programming
Write an application that interfaces with an input &/or output device that you made
For this assignment an interface connected to a device (in this case Arduino UNO card), which will be communicated in real time and in this case consist of 1 input and 3 outputs was created.
The program will use LabView; because with can develop the user interface and programming for communication with the card.
Figure 1 Start screen LabView
LabView is a programming environment using blocks which facilitates programming and understanding of it, there are two form of performing programming and that will depend on each user, the first is to create the graphical interface used by users to interact with the program and after that generate the code block will monitor implementation; or, you can create all programming and after that create the graphical interface to interact with the user, this will depend on each programmer or user.
For this exercise the graphical interface for viewing by the user and then the programming that control both the interface and the Arduino card is first created.
Figure 2 LabView Interface Display
With the interface created both ports Arduino as buttons and displays the interface configured by creating the following code
Figure 3 LabView code
In Figure 2 and Figure 3, both the graphical interface and programming code used is displayed; however, to perform the programming of the Arduino board from LabView has to load a file in Arduino so that it can recognize the instructions provided by LabView, the code used is as follows, that code was developed for this purpose by Sam Kristoff National Instruments in November 2010.
With the interface created both ports Arduino as buttons and displays the interface configured by creating the following code
Figure 4 LifaBase Code Programming Arduino
Download LifaBase code for Arduino with libreries
Download code and interface LabView
The idea of this program is to measure the temperature and based on that display the status and actions to be performed to keep the temperature at a programmed state previously, in this case the normal operating range is 30 ° to 60 ° C .
If it is below this range an indicator that prompts the user to activate the heating is turned on, while range being is exceeded another indicator that calls for the ventilation is activated and finally while it is in the normal operating range is activated, only indicates that state; for this example a potentiometer (variable resistor) was used to simulate the temperature sensor must be connected to the input of the Arduino A5.
The electronic diagram Arduino connections with input and output components show that the digital outputs 2,3 and 4 are connected to a resistor and a led diode. While the analog input A5 a potentiometer or a transducer that delivers an analog voltage signal after measuring a physical variable is connected.
Figure 5 Connection Diagram Electronic
Figure 6 physical connections allocation
Finally the connection to the PC is displayed and the interface created
Figure 7 Connection interface with LabView and Arduino Input and Output components
With the interface created both ports Arduino as buttons and displays the interface configured by creating the following code