LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

query: matlab function

i have add the cursor but it doesn't wait for the user to click on the axis.
instead it save into the file.


Message Edited by nonmm on 02-21-2008 01:42 PM
0 Kudos
Message 11 of 18
(1,224 Views)
You need to enclose the property node and your second Mathscript node inside a While loop (which should also contain a Wait Until Next ms Multiple, so it doesn't take over the CPU completely).

This is actually fairly basic LabVIEW stuff.  Have you tried looking at the Getting Started guide, or some of the other tutorials available on the NI website?


Message Edited by kehander on 02-21-2008 01:54 PM
0 Kudos
Message 12 of 18
(1,220 Views)
Actually i am quite new to labview. I have looked through the cursor_demo.vi in this discussion board but i can't solve my prob. hope i don't irritate you. 🙂
 
after going through the steps you told me, i can't seem to capture the cursor into my output file.


Message Edited by nonmm on 02-21-2008 02:41 PM
0 Kudos
Message 13 of 18
(1,215 Views)
You put the Write Characters to File inside the While loop as well.  That has to be outside the While loop.  (Oh, wait, you fixed that already.)


Message Edited by kehander on 02-21-2008 02:43 PM
0 Kudos
Message 14 of 18
(1,208 Views)
i have just edited and repaste into the forum and u give me comments. but there is still nothing shown inside the file?
0 Kudos
Message 15 of 18
(1,203 Views)
For some reason I can't actually run this VI myself, but I suspect that you need to specify that the output "a" is a double and not a string.  You can then convert the number into a string outside of the script node with the appropriate LabVIEW functions.

One way you can verify this is by wiring an indicator to the output of the MathScript node and see if it contains anything.
0 Kudos
Message 16 of 18
(1,191 Views)
strange i add a "number to decimal string", this time round it keep giving me zero despite my x value is not zero
0 Kudos
Message 17 of 18
(1,187 Views)
Yes, a number that is less than one will probably get rounded down to zero if you convert it to a decimal string.
0 Kudos
Message 18 of 18
(1,179 Views)