This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== 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. <color green>Result</color> := EXP(<color blue>Value</color>); <color green>Result</color>: the return value of the function \\ <color blue>Value</color>: 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. <color green>Result</color> := COS(<color blue>Value</color>); <color green>Result</color>: the return value of the function \\ <color blue>Value</color>: 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. <color green>Result</color> := SIN(<color blue>Value</color>); <color green>Result</color>: the return value of the function \\ <color blue>Value</color>: 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. <color green>Result</color> := TAN(<color blue>Value</color>); <color green>Result</color>: the return value of the function \\ <color blue>Value</color>: 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. de/s7/scl_commands.txt 2022/04/21 15:01()