Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI MAX, analog output task: continuous sampling aborts

I am trying to perform continuous output sampling using the NI-DAQ device PCI-6289 (named "Dev1"; output 'ao3') in Measurement & Automation Explorer 5.5 installed together with the device driver package NI-DAQmx 9.8. I am doing this using an Analog Output (Voltage) task set up within MAX. The sampling rate is set to its maximal value of 1 MHz, and I am using only a few samples (see the attached snapshot). Triggering and Advanced Timing is not changed, so the default configuration is used. The problem is now that the Samples to Write (12 in the snapshot) are output once only rather than repeatedly due to the selected Generation Mode 'Continuous Samples', but no error message appears. When I increase the Samples to Write to 16, continuous output is generated.

When I try the same in LabVIEW (2013) using DAQmx VIs, I receive the error -200018 ("DAC conversion attempted before data to be converted was available."). Therefore, the behaviour of MAX appears like a bug to me, it seems that errors reported by the DAQmx driver may be ignored.

0 Kudos
Message 1 of 7
(3,703 Views)

Hi,

 

first of all: Where did you confirm that you don't get continuous output? What is the receiver of your signal? Only because the curve in MAX doesn't move, doesn't mean that no continous output is generated. So please confirm that with e.g. a scope or another analog input that you have wired. You can use the testpanels in MAX if you don't want to create a second task.

Also I think, the error you get in LabVIEW has another cause. I can't confirm the error with your settings. Did you use an example program here?

 

Best,

Anna

Anna

Anna Vogl
Certified LabVIEW Developer
0 Kudos
Message 2 of 7
(3,637 Views)

Hello,

I did verify the output signal with an oscilloscope, of course (I should have mentioned that). There is no graph in MAX to move, because MAX simply displays one period of the signal to generate, independent on the sampling mode (finite/continuous).

Unfortunately, you cannot generate rectangular signals with a Test Panel in MAX.

I believe the error in LabVIEW is linked to the issue, because it appears only in constellations (too few samples) where the signal output in MAX fails (interrupts). With a number of 16 samples, output works with both MAX and LabVIEW; with less samples, both MAX and LabVIEW aborts output (with LabVIEW showing the error message, but MAX showing none).

Cheers!

0 Kudos
Message 3 of 7
(3,634 Views)

Hi,

yes, that is what I meant.

If you didn't have scope to verify the behaviour, you could have connected the output to an input of the device and read that with the testpanels. I didn't mean that you should generate a signal with  testpanels. But since you do have a scope there is no need to do that.

 

Even with your posted example I can't reproduce the error. I am currently using a simulated device but errors like this should appear anyway. The other difference is that I use newer versions of LabVIEW and DAQmx (2016). When you select the highlight mode in your blockdiagram, where exactly is the error thrown?

Best,

 

Anna

Anna Vogl
Certified LabVIEW Developer
0 Kudos
Message 4 of 7
(3,623 Views)

Ah yes, using the Test Panel as scope replacement, that is what you meant... sorry for confusion!

The VI "DAQmx Stop Task" is the one throwing the said error.

Perhaps the issue has been fixed for newer software versions meanwhile?

0 Kudos
Message 5 of 7
(3,619 Views)

Yes, that could be a possiblity. Maybe you can try to simulate the device in MAX and see if an error occurs there. Or you can upgrade to newer SW?

Anna Vogl
Certified LabVIEW Developer
0 Kudos
Message 6 of 7
(3,616 Views)

Hi Anna,

with a simulated device of the same type, LabVIEW does not throw an error...

 

0 Kudos
Message 7 of 7
(3,612 Views)