error using NI PXI 5412 arbitrary waveform generator using matlab

6 views (last 30 days)
Software: Matlab 2013a
Hardware: PXI 5412 arbitrary waveform generator
NI Chasis - PXIe 1082
As I am new to using AWGs with matlab I have been trying to use the example code from the Mathworks website to generate a sine wave using the AWGs.
if true
% code
driverInfo = instrhwinfo ('ivi');
disp(driverInfo.Modules')
% it gives me 'niFgen' in the list
makemid('niFgen')
% No error
resourceID = 'DAQ::PXI1Slot6';
% I also tried using the resourceID as just 'PXI1Slot6' but still gives the same error
ictObj = icdevice('niFgen',resourceID) % No error here
connect(ictObj)
% No error at this stage
Waveform = 1; %The number 1 is the enumerated value for Sine Waveform ChannelName = '0';
Frequency = 10E+6;
Amplitude = 2.0;
DCOffset = 0;
StartPhase = 0.0;
invoke(ictObj.Configurationfunctionsstandardfunctionoutput,'configurestandardwaveform',ChannelName, Waveform, Amplitude, DCOffset, Frequency, StartPhase);
end
At this point it gives me the following error:
"Error using icgroup/invoke (line 93) The instrument returned an error while executing the function. The operation cannot be completed in the current output mode"
Thanks in advance.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!