beautypg.com

Chapter 4. programming – IAI America S-SEL-E User Manual

Page 156

background image

Page 151

SQR (Square Root)

Chapter 4. Programming

E x p a n s io n

c o n d itio n

( A N D · O R )

In p u t

c o n d itio n

( I/O · F la g )

C o m m a n d

P o s t

( O u tp u t p o r t · F la g )

C o m m a n d

O p e r a n d 1

O p e r a n d 2

O p tio n a l

O p tio n a l

S Q R

V a r ia b le n o .

D a ta ·V a r ia b le n o .

O p tio n a l

[Function]

Stores the square root (SQR) of the data in Operand 2 in the variable in Operand 1. Stores the square root of the

contents in the variable in Operand 2 in the Operand 1 variable. If there is a post instruction (flag, output port),
it turns ON when the computation result is zero.

[Example]

SQR

1

4

The square root of 4 is 2, and after performing the command, variable 1 becomes 2.

SQR

1

*2

When the content of variable*2 in Operand 2 is 4, then the square root of 4 is 2, and after performing the
command variable 1 becomes 2.

This manual is related to the following products: