Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
eyes:flowcontrol:calculate [2018/01/22 14:53] sfiedle [Usage] |
eyes:flowcontrol:calculate [2018/01/23 16:23] (current) sfiedle [Example] |
||
---|---|---|---|
Line 4: | Line 4: | ||
===== Usage ===== | ===== Usage ===== | ||
+ | {{ :eyes:flowcontrol:calcprop.png?nolink|}} | ||
This Flow Control element can apply standard arithmetic (+,-,*,/) onto a Variable. Furthermore, the modulo (%) and exponentiation (^) methods are implemented in Lua 5.1. | This Flow Control element can apply standard arithmetic (+,-,*,/) onto a Variable. Furthermore, the modulo (%) and exponentiation (^) methods are implemented in Lua 5.1. | ||
- | To edit the formula fill in the Formula field in the Properties. Please note that Variables are called with cow.VariableName. | + | To edit the formula fill in the Formula field in the Properties. Please note that Variables are called with cow.VariableName.\\ |
- | Variant 1 - Computation with a constant\\ | + | ** Computation with a constant ** \\ |
- | ** cow.VariableName = cow.VariableName + ( any standard arithmetic symbol ) constant ** \\ | + | cow.VariableName = cow.VariableName + ( any standard arithmetic symbol ) constant \\ |
- | Variant 2 - Computation with a other Cow Variable\\ | + | ** Computation with a other Cow Variable ** \\ |
- | ** cow.VariableName = cow.VariableName + ( any standard arithmetic symbol ) cow.VariableName ** | + | cow.VariableName = cow.VariableName + ( any standard arithmetic symbol ) cow.VariableName \\ |
- | {{ :eyes:flowcontrol:calcprop.png?nolink |}} | + | Recall that a calculation of a Variable of type decimal and a Variable of type integer returns a Variable of type decimal. \\ |
+ | \\ | ||
+ | \\ | ||
- | Recall that a calculation of a Variable of type decimal and a Variable of type integer returns a Variable of type decimal. | ||
===== Example ==== | ===== Example ==== | ||
- | {{ :eyes:flowcontrol:examplecalc.png?nolink&800 |}} | + | |
+ | {{:eyes:flowcontrol:examplecalc.png?nolink&650 |}} | ||
**Properties Window** | **Properties Window** | ||
- | |< 100% 5% 35% >| | + | |< 100% 2% 40% >| |
^ ^ ^ | ^ ^ ^ | ||
- | |{{:eyes:flowcontrol:a.png?nolink&40 |}}|{{:eyes:flowcontrol:boxinteger.png?nolink&600 |}}|The [[eyes:flowcontrol:variable|]] factor is passed to the logic [[eyes:logics:boxmanipulation|]]. Factor is used as the coarse factor for the selected processor Coarse.| | + | |{{:eyes:flowcontrol:a.png?nolink&20|}}|{{:eyes:flowcontrol:boxinteger.png?nolink&600|}}|The [[eyes:flowcontrol:variable|]] factor is passed to the logic [[eyes:logics:boxmanipulation|]]. Factor is used as the coarse factor for the selected processor Coarse.| |
- | |{{:eyes:flowcontrol:b.png?nolink&40 |}}|{{:eyes:flowcontrol:varinteger.png?nolink&600 |}}|Here the [[eyes:flowcontrol:variable|]] called factor is of type integer with default value two. To see how to set up and use a [[eyes:flowcontrol:variable|]] follow the link.| | + | |{{:eyes:flowcontrol:b.png?nolink&20|}}|{{:eyes:flowcontrol:varinteger.png?nolink&600|}}|Here the [[eyes:flowcontrol:variable|]] called factor is of type integer with default value two. To see how to set up and use a [[eyes:flowcontrol:variable|]] follow the link.| |
- | |{{:eyes:flowcontrol:c.png?nolink&40 |}}|{{:eyes:flowcontrol:groupcalc.png?nolink&600 |}}|After clicking into the grey part of the element [[eyes:flowcontrol:group|]] the properties window displays the current value of the [[eyes:flowcontrol:variable|]] factor.| | + | |{{:eyes:flowcontrol:c.png?nolink&20|}}|{{:eyes:flowcontrol:groupcalc.png?nolink&600|}}|After clicking into the grey part of the element [[eyes:flowcontrol:group|]] the properties window displays the current value of the [[eyes:flowcontrol:variable|]] factor.| |
- | |{{:eyes:flowcontrol:d.png?nolink&40 |}}|{{:eyes:flowcontrol:examplecalcprop.png?nolink&700 |}}|The Calculate element displays the computation. Here the sum of the [[eyes:flowcontrol:variable|]] factor and one is written back to the [[eyes:flowcontrol:variable|]] factor.| | + | |{{:eyes:flowcontrol:d.png?nolink&20|}}|{{:eyes:flowcontrol:examplecalcprop.png?nolink&600|}}|The Calculate element displays the computation. Here the sum of the [[eyes:flowcontrol:variable|]] factor and one is written back to the [[eyes:flowcontrol:variable|]] factor.| |
===== Parameters and I/O ===== | ===== Parameters and I/O ===== |