Same source but different signals between the Data Aquisition Toolbox and the NI softwares

4 views (last 30 days)
Pierre
Pierre on 14 Mar 2012
Hello,
I have some trouble with the data acquisition toolbox. The simple program below works great for transient signals centered in 0. However, for signals with a voltage offset, the signal is set to zeros as if an high pass filter was applied. This is not an hardware problem as the signal acquired via NI softwares with the same source is correct.
We have a NI 6110 acquisition card.
Could you help me on this ?
Best regards
NB : We have exactly the same issue with the Oscilloscope enbedded in the data acquisition toolbox
The program:
daqreset;
fe=20000; % frequence d'echantillonage
varniv=5; % Niveau d'entrée en V (à checker)
duree=5; % en seconde
Nb_echant=duree*fe;
AI=analoginput('nidaq','Dev3');
input=addchannel(AI,0,{'angle'});
AI.Channel.InputRange = [-varniv varniv];
AI.Channel.SensorRange = [-varniv varniv];
AI.Channel.UnitsRange = [-varniv varniv];
set(AI, 'InputType','PseudoDifferential')
set(AI, 'SampleRate', fe)
set(AI, 'SamplesPerTrigger',Nb_echant);
set(AI,'TriggerType','Immediate'); %
start(AI);
wait(AI,duree*1.3);
data = getdata(AI,AI.SamplesAcquired);

Accepted Answer

Manisha
Manisha on 15 Mar 2012
Hi Pierre,
Is the Coupling property set to the same value ('AC' or 'DC') in both the NI software and the Data Acquisition Toolbox?
Thanks,
Manisha

More Answers (3)

Pierre
Pierre on 15 Mar 2012
Hi Manisha,
Thank you for answering. In both NI and Data Acquisition Toolbox, the property 'InputType' is set to Pseudodifferential (which corresponds to DC, I think). We investigated further the toolbox with a sine wave and it clearly behaves as a low cut filter under 10 Hz.... but not with the NI software!! Here is what we get with the 'get(AI)' command:
BufferingConfig = [16384 1]
BufferingMode = Auto
Channel = [1x1 aichannel]
ChannelSkew = 0
ChannelSkewMode = None
ClockSource = Internal
DataMissedFcn = @daqcallback
EventLog = [1x3 struct]
InitialTriggerTime = [2012 3 15 14 10 6.90933]
InputOverRangeFcn = []
InputType = PseudoDifferential
LogFileName = logfile.daq
Logging = Off
LoggingMode = Memory
LogToDiskMode = Overwrite
ManualTriggerHwOn = Start
Name = nidaqmxDev3-AI
Running = Off
RuntimeErrorFcn = @daqcallback
SampleRate = 2000
SamplesAcquired = 10000
SamplesAcquiredFcn = []
SamplesAcquiredFcnCount = 1024
SamplesAvailable = 0
SamplesPerTrigger = 10000
StartFcn = []
StopFcn = []
Tag =
Timeout = 1
TimerFcn = []
TimerPeriod = 10
TriggerChannel = [1x0 aichannel]
TriggerCondition = None
TriggerConditionValue = 0
TriggerDelay = 0
TriggerDelayUnits = Seconds
TriggerFcn = []
TriggerRepeat = 0
TriggersExecuted = 1
TriggerType = Immediate
Type = Analog Input
UserData = []
NIDAQMX specific properties:
ExternalScanClockSource = PFI7
HwDigitalTriggerSource = PFI0

Pierre
Pierre on 15 Mar 2012
There is no AI.Channel.Coupling
Here is AI.Channel:
Index: ChannelName: HwChannel: InputRange: SensorRange: UnitsRange: Units:
1 'angle' 0 [-5 5] [-5 5]
[-5 5] 'Volts'

Pierre
Pierre on 16 Mar 2012
Hi Manisha,
We did find a kind of solution. We installed the old NI-DAQ 7.4.4. driver and we do have access to discontinuous signal now, and the AI.InputType is now Differential.... However it is not very satisfying as the NI-DAQmx driver is no longer working. I think there is a bug in the data acquisition toolbox.
Regards

Community Treasure Hunt

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

Start Hunting!