02.02.2018 Views

Practical_modern_SCADA_protocols_-_dnp3,_60870-5_and_Related_Systems

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

48 <strong>Practical</strong> Modern <strong>SCADA</strong> Protocols: DNP3, <strong>60870</strong>.5 <strong>and</strong> <strong>Related</strong> <strong>Systems</strong><br />

Synchronization<br />

In order to achieve reliable communication, the reception of a message must be<br />

synchronized with its transmission. In other words, the receiving device must be able to<br />

identify the start of a new message frame. Under the Modbus RTU protocol, frame<br />

synchronization is established by limiting the idle time between successive characters<br />

within a message frame. If three character times (approximately three milliseconds)<br />

elapse without the receiving device detecting a new character, the pending message will be<br />

flushed. The next byte will then be interpreted as the address field of a new message line.<br />

Memory notation<br />

The memory notation allows for four different data types: coils, discrete inputs, input<br />

registers <strong>and</strong> holding registers. Register variables consist of two bytes, while coils <strong>and</strong><br />

discrete inputs are single bytes.<br />

Each function references only one type of data. This allows message-frame memory<br />

references to be expressed as offsets relative to the lowest possible address for that data<br />

type. For example, holding register 40001 is referenced as 0000.<br />

110V AC Coil<br />

Digital Output<br />

Discrete<br />

Digital Input<br />

5V DC<br />

Master<br />

Node<br />

16 Bit Input<br />

Register<br />

Slave Node<br />

16 Bit Output<br />

Register<br />

ADC<br />

DAC<br />

4-20mA<br />

Analog Input<br />

4-20mA<br />

Analog Output<br />

Figure 2.27<br />

Diagram illustrating Modbus data types<br />

Table 2.2 lists the address range <strong>and</strong> offsets for these four data types, as well as the function<br />

codes which apply to each. The diagram above also gives an easy reference to the<br />

Modbus data types.<br />

Function codes<br />

Each request frame contains a function code that defines the action expected for the target<br />

controller. The meaning of the request data fields is dependent on the function code<br />

specified.

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

Saved successfully!

Ooh no, something went wrong!