Example Code

NI 272x Soft Front Panel

Code and Documents

Attachment

Download All

Overview

This VI will allow the user to get and set the resistance on an NI-272x device in a visible format similar to the Switches or Digital Multimeter Soft Front Panel.

Description

This application uses the DAQmx relay control API and therefore will not destroy any open NI 272x Sessions. These VIs were created because the NI-272x Reference VIs do not have a Soft Front Panel.


Steps to Implement or Execute Code

Run Code:

  1. Run "272x Soft Front Panel.exe"
  2. Click "Resistor Device Name" dropdown to select an NI-272x device
    • An error will occur if there are no NI-272x devices in the system
  3. See resistance values of each channel

Modify Current Resistance:

  1. Hit "Options>>Edit Resistance".
  2. Read warning and click "OK" to accept.
  3. Click resistor image of desired channel.
  4. Enter value into "Requested Resistance"
  5. Click "OK".
    • Invalid resistance values will result in an error.
  6. Resistance will be coerced to nearest settable value.

Reset Device:

  1. Hit "Options>>Reset Device".
  2. Read warning and click "OK" to accept.

Requirements

Software

  • NI 272x Reference VIs (Link)
  • LV 2012 Runtime Engine (Link)

Hardware

  • NI 272x Device (NI 2720, 2722, 2725, 2727)

Additional Images or Video

SFP.PNG


Frank,
National Instruments
Software Group Manager

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors