有關Formula Node的應用....

先向高手們說聲感謝與抱歉。

感謝您為小弟解答在LABVIEW使用上的困擾。

抱歉小弟一直提出一些蠻基本且愚蠢的問題。

這真的是沒辦法,小弟摸LABVIEW的日子實在太短了,而又要應用到一些介面與計算的問題。身邊又沒有LABVIEW的能手請教,看書又來不及,因為實在太趕了。都五月快中了,看書時在來不急

所以來論壇詢問+爬文比較快。希望各位高手海涵別介意。

小弟這篇的問題是有關於Formula Node應用。

小弟可以在Formula Node中輸入需要應用的程式。這是沒有問題的。

這是在程式區可以這樣用,帶是今天如果我想在介面區自由輸入呢?可以做到嗎?當然!未知參數是一樣的!只是他們的加減乘除以及常數項不同。)

希望知道的高手可以幫忙解答一下,如果不行也請告知小弟一下。這樣小弟也可以死心盡快想替代方案。

感謝了~

Dar38482.515474537

答案是.....不行

是可以的,使用「Eval Formula Node」就可以做到這個功能,我寫了一個小程式,請參考看看:(7.1)Eval Formula Node Example.vi

 

Eval Formula Node的位置在這裡:

參考來源:Can I Programmatically Change an Equation Inside a Formula Node?

原文如下:


Can I Programmatically Change an Equation Inside a Formula Node?

Primary Software: LabVIEW Development Systems>>Full Development System
Primary Software Version: 6.1
Primary Software Fixed Version: N/A
Secondary Software: N/A

![|10x1](upload://2ysDegIj5Vd1nsTDqPnvj2hzgbk.gif)

Problem: I would like to be able to dynamically change the equation inside of a formula node. I do not want to have to edit the code between executions.

Solution: There are a number of ways to achieve this type of dynamic behavior in LabVIEW. If you have a limited number of equations that you would like to evaluate, you can simply use a case structure in which each case will contain an individual formula node. The case structure will allow you to dynamically decide which of the formulas to use. In the event that you have many formulas, or you would like to programmatically insert the code into a formula node, you may be able to use the Eval Formula Node.vi. This vi was introduced in LabVIEW 6.0 and it can be found in the Full and Professional Development Systems of LabVIEW.

This vi can be found on the functions palette by clicking on the following:

Functions»Anayze»Mathematics»Formula»Eval Formula Node.vi

If you are manipulating a polynomial equation and only the coefficients of the terms are changing, you can alter the coefficients dynamically using a formula node. The formula node is available in all of the LabVIEW Systems. To manipulate an equation in this fashion perform the following steps:


  1. Add the coefficients as inputs to the Formula Node by right-clicking the border of the node and selecting Add Input from the shortcut menu.
  2. Add an input for every coefficient you want to change.


For example, you can enter the equation y=ax^3+bx^2+cx+d in a Formula Node, and add inputs for a, b, c, d, and x. You can then change the values wired to the a, b, c, and d inputs with every call to the Formula Node.

這種方式可以支援3D的曲線嗎?

也就是f(x,y,z)的格式。

有支援嗎?

Dar38482.5157291667

只要是方程式可以寫的出來的,都可以用這個方式來計算。

原來有這種東西啊,又學到一步 :)

感謝班大指點

感謝您的幫助了~

但是小弟是使用7.0的~

大大您的範例是7.1版的...他不給開QQ

Dar38482.5156018519

[QUOTE=Dar]

感謝您的幫助了~

但是小弟是使用7.0的~

大大您的範例是7.1版的...他不給開QQ

[/QUOTE]

上面的回覆有說明Eval Formula Node.vi在那裡(LV7.0在相同位置),自己寫就可以了

^^

小弟自己完成了範例~

ㄎㄎ....算是一個小小的試驗吧~

真的可以用~~

感謝大大您的指教了~