Command System_Math

Using of command

This command is use for mathematical operations between variables or between variables and fixted number.

Commands parameters

  1. Variable A: This parameter is use for select variable for first operand. It can be select variable 0-99.
  2. Operator:It can be select mathematical operator.Operator is same as in c functions in math.h. Variable A is use in all operators. Variable B is use in some operators.Operators "+" "-" "*" "/" use Variable A and Variable B. Operator sin(A) use only Variable A as a parameter of function,function atan2(A,B) use Variable A as first parameter and variable B as a second parameter etc.
  3. Variable B:This parameter is use for select variable for second operand if it is use.It can be select variable 0-99 or Number. Selection Number means that second operand is use fixted number which is set in the next parameter.
  4. Variable B constant number: This parameter is use if Variable B is select "Number". Number select in this parameter is use as second operand.
  5. Result to: Parameter select variable where is stored result of mathematical operation. It can be select variable 0-99.

Error codes

  1. Error code -11: Bad variable A. This error means that first operand is not in range variable0-99.
  2. Error code -12:Bad operator: Operator is not in list of operators
  3. Error code -13:Bad variable B. Second operand is not in range variable0-99 or Number
  4. Error code -14:Bad result variable: Result variable is not in range variable0-99
  5. Error code -15:Devided by 0. Variable B in devided operation is 0.
  6. Error code -16:Variable A out of range. Check variable range in selected operator.