Anu Kalidas Posted August 30, 2005 Report Share Posted August 30, 2005 Hi, Is it possible to update the formula in a formula node dynamically just like NI's Formula Express VI does. I was not able to find any property node for this. Is it possible through VI Scripting? TIA Kalidas. Quote Link to comment
Wolfram Posted September 3, 2005 Author Report Share Posted September 3, 2005 Hi,Is it possible to update the formula in a formula node dynamically just like NI's Formula Express VI does. I was not able to find any property node for this. Is it possible through VI Scripting? TIA Kalidas. 5897[/snapback] Use this and have fun. Wolfram Download File:post-1013-1125771079.vi Quote Link to comment
BChandler Posted September 3, 2005 Report Share Posted September 3, 2005 Use this and have fun. Wolfram 5979[/snapback] Could you make a version of that attachment in LV 6.1? (or is it a LV 7 feature only?) This is a topic is of some value to me. The old Eval methode is too slow (and ugly). -Thanx Quote Link to comment
Michael Aivaliotis Posted September 4, 2005 Report Share Posted September 4, 2005 Could you make a version of that attachment in LV 6.1? (or is it a LV 7 feature only?)This is a topic is of some value to me. The old Eval methode is too slow (and ugly). 5981[/snapback] This will not help you. The Eval Formula VI works at run-time allowing formula parsing and evaluation. The Scripting VI indicated above is a development tool that creates a formula node during edit time. Here is a picture of the code so you can create it yourself in 6.1 Quote Link to comment
Anu Kalidas Posted September 4, 2005 Report Share Posted September 4, 2005 Cool.... . I like that... Thanks a lot Wolfram... From where did u get that New VI and New VI Object VIs??? Quote Link to comment
Anu Kalidas Posted September 5, 2005 Report Share Posted September 5, 2005 I think I didn't read Michael Aivaliotis' "readme first" on VI scripting properly . Now I know from where to get those VIs. One has to install the ogmnu_Appcontrol_Plus package using the OpenG Commander to get these VIs. Thank you all for the help. :worship: Quote Link to comment
BChandler Posted September 6, 2005 Report Share Posted September 6, 2005 This will not help you. The Eval Formula VI works at run-time allowing formula parsing and evaluation. The Scripting VI indicated above is a development tool that creates a formula node during edit time. Here is a picture of the code so you can create it yourself in 6.1 5985[/snapback] Thanx, for the diagram it was enough to get it working. Apparently LV 6.1 does not have the BDwin.Open property. But I made it work on an existing vi. Still as you said, of limited value at run time. I was thinking of a peak fit function we use as part of a larger program. Customers would like to define there own peak formulas. And I've avoided using Eval because there's too much data. Even a hard coded formula is slow sometimes. But the LV scripting in gereral is a neat tool. Quote Link to comment
mdd100ai Posted July 5, 2007 Report Share Posted July 5, 2007 Hi! I am just trying to adapt this VI to changing the content of a MathScript Node, but unfortunately I could not find out how to create such a object class constant. When I try to create a constant from the VI's input, I get a "Generic" and cannot even change it to "Formula" as given in the example, because it is not listed. Could anyone please tell me how to create such a constant! And back to my original problem: Is it possible to change the MathScript code in a VI that is not yet running, but is supposed to run after the change? I think LV need to compile the node - can it do so while it is running? Thanks a lot, Christian Quote Link to comment
gb119 Posted July 5, 2007 Report Share Posted July 5, 2007 QUOTE(mdd100ai @ Jul 4 2007, 10:30 AM) Hi! I am just trying to adapt this VI to changing the content of a MathScript Node, but unfortunately I could not find out how to create such a object class constant. When I try to create a constant from the VI's input, I get a "Generic" and cannot even change it to "Formula" as given in the example, because it is not listed. Could anyone please tell me how to create such a constant! And back to my original problem: Is it possible to change the MathScript code in a VI that is not yet running, but is supposed to run after the change? I think LV need to compile the node - can it do so while it is running? Thanks a lot, Christian If you are using LabVIEW 8.2 then my http://forums.lavag.org/downloads-file87.html' target="_blank">Scripting Tools toolkit has a polymorphic vi that returns a class constant of every possible type. This doesn't actually help you that much because in LV 8.x the properties and methods for scripting are hidden and can't be revelaed with any fancy ini file key. The Scripting Tools toolkit will create some nodes for you, but not a formula node (yet), but if you look at the Create Expression Node, you'll see that that is actually creating a formula node (and a mathscript node is a subclass of a formula). Alternatively, I'd reccomend the DataAct Class browser for those wanting to mess with LabVIEW scripting - I think it supports LV 7.x and upwards. It does cost $ if you want the version that can create property and method nodes. In terms of using a scripted vi in a project - firstly you need to be aware that it will only work in the development environment (scripting is really only for NI for writing development tools...). If that is not a problem, then what you will want to do is have a vi that creates and scripts a new vi that has the formula node, and then executes the new vi using the vi-server methods, before closing all the references to the new vi, hence removing it from memory. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.