11-18-2008 05:35 AM
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
Solved! Go to Solution.
11-19-2008 08:53 AM - edited 11-19-2008 08:56 AM
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