LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

logging data into a database

Solved!
Go to solution

For my thesis I have a test stand that measures some values and now i have to get them into a database each couple of seconds (if it is possible and not to difficult into MS Access or a textfile coupled to MS Access). The extra problem is that I must be able to run the database while the data is logging. Can somebody help me with this problem please, it's quiet urgent and I am not to familiar with LabView.

0 Kudos
Message 1 of 8
(3,757 Views)

That's easy!  NI makes a database toolkit.  Search the forums and you'll find this question has been asked before.

 

PS - if you don't have the toolkit, many folks have been happy with this and this.

Message Edited by jcarmody on 01-14-2009 02:20 PM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 8
(3,743 Views)

You have a couple of options. You can get the Datebase Connectivity Toolkit from NI. This is based on ADO technology from Microsoft and hides some of the complexity of reading and writing to a db. There is LabSQL from Jeffrey Travis. This is also based on ADO and does not cost anything but you would have to become familiar with SQL. This happens to be what I use with LabVIEW.

 

Both of them come with examples and both have had numerous postings that you could refer to.

0 Kudos
Message 3 of 8
(3,740 Views)

I just downloades labsql, but I don't understand the working exactly. How do I select the document it has to be saved in and what do I have to fill in in the connection string?

 

 

0 Kudos
Message 4 of 8
(3,718 Views)

This site will tell you what your connection string should be.  I'm not sure what your first question means...

Post what you have so far.

Message Edited by jcarmody on 01-15-2009 12:31 PM
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 5 of 8
(3,711 Views)

Thanx for your help, I now can make connection and save values in acces but only when I am using a statement like this: INSERT INTO myOtherTable
 (Location, Temp, Humidity) VALUES ('Austin', 102, 95);

Is it possible to send measured values to access in stead of values you have to fill in manually like in the example above? If it is possible without converting the values to a string because i have to use the numeric values for further processing.

I hope you can also help me with this problem

 

 

0 Kudos
Message 6 of 8
(3,682 Views)
Solution
Accepted by topic author stefvg

You can use the Format Into String function. This is one of the basic LabVIEW functions that you should be familiar with. With your existing insert and with the example I posted, you are not inserting strings into the table. With SQL, a string is surrounded by the ' mark. Just like you have around Austin.

 

Message Edited by Dennis Knutson on 01-19-2009 10:07 AM
0 Kudos
Message 7 of 8
(3,678 Views)
Thanx for your help, i think all the problems concerning writing to a database a solved now. The values i need to write to this database are comming from a Schneider Elektric device (EGX100). This device is coupled on a few instuments with his serial port (RS485) in daisy chain (all the devices are placed after eatch other). Then he is coupled with the internal network with a TCP/IP connection. How am i supposed to get the values out of this device. Is that just with the TCP-commandos or do i have to use the instrument drivers or both or someting else?
0 Kudos
Message 8 of 8
(3,640 Views)