Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

usage of On Board FIFO for Analog output Generation

i would like to use Onboard memory for Analog Output Continous waveform Generation?
 
i am not quite sure how can we set on board memory for this?
 
I have to use ANSI C API's only(No Lab View)  and i am using NI 6229 PCI Card.
 
can any one suggest the way ?
 
0 Kudos
Message 1 of 4
(4,217 Views)
Hello Ganga,

There is the DAQmxSetAOUseOnlyOnBrdMem is a NI-DAQmx C Property which is discussed in the NI-DAQmx C Reference Help, which is installed with the NI-DAQmx driver under Program Files >> National Instruments >> NI-DAQ.  This function specifies whether to write samples directly to the inboard memory of the device, including data FIFOs, bypassing the memory buffer.  You will need to set this property and write your data before starting the task.  The default behavior is to regenerate the data written to the buffer, the different regeneration modes are discussed in this KnowledgeBase, if you want to change the default behavior the NI-DAQmx C Reference Help is a great resource.

Regards,
Micaela N
National Instruments
0 Kudos
Message 2 of 4
(4,210 Views)

Hi Micaela,

i am thankful for your suggestions.

i am having some doubts abt usage of DAQmxSetAOUseOnlyOnBrdMem . The prototype of function as below.

DAQmxSetAOUseOnlyOnBrdMem(TaskHandle taskHandle, const char channel[], bool32 data);

channel means pin on NI Card where we get the generated analog output?

what abt the data argument?what should we give for data?

we are putting triangular waveform samples in an array and then writing them  using DAQmxWriteAnalogF64 to which we send samples as one of the argument.

Then we are starting the task.

is it sufficient to select onboard memory using DAQmxSetAOUseOnlyOnBrdMem  and striaght away use DAQmxWriteAnalogF64?

or should we do anything other?

looking forward for your suggestions.

Ganga

 

0 Kudos
Message 3 of 4
(4,205 Views)
Hello Ganga,

The arguments for the char channel are in the form - "DevX/aoY" where X is your device number from Measurement and Automation Explorer and Y is the line number.  It's the same format as the physical channel argument use to create the AO channel.

The data argument is a boolean value - you will want to turn the property on or true.

You are right about the order of commands, you just need to set the UseOnlyOnBrdMem property and then you can use it directly with the DAQmxWrite function call.

Let me know if you have any other questions!
Micaela N
National Instruments
0 Kudos
Message 4 of 4
(4,184 Views)