Example Code

Open Contacts Support for NI-9219 with CompactDAQ (DAQmx)

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Hardware

  • Data Acquisition (DAQ)

    Software

  • LabVIEW

    Driver

  • NI DAQmx

Code and Documents

Attachment

 

Overview

This example shows how to judge the input circuit if there is a load being connected.

 

Description

This code can be implemented in software as it is simply defined as a 2-wire resistance measurement using a 1kohm range. If the reading is railed (greater than 1kOHM), then you know the inputs are open, otherwise there is a load connected between the two inputs.

 

Requirements

 Software

  •    LabVIEW 2012 or compatible
  •    NI-DAQmx 9.5.5 or compatible

 Hardware

  •    NI 9219
  •    NI cDAQ-9178

 Steps to Implement or Execute Code

  1.Configure the following settings in the block diagram:

   (1)Select the physical channel.

   (2)Set the limit values and sample rate.

  2.Run the VI

  3.Check the result.

搜狗截图16年12月25日1754_5.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Charley Dahan

Global Account Manager

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

Comments
Todd S.
NI Employee (retired)
on

Thanks for posting.  Could you include a screen shot or two to give us an idea of what the code looks like?

Todd S.
LabVIEW Community Manager
National Instruments