Database Communication Using LabVIEW Video - Halvorsen.blog

1y ago
51 Views
2 Downloads
2.26 MB
33 Pages
Last View : 22d ago
Last Download : 3m ago
Upload by : Adalynn Cowell
Transcription

Database Communication using LabVIEW Hans-Petter Halvorsen, M.Sc.

Software Microsoft SQL Server Express can be downloaded for free from Internet Software All LabVIEW Software can be downloaded from: www.ni.com/download

Overview Microsoft SQL Server Database ODBC Write/Read Data Database Management Create Tables LabVIEW Application with GUI that Communicate with the SQL Server

Database Systems Hans-Petter Halvorsen, M.Sc.

Old fashion Database (Data-storage) Systems Not too long ago, this was the only data-storage device most companies needed. Those days are over.

Database Systems A Database is a structured way to store lots of information. The information is stored in different tables. - “Everything” today is stored in databases! Examples: Bank/Account systems Information in Web pages such as Facebook, Wikipedia, YouTube, etc. lots of other examples! (Give me 5 examples)

Database Management Systems (DBMS) Oracle MySQL MariaDB Sybase Microsoft Access Microsoft SQL Server . (we have hundreds different DBMS)

SQL Server Hans-Petter Halvorsen, M.Sc.

Microsoft SQL Server Software

Creating Tables Table Columns SCHOOL SchoolId Name Description Table Name Primary Key

Lets Create the Example from Scratch

SQL Structured Query Language Hans-Petter Halvorsen, M.Sc.

What is SQL? Theory SQL – Structured Query Language SQL is a standard language for accessing databases – and manipulate data SQL is not case sensitive Example: select SchoolId, Name from SCHOOL We use the “SELECT” command in order to get data from the Database Columns Table

SQL – Structured Query Language Theory Query Examples: insert into STUDENT (Name , Number, SchoolId) values ('John Smith', '100005', 1) select SchoolId, Name from SCHOOL select * from SCHOOL where SchoolId 100 update STUDENT set Name 'John Wayne' where StudentId 2 delete from STUDENT where SchoolId 3 We have 4 different Query Types: INSERT, SELECT, UPDATE and DELETE

Lets Create some Examples from Scratch

Open Database Connectivity (ODBC) Hans-Petter Halvorsen, M.Sc.

ODBC ODBC (Open Database Connectivity) is a standardized interface (API) for accessing Theory the database from a client. You can use this standard to communicate with databases from different vendors, such as Oracle, SQL Server, etc. The designers of ODBC aimed to make it independent of programming languages, database systems, and operating systems. Control Panel Administrative Tools Data Sources (ODBC) We will use this ODBC Connection later in LabVIEW in order to open the Database Connection from LabVIEW Note! Make sure to use the 32 bit version of the ODBC Tool!

ODBC – Step by Step Instructions The Name of your ODBC Connection The Name of your SQL Server Select the Database you are using Use either Windows or SQL Server authentication (Windows is simplest to use!) Test your connection to see if its works 18

Lets Create the Example from Scratch

LabVIEW Database Communication in LabVIEW Hans-Petter Halvorsen, M.Sc.

LabVIEW SQL Toolkit For Easy Database Communication using LabVIEW Hans-Petter Halvorsen, M.Sc.

LabVIEW SQL Toolkit Software Software For Easy Database Communication using LabVIEW Hans-Petter Halvorsen Download for free here: http://home.hit.no/ hansha/documents/labview/code/SQLToolkit.zip

LabVIEW SQL Toolkit Easy Access to Database Systems from LabVIEW 2D Table with Data Example 1: Get Data from Database into LabVIEW: 1 3 2 Query Your ODBC Connection Example 2: Write Data to Database from LabVIEW: Query 1 Students: Try these Examples 2 3 23

Example 1: Get Data from Database into LabVIEW

Lets Create the Example from Scratch

Example 2: Write Data to Database from LabVIEW

Lets Create the Example from Scratch

Alternative Solution: Type in the Connection String for your Database Your Password for the sa user Type your Database here Your SQL Server Instance Your SQL Query Note! When using this method, you dont need to create an ODBC Connection first!

LabVIEW Example Logging Measurements Data to SQL Server Hans-Petter Halvorsen, M.Sc.

Logging Measurement Data into SQL Server Database Temperature Measurements (TC-01 Thermocouple) Note! You will need the NI DAQmx Driver 30

Logging Measurement Data into SQL Server Database

Lets Create the Example from Scratch

Hans-Petter Halvorsen, M.Sc. University College of Southeast Norway www.usn.no E-mail: hans.p.halvorsen@hit.no Blog: http://home.hit.no/ hansha/

of ODBC aimed to make it independent of programming languages, database systems, and operating systems. Control Panel Administrative Tools Data Sources (ODBC) We will use this ODBC Connection later in LabVIEW in order to open the Database Connection from LabVIEW Theory Note! Make sure to use the 32 bit version of the ODBC Tool!

Related Documents:

Certified LabVIEW Architect Exam LabVIEW Core 1 LabVIEW Core 3 LabVIEW Core 2 Managing Software Engineering in LabVIEW Advanced Architectures in LabVIEW LabVIEW Connectivity Object-Oriented Design and Programming in LabVIEW LabVIEW Performance LabVIEW Real-Time 1

examples. So launch LabVIEW and explore the LabVIEW environment as you read this section. 1.3.1 Starting LabVIEW . If your version of LabVIEW was installed using the default installation procedure, launch LabVIEW by selecting All Programs National Instruments LabVIEW 2013 (or LabVIEW 2014) LabVIEW 2013 (or LabVIEW 2014) from the Start menu .

Labview Exercises for Labview 7.0 Installation of Labview: 1. Install the Labview 7.0 software and drivers onto your computer. These files can be found by mapping a network drive to \\poohbah\labview, and by running the ‗autorun‘ file in the ‗Labview 7‘ folder. The serial num

Sound and Vibration Measurement Suite Sound and Vibration Toolkit LabVIEW Internet Toolkit LabVIEW Advanced Signal Processing Toolkit . LabVIEW Report Generation Toolkit for Microsoft Office LabVIEW Database Connectivity Toolkit LabVIEW DataFinder Toolkit LabVIEW S

in LabVIEW Object-Oriented Design & Programming in LabVIEW LabVIEW Learning Path LabVIEW Core 1 LabVIEW Getting Started LabVIEW LabVIEW Core 3 Core 2. Student Guide x ni.com C.What You Need to Get Started Befor

of the LabVIEW Arduino interface. What this book covers Chapter 1, Welcome to LabVIEW and Arduino, introduces you to the Arduino platform and the LabVIEW software. Chapter 2, Getting Started with the LabVIEW Interface for Arduino, shows you how to install and use the LabVIEW interface for Arduino via the LINX module.

Actor-Oriented Design in LabVIEW LabVIEW NXG Options LabVIEW NXG Core 1 LabVIEW NXG Core 2 Transitioning to LabVIEW NXG Proficiency Events LabVIEW Developer Days CLD Summit . This learning path is for users developing embedded control and monitoring systems to design smart machines or industrial equipment. It presents courses, exams, and .

Density (PSD), displaying the level of stress and LabVIEW Interface for Arduino (LIFA). Fig. 6. The overall LabVIEW programming for the study B. Graphical User Interface The graphical user interface (GUI) is designed in LabVIEW to help user to communicate with the LabVIEW and display the results. Fig. 7 describes the overall LabVIEW GUI of the