error using NI PXI 5412 arbitrary waveform generator using matlab
15 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Periodic Waveform Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!