23.03.2017 Views

wilamowski-b-m-irwin-j-d-industrial-communication-systems-2011

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Modbus 36-15<br />

Modbus TCP frame<br />

MBAP header<br />

Modbus application layer PDU (APDU)<br />

Transaction<br />

identifier<br />

Protocol<br />

identifier<br />

Length<br />

Unit<br />

ID<br />

Func.<br />

code<br />

Start<br />

address<br />

Register<br />

count<br />

Byte<br />

count<br />

Data for<br />

register<br />

Data for<br />

register<br />

A3<br />

6E<br />

00<br />

00 00 0B 01<br />

10 00 01 00 02 4 E1 24<br />

E2 48<br />

Request (from PLC to RTU)<br />

A3 6E 00 00 00 06 01 10 00 01 00 02<br />

Reply (from RTU to PLC)<br />

FIGURE 36.14<br />

Example Modbus transaction between the PLC and the RTU.<br />

holding registers, this particular RTU will ignore any attempt to write to registers in this second contiguous<br />

area. Registers in this second contiguous area should therefore be considered as being “read only.”<br />

As may be seen from this table, the four digital inputs of the first DDI 3420 module are mapped onto<br />

the holding register at address 5392. The least significant 4 bits of the following register at address 5393<br />

will contain status information (short-circuit, power failure) related to these same inputs.<br />

A Modbus master changes the outputs on the next module, the DDO 3410 with four digital outputs,<br />

by writing the desired state to the holding register at address 0001. This DDO 3410 module uses another<br />

two registers in the input area: the first (at address 5394) echoes the value stored in the register 0001,<br />

while the following (at address 5395) stores the actual status of the physical outputs.<br />

The AVI 1270 module uses the registers 5396 and 5398 to store the input voltage of each analog input,<br />

while the other two registers, at addresses 5397 and 5399, store status information (over and undervoltage<br />

errors and warnings). The AVO 1250 uses the registers at addresses 0002 and 0003 to receive<br />

the voltage values that should be applied to the analog outputs, and the registers at 5400 and 5401 store<br />

status information (over and under-voltage errors).<br />

An example of a possible exchange of Modbus message frames between the PLC and this particular<br />

RTU (functioning as Modbus server) is described in Figure 36.14. In this exchange, the PLC uses the<br />

Modbus function “Write Multiple Registers” to change the analog output values stored in registers 0002<br />

and 0003 to the values 0xE124 and 0xE248, respectively. Note that the starting address of 0002 is sent<br />

on the wire as 0001 since this particular RTU follows the Modbus specification to the letter, and all<br />

documentation assumes that the memory areas start at address 1, which is then sent on the wire as 0.<br />

Acronyms<br />

APDU<br />

ASCII<br />

CRC<br />

EIA<br />

FIFO<br />

HMI<br />

IP<br />

LAN<br />

LRC<br />

MBAP<br />

PLC<br />

RTU<br />

SCADA<br />

TCP<br />

TIA<br />

Application layer protocol data unit<br />

American Standard Code for Information Interchange<br />

Cyclic redundancy check<br />

Electronics Industries Association<br />

First in first out<br />

Human–machine interface<br />

Internet protocol<br />

Local area network<br />

Longitudinal redundancy check<br />

Modbus application protocol<br />

Programmable logic controller<br />

Remote terminal unit<br />

Supervisory control and data acquisition<br />

Transmission control protocol<br />

Tele<strong>communication</strong>s Industry Association<br />

© <strong>2011</strong> by Taylor and Francis Group, LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!