KEYENCE N-400 User Manual

Page 119

Advertising
background image

111

Chapter 6 PLC Link

6

Real-time control

To specify the flag areas, use “0000” or “0001”.

While the N-400 is writing the bar code data read by the BL series in the PLC’s
memory, the flag area is specified as “0001”.

When data writing is completed, the flag area becomes “0000”. This indicates
that new data has been stored in the A+02 to A+258 addresses.
When the A+00 address is “0000”, the stored data is effective.

Example 1

Normally, the A+00 address is set to “0000”.
While the N-400 is writing data, the flag area is “0001”. When the flag area
becomes “0000”, the data stored in the A+02 to A+258 addresses can be
processed.

Example 2

Normally, the A+00 address is set to “0001”.
When data writing is completed, the flag area becomes “0000”. The data stored
in the A+02 to A+258 addresses can then be processed.
Set the A+00 address to “0001” immediately after data processing is completed.
When the A+00 address becomes “0000”, this indicates that writing new data is
completed.

Note: When the BL series continuously reads bar codes, the real-time processing
mode may replace stored data with new data before the new data is processed in
the PLC. To prevent this, use the sequential processing mode as shown below.

Sequential processing

To specify the flag areas, use “0002” or “0003”.

When the A+00 address is “0002”, new data can be stored.

When data writing is completed, the flag area becomes “0003”, and new data
has been stored in the A+02 to A+258 addresses.

After data processing is completed, set the flag area to “0002”. Writing new data
is impossible until the flag area is “0002.

Data which cannot be stored in the specified areas is retained in the BL series’
transmission buffer. (In sequential processing mode, data is retained in the BL
series’ transmission buffer instead of the N-400’s transmission buffer. For the
capacity of the BL series’ transmission buffer, see p. 63.) If the amount of
retained data exceeds the buffer capacity, the “BUFFER OVERFLOW” error
occurs and the “OVER” code is stored in the corresponding area.

Even when the BL series with ID No. 1 retains data (the flag area is “0003”), data
from the BL series with other ID numbers can be stored (if the flag area is “0002”).
Thus, the sequential processing for each ID number is performed independently.

Tips

Advertising