Micromod Micro-DCI: 53MC5000 PLC AND PRINTER INTERFACES User Manual
Page 26

3.2.1 CALCULATING STARTING ADDRESSES FOR WRITES
Methods to calculate L and C starting datapoint locations from the bottom of memory for write op-
erations are as follows:
DDI-A L-Type Starting Location (Words) = L(2048) - (Number of Output Words X 16)
If four words are to be output from the L-Stack, then the starting datapoint location is as follows:
L-Stack Starting Location = L(2048) - (4 X 16) = L(2048) - (64) = L1984
DDI-B L-Type Starting Location (Bytes) = L(1536) - (Number of Output Bytes X 8)
If six bytes are to be output from the L-Stack, then the starting datapoint location is as follows:
L-Stack Starting Location = L(1536) - (6 X 8) = L(1536) - (48) = L1488
DDI-A C-Type Starting Location (Words) = C(768 - Number of Output Words)
If three words are to be output from the C-Stack, then the starting datapoint location is as follows:
C-Stack Starting Location = C(768 - 3) = C765
DDI-B C-Type Starting Location (Words) = C(704 - Number of Output Words)
If three words are to be output from the C-Stack, then the starting datapoint location is as follows:
C-Stack Starting Location = C(704 - 3) = C701
3.3 PCS - PLC MEMORY MAP AGREEMENT
It is important to remember that data is stored in contiguous locations in the PCS and PLC memory
maps; therefore, there must be agreement in the data assignments between these two (PCS output
identifiers must match PLC input identifiers and PCS input identifiers must match the PLC output
identifiers).
When defining the number of PLC L and C memory locations, the user should allow room for possi-
ble future expansion of both memory areas. This is advised because expanding the L and C PLC
memory areas causes the established memory locations to move down.
3.4 PLC MEMORY ADDRESSING SCHEME
Starting PLC Memory Address High and Low Bytes are part of the Read and Write Control Bytes
sent from the PCS to a PLC for read and write operations. The high and low bytes are two bytes
that form the starting PLC memory location to be addressed for the operation. These two bytes
contain byte-decimal data; therefore, if the PLC uses a memory addressing scheme that is not byte-
decimal, then decimal values must be entered into these bytes that represent the starting memory
address being accessed by the operation. This conversion is not performed by the PCS. For ex-
ample, if the PLC starting memory address is a word-octal 300
8
or a word-hexadecimal C0
16
, then
the decimal values that must be entered in the two byte starting memory address are 1 for the
Starting PLC Memory Address High Byte and 128 for the Starting PLC Memory Address Low Byte.
These numbers are derived as follows:
C0
16
= 300
8
= 192
10
(See Appendix A for data conversion procedures)
192
10
X 2 = 384
10
(there are two bytes per word)
384/256 = 1 with 128 remainder; therefore the High byte value is 1, and the Low byte value is 128.
53MC9015 53MC5000 PLC and Printer Interfaces
3-2
DESCRP