LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save data aquired with NI mydaq and save it in a data base using Labview?

i have developped with labview an interface that can control automatic irrigation station using two sensors ( humidity sesonr and temperature sensor) so i want to save data aquired during a year in a data base so i can compare these results in the next year please help me to do that in my interface labview and thanks 

0 Kudos
Message 1 of 7
(3,418 Views)

There is a database toolkit for LabVIEW.  I don't think it is a free download however.  With the Data Manipulation toolkit, you can integrate with most databases that use the ODBC protocol.

 

If you don;t need anything fancy, you can write the values out to file using the write/read spreadsheet VIs.  If the file is [COMMA] or [TAB] delimited, you can import it into your database with ease.

 

Another approach is to format you output to a text file as SQL, and import the records that way.

 

INSERT INTO TEMP_HUM_TBL (Temperature, Humidity, Txn_Date)
VALUES (30, 95, 'Dec-24-2013');

Machine Vision, Robotics, Embedded Systems, Surveillance

www.movimed.com - Custom Imaging Solutions
0 Kudos
Message 2 of 7
(3,388 Views)
There are a couple of free toolkits that use SQL. I've used LabSQL quite a bit. Search the board for SQL if you don't have the NI Database Connectivity Toolkit.
0 Kudos
Message 3 of 7
(3,385 Views)

please can you send me an example or a source of examples that using these statements i can't write a database easly because it's the first time that i use it toolkit or text 

0 Kudos
Message 4 of 7
(3,314 Views)

Hi hamdouch1000,

 

I believe the below forum post will help you moving forward: http://forums.ni.com/t5/LabVIEW/intergrating-labview-and-labsql/td-p/1557292

 

Are you planning on using LabSQL or NI toolkit Database Toolkit?

 

MJ
Application Engineer
National Instruments
0 Kudos
Message 5 of 7
(3,298 Views)

Hi thank you so much for help So i'm planning to use labsql i think that is it's easy to use but i don't know it how it work and how i can integrate it in my application 😕

0 Kudos
Message 6 of 7
(3,245 Views)

Your VI does seem to do much of anything except spin as fast as possible. You need to decide what to save and how often. With LabSQL, you would start by designing the database itself. In order to use LabSQL, you then should take a SQL tutorial as the reading and writing to the database is not related to LabVIEW. With an existing database, you would also create a udl file that points to it. Once you are comfortable with SQL, the examples that come with LabSQL should make a lot more sense. The lower level functions are all Microsoft ADO based so ms is also a good reference.

0 Kudos
Message 7 of 7
(3,243 Views)