LabVIEW MathScript RT Module

cancel
Showing results for 
Search instead for 
Did you mean: 

capture data using mouse

Hi,
 
i have plot a graph using plot(w,block1);
 
am i able to get the data using "ginput" ?
 
[Wu] = ginput;
Tu1=2*pi/Wu(1);
0 Kudos
Message 1 of 16
(9,743 Views)
Yes, you can do that.
 
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.
Note that if you only specify one output, ginput only returns the x-coordinates of the data points acquired. Moreover, ginput will stop execution of MathScript until you press the <Enter> key to step acquiring.
0 Kudos
Message 2 of 16
(9,735 Views)
i have done ask what you have told me, but it doesn't seem to capture my data.
0 Kudos
Message 3 of 16
(9,733 Views)
If you want the value of Tu1, you must explicitly change the data type of the output Tu1 as DBL scalar.
 
Also note that ginput only works for the plot window generated by MathScript Window or Node. It does not work on native LabVIEW XY Graph control.
0 Kudos
Message 4 of 16
(9,731 Views)
oh i see. so for labview part, the cursor can't be done completely?
0 Kudos
Message 5 of 16
(9,729 Views)

Open the attached VI. Move the cursor to verify the value of cursor point.

By the way, what do you really want to do?

matlabscript graph.vi ‏1 KB
0 Kudos
Message 6 of 16
(9,727 Views)
i wish to capture data from the graph and use the data for calculation. do version 6.2 have graph cursor?
0 Kudos
Message 7 of 16
(9,723 Views)
I have not tried version 6.2. But, I think it should have cursor.
0 Kudos
Message 8 of 16
(9,713 Views)
i cant seem to open ur file.
0 Kudos
Message 9 of 16
(9,707 Views)
I re-attach the VI.
0 Kudos
Message 10 of 16
(9,673 Views)