beautypg.com

Sel language – IAI America DS-S-C1 User Manual

Page 50

background image

48

133

• • • • • • • • • • •

Variable 99

[Function]

Reads the value from the designated I/O port or flag as a binary number, then stores this
value in variable register 99.

= 133 in decimal notation

• • •

Binary Number

• • •

Input Port No.

n

o

i

s

n

a

p

x

E

n

o

i

t

i

d

n

o

c

)

R

O

·

D

N

A

(

t

u

p

n

I

n

o

i

t

i

d

n

o

c

)

g

a

l

F

·

O

/

I

(

d

n

a

m

m

o

C

t

s

o

P

)

g

a

l

F

·

t

u

p

t

u

O

(

d

n

a

m

m

o

C

1

d

n

a

r

e

p

O

2

d

n

a

r

e

p

O

l

a

n

o

i

t

p

O

l

a

n

o

i

t

p

O

N

I

g

a

l

F

·

t

r

o

p

O

/

I

g

a

l

F

·

t

r

o

p

O

/

I

2

7

2

6

2

5

2

4

2

3

2

2

2

1

2

0

3

2

2

2

1

2

0

2

9

1

8

1

7

1

6

1

N

O

F

F

O

F

F

O

F

F

O

F

F

O

N

O

F

F

O

N

O

Note:

The maximum input limit for the port is 31 consecutive bits.

[Example 1]

IN

8

15

Read input ports 8 ~15 as a binary number in variable 99.

ò

Binary number

ò

12. SEL Language

IN (Binary Number Read I/O • Flag)

[Example 2]

LET

1

8 Assign 8 to variable 1.

LET

2 15 Assign 15 to variable 2.

IN

*1

*2 Read port 8(content of variable 1) to port 15
(content of variable 2) as a binary number to variable 99.

0

0

1

0

0

1

0

1

2

7

+ 0 + 0 + 0 + 0 + 2

2

+ 0 + 2

0

28 + 0 + 0 + 0 + 0 + 4 + 0 + 2