Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

New to NI-DAQmx? Check out the new Getting Started with NI-DAQmx Series!

I like the hardware damage sugestion.  I can't tell you how many time I have worked on a test system and when wierd thing are going on it usually is the hardware.  Contrary to most bosses, customers, and hardware installers.

I think it's a HARDWARE problem, software works fine 😉

Dan (A software guy)

Dan Shangraw, P.E.


   

0 Kudos
Message 31 of 35
(2,675 Views)
Hi,
My name is aymen. I m using Labview  8.5 to generate a special waveform.We are using a Multifunction DAQ USB 6211.I have downloaded the instrument drivers. The device is now detected when plugged in. (I must say, I m new to NI DAQ..)
 
Then, I added the DAQ assistant VI to my Labview code.
I thought as he help is saying: it creates the task.
 
My purpose is to generate a continues special waveform.
SO, my LABVIEW code generates that waveform, still working in the generation part using the DAQ.
 
I thought by adding the DAQ ASSISTANT VI to my Labview code, the generation will be automatic.
But when running I got this message:
 
Error -200802 occurred at DAQmx Write (Analog 1D Wfm NChan NSamp).vi:2
 
Possible reason(s):
Measurements: Write cannot be performed when the task is not started, the auto start input to DAQmx Write is false, the Sample Timing Type is something other than On Demand, and the output buffer size is zero.
Call DAQmx Start before DAQmx Write, set auto start to true, modify the Sample Timing Type, or change the output buffer size.
Task Name: _unnamedTask
 
 
I took a look inside the DAQ ASSISTANT VI, block diagram, and it seems ot me that it has the starting and the writing part!!!!
 
SO, I can not understand the problem..
Am I using the DAQ ASSISTANT in a correct way!!!
 
I ll appreciate anyhelp, any idea, any suggestions.
Thanks a lot, thanks NI
 
0 Kudos
Message 32 of 35
(2,649 Views)
Here is the labview file.

I expanded the DAQ ASSISTANT and I tried to changed!!
I m not sure if it is in the correct way, But I fixed some of the problemslike the auto start and the buffer size, but I got a new message:

Error -200479 occurred at DAQmx Start Task.vi:2

Possible reason(s):

Measurements: Specified operation cannot be performed while the task is running.

Task Name: _unnamedTask<D0>

Thank you for any comment




0 Kudos
Message 33 of 35
(2,635 Views)
// Also, I didn't realize until now that you are saying the DAQmx event callback is also slower than Traditional DAQ.

Well... in my tests, it was slower. Much slower.
I did a test also using the counter and a callback to use as a "clock" just incrementing a variable which was monitored through a 500 ms timer interval to make things very simple. And the max frequency it was able to work was 2 - 3 times slower than the Traditional in a AMD true 2GHz machine.
It was so bad that I discarded using callbacks for fast repeated working while in the Trad. it worked very well.

//
Hardware timed single point is specifically designed with low latency to support reading one sample at a time.

Latency is not our issue.
Continuous real time fast acquisition is, with progress display (and saving in disk) of results for FOUR acquisitions engines (2 channels each) at same time.

/* You can use a linear function to scale the results returned by the BinaryI16 read.  The values will be approximately correct; however, I would recommend using the scaling coefficients, if possible, if your application requires accuracy.  The fact that the scaling coefficients are polynomial is a result of the MCal algorithm we use on M-Series.  The polynomial coefficients help compensate for small non-linearities across the range of the ADC, which when applied correctly, result in more accurate measurements. */

This is new stuff for me... I did not read it in the documentation. Or, I did not find it.
I read about custom scales and I supposed that the binary reads were linear!
But if I understood, you are talking about internal scaling coefficients not applied when we use the Binary reads and used when we use the scaled Analog reads.
We do not use the scaled Analog reads because they are slow. As you see, we are always looking for the fastest approach. The scalling calculations we can do later, through threads for processing and displaying, instead of when getting the data in the time-critical callback.

But now I need to know what are these internal scalling coefficients ! HOW I get them?

LMP

0 Kudos
Message 34 of 35
(2,627 Views)

Merlin-3,

In a few select things Traditional DAQ may have been faster that NI-DAQmx.  However, in many areas, such as single point AI reads NI-DAQmx is much faster.  Furthermore, we are actively developing NI-DAQmx and we are actively working toward improving the performance.  In general the code paths in NI-DAQmx are much simpler than Traditional NI-DAQ.  NI-DAQmx was developed from the ground up with a focus on simplifying code paths, where Traditional NI-DAQ was the result of years of adding features here and there.  It was an excellent driver for its time, but it became apparent that we could not move forward without making some pretty significant modifications to the architecture (a.k.a. NI-DAQmx).  As we continue to develop NI-DAQmx we will continue to work on performance.

To answer your question about scaling coefficients, you can get them using a DAQmx Channel Property node.  After placing the property node the property is located at Analog Input >> General Properties >> Advanced >> Device Scaling Coefficients >> Device Scaling Coefficients.  If you are developing in C you can get the coefficients with a call similar to the following:

float64 coefficients[100];
unsigned int arraySizeInSamps = 1000;
DAQmxGetAIScalingCoeff( taskHandle, "DevX/ai0", coefficients, arraySizeInSamps );

The MCal calibration is discussed in the following Developer Zone Document:

New NI-MCal Calibration Methodology Improves Measurement Accuracy

Let me know if you have any further questions, although I think it may be better to start a new thread since this one has severely wandered off topic.

Regards,

Neil S.
Multifunction DAQ
Product Support Engineer
National Instruments

 
0 Kudos
Message 35 of 35
(2,621 Views)