how can I generate a sin signal by NI PXI-5422 - Instrument Control Toolbox
5 views (last 30 days)
Show older comments
I tried this code: http://www.mathworks.com/help/instrument/examples/using-ni-fgen-instrument-driver-to-generate-a-sine-wave.html
driverInfo = instrhwinfo ('ivi');
disp(driverInfo.Modules');
makemid('niFgen')
resourceID = 'DAQ::PXI1Slot3';
ictObj = icdevice('niFgen',resourceID,'optionstring','Simulate=true,DriverSetup=Model:5402');
connect(ictObj);
Waveform = 1; %The number 1 is the enumerated value for Sine Waveform
ChannelName = '0';
Frequency = 10E+3;
Amplitude = 2.0;
DCOffset = 0;
StartPhase = 0.0;
invoke(ictObj.Configurationfunctionsstandardfunctionoutput,'configurestandardwaveform',ChannelName, Waveform, Amplitude, DCOffset, Frequency, StartPhase);
invoke(ictObj.Waveformcontrol,'initiategeneration');
But it doesn't work. There is no errors, but also my PXI didn't generate any signal. I use NI PXIe-1062Q, and in slot 3 I have a NI-PXI-5422.
List of my modules: driverInfo = instrhwinfo ('ivi'); disp(driverInfo.Modules'); 'nidcpower' 'nidmm' 'niFgen' 'niRFSA' 'nisACPwr' 'niScope' 'nisCounter' 'nisDCPwr' 'nisDigitizer' 'nisDmm' 'nisDownconverter' 'nisFGen' 'nisPwrMeter' 'nisRFSigGen' 'nisScope' 'nisSpecAn' 'nisSwtch' 'nisUpconverter' 'niSwitch'
How can I genrete the sin signal?
Thank you in advance, Pawel Frankowski
0 Comments
Answers (0)
See Also
Categories
Find more on Instrument Connection and Communication in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!