
3.Power Mate-D/F/H OPERATION B-62714EN/04
- 92 -
3.2 DATA CONCURRENCY
When DI data is handled by a ladder program, the I/O Link-II function
guarantees the concurrency of data on a byte-by-byte basis, but does
not guarantee the concurrency of multiple bytes of data.
The I/O Link-II function does not exchanges data in synchronism with
a ladder program, so that the function does not guarantees the
concurrency of DI data consisting of 2 bytes or more. This means that
when a ladder program reads 2-byte DI data, for example, the higher
byte and lower byte of the data may be updated at different timings.
Example where concurrency is not guaranteed
When the 2-byte data 1234 (hex) is entered from the I/O Link-II board
to the area R0300 set to the value 0000 (hex), the ladder program may
read the value 0034 (hex).
DI data R area of the PMC
R0300 00 00
34
R0300 00 34
12 If the ladder program reads R0300
during this period, 0034 (hex) is read.
R0300 12 34
Example of countermeasure: Control using synchronization flags
Concurrency can be guaranteed by providing a synchronization flag
before and after multi-byte data and synchronizing the data with the
flags. An example of guaranteeing the concurrency of 6-byte data is
given below.
(1) Data structure
A synchronization flag is prepared at the byte position preceding
the 6-byte data and at the byte position following the 6-byte data,
thus allocating an 8-byte area in total.
R0099 Synchronization flag 1
R0100
: Data section
R0105
R0106 Synchronization flag 2
(2) Processing on the data write side
The data is updated using the procedure below.
1 Synchronization flag 1 is incremented.
2 The data section is updated.
3 The same value as set in synchronization flag 1 is set in
synchronization flag 2.