Jump to content
  • 0

custom generated signal


ssm

Question

Dear Help,

I am trying to generate a custom signal, the values are stored in a file. 

I am trying to use the following function:

FDwfAnalogOutNodeDataSet(hdwf, 0, AnalogOutNodeCarrier, rgdSamples, 4096);

so the rgdSamples are taken from the file and passed to the function, is there a limit on the number of samples. I assume it has to match the buffer size? but then what is the buffer size?

The number of samples taken from the file can vary, so in case this number is higher than the buffer size, I will supply the samples in parts. 

is there a code sample for that? if not would you give me any remarks or comments on this,

thank you

ssm

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Hi @ssm

The FDwfAnalogOutNodeFunctionSet(..., funcCustom) mode is intended to generate a waveform pattern. The configured data is stretched to device buffer size (4k/4096).
You can use the FDwfDeviceConfigOpen(..., 2,...) to have 16k (16384) buffer size.
The specified frequency stands for the entire waveform frequency and not sample rate.

If you have less samples and you are interested in outputting samples-by-sample basis with defined sample-rate:
- you can pad your data up to the device buffer size, 4k/16k
- specify frequency as = sample-rate/buffer-size
- specify run length in seconds as samples/sample-rate and repeat 1 or multiple or 0 for infinite.

With the FDwfAnalogOutNodeFunctionSet(..., funcPlay) mode you can stream 'unlimited' samples at rate up to ~1Msps. The frequency represents sample rate.

 

Link to comment
Share on other sites

thank you for the reply,

probably I have to use the 16k buffer configuration,

what if I have more samples in the file than the buffer size? is there a way to pass the samples to the Wave Channel with rate > 1M. For instance a loop to pass the samples out in 4k portions. 

in the GUI interface, when importing a file it says the "Count" (please see attached), is there an equivalent setting when using c code?

Another issue, if I need to use the scope as well, do I have to use FDwfAnalogIO* functions or I can work with the FDwfAnalogIn and FDwfAnalogOut separately?

thank you for the help

Screen Shot 2020-01-29 at 7.48.49 AM.png

Link to comment
Share on other sites

Dear Attila,

please can you tell me the use of the following function:

FDwfAnalogOutNodeFrequencySet

when using a custom generated signal? and what is the relation of the frequency set here and the buffer size?

thank you

ssm

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...