Use Formula to create mathematical expressions, save them, and use them throughout your program.
Formula enables you to apply mathematical operators to data tag values, and then output the result to a data tag.
To use Formula in your program:
Create a Formula by clicking Formula on the Solution Explorer, and then clicking Add New Formula.
Click in the Expression field to build the expression. You can type in constant numbers, parameters and operators. You can also select parameters and operators from the drop-down lists.
Clicking in the Type field for each parameter.
Place the Formula Ladder function:
Either
|
|
|
|
Link tags to the Formula parameters.
Note ♦ |
The formula syntax conforms to normal mathematical notation. |
♦ |
With the exception of the - (minus) sign, binary operators cannot be used to begin a formula. The other binary operators include Add [+[, Mul [*], Div [/], Parenthesis [( )], and Power. Unary operators, such as Sin, may be used to begin a formula. |