I'm using the functions
[WaveformHandle]=invoke(FgenObj.Configurationfunctionsarbitrarywaveformoutput,'createwaveformf64',ChannelName,WaveformSize,WaveformData);
invoke(FgenObj.Configurationfunctionsarbitrarywaveformoutput,'configurearbwaveform',ChannelName,WaveformHandle,Gain,Offset);
to create a waveform with the NI-Fgen. My Waveform is just a sine wave of a certain number of samples. I'm confused about what exactly the WaveformSize is supposed to represent. When I make the WaveformSize 10000 samples and the WaveformData a sine wave array with 10000 samples and I view the signal on the scope with 50000 samples the waveform spans all 50000 samples. When I decrease the WaveformSize to 1000 samples and likewise with the WaveformData array I suddenly don't get a clean sine wave, but the signal still spans all 50000 samples. How can I make a sine wave that spans 10000 samples? Should I be using a user defined standard waveform as opposed to an arbitrary waveform? Also here is what I'm using to configure the scope.
SampleRate=2E+6;
NumSamples=50000;
TimeOut = NumSamples/SampleRate;
RefPosition=0;
NumRecords=1;
EnforceRealTime=1;
Range = 60;
Offset = 0;
Coupling = 1;
ProbeAttenuation = 10;
channelList = '1';
invoke(ScopeObj.Configurationfunctionsvertical, 'configurevertical', '1', Range, Offset, Coupling, ProbeAttenuation, true);
invoke(ScopeObj.Configurationfunctionshorizontal,'configurehorizontaltiming',SampleRate,NumSamples,RefPosition,NumRecords,EnforceRealTime);
invoke(ScopeObj.Acquisition, 'initiateacquisition');
[waveformArray, waveformInfo] = invoke(ScopeObj.Acquisition, 'fetch', channelList,TimeOut, NumSamples, waveformArray, waveformInfo);
I'm new to using MATLAB for this purpose to there may be some simple mistake I'm unaware of