Delta DVP-ES2 User Manual Page 348

  • Download
  • Add to my manuals
  • Print
  • Page
    / 702
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 347
DVP-ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming
3-232
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 bytes to be converted (n = 1~256)
Explanations:
1. 16-bit conversion mode: When M1161 = OFF, the instruction converts n bytes of ASCII codes
starting from S into Hex data in byte mode and send them to high byte and low byte of D. n =
the converted number of bytes.
2. 8-bit conversion mode: When M1161 = ON, the instruction converts n bytes (low bytes only) of
ASCII codes starting from S into Hex data in byte mode and send them to the low byte of D. n
= the converted number of bytes. (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 4 bytes of ASCII codes stored in registers D20~ D21 into Hex value
and send the result in byte mode to register D10. n = 4
X0
HEX D20 D10 K4
M1001
M1161
3. Assume:
S ASCII code
HEX
conversion
S ASCII code
HEX
conversion
D20 low byte H 43 “C” D24 low byte H 34 “4”
D20 high byte H 44 “D” D24 high byte H 35 “5”
D21 low byte H 45 “E” D25 low byte H 36 “6”
D21 high byte H 46 “F” D25 high byte H 37 “7”
D22 low byte H 38 “8” D26 low byte H 30 “0”
D22 high byte H 39 “9” D26 high byte H 31 “1”
D23 low byte H 41 “A” D27 low byte H 32 “2”
D23 high byte H 42 “B” D27 high byte H 33 “3”
API Mnemonic Operands Function
83
HEX P
Convert ASCII to HEX
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 * *
HEX, HEXP: 7 steps
Page view 347
1 2 ... 343 344 345 346 347 348 349 350 351 352 353 ... 701 702

Comments to this Manuals

No comments