4 priority levels of operations – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual

Page 103

Advertising
background image

7.4 Priority Levels of Operations

7-15

7

Programming

7.4 Priority Levels of Operations

A priority level is assigned to each operator used in an operation written in motion language.
For an operation involving three or more items, specify the priority level by using ().
The priority levels of operators are shown below.

• Arithmetic Operation Example

Precautions on operations involving three items or more
For example, with the operation below,

1 + 2 is calculated first according to the priority level shown above, and then the result of 3 is multiplied by 3. The final
result of 9 is then stored in MW00100. Therefore, MW00100 = 9.

Operator

Priority Level

1

2

3

4

Parentheses

()

NOT

!

AND

&

OR

|

XOR

^

Arithmetic operation

+

-

*

/

High

Low

• Operation example

With this operation, 1 + 2 is calculated, and the result of 3 is stored in MW00100.

• Example of operation involving three items or more

With this operation, 2 * 3 is calculated first, and 1 is added to the result of 6. The final result of 7 is then
stored in MW00100.
Therefore, MW00100 = 7

MW00100 = 1 + 2

∗ 3;

EXAMPLE

   

 

MW00100 = 1 + 2;

   

 

MW00100 = 1 + (2

∗ 3);

INFO

Advertising