LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

plotting of graph

hi,

let say i got this equation.

Kc=1;
Ti=1;
Td=1;
L=1;
w=0.01:0.01:1.01;
PID = Kc*(1+ 1./(j*w*Ti) + j*w*Td/((j*w*Td/10)+ 1));
block1 = angle(exp(-j*w*L).*(j*w+1).^(-6) .* PID) + pi;
plot(w,block1);

how do i plot in labview as i got no problem in matlab?

Thanks in advance.

0 Kudos
Message 1 of 4
(6,950 Views)
nonmm,

You can open LabVIEW, go to Tools>>MathScript Window..., then click the Script tab and enter your script there. Alternatively, you may try something like the attached VI.

Hope that helps,
KevinC
National Instruments
0 Kudos
Message 2 of 4
(6,941 Views)

oh thanks 🙂 how about the command of "ginput" (using of mouse) can it be used in labview?

because once i got the graph, i need to get the point that touches the zero crossing line by using mouse in order to do another calucation.

0 Kudos
Message 3 of 4
(6,937 Views)
MathScript supports the command of ginput.
 
Below are the syntax and description of ginput.
[x, y] = ginput
[x, y] = ginput(n)
[x, y, b] = ginput
[x, y, b] = ginput(n)
Acquires data points from the current plot by a mouse click. [x, y] = ginput acquires data points until you press the <Enter> key. [x, y] = ginput(n) acquires data points until LabVIEW acquires n data points or until you press the <Enter> key.
 
In LabVIEW, you can use the cursor of XY Graph.
0 Kudos
Message 4 of 4
(6,927 Views)