Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

1 sample at a time with NI-4461

Solved!
Go to solution

I'm trying to perform single voltage value ejection in a loop with NI-4461 PCI-card.

It seems to me that the straightforward way to this is to set the output buffer size to 1 and make the card wait for my program to generate the next value. But it turned out that while this works, the buffer size has great impact on the performance: if I set the sample rate to 204800 and small buffer size (2 Samples) one of the kernels of my CPU is loaded at almost 100%, when the buffer size is 200 the processor load is near zero most of the time except periodical bursts (every 80-90 seconds). I would like to know what is going on and what is the proper way to rerform the task.

0 Kudos
Message 1 of 11
(4,960 Views)

What is the frequency of the signal that you are trying to generate? Are you using LabVIEW and DAQmx?

------

"A VI inside a Class is worth hundreds in the bush"
യവന്‍ പുലിയാണു കേട്ടാ!!!
0 Kudos
Message 2 of 11
(4,945 Views)
I am using LabVIEW 2009 and DAQmx. The frequency I need is not stated firmly but now it is necessarily below 1kHz the inner time source of LabVIEW. I am trying to make feedback system controled by device with slightly non-periodic sampling. The average delay is about 6 ms.
0 Kudos
Message 3 of 11
(4,936 Views)

Try this:

4461 Dc output.png

Regards,

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 4 of 11
(4,930 Views)
Thank you for the answer but the diagram does not work with my device. You can see almost identical diagram in my attachment along with the error message it produce. For this code to work one should add one more property node setting the buffer size contrary to the DAQmx documentation that says that the buffer size is calculated from the sampling rate and the number of samples set by the Timing.vi. But while I can make my program to run I can not understand what it is doing. At what instant values go through the buffer to output, what are these values (I should set some buffer size while I placed to it only one value)?
0 Kudos
Message 5 of 11
(4,925 Views)

Hi,

 

just use a DAQmx Configure Output Buffer.vi.

 

See this KB for more information:

Why Am I Getting Error -200609 or Error -200802?

 

Regards,

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 6 of 11
(4,919 Views)

Thanks for the usefull link, now I know why the buffer size was not set automatically.

But what values are in the buffer? When will I see the last value at the output?

 

0 Kudos
Message 7 of 11
(4,915 Views)

Hi,

 

since the card has  a delta-sigma converter it might not be the best choice for DC output, see here, but you can create an Array of two DBL values and write that to the buffer.

 

Regards,

Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 8 of 11
(4,907 Views)

Thank you for reply I can now figure out what is inside the device but I need some details concerning the API.

 

Assume I set the buffer size to 2, choose Allow Regeneration and Continuous Samples.

The on-board buffer size is 2047.

I send data as 2-element arrays in a loop.

 

Then what goes out the on-board buffer to the output?

2045 zeroes and two values from my data-array repeated untill I send new data?

Or may be on-board  buffer fills gradually receiving data and ever longer non-zero trains go out?

 

0 Kudos
Message 9 of 11
(4,872 Views)
Solution
Accepted by topic author Gastarbeiter

If you set the buffer size to 2, only the 2 samples you wrote are repeated until you overwrite those values. Just take the measurement with your 4461.

 

For exact information about the 4461 analog output, e.g. filter delay refer to the NI Dynamic Signal Acquisition User Manual, p. 2-12 ff.

 

Regards,

Message Edited by AndreasS on 11-16-2009 10:27 AM
Andreas Stark
LabVIEW Lead @ Rocket Factory Augsburg
0 Kudos
Message 10 of 11
(4,848 Views)