Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help about using PCI-6221 and C# to control three Digital Port and one Analog input

Solved!
Go to solution

I need to send digital output to three ports and then read an analog voltage from Analog input by using PCI-6221.

 

I made a C# program to control it. I built four tasks in total. Three tasks for three digital output ports, and one task for analog input.

 

How can I reduce the time?

 

Using my method, it takes 3.3ms in total. And it is slow.

 

Can I build only one task for three DO ports?

 

What is the best way to control task to reduce communication time with PC ?

 

Is that possible to save a lot of analog input reading in DAQ device's memory, and then read it all together from computer to reduce time consumption?

 

 

One million thanks!

 

Jin

0 Kudos
Message 1 of 2
(3,900 Views)
Solution
Accepted by timinmanchester

Hi Jin,

 

To answer your questions, yes you are able to configure one Digital Output Task to use three output ports, and the PCI-6221 does have an onboard FIFO memory buffer of 4095 samples.

 

I would like to direct you to the NI-DAQmx example files for C# which can be found at the following location on your machine

 

C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DotNET2.0

 

In this location you will find prewritten examples in C# which should give you a good idea of how to go about architecting your code to achieve the results that you require.

 

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

 

I hope this response is helpful.

 

Best Regards

 

Steve H

Message Edited by StevenH on 11-19-2008 02:56 PM
Message Edited by StevenH on 11-19-2008 02:56 PM
0 Kudos
Message 2 of 2
(3,886 Views)