Delta DVP-ES2 User Manual Page 343

  • Download
  • Add to my manuals
  • Print
  • Page
    / 702
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 342
3. Instruction Set
3-227
API Mnemonic Operands Function
82
ASCI P
Convert Hex to ASCII
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 * * * * * *
n * *
ASCI, ASCIP: 7 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: Source device D: Destination device n: Number of nibbles to be converted (n = 1~256)
Explanations:
1. 16-bit conversion mode: When M1161 = OFF, the instruction converts every nibble of the Hex
data in S into ASCII codes and send them to the higher 8 bits and lower 8 bits of D. n = the
converted number of nibbles.
2. 8-bit conversion mode: When M1161 = ON, the instruction converts every nibble of the Hex
data in S into ASCII codes and send them to the lower 8 bits of D. n = the number of converted
nibbles. (All higher 8 bits of D = 0).
3. Flag: M1161 (8/16 bit mode switch)
4. Available range for Hex data: 0~9, A~F
Program Example 1:
1. M1161 = OFF, 16-bit conversion.
2. When X0 = ON, convert the 4 hex values (nibbles) in D10 into ASCII codes and send the result
to registers starting from D20.
X0
ASCI D10 D20 K4
M1001
M1161
3. Assume:
(D10) = 0123 H ‘0’ = 30H ‘4’ = 34H ‘8’ = 38H
(D11) = 4567 H ‘1’ = 31H ‘5’ = 35H ‘9’ = 39H
(D12) = 89AB H ‘2’ = 32H ‘6’ = 36H ‘A = 41H
(D13) = CDEF H ‘3’ = 33H ‘7’ = 37H ‘B’ = 42H
Page view 342
1 2 ... 338 339 340 341 342 343 344 345 346 347 348 ... 701 702

Comments to this Manuals

No comments