5 Script Coding Examples
20-36 SmartAXIS Touch User’s Manual
Script
Operation description
Calculates the square root of the value of [D20] and the result is stored in [D10].
Only the data type float32 can be used.
Script
Operation description
Calculates the sine of the radian value of D20 and stores the result in D10.
Only the data type float32 can be used.
Script
Operation description
Calculates the cosine of the radian value of D20 and stores the result in D10.
Only the data type float32 can be used.
Script
Operation description
Calculates the tangent of the radian value of D20 and stores the result in D10.
Only the data type float32 can be used.
Script
Operation description
Calculates the arcsine of the value of D20 and stores the result as radians in D10.
Only the data type float32 can be used.
Script
Operation description
Calculates the arccosine of the value of D20 and stores the result as radians in D10.
Only the data type float32 can be used.
â–
Example 5.7.7 Square root
[D 10] = ROOT([D 20]);
â–
Example 5.7.8 Sine
[D 10] = SIN([D 20]);
â–
Example 5.7.9 Cosine
[D 10] = COS([D 20]);
â–
Example 5.7.10 Tangent
[D 10] = TAN([D 20]);
â–
Example 5.7.11 Arcsine
[D 10] = ASIN([D 20]);
â–
Example 5.7.12 Arccosine
[D 10] = ACOS([D 20]);