This function block is used to perform various mathematical calculations on a single number.
Figure 1: Math Operation - Wire Sheet |
Figure 2: Math Operation - Property Sheet |
Figure 3: MathOperation - Logic Diagram
Input
Input Name |
Description |
In |
Depending on the operation, In is used to perform a mathematical calculation or or it is used to change the representation. |
Table 1:Inputs of MathOperation Function
Output
Output Name |
Description |
Out |
Result of the calculation or the new representation of the input value. |
Table 2:Output of MathOperation Function
Parameter
Parameter Name |
Description |
Operation |
Following operations are possible: ident: Out = In abs: Absolute value, i.e. absolute Value int: Integer value frac: Fractional value arccos: Inverse trigonometric function arccos() as radian value *1 acrsin: Inverse trigonometric function arcsin() as radian value *1 cos: Trigonometric function cos() as radian value *1 exp: Exponential e(x) log10: Common logarithm with base 10. ln: Natural logarithm with base e - sin: Trigonometric function sin() as radian value *1 sqrt: Square root - tan: Trigonometric function tan() as radian value *1 round: Rounding after decimal place sign: Result is -1, 0, +1 depending on the sign of Inp *1:1 rad = 57.29577951° or 1°=0.017453293 rad |
Out Save |
Master Sync Enabled: If you set it to "true" the last output will be set as output for one cycle after the controller restarts. The application can use it to return to the same state before the controller restart Out: To enable or disable the Out feature. |
Table 3: Parameter of MathOperation Function
Examples
Figure 4: Math Operation Example with Round |
Refer to General Description for general information about IRMN4 Function Blocks.