LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW data to Access or mySQL

Hi I'm taking a read from USB 6008 device, and I need to create a database in Microsoft Access or SQL of the data (with date and time) that I´m reading. Can anyone show me how to do this? I used LabVIEW really little when I was in college, so I'm practically a rookie. I attached mi VI 

0 Kudos
Message 1 of 2
(2,354 Views)

@jalex0906 wrote:

Hi I'm taking a read from USB 6008 device, and I need to create a database in Microsoft Access or SQL of the data (with date and time) that I´m reading. Can anyone show me how to do this? I used LabVIEW really little when I was in college, so I'm practically a rookie. I attached mi VI 


You should probably settle on a database first. Note that Access uses SQL, as most traditional databases do.

 

SQL Server, MySQL, SQLite and Access, just to name a few, have very different properties. SQL Server requires a server to run somewhere although this could be local, Access requires a file somewhere, SQLite can also retain a database in memory. Access is for instance not really designed for multi-client access. SQL Server can do that and also has replication features. You can even make a text file database, and access it with SQL.

 

You usually don't need ODBC. ODBC is mend to be the glue between programs and the database. I think it's redundant, and there are some serious flaws in it (like plain text storage of passwords in the registry).

 

Once you chose a DB, you need a driver for it. SQLite has it's own driver\library. A lot of the other DB's allow ADO (com or .net) interfaces, and most available drivers use that. Just google "LabVIEW SQL library".

 

I'd recommend making a similar test VI, like the DAQ VI you've posted, but for the DB.

 

To connect the two, the problem gets more complicated. You'd do yourself a favor to look at architectures like producer\consumer, state machine, etc.. To get your program working, you only need two looks, and a queue between them. That's basically a producer\consumer.

 

Be aware though that this get's the program working, it won't scale up very well. Usually, small programs grow bigger. Two loops and a queue is not a good basis for a full fetched program.

Message 2 of 2
(2,297 Views)