NI LabVIEW Getting Started

Real-time module

Advertisement

Quick Links

Getting Started with the
LabVIEW Real-Time Module
Contents

Launching LabVIEW and Exploring Documentation

FieldPoint™, LabVIEW™, National Instruments™, NI™, ni.com™, and NI-DAQ™ are trademarks of National Instruments
Corporation. Product and company names mentioned herein are trademarks or trade names of their respective
companies. For patents covering National Instruments products, refer to the appropriate location: Help»Patents in your
software, the patents.txt file on your CD, or ni.com/patents.
ni. c o m
© 2003-2004 National Instruments Corp. All rights reserved.
This document provides steps to build a simple deterministic application
and references to programming examples and documentation for more
information as you build the application. Refer to the LabVIEW Real-Time
Module Release Notes for installation and configuration instructions. Refer
to the LabVIEW Real-Time Module User Manual for information about
programming deterministic applications using LabVIEW.
Launching LabVIEW and Exploring Documentation ............................ 1
Creating and Running a Deterministic Application ................................ 3
Creating the Control Loop ............................................................... 3
to the Control Loop ....................................................................... 4
Setting Priority of the VI to Time Critical ....................................... 6
Adding Timing to the Control Loop ................................................ 6
Sending Data Out of the Time-Critical VI....................................... 7
Downloading and Running the Application .................................... 9
Optimizing the Control Application ....................................................... 11
The LabVIEW Real-Time Module includes a comprehensive
documentation set designed to help you create deterministic applications.
The LabVIEW Real-Time Module Bookshelf, available by selecting
Help»Search the Real-Time Module Bookshelf from LabVIEW,
is a PDF that contains links to and descriptions of the available
Real-Time Module documentation.
1.
Launch LabVIEW to open the LabVIEW dialog box shown in
Figure 1.
2.
Open and explore the LabVIEW Real-Time Module Bookshelf.
Printed in Ireland.
April 2004
323525B-01

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LabVIEW and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for NI LabVIEW

  • Page 1: Table Of Contents

    Figure 1. Open and explore the LabVIEW Real-Time Module Bookshelf. April 2004 FieldPoint™, LabVIEW™, National Instruments™, NI™, ni.com™, and NI-DAQ™ are trademarks of National Instruments Corporation. Product and company names mentioned herein are trademarks or trade names of their respective 323525B-01 companies.
  • Page 2 LabVIEW Help. The RT Module allows you to select the host computer or an RT target as an execution target to run VIs built in LabVIEW. The LabVIEW dialog box indicates the current execution target. The default execution target is the development computer, or host computer.
  • Page 3: Creating And Running A Deterministic Application

    RT targets. Open a blank VI and display the block diagram. Place a While Loop on the block diagram. Refer to the LabVIEW User Manual for information about using While Loops. Right-click the conditional terminal and select Create Control from the shortcut menu to create and wire a Stop button control to the conditional terminal.
  • Page 4: Adding Analog Input/Output And Data Processing To The Control Loop

    (FieldPoint) the FP Write VI. Create a control for the task/channel in input of the DAQmx Write VI and select an NI-DAQmx task. Refer to step 3 for information about creating an NI-DAQmx task using the DAQ Assistant. (FieldPoint) Create a control for the FieldPoint IO Point In input of the FP Write VI.
  • Page 5 Figure 2. NI-DAQmx Control Loop The block diagram for a FieldPoint I/O system should look similar to Figure 3. Figure 3. FieldPoint Control Loop © National Instruments Corporation Getting Started with the LabVIEW Real-Time Module...
  • Page 6: Setting Priority Of The Vi To Time Critical

    The VI reads analog data and sends the data to the PID VI. The PID VI processes the data using a PID control algorithm. The VI returns the results to the device. Refer to the LabVIEW PID Control Toolset User Manual for information about using PID VIs.
  • Page 7: Sending Data Out Of The Time-Critical Vi

    VI on the RT target can receive data from the First PID Control VI using Real-Time FIFOs and then use network communication methods to update the host computer VI. Refer to the LabVIEW Real-Time Module User Manual for information about using the Real-Time FIFO VIs.
  • Page 8 Right-click the While Loop and select Add Shift Register from the shortcut menu. Use While Loop shift registers to pass data from one iteration to the next. Refer to the LabVIEW User Manual for information about using shift registers. Wire the rt fifo output of the RTFIFOCreate VI to the left terminal of the shift register and then wire the terminal to the rt fifo input of RTFIFORead VI.
  • Page 9: Downloading And Running The Application

    Notice that the thumbtack for RT Engine - Normal Priority Loop (TCP Comm) VI is in the horizontal position, shown at left, indicating that you have not downloaded the VI to the RT target. © National Instruments Corporation Getting Started with the LabVIEW Real-Time Module...
  • Page 10 VI to the RT target. Click the Run button. LabVIEW runs the VI on the RT target. Select File»Exit without closing RT Engine VIs to close LabVIEW on the host computer while continuing to run the VIs on the RT target.
  • Page 11: Optimizing The Control Application

    Refer to the NI-DAQmx Help for information about timing control loops using the DAQmx - Data Acquisition VIs. Refer to the LabVIEW Real-Time Module User Manual for information about optimizing VIs for deterministic performance.

Table of Contents