Rockwell-automation 1771-DB BASIC MODULE Manuel d'utilisateur Page 130

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 394
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 129
Chapter
Expressions, Variables and Operators
9
9 -20
You can change the fraction portion of TIME by manipulating the contents
of internal memory location 71 (47H). You can do this by using a
DBY(71) operator (page 9 -18). Note that each count in internal memory
location 71 (47H) represents 5 milliseconds of TIME.
>DBY(71)
= 0 :REM FRACTION OF TIME = 0
>
PRINT TIME
READY
>RUN
0
>NEW
>
DBY(71) = 3 :REM FRACTION OF TIME = 3*5ms = 15 ms
>
PRINT TIME
READY
>RUN
1.5 E-2
Only the integer portion of TIME changes when a value is assigned.
This allows you to generate accurate time intervals. For example, to create
an accurate 12-hour (43200 seconds) clock use an ONTIME statement
(page 11 -25). When the TIME interrupt occurs, the statement TIME 0 is
executed, but the millisecond counter is not re-assigned a value.
If interrupt latency exceeds 5 milliseconds, the clock remains accurate.
Commands
10
What’s Next?
Vue de la page 129
1 2 ... 125 126 127 128 129 130 131 132 133 134 135 ... 393 394

Commentaires sur ces manuels

Pas de commentaire