08-23-2015 11:45 AM
i'm using ni-6008 to sample voltage and current.
the values obtained are in the form of 1D array.
these values are given to the shift register to have the difference between present value and previous value.
the difference is given as input to the mathscript for the program written as shown in the vi.
i hope, i'll get the difference between two successive elements in 1D array and this is fed to mathscript module.
but when i run this vi, it is showing an error as shown
how to rectify this error? and also
if we give 1D array as input to mathscript and it is unable to perform comparision operations ( such as greater than, lesser than etc.), then what is the modification shall i do?
please suggest me some solutions
08-23-2015 12:27 PM
08-23-2015 01:10 PM - edited 08-23-2015 01:14 PM
yeah, i've tried that method.
the problem is i'm feeding back the d value for every iteration. i'VE TO update the d value
08-23-2015 01:21 PM
08-23-2015 01:27 PM
then please suggest me some way to take the difference of successive values in an array.since sampled voltages are in the form of array
08-23-2015 01:38 PM
08-23-2015 02:27 PM - edited 08-23-2015 02:37 PM
can anyone give me the link for the mathscript module syntaxes for the functions? i've tried. but unable to get the required data.
i mean, I NEED ALL THE POSSIBLE SYNTAXES REQUIRED AND ARE PRESENT FOR THE FUNTIONS PRESENT IN MATHSCRIPT MODULE.
for example, the syntax for 'for' loop is
for m=1:10 , for m=1:0.1:10, etc.
so i need some pdf that gives all tthe posssible syntaxes for the functions in mathscript module.
and i need one more qlarification. is both mathscript and matlab are same?. shall i use all the syntaxes of matlab functions in mathscript. if not, show me some pdfs that tells the correction to do( i mean the proper syntax and format)
08-23-2015 04:00 PM
You can use a For loop (to index through your array) and a Shift Register (to hold on to the previous value) to convert an array of data into an array of (data(i) - data(i-1)). Here I've created an array of 100 random numbers between 0 and 1 ("data") and then used the For loop + Shift Register to compute the Delta array (with an implicit assumption that the number before the first point was 0). You can do it all in LabVIEW (and should do it all in LabVIEW).
Bob Schor
08-24-2015 01:28 PM
08-24-2015 08:23 PM
yes. i've tried. there very less explanation is given.