Rockwell Automation 1747-PT1, D1747NP002 Hand-Held Terminal User Manual
Page 380

Chapter 27
The Status File
27–12
Address
Description
5/02
5/01,
Fixed
S:3L
Current/Last 10 ms Scan Time Byte
Read/write. The value of this byte tells you how much time elapses
in a program cycle. A program cycle includes the ladder program
scan, I/O scan, and servicing the communication port. The byte
value is zeroed by the processor each scan, immediately preceding
the execution of rung 0 of program file 2 (main program file) or on
return from the REF instruction. The byte is incremented every 10
milliseconds thereafter, and indicates, in 10 ms increments, the
amount of time elapsed in each program cycle. If this value ever
equals the value in S:3H Watchdog, a user watchdog major error will
be declared (code 0022).
Resolution of the scan time value: The resolution of this value is +0
to – 10 milliseconds. Example: The value 9 indicates that 80–90 ms
has elapsed since the start of the program cycle.
Application example: Your application requires that each and every
program scan execute in the same length of time. You measure the
maximum and minimum scan times and find them to be 40 ms and
20 ms.
You can make every scan equal to precisely 50 ms by programming
the following rungs as the last rungs of your program.
This example assumes that your I/O scan and communications
servicing takes less than 10 ms. If it were to exceed 10 ms, the
resolution of +0 to –1 tick (10 ms) would have to be added to the
scan time.
]LBL[
1
(JMP)
1
LES
LESS THAN
Source A
N7:0
Source B
5
MOV
MOVE
Source
S:3
Dest
N7:0
AND
BITWISE AND
Source A
255
Source B
N7:0
Dest
N7:0
•
•