Rockwell-automation 1775-KA PLC-3 Communication Adapter Module User Ma Instrukcja Użytkownika Strona 89

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 239
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 88
Message Procedure Commands
Chapter 6
611
FROM_BCD Function
The FROM_BCD function converts its parameter from
binary–coded–decimal format to binary format. The resulting value is 32
bits long. For example, the FROM_BCD function in Figure 6.2 converts
the contents of decimal word 12 from binary coded decimal to a regular
decimal value of 27. From the above example (section titled TO_BCD
Function), the FROM_BCD function stores the following bit pattern in
user symbol COUNT:
0000 0000 0000 0000 0000 0000 0001 1011
As you can see from these examples, TO_BCD and FROM_BCD perform
opposite functions.
You can add your own explanatory comments to any command line in a
message procedure. To do this, enter a semicolon (;) after the command.
Then enter your comment after the semicolon. Figure 6.3 illustrates the
format for comments.
Figure 6.3
Format
for Comments
COUNT = 0 ; INITIALIZE COUNTER
<
<
Comment
Comment Delimiter
Command
10029–I
Anything that appears between a semicolon and the end of the command
line is considered to be a comment. Comments may be any length. The
end of the command line, and therefore the end of your comment, is
delimited by the carriage– return and line–feed pair of characters.
A comment can be the only thing on a line. Do not use comments on the
same line as label. Doing so will cause errors in the message procedure.
Comments
Przeglądanie stron 88
1 2 ... 84 85 86 87 88 89 90 91 92 93 94 ... 238 239

Komentarze do niniejszej Instrukcji

Brak uwag