Example Code

Starting and Stopping Multiple DAQmx Tasks

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.

    Driver

  • NI DAQmx

Code and Documents

Attachment

Download All

Overview

Multiple DAQmx tasks to be started and stopped at will.

 

Description

 

This code uses a combination of the Producer-Consumer, UI Event Handler, and Standard State Machine architectures to start and stop two DAQmx Tasks on different channels, independent of one another

 

You can press the "start" and "stop" buttons on the front panel to control the tasks individually, running them together in parallel or separately as you please.

 

Requirements

Software

LabVIEW 2012 or compatible

 

Steps to Implement or Execute Code

  1. Download and Unzip file
  2. Either create a simulated DAQ device or connect to one you already have
  3. Change the "Physical Channel" inputs on the DAQmx Create Virtual Channel VIs to match the channels on your (real or simulated) device
  4. Run the code

Hardware

MAX or any Analog Input device

 

 

 

Chiara A
Applications Engineer with NI UK & Ireland

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

Comments
PrimaryKey
NI Employee (retired)
on

You seem to forgot to attach the file

Piotr Kruczkowski
Certified TestStand Architect
Certified LabVIEW Architect
chiara.a
NI Employee (retired)
on

Oops!  Thank you!  I must have been a bit absent minded that day.

Chiara A
Applications Engineer with NI UK & Ireland
cramfulSAI
Member
Member
on

Hi,

I an using Labview 2012 (version 12.0f3, 32 bit) and cannot open your code.  Could you please save it for my Labview version?

I need to acquire data on multiple channels simultaneously using a 9205.

Best regards

Chundra

=======