NI USB-6212 analog output not appearing for live acquisition and processing
4 views (last 30 days)
Show older comments
Hello. I'm using Matlab 2015a. The DAQ is able to connect to the computer, as shown below. I am trying to use Live Acquisition and Processing through this code from here: https://www.mathworks.com/matlabcentral/fileexchange/46685-live-data-acquisition-for-real-time-signal-processing-in-matlab , but I get the problem below (the analog input is able to connect, but the analog output is not.) When I type Gen.DeviceName = ' and then hit tab in the Command Window, a pop-up indicates "No Completions Found." I'm able to generate a signal using the NI Device Monitor Test Panels and Measurement & Automation Explorer. Any thoughts on why the output is not working for live processing? Specifically, why is it that the same value/name I used for DeviceName on analog input, not work for analog output?
Thanks, WC
>> daq.getDevices
ans =
ni: National Instruments USB-6212 (BNC) (Device ID: 'Dev1')
Analog input subsystem supports:
4 ranges supported
Rates from 0.1 to 400000.0 scans/sec
16 channels ('ai0' - 'ai15')
'Voltage' measurement type
Analog output subsystem supports:
-10 to +10 Volts range
Rates from 0.1 to 250000.0 scans/sec
2 channels ('ao0','ao1')
'Voltage' measurement type
Digital subsystem supports:
24 channels ('port0/line0' - 'port2/line7')
'InputOnly','OutputOnly','Bidirectional' measurement types
Counter input subsystem supports:
Rates from 0.1 to 80000000.0 scans/sec
2 channels ('ctr0','ctr1')
'EdgeCount','PulseWidth','Frequency','Position' measurement types
Counter output subsystem supports:
Rates from 0.1 to 80000000.0 scans/sec
2 channels ('ctr0','ctr1')
'PulseGeneration' measurement type
Code from the editor:
% Analog Input
Acq = dspdemo.DAQRecorder(...
'DeviceName','Dev1 - National Instruments USB-6212 (BNC)',...
'SampleRate', fs,'SamplesPerFrame',frameLength,...
'ChannelNumbers',0,...
'OutputNumOverrunSamples', true)
% output
Gen = dspdemo.DAQPlayer(...
'DeviceName','Dev1 - National Instruments USB-6212 (BNC)',...
'SampleRate', fs,...
'FirstChannelNumber',0,...
'OutputDeviceUnderrunStatus', true,...
'TargetLatencyFrames', 2);
>> encoder_Iive
Acq =
System: dspdemo.DAQRecorder
Properties:
DeviceName: 'Dev1 - National Instruments USB-6212 (BNC)'
MeasurementType: 'Voltage'
TerminalConfiguration: 'SingleEnded'
SampleRate: 50000
SamplesPerFrame: 2000
ChannelNumbers: 0
OutputNumOverrunSamples: true
Error using matlab.system.StringSet/findMatch (line 58)
Dev1 - National Instruments USB-6212 (BNC) is not a valid
setting for the DeviceName property.
Error in matlab.system.SystemProp/parseInputs (line 46)
Error in matlab.system.SystemProp/sysObjSetProperties
(line 43)
Error in dspdemo.DAQPlayer (line 158)
Error in encoder_Iive (line 45)
Gen = dspdemo.DAQPlayer(...
0 Comments
Answers (0)
See Also
Categories
Find more on National Instruments Frame Grabbers 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!