3

I am new to LabVIEW and trying to make a small project. In LabVIEW from one device, I am measuring some values and then need to store them in database. Initially, I used Excel to store data. But now I need to add MySQL functionality to store data and then later retrieve when need for analyzing.

I look for NI toolkit but it is expensive. I need some free and open source solution for my project. I search over SO and google to find any examples where I can start and make it work, but I couldn't find any. If someone suggest me some resources or having some example code that I can use to achieve my goal. thanks in advance.

SeanJ
  • 1,203
  • 2
  • 19
  • 39
Rio
  • 347
  • 3
  • 6
  • 20

3 Answers3

2

Take a look at LabSQL. This works in LabVIEW 2017, allowing connection to a MySQL database without NI's LabVIEW Database Connectivity Toolkit.

adambro
  • 310
  • 4
  • 16
  • According to the link it works in LabVIEW 6.0 (!) onwards, but there's no specific information there about recent versions. Are you saying you can confirm it works in LabVIEW 2017? – nekomatic Jan 25 '19 at 10:31
  • Yes, I've tried both the _Insert into a Table_ and _Fetch a Table_ examples and these work on LabVIEW 2017. – adambro Jan 25 '19 at 10:51
  • @adambro Can you provide some example code or refer to any tutorials?. thanks. I came across LabSQL, and I tried but no success. I will try again and will paste the problem. – Rio Jan 25 '19 at 12:48
  • @Rio I've only used the examples provided with LabSQL so can't provide anything further but if you do share details of the issue you've had then I will try to help. – adambro Jan 25 '19 at 13:15
0

I normally use the Database Connectivity Toolkit, but I did confirm I could get this to work in 2017 as well (though connecting to a MSSQL database instead of MySQL).

The only thing that tripped me up at first was not using the Create Connection before Open Connection (because I was used to the aforementioned toolkit). I didn't try anything complicated; I just ran a simple selection query. But it looks like everything should work pretty similarly to the toolkit. As adambro said, if you have a more specific question, maybe we can help with an answer.

Code Snippet

John Covil
  • 16
  • 4
0

I would suggest you could use SQLite. It is a fairly easy toolkit. You can download it via the VI package manager. By dr. James Powell. SQLite is excellent in storing data locally.

Use the SQLite browser from sqlitebrowser.org.

Also a nice way to learn SQL!