LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform graph

can anyone please explain my mathscript error and my wiring problem.

 

the hardware is pci 6025E DAQ

 

 

0 Kudos
Message 1 of 4
(2,830 Views)

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:

  • delta_t
  • start
  • step
  • stop

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?

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 4
(2,805 Views)

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>   ---'


Message 3 of 4
(2,766 Views)

Simple LabVIEW stuff is much more efficient:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 4
(2,760 Views)