41
1 Data Acquisition Practical Session Antonios Vandoulakis Technical Sales Engineer [email protected] +30 210 80 61 307

Technical Sales Engineer [email protected] +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

1

Data Acquisition Practical Session

Antonios VandoulakisTechnical Sales Engineer

[email protected]

+30 210 80 61 307

Page 2: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

2

Agenda

• Brief introduction to NI and LabVIEW

o Exercise 1 – Working with LabVIEW

• Brief introduction to CompactDAQ architecture

o Exercise 2 – Taking measurements with CompactDAQ

• Overview on the graphical interface

o Exercise 3 – Programming structures in LabVIEW

o Exercise 4 – Acquire different signals simultaneously

• Resources for your application

• Questions and comments

Page 3: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

3

National Instruments and LabVIEW

Page 4: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

4

National Instruments at a Glance

• Leaders in Computer-Based Measurement and Automation

• Long-term Track Record of Growth and Profitability

• Record Revenue: $1.14B in 2013

• Fortune “100 Best Companies to Work For” eleven years in a row

• More than 6000 employees; operations in 40+ countries

• Founded in 1976 with focus on Instrument Control

• LabVIEW 1.0 released in 1986

NI HQ

Page 5: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

5

Virtual Instrumentation EverywhereMore than 30,000 companies annually, including>90% of Fortune 500 manufacturing companies

Page 6: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

6

What is LabVIEW?

• LabVIEW is a Programming Language such as C/C++,

Visual Basic, .NET, etc.

• Graphical programming

• For test and measurement and automatization

• Import libraries such as DLL, ActiveX

• Connects to Hardware I/O

• Manage features of O.S. (multicore, etc.)

Page 7: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

Graphical System DesignA platform-based approach for measurement and control

Applications

Deployable Targets

Commercial Technology

Models of Computation, User Interface

Math and Analysis

Measurement and Control I/O

Timing

Page 8: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

Graphical System DesignA platform-based approach for measurement and control

Page 10: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

15

The LabVIEW Environment“VI” = program or function

“Front Panel” = user interface “Block Diagram” = code

Page 11: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

17

Controls & Indicators

• Knobs/Dials

• Graphs/Charts

• Buttons

• Digital Displays

• Sliders

• Thermometers

• Customize and

create your own

Page 12: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

19

Functions and Express VIs

Configuration BasedExpress VI

Standard VIs

Page 13: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

20

Dataflow Programming

1

2

3

Comparison waits until all inputs are present, then executes

Once executed, output from comparison continues through code

Both Simulate Signal Express VIs execute simultaneously

1 2 3

Page 14: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

21

Συλλογή Ανάλυση Παρουσίαση

Page 15: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

22

Analyze PresentAcquire Ανάλυση ΠαρουσίασηΣυλλογή

Page 16: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

23

Wires and Data Types

• Transfer data between block diagram objects through wires

• Wires are different colors, styles, and thicknesses, depending on their data types

• A broken wire appears as a dashed black line with a red X in the middle

23

Scalar1D Array2D Array

DBL Numeric Integer Numeric String

Page 17: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

25

Exercise 1: Create a simple VI in LabVIEW

What will we learn?

– Working with LabVIEW environment

Create an application that:

– Simulates a signal

– Calculate the RMS value

– Show the value in the front panel of LabVIEW

Page 18: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

26

Data Acquisition

with LabVIEW

Page 20: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

32

Measuring Analog Input Signals

• Architecture

multiplexed

simultaneous sampling

• Sampling rate

• Resolution

• Signal conditioning

Analog Input

To PC

Important Factors to Consider

Page 21: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

33

Analog Input – Architectures

Channel 0

Channel 1ADC

Channel 0

Channel 1

Simultaneous sampling

MUX

Multiplexed

AMP

ADC

Channel 0

Channel 1

ADC Channel 0

Channel 1

AMP

AMP

Interchannel delay

No interchannel delay

Page 22: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

35

NI CompactDAQ

Hi-Speed USB 2.0

Support more than 100 modules

Hot-swappable modules

