Delta-electronics Programmable Logic Controller DVP-PLC Manuel d'utilisateur Page 380

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 586
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 379
7 Application Instructions API 50-99
DVP-PLC APPLICATION MANUAL
7-96
Program Example 2:
1. M1161 = On: The 8-bit conversion mode
2. When X0 = On, convert the 4 hex values in D10 into ASCII codes and send the result to registers starting from
D20.
X0
ASCI D10 D20 K4
M1000
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) = CDEFH ‘3’ = 33H ‘7’ = 37H ‘B’ = 42H
4. When n = 2, the bit structure will be as:
0000000100100011
01
23
D10=0123 H
00 000 001100 0
00 00 0011001
3
33
2
100 0
100 00
ASCII code of D20=2 is 32H
ASCII code of D21=3 is 33H
5. When n = 4, the bit structure will be as:
0000 0 1 0 1 11000000
0 00000 00 00000011
00
01 2 3
D10 = H 0123
b15
b15
Converted to
b15
0 00000 00 00110011
b15
3 H 33
2 H 32
D22
b15
b0
b0
b0
b0
b0
D20
D21
1 H 31
D23
0 H 30
00000 0 0 0001011
00
00000 0 0 0010011
Vue de la page 379
1 2 ... 375 376 377 378 379 380 381 382 383 384 385 ... 585 586

Commentaires sur ces manuels

Pas de commentaire