sábado, 21 de mayo de 2016

Graph of Temperature

This practice consists on introduce in a graph the temperature of a day, read from a database. Moreover, we can modify the temperature of every hour of the day.

Materials we need:
-1 computer with LabVIEW and Microsoft Access

To do that, the first thing that we have to do is to create a database with the temperature of every hour in a day. In my case, do don't invent it, I took the values from this page:
http://www.accuweather.com/es/es/santander/306949/hourly-weather-forecast/306949?hour=46

Then, we have to introduce these values inside a database:




Then,we have create a data link, that it's like a bridge between the database and LabVIEW. To do that, we have to click on: Tools -> Create Data Link and then, we will follow the instructions.


Then, we will create an VI like this one. On the left we can see a description of the program, the path where the database and 2 numeric inputs with a button of Modify. Then, we can see a Stop button, to stop the program. On the right, we can see a graph with the values represented and a table with the hours of the day and their temperatures.


Inside this program, the first thing that we can see is the inputs and the outputs of the program. Then, we can see how do we pick the path of the database.


Then, we go to the main part of the program. In this first half, we read all the values of the database and we introduce them in a XY Graph to see them and in an Array, to see all the numeric values.


In this second half, we are waiting until we press the Stop button or the Modify button. Then, press the Stop button, the program will finish, but if we press the Modify button, we will overwrite the value of the temperature of the hour chosen in the database and we will go to the beginning of the while loop. In the end, we have a Clear Errors, to avoid problems at the end of the program.


You can download the program from this link:

No hay comentarios:

Publicar un comentario