LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency Response Analyser: Error -1802 occurred

Hi,
 
I'm fairly new to Labview but feel I know most of the fundamentals.
 
I've been trying to convert the following bit of code from Matlab to Labview (I am aware 8.20 has a math script function but I don't have access to it). Please could someone have a look at my VI and possibly tell me why I am getting the 1802 error. It suggests that "(Hex 0xFFFFF8F6) Waveforms have different dt values." but I'm not sure what this means or how to fix it.
 
Also, if anyone has any constructive critisism of my methods for implementing the code then I would love to hear them.
 
Many thanks for your time in assisting me,
 
Ian Haigh
 
 
 
 
% routine for calculating Transfer Function
% signal is the array containing the measured signal
% sigs is the array containing the input sine wave
% sigc is the array containing the input cosine wave
clear;
freq=11.45;
sfreq=360*freq;
cycs=10;
a=0;
b=0;
i=1;
for t=0:1/sfreq:cycs/freq;
n=cycs*360+1;
ph=60;
signal=0.37*sin(2*pi*freq*t+ph*pi/180);
time(i)=t;
sigs=sin(2*pi*freq*t);
sigc=cos(2*pi*freq*t);
real(i)=signal.*sigs;
r=real(i);
comp(i)=signal.*sigc;
c=comp(i);
a=a+r;
b=b+c;
i=i+1;
end
a=(2*a-real(1)-real(n))/(n-1);
b=(2*b-comp(1)-comp(n))/(n-1);
R=sqrt(a*a+b*b)
ang=atan(b/a)*180/pi
0 Kudos
Message 1 of 2
(3,293 Views)

Hi Ian,

 

It seems that you are attempting to use different dt in the waveforms, but I founded in this link two ways to avoid having this problem. Hope you find it useful. Thanks for using the forums!

http://digital.ni.com/public.nsf/websearch/C41966093C3D030F86256FF8007F8BF5?OpenDocument

 

NorSa

AE LATAM

NorSa
(Former) NI Applications Engineer Latin America
0 Kudos
Message 2 of 2
(3,289 Views)