02.02.2018 Views

Practical_modern_SCADA_protocols_-_dnp3,_60870-5_and_Related_Systems

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

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

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

Note that in the following procedures, no new procedure is commenced until the<br />

previous procedure is terminated. It is for this reason that a single-bit frame count bit is<br />

sufficient for protection against frame sequence number errors; there is a frame window of<br />

exactly one.<br />

SEND/NO REPLY procedures<br />

The frame is transmitted, <strong>and</strong> a minimum line-idle time of 33 bit-times is required before<br />

any further transmissions by the primary. On receipt of the message at the secondary, it is<br />

checked for error by comparison with the checksum octet, <strong>and</strong> if valid it is notified to the<br />

service user.<br />

SEND/CONFIRM procedures<br />

The primary station will transmit the message. If a confirmation is not received from the<br />

secondary station within a configured time-out period, it will re-transmit the message up<br />

until a configured number of retries.<br />

If the secondary station receives the message, it will respond with either a positive or<br />

negative confirmation, function code 0 or 1. FC=0 means the message is correctly received<br />

<strong>and</strong> accepted, <strong>and</strong> in this case the procedure terminates. FC=1 means the secondary cannot<br />

accept the message, because its buffer is full or some other reason. In this case the primary<br />

will retry, up until a configured number of retries.<br />

This procedure makes use of the frame count bit (FCB) to ensure that the message<br />

sequence is not disturbed. The FCB is toggled with each SEND/CONFIRM transmission<br />

from the primary station, <strong>and</strong> an expected FCB flag is maintained by the secondary<br />

station. If a message sent by the primary is not confirmed by the secondary, it is retransmitted<br />

with the FCB unchanged. Thus a message lost or corrupted in the primary to<br />

secondary transmission direction would when retransmitted still have the expected FCB<br />

value. Alternatively, if the problem was that the confirmation from the secondary station<br />

was lost or corrupted, the secondary station would be able to recognize receipt of a<br />

retransmitted message from the primary by the unchanged FCB bit. In this case it retransmits<br />

the original confirmation message.<br />

As an alternative to sending a confirmation frame, which is a minimum of six octets in<br />

length (that is if single-octet address is used), the single control character response (hexadecimal<br />

0xE5) is allowed. This option may be used to improve transmission efficiency<br />

when there is no need to transmit any other information back to the primary station.<br />

REQUEST/RESPOND procedures<br />

This procedure is similar to the SEND/CONFIRM except instead of receiving a confirmation<br />

back from the secondary station, a frame containing data is returned, or a negative<br />

response is returned indicating that no data is available. In the case of a negative response,<br />

either a frame with FC=9, or the single control character (0xE5) may be returned.<br />

As for the SEND/CONFIRM procedures, the frame count bit is toggled at each end for<br />

each message transmission, <strong>and</strong> this is used to detect errors in the transmission in either<br />

direction. Basically, when both primary <strong>and</strong> secondary have incremented their frame count<br />

bits <strong>and</strong> they agree, the procedure is complete.<br />

Philosophy of transmission<br />

For unbalanced transmission only the controlling or primary station on a link can initiate<br />

transmissions. Because of this it is necessary that a polling system is implemented by the<br />

primary station in order to determine if there is change data available at each secondary<br />

station.

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

Saved successfully!

Ooh no, something went wrong!