From 08:00 PM CDT Friday, August 12 - 01:00 PM CDT Saturday, August 13, will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

DAQmx question

I am using a PCI-6731 to output an array of voltages. The ao/StartTrigger is used to trigger an AI scan on a PCI-4472 board and generate a pulse on the 6731 clock output. The driver is NI-DAQmx version 7.3.1

I need to change the AO from an array of voltages to a single voltage, but am having difficulty. Can someone show me how to change the DAQmx to Analog/single channel/single sample/DBL while maintaining the triggering? I am attaching the vi.


0 Kudos
Message 1 of 4
The control labelled AO Samples per Buffer is wired to the Samples per Channel input of the timing VI for your AO task. This input does not determine the buffer size. If your ao task is finite, this input determines how many points are generated before the task stops. If your task is continuous, I think this input is ignored. Since you are not setting the Sample Mode for your ao task, you are getting the default behavior of a finite task. Is that what you want?

Unless you configure it explicitly using the Configure Output, your ao buffer size is determined by the amount of data you write before starting your task. If you want to generate a 'single point' and preserve the triggering, you need to make a small buffer of that single value. I think the minimum size for an analog output buffer is two points.
0 Kudos
Message 2 of 4

Thanks for the response.

To answer your question, I am using a finite amount of data. I am currently using this vi in an application with favorable results. I now need to create a variation of the same vi, the only change being that I need to output a single voltage as opposed to an array of voltages.

If I put a single value in a two point buffer, what should the ao sample rate be, and what effect will it have on the readings in the ai scan?

0 Kudos
Message 3 of 4
Ordinarily, when you want to generate a DC voltage you just use an On Demand (no hardware timing) task. That means you don't use the Timing VI at all. However, since you want to use the ao/StartTrigger to trigger the AI task, you must use hardware timing so that there will be a ao start trigger pulse. Since you must call the Timing VI you must set a sample rate. Unless you are using the ao/SampleClock to time something else, it doesn't matter what sample rate you choose. Just use the default of 1000. Unless you are using the ao/SampleClock to time your ai scan, it will have no effect on your ai scan. You can leave the sample mode on the ao timing vi to finite. But be aware that the samples per channel input on the ao timing vi will determine how many times the data in your 2 point buffer is generated. The default is 1000. This would write out the same value to the ao channel 1000 times. Again, this is probably harmless. But you could just as well set this input to 2, which is the minimum.
Message 4 of 4