Skip to content Skip to navigation

Connexions

You are here: Home » Content » Digital Example VI

Navigation

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.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

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 display tagshide tags

    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.

    Click the tag icon tag icon to display tags associated with this content.

Also in these lenses

  • eScience, eResearch and Computational Problem Solving

    This module is included inLens: eScience, eResearch and Computational Problem Solving
    By: Jan E. OdegardAs a part of collection:"LabVIEW Graphical Programming Course"

    Click the "eScience, eResearch and Computational Problem Solving" link to see all content selected in this lens.

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.

Digital Example VI

Module by: National Instruments. E-mail the author

User rating (How does the rating system work?)
Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

:
(0 ratings)

Summary: In this exercise, the objective is to control the digital I/O lines on the DAQ device. Complete the following steps to complete a VI that turns on the LEDs of Port 0 on the DAQ Signal Accessory based on the digital value set on the front panel. Each LED is wired to a digital line on the DAQ device. The lines are numbered 0, 1, 2, and 3, starting with the LED on the right.

Exercise 1

Note:

The LEDs use negative logic. That is, writing a 1 to the LED digital line turns off the LED. Writing a 0 to the LED digital line turns on the LED.
  1. Open the Digital Example VI, located in the C:\Exercises\LabVIEW Basics I directory, and modify the block diagram as shown in Figure 1.
    Figure 1
    Figure 1 (digitalexamplebd.png)
    DAQAssistantIcon.png Place the DAQ Assistant Express VI, located on the Functions>>Input palette, in the While Loop. Complete the following steps to configure the counter to perform event counting.
    1. Select Digital I/O>>Port Output for the measurement to make.
    2. Select Dev1>>port0 for the physical channel and click the Finish button.
    3. In the Digital Output Port Task Configuration dialog box that appears, select Invert All Lines In Port because the LEDs use negative logic.
    4. Click the OK button to close the configuration dialog box. All of the settings specified for the task are saved internally in the DAQ Assistant VI.
    BuildArrayicon.png Place the Build Array function, located on the Functions>>All Functions>>Array palette, on the block diagram. Wire the Build Array function to the DAQ Assistant. Complete the wiring of the block diagram. The Boolean buttons on the front panel are stored in an array to simplify the code. The Array Subset function extracts only the first four elements in the array. The output of the array subset needs to be reversed because element 0 of the array is the most significant bit. The array is then converted to a number with the Boolean Array to Number function, and converted into an array of one element. This value is passed to the DAQ Assistant Express VI to write that value to the port.
  2. Save the VI.
  3. Display the front panel and run the VI. Turn the Boolean LEDs on and off and observe the changes on the DAQ Signal Accessory.
  4. Stop and close the VI.

Content actions

Give Feedback:

E-mail the module author | Rate module ( How does the rating system work?)

Rating system

Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

(0 ratings)

Download:

Add module to:

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 (?)

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.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks