Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple DAQmx task

I am trying to write a simple, for now, DAQmx task using either the API or measurement studio. My goal is to collect N samples (currently i am trying for 2, though eventually it will be a few thousand) from a DAQmx board, starting when I see a rising hardware trigger. This seems simple enough so I am reluctant to post this question. I have been looking through the samples and trying to play with measurement studio, but on each test I get an error (after however long i've set the time out) that not enough data was read? My guess is that I don't have the trigger set up properly, is that correct? Is there an example that does this that I can look at?
 
Thanks,
-Bill
0 Kudos
Message 1 of 3
(3,305 Views)

Hi,

Let me first point you to the examples, they should be located accordingly to this knowledge base: NI-DAQmx, NI-VISA and NI-488.2 .NET Example Locations.  Take a look at these examples, specifically AcqVoltageSamples_IntClk, this will use the internatl clock of the card. I made sure this example runs, so you should be able to open the c# or VB versions of it and press start.

Let me know if helps



Message Edited by Jaime F on 01-22-2008 03:17 PM
Jaime Hoffiz
National Instruments
Product Expert
0 Kudos
Message 2 of 3
(3,293 Views)
Bill -
 
As Jamie pointed out, the examples are one good place to start to see how to use the API.
 
If you have Measurement Studio, another good place to start is with the tools that Measurement Studio integrates into the Visual Studio environment. These tools are specifically intended to help you get started with including DAQmx functionality in your programs. They generate code to configure a task, read data from the task, and display the data on a UI.
 
I've provided some links to applicable documentation, below. These links require you to have the Measurement Studio help installed on your machine to work.
 
If you are using Measurement Studio with Visual Studio 2005:
Topics on using the integrated tools:
 
Topic on using the class library from scratch:
 
If you are using Measurement Studio with Visual Studio 2003:
Topics on using the integrated tools:
 
Topic on using the class library from scratch:
 
Let us know if you have further questions.
 
David Rohacek
National Instruments
0 Kudos
Message 3 of 3
(3,280 Views)