beautypg.com

7 scan time – Micromod Micro-DCI: 53MC5000 PLC AND PRINTER INTERFACES User Manual

Page 33

background image

3.7 SCAN TIME

The Scan Time is a time period from 100 to 25,500 ms that the user selects by entering a value
from 1 to 255 into datapoints B685 (DDI-A) and B661 (DDI-B). The read and write data exchanges
occur between the PCS and PLC during this time interval; therefore, the purpose of the Scan Time
is to set the data update rate for the PCS. The PLC scan cycle runs asynchronously to the internal
F-TRAN scan cycle. Because of this, an F-TRAN program that uses data in the PLC L- or C-data-
base modules might read adjacent datapoint locations that are a scan update apart. A typical
Scan Time that is properly set can be depicted as follows:

Scan Time

n

Scan Time

n+1

Scan Time

n+2

Read
Phase

Write
Phase

Read
Phase

Write
Phase

Read
Phase

Write
Phase

Notice, all of the read and write phases are completed within the Scan Time cycle.

If the read and write phases exceed the specified Scan Time, then a Scan Overrun occurs and the
Scan Overruns Counter (B686 for DDI-A and B662 for DDI-B) is incremented. The Scan Time it-
self should be increased or the data being exchanged during the read or write phases should be re-
duced. A Scan Time that is improperly set can be depicted as follows:

Scan Time

n

Scan Time

n+1

Scan Time

n+2

Read
Phase

Write
Phase

(Dead Time)

Read
Phase

Write
Phase

Notice that the write phase is overlapping into the Scan Time

n+1

window because the Scan Time is

improperly set. The Scan Time

n+1

window now has a large dead time of inactivity until Scan Ti-

me

n+2

starts again with a new read phase. An improper Scan Time therefore can actually reduce

PCS throughput.

As shown below, the read and write phases are data exchanges that have three minimal time inter-
vals: the command from the PCS, which requires 13 characters minimum; the PLC turnaround
time, which is assumed as 20 ms minimum; and the PLC response, which also requires 13 charac-
ters minimum.

Read Phase

Write Phase

Read L and C
Words Command
(13 Characters
minimum)

960 ms
PCS-PLC
Turnaround
Time

PLC Response
(13
Characters
minimum)

Write L and C
Words Command
(13 Characters
minimum)

960 ms
PCS-PLC
Turnaround
Time

PLC Response
(13 Characters
minimum)

As shown above, there is a minimum 52 character overhead and a minimum 1920 ms time over-
head. The time for each phase is extended depending on the quantity of data exchanged and the
baud rate at which it is exchanged. Generally, the read phase is longer, as a greater quantity of
data is usually transferred from the PLC to the PCS. During the write phase, the PLC response is
an echo message of the write command without the data.

Section 3. Product Description

DESCRP

3-9