Int (integer), Function – Yaskawa SMC–4000 User Manual

Page 141

Advertising
background image

131

SMC–4000 User Manual

@INT (Integer)

[Function]

DESCRIPTION:

@INT returns only the whole number part of a number or variable given in square brackets. Note that the
@INT command is a function, which means that it does not follow the convention of the commands, and
does not require the underscore when used as an operand.

ARGUMENTS: @INT [n]

where

n is a number

USAGE:

EXAMPLES:

While Moving

Yes

Minimum n value

-2147483648.9999

In a Program

Yes

Maximum n value

2147483648.9999

Not in a program

Yes

Default Value

---

Can be Interrogated

No

Default Format

---

Used as an Operand

Yes

#TEST

Program TEST

VAR1=123.456

Set variable

MG @INT[VAR1]

Display only the whole number portion of

VAR1

VAR2=@INT[VAR1]+25

Perform calculation

EN

End of program

Advertising