02-26-2016 05:39 AM
can anyone please explain my mathscript error and my wiring problem.
the hardware is pci 6025E DAQ
02-26-2016 06:14 AM - edited 02-26-2016 06:15 AM
1. For wiring error use the context help of the XY Graph in order to know valid wire types. Please note that each call in the VI will create ONE XY point so you won't see any lines....
2.a The formula node clearly states that you are using undeclared variables. These are:
Declare them by prepending the datatype (e.g. float)
2.b You failed to include line end markers. These are similar to ANSI C ';'. Refer to examples of the formula node in case you are not sure what i mean.
2.c ':' is not defined as an operator in the formula node. What does the line "t=start:step:stop" mean?
Please refer to the LV help for formula node to learn the syntax and valid operators.
Norbert
EDIT: You don't use any IO hardware with your code. Why do you state that you use an E-Series device?
02-26-2016 11:37 AM
You can do what you're trying to do much easier just using LabVIEW code instead of the formula node.
This is what you would have to do to declare your variables:
float delta_t;
float start;
float step;
float stop;
float t[100];
float x[100];
delta_t = 1/f_s;
start = 0;
step = delta_t;
stop = (N-1)*delta_t;
t = start:step:stop;
x =Asin(2*pi*f*t);
I don't know what you're expecting to happen with your "t" array line though. That formula won't work.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
02-26-2016 12:22 PM