LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

postgreSQL

Hello to all,

 

Sorry about my request of help but I am not familiar with this topic and I need your help if this is possible.

 

First of all I have already develop one VI that acquire data from one temperature/humidity and dew point sensor. Next step is to make one connection between Labview and postgreSQL in order to storage all my data in one database. From my request of this forum I show that I can use Labview Database Connectivity Toolkit. I have already developed some examples provided by NI (http://www.ni.com/pdf/labview/us/database_connectivity_toolkit.pdf) but in this case I use UDL for communication between an application and a database (by the help of Microsoft Access).

 

I would appreciate if you could recommend me any other tutorial specialize for postgreSQL and Labview in windows 7 environment. To be honest I don't have a lot of experience with database (level : beginner) and I need something step by step.

 

Thank you in advance,

kb

Mockup.jpg

0 Kudos
Message 1 of 5
(5,056 Views)

You should only need to make a new UDL, possibly with a small tweak to the sql query if you're using wild cards.

A database is a database, regardless if it's access, sqlserver or postgresql. You open a connections, perform your sql and close the connection.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 5
(5,048 Views)

Hello again,

 

SQLtest.jpg

This figure is presented what I try to do using Labview & Microsoft Access. At the moment I took some random values for the data (in reality I will acquire the data from the sensors every 30 minutes). Firstly I created one empty database using Access. Then by the help of Labview I insert some data to this database. The communication that I used between an application and a database is UDL and the type of the datadase is mdb.

 

Now instead of Microsoft Access I would like to use PostgreSQL. When I try to make an empty database with postgreSQL I don't know where is located this database in order to search with Labview and in addition I don't know what type of database is. What is the modification that I need to do in order to work with postgreSQL???

 

I really need your help because I just start to use Labview with Database Connectivity toolkit and it is very new for me.Smiley Happy

 

 

Thank you in advance,

kb

0 Kudos
Message 3 of 5
(5,014 Views)

If everything works as it should, you only need to reconfigure the .UDL. Just double click it and change the settings as needed.

I havn't worked with postgresql, but basic sql is a standard thus no need to change the code. 🙂

 

According to mysql vs postgres you set up a ODBC-connection (and use that in the UDL)

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 5
(5,012 Views)

I have a few recommendations:

 

First, don't use the DCT. It adds a layer of complexity that is ultimately not helpful. Check out this thread.  It has a good discussion of the pros and cons of both approaches, and the last page has LV2012 version of the drivers I recommend.

 

My second recommendation is to learn a little SQL. You don't need to be an expert and it's really not very hard, but it will help you understand what is going on.

 

Third, do some reading on the ADO interface. It is the underlying mechanism on the Windows platform that lets you talk to databases in a consistent , standardized way.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(4,992 Views)