From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

FGen Streaming waveform example in C

How can I stream a waveform using FGen in C? There are no FGen examples for streaming waveforms, are there examples in any other places?

 

Specifically I want to do something like this, with a streamed waveform inside a script: 

https://forums.ni.com/t5/Example-Programs/Fgen-Arb-Waveform-Streaming-with-Script-Mode/ta-p/3502366

But this example is in labview and it would be useful to have an example in C, if only for how to do the streaming part.

 

Thanks!

 

 

0 Kudos
Message 1 of 2
(2,344 Views)

Hi,

 

As for C, I don't think there is a FGen C example with streaming capabilities. You will have to write it. (I am assuming that you were able to run the C samples without streaming so you will only need to implement the streaming part)

 

However, under CVI examples, there is streaming examples. 

C:\Users\Public\Documents\National Instruments\CVI\Samples\niFgen\ArbitraryWaveformStreaming

 

Maybe you can compare the two CVI examples (Arbitrary Waveform w/o Streaming and w/ Streaming) to get some hints on how to implement streaming in C. The CVI example with Streaming has the part where you allocate and configure waveform. That should give you a place to start. 

 

I am no expert in C or CVI so can't give you much better advice than that. 

Hope it helps !

Message 2 of 2
(2,316 Views)