Yaskawa MotionWorks+ Windows Software User Manual

Page 69

Advertising
background image

MotionWorks+™

Expression Builder

63

Creating Expressions

Double-click on the folders in the Variable Type window. Select an item from the
Variable window. The item is inserted at the cursor position.

For the purpose of explanation of the operators, assume the following:.

Variable Name

Type

Value

mPositon_Complete

Bit

1

mSpeed_Main

Float

-36.274

mState_Latch_Main

Bit

1

Mytable[Var2]

Long

10000

Var1

Integer

100

Var2

Integer

10

Var3

Integer

75

Var4

Integer

10

Var5

Bit

1

Var6

Bit

0

Var7

Integer

85 (0x55)

Var8

Integer

170 (0xAA)

Var9

Float

0.1666667

Operator

Symbol

Example Expression

Result

Plus

+

Var1 + Var2

110

Minus

-

Var1 - Var2

90

Multiply

*

Var1 x Var2

1000

Divide

/

Var1 / Var2

10

Modulus

%

Var3 % 4

3

Equal To

==

mPosition_Complete==Var5

1

Greater Than

>

Var1 > Var2

1

Greater Than or Equal to

>=

Var2 >= Var3

0

Less Than

<

Var1 < Var3

0

Less Than or Equal to

<=

Var2 <= Var4

1

Logical And

&&

Var5&&mPosition_Complete

1

Logical Or

| |

Var5||Var6

1

Logical Not

!=

mState_Main_Latch != Var6

1

Bitwise And

&

Var7 & Var8

0

Bitwise Or

|

Var7 | Var8

255 (OxFF)

Bitwise Not

!

( )

( )

(Var1+Var2) / Var3

11

Advertising