Skip to content Skip to navigation

Connexions

You are here: Home » Content » Analog Output

Navigation

Content Actions

  • Download module PDF
  • Add to ...
    Add the module to:
    • My Favorites
    • A lens
    • An external social bookmarking service
    • My Favorites (What is 'My Favorites'?)
      'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.
    • A lens (What is a lens?)

      Definition of a lens

      Lenses

      A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

      What is in a lens?

      Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

      Who can create a lens?

      Any individual Connexions member, a community, or a respected organization.

    • External bookmarks
  • E-mail the author

Lenses

What is a lens?

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

This content is ...

Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
  • National Instruments

    This module is included in aLens by: National InstrumentsAs a part of collection:"LabVIEW Graphical Programming Course"

    Comments:

    "A full introductory course on programming with LabVIEW."

    Click the "National Instruments" link to see all content affiliated with them.

Recently Viewed

This feature requires Javascript to be enabled.

Tags

(What is a tag?)

These tags come from the endorsement, affiliation, and other lenses that include this content.

Analog Output

Module by: National Instruments

Summary: In this lesson, you will learn how to perform analog output.

Use analog output to perform digital-to-analog (D/A) conversions. The available analog output types for a task are voltage and current.

Figure 1
Figure 1 (MAXAOMeasType.png)

To perform a voltage or current task, a compatible device must be installed that can generate that form of signal.

Task Timing

When performing analog output, the task can be timed to Generate 1 Sample, Generate n Samples, or Generate Continuously.

Generate 1 Sample

Use single updates if the signal level is more important than the generation rate. For example, generate one sample at a time if you need to generate a constant, or DC, signal. You can use software timing to control when the device generates a signal.

This operation does not require any buffering or hardware timing. For example, if you need to generate a known voltage to stimulate a device, a single update would be an appropriate task.

Generate n Samples

One way to generate multiple samples for one or more channels is to generate single samples in a repetitive manner. However, generating a single data sample on one or more channels over and over is inefficient and time consuming. Moreover, you do not have accurate control over the time between each sample or channel. Instead, you can use hardware timing, which uses a buffer in computer memory to generate samples more efficiently.

You can use software timing or hardware timing to control when a signal is generated. With software timing, the rate at which the samples are generated is determined by the software and operating system instead of by the measurement device. With hardware timing, a TTL signal, such as a clock on the device, controls the rate of generation. A hardware clock can run much faster than a software loop. A hardware clock is also more accurate than a software loop.

Note:

Some devices do not support hardware timing. Consult the device documentation if you are unsure if the device supports hardware timing.

Programmatically, you need to include the timing function, specifying the sample rate and the sample mode (finite). As with other functions, you can generate multiple samples for a single channel or multiple channels.

Use Generate nn Samples if you want to generate a finite time-varying signal, such as an AC sine wave.

Generate Continuously

Continuous generation is similar to Generate nn Samples, except that an event must occur to stop the generation. If you want to continuously generate signals, such as generating a non-finite AC sine wave, set the timing mode to continuous.

Task Triggering

When a device controlled by NI-DAQmx does something, it performs an action. Two very common actions are producing a sample and starting a generation. Every NI-DAQmx action needs a stimulus or cause. When the stimulus occurs, the action is performed. Causes for actions are called triggers. The start trigger starts the generation. The reference trigger is not supported for analog output tasks.

Comments, questions, feedback, criticisms?

Send feedback