Mathematical and functional expressions – Yaskawa SMC–4000 User Manual

Page 331

Advertising
background image

321

SMC–4000 User Manual

Mathematical and Functional Expressions

For manipulation of data, the SMC–4000 provides the use of the following mathematical operators:

The numeric range for addition, subtraction and multiplication operations is +/-2,147,483,647.9999. The
precision for division is 1/65,000.

Mathematical operations are executed from left to right. Parentheses can be used and nested four deep.
Calculations within a parentheses have precedence.

Examples:

Operator

Function

+

Addition

-

Subtraction

*

Multiplication

/

Division

&

Logical And (Bit-wise)

|

Logical Or (On some computers, a solid vertical line appears as a broken line)

( )

Parenthesis

SPEED=7.5*V1/2

The variable, SPEED, is equal to 7.5 multiplied by V1 and

divided by 2

COUNT=COUNT+2

The variable, COUNT, is equal to the current value plus 2.

RESULT=_TPX-(@COS[45]*4

0)

Puts the position of X - 28.28 in RESULT. 40 * cosine of

45

° is 28.28

TEMP=@IN[1]&@IN[2]

TEMP is equal to 1 only if Input 1 and Input 2 are high

Advertising