Example Code

Read Write Digital Port - DAQmx ANSI C

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.

    Software

  • Other

    Driver

  • NI DAQmx

Code and Documents

Attachment

Overview
The example demonstrates how to read and write digital port using DAQmx ANSI C

Description:
This example creates two DAQmx tasks that read and write to digital ports simultaneously. It can be configured to read and write to the same port, as long as the lines are different in each DAQmx task. This example combines techniques from the ANSI C examples Read Dig Port and Write Dig Port examples that ship with DAQmx.

Requirements
Software
ANSI C

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

National Instruments

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