beautypg.com

4 pcs modbus master operation – Micromod Micro-DCI: 53MC5000 PLC AND PRINTER INTERFACES User Manual

Page 67

background image

6.4 PCS MODBUS MASTER OPERATION

In Modbus master operation, the PCS initiates the read and write commands to the PLC.

6.4.1 PCS MODBUS MASTER MEMORY MAP

The DDI-A and DDI-B PCS memory maps for Modbus master operation are laid out similar to those
shown in Figures 3-1 and 3-2, except the L-values are stored on the byte boundary instead of a
word boundary. The size of the memory is unchanged, but a minimum of one byte (8 L-values) is
transferred even if only one L-value is used as an active indicator of a process event. Data trans-
fers are similar to those shown in Figure 3-3 and described in Section 3.2. There is one exception
and that is the last datapoint of the L-memory area (DDI-A - L2047, DDI-B - L1535), can be written
as a single coil (bit) from the PCS to the PLC.

6.4.2 WRITING A SINGLE L-VALUE

Write Function Code 5 - Preset [Write] a Single Coil.
Writing a single L-value causes the last bit of the L-memory area (DDI-A - L2047, DDI-B - L1535)
to be written to a single coil in the PLC.

6.4.3 READING A SINGLE L-BYTE

Read Function Code 1 - Read Coil Status, or Read Function Code 2 - Read Input Status.
A single byte of L-data read from the PLC appears at the top of the L-memory area (L1536 for DDI-
A; L1024 for DDI-B).

6.4.4 WRITING A SINGLE L-BYTE

Write Function Code 15 - Force [Write] Multiple Coils.
The last byte of the L-memory area is used to write to the PLC (L2040 of DDI-A; L1528 of DDI-B).

6.4.5 READING MULTIPLE L-VALUES

Read Function Code 1 - Read Coil Status, or Read Function Code 2 - Read Input Status.
When reading multiple L-values, whole bytes must be transferred from the PLC to the PCS. If the
data must fall on byte boundaries in the PCS, then care should be taken in the choice of the PLC
read memory address. The coil or status bit at this address will be the least significant bit of the
first byte read into the PCS. All subsequent bytes will follow contiguously.

6.4.6 WRITING MULTIPLE L-VALUES

Write Function Code 15 - Force [Write] Multiple Coils.
When writing multiple L-values, data is sent from the PCS L-memory area to the PLC in whole
bytes. If the data sent must be loaded into specific byte boundaries in the PLC, then care should
be taken in the choice of the PLC write memory address. The coil or status bit at this address will
be the least significant bit of the first byte written to the PLC. All subsequent bytes will follow con-
tiguously.

6.4.7 READING C-VALUES

Read Function Code 3 - Read Holding Registers, or Read Function Code 4 - Read Input Registers.
Reading C-values causes the addressed information to be retrieved from the PLC memory at word
boundaries. The requested information is sent to the PCS where the C-values are stored in the C-
memory area at word boundaries. Storage starts at the top of the PCS C-memory area and contin-
ues until the transfer is complete.

Section 6. MODBUS RTU Mode

MODBUS2

6-3