====== Simatic S7 SCL commands with examples ====== === trigonometric / math functions === [[de:s7:scl_commands#cos|COS (cosinus)]], [[de:s7:scl_commands#exp|EXP (exponential)]], [[de:s7:scl_commands#sin|SIN (sinus)]], [[de:s7:scl_commands#tan|TAN (tangent)]] ===== EXP ===== The function returns the value of the "EXP" (exponent from the base e (e = 2.718282)) math function. Result := EXP(Value); Result: the return value of the function \\ Value: function input \\ {{:de:s7:exp_example.png|}} A yellow underline in the code indicates that the result of the function is not completely accurate for [[de:s7:tia_datatypes#real|REAL]] and [[de:s7:tia_datatypes#int|INT]] types. For [[de:s7:tia_datatypes#lreal|LREAL]] type, precision is complete. ===== COS ===== The function returns the value of the "COS" (cosinus) trigonometric function. Result := COS(Value); Result: the return value of the function \\ Value: function input \\ {{:de:s7:cos_example.png|}} A yellow underline in the code indicates that the result of the function is not completely accurate for [[de:s7:tia_datatypes#real|REAL]] and [[de:s7:tia_datatypes#int|INT]] types. For [[de:s7:tia_datatypes#lreal|LREAL]] type, precision is complete. ===== SIN ===== The function returns the value of the "SIN" (sinus) trigonometric function. Result := SIN(Value); Result: the return value of the function \\ Value: function input \\ {{:de:s7:sin_example.png|}} A yellow underline in the code indicates that the result of the function is not completely accurate for [[de:s7:tia_datatypes#real|REAL]] and [[de:s7:tia_datatypes#int|INT]] types. For [[de:s7:tia_datatypes#lreal|LREAL]] type, precision is complete. ===== TAN ===== The function returns the value of the "TAN" (tangent) trigonometric function. Result := TAN(Value); Result: the return value of the function \\ Value: function input \\ {{:de:s7:tan_example.png|}} A yellow underline in the code indicates that the result of the function is not completely accurate for [[de:s7:tia_datatypes#real|REAL]] and [[de:s7:tia_datatypes#int|INT]] types. For [[de:s7:tia_datatypes#lreal|LREAL]] type, precision is complete.