12-12-2018 05:54 PM
Hi,
Good people. I am new in LabView. I wrote a program using the Mathscript node but the iteration time is 200ms. I need something faster than this. My understanding formula node will be faster than the Mathscript node. Here I am attaching my VI. I tried this to convert the formula node but faile. Can anyone help me to convert this VI to formula node?
Thanks.
Solved! Go to Solution.
12-12-2018 10:08 PM
Wow -- someone who hasn't learned the First Principle of LabVIEW, the Principle of Data Flow. Who doesn't know about Shift Registers and who hasn't learned (as many beginners, even myself, when I started learning (about) LabVIEW didn't realize) that one should almost never use Local Variables, particularly when inside a Loop (where Shift Registers make so much more sense).
One also wonders if you know how to use parentheses to make expressions like "K=m^2*m" unambiguous. I don't know if you intend for the exponent to be 2 or 2m -- I also am not 100% certain I could predict how the MathScript interpreter (I'm assuming it is interpreted) will parse it, and whether its rules are the same as what you intend.
Here are some suggestions:
Since I don't know what to make of the attached file (and why I would need to see "the real questions", as outlined above, to be able to suggest what to do), I'm not going to suggest anything more than "Please explain, without using LabVIEW, MatLab, or any other coding language -- just use Math.
Bob Schor
12-13-2018 09:13 AM
@Moni98ce wrote:
Hi,
Good people. I am new in LabView. I wrote a program using the Mathscript node but the iteration time is 200ms. I need something faster than this. My understanding formula node will be faster than the Mathscript node. Here I am attaching my VI. I tried this to convert the formula node but faile. Can anyone help me to convert this VI to formula node?
Thanks.
I don't have the mathscript toolkit installed, so I can't run your .vi
moreover, I can't copy and paste your script from your mathscript node
1# run your vi, then hit the "edit>make values default" , then save your .vi and post it here
2# copy and paste your script here as text
then I will have a look
12-13-2018 09:29 AM
Hi,
Thank you very much. Previously I uploaded a wrong VI. Now I am also uploading the corrected VI.
12-13-2018 11:37 AM - edited 12-13-2018 11:43 AM
@Moni98ce wrote:
Hi,
I wrote a program using the Mathscript node but the iteration time is 200ms...
You have set the iteration time of the while loop to 200 ms each iteration here:
decrease this value e.g. to 1 ms, and see what happens next...
in the mean time, your mathscript node can be re-written as:
(test4_formula-node.vi)
personally, I would use more parenthesizes, as bob already suggested, like this:
K = w**(2*m); not: K = w**2*m;
without the mathescript-node, I can run the test4.vi and this is what I get on the frontpanel: (test4_no-mathscript.vi)
12-16-2018 04:49 AM - edited 12-16-2018 05:11 AM
other people solve sudokus...