Plus RS-232 Manuel d'utilisateur Page 146

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 235
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 145
Data Encoding and Addressing
Chapter 6
6-9
addressing in a PLC’s ladder diagram program to allow it to access its
own data table memory.
Due to the differences in PLC memory organization, the logical
addressing scheme varies for each controller type.
PLC/PLC-2
PLC and PLC-2 Family controllers access their data tables by using an
octal word address. In PLC/PLC-2 command messages, this type of
logical word address must be represented as an equivalent byte address.
This byte address appears in the 2-byte field labeled ADDR in the
message block formats (Chapter 5).
To encode a logical PLC/PLC-2 address, convert the octal word address to
whatever number system you are using in your computer application
programs. Next, double this converted word address to get the
corresponding byte address. Place the result in the ADDR field, low byte
first.
For example, to address PLC Word 020, you would first convert the octal
value 20 to the desired base. In this example, let’s use hexadecimal
values. Octal 20 is 10 hex. Doubling this value gives 20 hex for the byte
address. You would then code the value 0020 hex in the ADDR field of
the message, low byte first. In binary format, ADDR would look like:
00100000 00000000
First Byte Second Byte
Low Byte (Value 20 Hex) High Byte (Value 00 Hex)
ADDR
Important: PLC and PLC-2 Family controllers use this same logical
addressing format when they transmit command messages to another
station. If you plan to transmit a command message to your computer
from one of these PCs, you should set up a buffer space in your computer
to simulate PC memory. You would then have to write computer
application programs to accept and execute commands from the PC
stations and to translate the ADDR value into the corresponding address
in the simulated PC memory.
Vue de la page 145
1 2 ... 141 142 143 144 145 146 147 148 149 150 151 ... 234 235

Commentaires sur ces manuels

Pas de commentaire