Using Pmod SubVIs

0

LINX currently has 12 Pmod SubVIs; each SubVI has it’s own example VI to help you use it. Currently, myself and a few other interns are working to create SubVIs for as many Pmods as possible. Below is a tutorial with instructions for using Pmods in LabVIEW.

24210513074_d6a8bae83d_o

Overview

This guide will describe how to implement Digilent’s Pmod interfaces in LabVIEW. Digilent provides several SubVI’s that are designed to make implementing and using a Pmod on a microcontroller as straightforward as possible.


Prerequisites

Hardware

  • A LINX supported device (list of LINX supported devices found here)
  • USB Cables
  • A Digilent Pmod

Software

  • LabVIEW (install instructions not included)
  • NI_VISA (install instructions included)
  • LINX (install instructions included)

Tutorial

1. Install NI-VISA

1.1) Once you have LabVIEW installed you will need to install NI-VISA. NI-VISA is utilized by LINX in order to communicate with microcontrollers and other supported boards. The download has an installer that will guide you through the installation process.

kfvshlaf1435743453066674786


2. Install LINX

2.1) To connect with LabVIEW, LabVIEW MakerHub LINX is used. LINX provides multiple LabVIEW VIs ranging from a basic analog read to setting up different communication protocols and more. Download LabVIEW MakerHub LINX here by clicking on download from the attached page.

fkjxmclikikun4i-large

2.2) Click download toolkit after clicking download. This is a VI Package Manager link so click launch application to open the VI package manager. If this isn’t your first time with LabVIEW make sure to update your VIPM so the newest LINX builds can be shown.

screen-shot-2016-11-01-at-2-18-05-pm

2.3) Choose your version of LabVIEW in the upper left corner of the window that pops up and click install. The packages will be listed…just click next. Accept the license agreements. LINX will now be downloaded and installed. Once the installation is finished, restart LabVIEW and close all of the VIPM windows.


3. Add the Pmod SubVIs to your Block Diagram

3.1) From LabVIEW, open a new VI and press control+E to open the Block Diagram.

screen-shot-2016-11-02-at-12-27-33-pm

3.2) Right click to open the functions palette, then press the pin in the top left to pin it down and select MakerHub->LINX->Sensors->Pmods to view the Pmod SubVI’s.

screen-shot-2016-11-01-at-2-34-39-pm

3.3) Select the Pmod you want to use to see its Sub VI’s. Most contain an Open, Read and Close Sub VI.

screen-shot-2016-11-07-at-4-42-13-pm

Some only contain an Open and Read because a close is not required for that particular Pmod.


4. Find Pmod Example VI

4.1) Open the “NI Example Finder” by selecting Help->Find Examples.

screen-shot-2016-11-01-at-3-41-48-pm

4.2) Select the search tab in the top left corner and enter “LINX” into the search tab and press search. Scroll down, and you will see the examples for every Pmod that currently has a LINX Sub VI.
screen-shot-2016-11-01-at-2-31-14-pm

4.3) Select the example for the Pmod you are trying to use. A VI similar to the one above will appear.

screen-shot-2016-11-01-at-2-30-02-pm

Each example will include a short description along with instructions for using the Pmod.


Thank you for reading my blog post, and a copy of this tutorial is available on Hackster.io. Search “Pmods with SubVIs in LabVIEW” and it will have a link to that tutorial on their reference page. Check out LabVIEW MakerHub for more information about LINX and the ways you can use Pmods with LabVIEW. Please feel free to comment with any questions or comments you may have.

Share on FacebookTweet about this on TwitterShare on Google+Pin on PinterestShare on RedditShare on TumblrShare on LinkedInShare on StumbleUponEmail this to someone
Share.

About Author

Leave A Reply