Signal Connectivity

Integrated Signal Conditioning

Page 23: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

37

Exercise 2: Introduction to data acquisition

with LabVIEW

What will we learn

Take measurements using LabVIEW

and NI CompactDAQ

Create an application that :

Takes measurements from a

thermocouple and store

measurements into a file

Page 24: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

38

Measurement and Automation Explorer

(MAX)

Device

configuration

and connection

management

Built-in test panel

windowsDAQmx Task

creation

Signal connection

diagrams

Page 25: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

41

Programming in LabVIEW

Page 26: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

42

Controlling Program Execution

• Looping (For and While)

• Case structure

• Sequence structure

• State machines

• Event structure

• State diagram editor

• Timed loop

Is Limit

Met?

Turn On

Output

Yes

Reset

Output

No

Start

Page 27: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

43

LabVIEW Looping Basics

While Loop For Loop

Run until stop

condition metRun N times

Page 28: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

44

Exercise 3: Execution of a program

What will we learn

– How to create an application in

LabVIEW

Create an application that:

– Reads temperature from

Thermocouple/RTD

– Turn on/off digital lines

Page 29: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

45

Parallel Operations with LabVIEW

LabVIEW C*

(does not include code to generate UI)

LabVIEW C

Page 30: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

46

Parallel Operations in LabVIEW

Configuring and visualizing multiple tasks graphically is easier

Analog Output Loop

Analog Input Loop

Parallel loops automatically

take advantage of

multithreading and

multi-core processors for

higher performance

Page 31: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

47

Exercise 4: Multiple operations on analog input

channels

What will we learn

Create parallel operations with LabVIEW

Create an application based on

multiple tasks

Acquire Temperature Measurements

Acquire Acceleration Measurements

Page 32: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

48

Modules and Toolkits in LabVIEW

Page 34: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

51

Report Generation Toolkit for Microsoft Office

• Programmatically create and edit

reports in Microsoft Word and Excel

• Populate report templates

• Manage report layout, format, and

appearance

• E-mail reports and run macros

• Express VI included

Page 35: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

52

Database Connectivity Toolkit

• Insert, select data from OLE DB, ODBC databases

Microsoft Access, SQL Server, Oracle, etc.

• Create, drop tables

• Save records in XML format

• Execute SQL queries

Immediate, parameterized

• Execute stored procedures

• Accept, reject multiple operations (transactions)

Page 36: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

55

LabVIEW Touch Panel Module

Create custom human-machine interface (HMI) for Windows XP

Embedded and Windows CE Devices

NI TPC-2006

Page 37: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

57

• Build

LabVIEW-

based web

thin clients

• Monitor or

control from

your

smartphone

• Connect to

LabVIEW Web UI Builder

Page 38: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

58

NI Vision Development Module

• LabVIEW programming libraries for machine vision and image processing

• Includes Vision Assistant

Prototypes and benchmarks applications

Generates complete code for LabVIEW, Visual Basic, and C

• Hundreds of tools to:

Enhance images

Check for presence

Locate features

Identify parts

Measure objects

Page 39: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

59

Motion Control with LabVIEW

• NI Motion Assistant

Interactive environment with 3D visualization

Ready-to-run LabVIEW or C code creation

Easy trapezoidal or S-curve velocity profile implementation

Teach pendant for easy prototyping

• NI SoftMotion Controller for CANopen and IEEE 1394

Use LabVIEW and NI Motion Assistant to program distributed motion control applications

Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives from ORMEC

• NI SoftMotion Development Module

Develop custom motion controllers in LabVIEW Real-Time or LabVIEW FPGA

Use trajectory generation, spline interpolation, position, velocity control, and encoder implementation VIs

Page 40: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

60

Resources

Page 41: Technical Sales Engineer a.vandoulakis@metrisys.com +30 ... · distributed motion control applications Compatible with intelligent CANopen drives from Copley and IEEE 1394 drives

61

NI LabVIEW – Useful Links

What is LabVIEW: www.ni.com/labview/

Download LabVIEW: www.ni.com/labviewse/