beautypg.com

Delta DVP-ES2 User Manual

Page 313

background image

3 . I n s t r u c t i o n S e t

3 - 1 9 7

API Mnemonic

Operands

Function

76

ASC

ASCII code conversion

Controllers

ES2/EX2 SS2 SA2

SE

SX2

Bit Devices

Word devices

Program Steps

Type

OP

X Y

M S K H KnX KnY KnM KnS T C D E F

S

D

*

*

*

ASC: 11 steps

PULSE 16-bit 32-bit

ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2

Operands:

S: English letters to be converted into ASCII code D: Device for storing ASCII code

Explanation:

1.

The ASC instruction converts 8 English letters stored in S and save the converted ASCII code

in D. The value in S can be input by WPLSoft or ISPSoft.

2.

If PLC is connected to a 7-segment display while executing ASC instruction, the error

message can be displayed by English letters

3.

Flag: M1161 (8/16 bit mode switch)

Program Example:

When X0 = ON, A~H is converted to ASCII code and stored in D0~D3.

X0

ASC

A B C D E F G H

D0

D0

D1

D2

b15

b0

42H (B)

41H (A)

44H (D)

43H (C)

46H (F)

45H (E)

D3

48H (H)

47H (G)

Low byte

High byte

When M1161 = ON, every ASCII code converted from

the letters will occupy the lower 8 bits (b7 ~ b0) of a

register and the upper 8 bits are invalid (filled by 0),

i.e. one register stores a letter

b15

b0

D0

D2

D4

D6

D1

D3

D5

D7

00 H

00 H

00 H

00 H

00 H

00 H

00 H

00 H

41H (A)

42H (B)

43H (C)

44H (D)

45H (E)

46H (F)

47H (G)

48H (H)

Low byte

High byte

This manual is related to the following products: