16. CUSTOM MACRO
Brackets are used to change the order of operations. Brackets can be used
to a depth of five levels including the brackets used to enclose a function.
When a depth of five levels is exceeded, P/S alarm No. 118 occurs.
Example) #1=SIN [ [ [#2+#3] *#4 +#5] *#6] ;
to indicate the order of operations.
Brackets ([, ]) are used to enclose an expression. Note that parentheses
are used for comments.
Errors may occur when operations are performed.
Table 16.3(b) Errors involved in operations
Type of error
a = b*c 1.55×10
a = b / c 4.66×10
a = b + c
a = b – c
a = SIN [ b ]
a = COS [ b ]
a = ATAN [ b ] / [ c ]
1 The relative error depends on the result of the operation.
2 Smaller of the two types of errors is used.
3 The absolute error is constant, regardless of the result of the
4 Function TAN performs SIN/COS.
S The precision of variable values is about 8 decimal digits. When very
large numbers are handled in an addition or subtraction, the expected
results may not be obtained.
D Bracket nesting
D Operation error
a + b