﻿ Expressions

Expressions

 It is possible to write the expressions to the masks. The expression is the mathematical formula. The result of expression is a number. Syntactically, the math expression is the combination of the numbers, numerical variables and numerical functions, separated by the signs of the math operations and the parentheses. The simplest examples of math expressions are the number and the numerical variable   Following math operations are allowed in the language: <+> – the addition; <-> – the subtraction; <*> – the multiplication; – the division; <^> – the involution.   It is necessary to remember, that two operational sign can't follow one-after-another.   Following math functions are allowed: – sinus of angle x (in degrees); – cosine of angle x (in degrees); – tangent of angle x (in degrees); – arctangent of angle x (in degrees); – arcsine of angle x (in degrees); – arccosine of angle x (in degrees); – square root of x; – absolute value of x; – sign for x; – rounding of x to y decimals after point; – decimal logarithm of x; – natural logarithm of x.   Predefined variables and functions, all parameters of current CLDATA command transmitted via the array are available in the expression. For example:   Mask: X[2+5/2+2*(sin(45))] Y[CLD.Y*2] F[FEED]   NC code: X005914 Y001234 F200   In this sample the expression of the first element: 2+5/2+2*(sin(45)) is equal to 5.91421356237697. When out to the NC code, the register was found in the registers list and the number output format was taken from the register. The expression of the second element has the parameter transmitted via the array – (equal 0.617) multiplied on 2. The third element uses the predefined variable . This variable contains the current feedrate value.       See also: Mask structure