Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Using C#, how to use Digital Output as trigger for Analog input?

I want to connection one line of Digital Output Port to one PFI of this Port using wire.

 

So the PFI can get the Digital output signal.

 

And then use this PFI as the trigger signal for saving one sample Analog Input into device Buffer.

 

After maybe 100 readings, read the data from device to PC.

 

Is that possible?

 

0 Kudos
Message 1 of 2
(4,085 Views)

Hi,

 

So to answer your questions:

 

Yes you are able to connect a Digital Output line to a PFI line in order to use it as a trigger for your Analog Acquisition.

 

Yes you are able to acquire analog signals into the hardware buffer, and by configuring a Continuous Acquisition you are able to specify to read a number of samples from the buffer at any time.

So if you are acquiring samples at a rate of 1kHz and specify to read 100 samples from the buffer into a graph, then your graph will be updated every 0.1seconds.

 

Examples for doing this in C# can be found by navigating to C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0

 

There is also a useful help file which can be found by navigating to Start>>All Programs>>National Instruments>>NI-DAQ>>NI-DAQmx .NET Framework 2.0 Help

 

Hope this Helps.

 

Regards,

 

Steve

0 Kudos
Message 2 of 2
(4,061 Views)