3 double word fragmentation, 4 sample programs – Rockwell Automation 57C445 AutoMax PC Link Interface Module User Manual
Page 45

D3Ć5
There are 16 slot maps (SLOT_MAPS) for a given drop. Each slot
map consists of two double words (each double word is 4 bytes).
The first double word is the output register map; the second double
word is the input register map. The double word register map is
defined in Table 5:
Table 5 - Double Word Register Map
Byte
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
0
#7
#6
#5
#4
#3
#2
#1
#0
1
#15
#14
#13
#12
#11
#10
#9
#8
2
#23
#22
#21
#20
#19
#18
#17
#16
3
#31
#30
#29
#28
#27
#26
#25
#24
If the bit for a given register is set in the output register map, the
register is an output register. If the bit for a given register is set in the
input register map, the register is an input register. A register may not
be both an input and an output; therefore any bits set in the output
map for a given slot must not be set in the input map. All input and
output register blocks must be contiguous. A sample program which
demonstrates the creation of configuration packets, called RIOCNF.C,
is provided on the distribution diskette.
3.3
Double Word Fragmentation
Due to the 16Ćbit limitation of the PC Link module, the module is
accessed from the host one word at a time. When a double word
value register is read or written, it is actually read or written as two
words. If the PC Link module writes a double word value in between
the host's two accesses, the host will have one word which is from
the old double word value and one word which is from the new
double word value.
To protect from fragmentation during reads, each double word is
read twice in succession. The results of the two reads are compared.
If the results are the same, the value is ok. If the values are different,
the value must be read again, but his new read will not be
fragmented since information for this drop will not be updated for at
least 2.6 milliseconds.
For example, if the PC Link module was to change a double word
value between the host's two word reads for the double word, it will
not update that double word again until the next network scan which
is a minimum of 2.6 milliseconds later. If the values of the two host
double word reads (1 assignment and 1 compare) are different, we
know that the double word value will not be updated for at least 2.6
milliseconds. As long as the next access is within this time period, the
double word value read will not be fragmented.
3.4
Sample Programs
Three sample programs are provided with the RERIO software.
These programs are described in sections 3.4.1Ć3.4.3.