Top Banner
컴퓨터 정보통신 기초 - 1 - 4 DNP
96

DNP - Daum

Nov 08, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: DNP - Daum

컴퓨터 및 정보통신 기초 - 1 -

제 4장

DNP

Page 2: DNP - Daum

- 2 - Tae-Wan Kim

주요내용

1. DNP 개요

2. DNP Layer

3. DNP Object Library

4. DNP Application layer

5. DNP Transport layer

6. DNP DataLink layer

7. DNP Physical layer

Page 3: DNP - Daum

컴퓨터 및 정보통신 기초 - 3 -

DNP 개요

Page 4: DNP - Daum

- 4 - Tae-Wan Kim

History of DNP

1990 IEC 870-5에 기초하여 DNP1.0, 2.0 개발(Westronic )

1993 DNP 3.0 Basic 4 Document 발표(Harris)

DNP Users Group 결성

1995 DNP Subset Definition 문서 발표

1996 DNP Users Group Home Page 개설(www.dnp.org)

1999 DNP LAN-WAN 표준 승인

1999 DNP Level 1 & 2 Tests Procedures 발간

2000 IEEE Std 1379 재발표(수정)

“Recommended Practice for IED to RTU Communications”

Page 5: DNP - Daum

- 5 - Tae-Wan Kim

Purpose of DNP

제어통신(Telecontrol)을 위한 프로토콜로 개발

IEC에 의해 정의된 제어통신의 특징

짧은 응답 시간

잡음에 강해야 함

비교적 저속의 통신네트워크 환경

DNP 3.0 은 위 세가지를 만족함

Page 6: DNP - Daum

- 6 - Tae-Wan Kim

Standard Protocol

DNP User Group 에 의해 관리됨

Vendors

시스템 통합관리자

Utilities

S/W 개발자

독립

Hardware

Operating System

통신 매체

제조사

국제표준에 기초함

IEC OSI, IEEE RP 1379, IEC 870-5

Page 7: DNP - Daum

- 7 - Tae-Wan Kim

Scaleable Protocol

대규모, 소규모에 모두 적용됨

Master

RTU(Remote Terminal Unit)

IED(Intelligent Electronic Device)

Subset 정의

Level 1 – 단순한 IED

Level 2 – IED, 단순한 RTU

Level 3 – RTU, Data 집합장치

Page 8: DNP - Daum

- 8 - Tae-Wan Kim

Intelligent Protocol

운용은 프로토콜을 통해 다이나믹하게 수정가능함

Assign Class, Enable Unsolicited

Data Link 실패시 자동 재전송 기능을 지원가능

(구현시 설계)

동보통신 가능(Broadcast)

File Transfer 지원(File Object ’0x46’)

Page 9: DNP - Daum

- 9 - Tae-Wan Kim

Public Protocol

DNP 문서는 Public Domain에서 쉽게 구할 수 있음

DNP Basic 4

• DNP Data Link Layer

• DNP Transport Layer

• DNP Application Layer

• DNP Object Library

DNP Subset Definitions Document

DNP Level 1 and 2 IED Certification Documents

Page 10: DNP - Daum

- 10 - Tae-Wan Kim

Object Based

객체 기반의 응용계층

기능코드가 데이터와 독립

Read, Write, Select/Check/Operate, Freeze and Read, Time

Sync

객체는 표준 SCADA 데이터와 일치됨

Binary Input, Binary Output, Analog Input, Analog Output,

Counter

DNP3.0 기술위원회를 통해 새로운 객체 추가 가능

Page 11: DNP - Daum

- 11 - Tae-Wan Kim

Multifunctional Protocol

다양한 통신매체에서 동작 가능

RS-232

Dialup

Radio(TRS, Wireless Data)

Digital Cellular

LAN(TCP/IP)

Satellite

저, 중속 네트워크에 적합

다른 자동화 프로토콜은 직렬에서 동작되거나 LAN 환경에서만

사용

Page 12: DNP - Daum

컴퓨터 및 정보통신 기초 - 12 -

DNP 3.0 Layer

Page 13: DNP - Daum

- 13 - Tae-Wan Kim

OSI 7 & DNP Layer

Application Layer

Presentation Layer

Session Layer

Transport Layer

Network Layer

Data Link Layer

Physical Layer

Application Layer

Transport Layer

Data Link Layer

Physical Layer

- OSI 7 Layer - - DNP Layer -

Data Model DNP Data Object Library

Page 14: DNP - Daum

- 14 - Tae-Wan Kim

DNP Frame Format

8 Bytes 2 Bytes

05 64 LEN DL

CTL

DEST SOURCE HEADER

TH AH DATA B;OCK 01

DATA B;OCK 02

DATA B;OCK 03

BEGIN OF APPLICATION USER DATA

CRC

16 Bytes 2 Bytes

DATA B;OCK 15

DATA B;OCK 16

10 Bytes 2 Bytes

CRC

CRC

CRC

CRC

CRC

Page 15: DNP - Daum

- 15 - Tae-Wan Kim

Overview of mechanism

(Read Request)

Object HeaderApplication

Header

Object HeaderApplication

HeaderTransport Header

Object HeaderApplication

HeaderTransport HeaderDatalink Header CRC

<Master>

Object Header

Transport

Layer-->

Application

Layer-->

DataLink

Layer-->

User --->

Object HeaderApplication

Header

Object HeaderApplication

HeaderTransport Header

Object Header

<Slave>

<Send>

Object HeaderApplication

HeaderTransport HeaderDatalink Header CRC

Page 16: DNP - Daum

- 16 - Tae-Wan Kim

Object HeaderApplication

HeaderData

Overview of mechanism

(Read Response)

Object HeaderApplication

HeaderData

Object HeaderApplication

HeaderTransport Header Data

Object HeaderApplication

HeaderTransport HeaderDatalink Header CRCData

<Master>

Object Header Data

Transport

Layer-->

Application

Layer-->

DataLink

Layer-->

User --->

Object Header

<Slave>

<Send>

Data

DataData

Object HeaderApplication

HeaderTransport Header Data

Object HeaderApplication

HeaderTransport HeaderDatalink Header CRCData

Page 17: DNP - Daum

컴퓨터 및 정보통신 기초 - 17 -

DNP 3.0 Object Library

Page 18: DNP - Daum

- 18 - Tae-Wan Kim

DNP Data Objects

DNP Object Number = Data Type

Binary Inputs, Binary Outputs, Counters, Analog Inputs,

Analog Outputs, Time, Class Data

Object 의 속성은 각 데이터의 형태를 나타냄

DNP Object Variations

각 Object내에서의 데이터 표현 및 속성의 차이를 나타냄

Single bit or Status byte Binary Inputs

16 bit or 32 bit Analogs

Running or Frozen Counters

Variation 0 = Any Variation (Requests 시 WILDCARD 로 사용)

Page 19: DNP - Daum

- 19 - Tae-Wan Kim

DNP Type

Symbol Data Type 의 미

UI Unsigned Integer 자연수

I Integer 정수

UF Unsigned Fixed Point Positive fixed point

number

F Fixed Point Positive or negative fixed

point number

R Real 실수

BS Bit String 독립적 비트의 조합

OS Octet String 바이트의 조합

Page 20: DNP - Daum

- 20 - Tae-Wan Kim

Object Example

01 (0x01) Binary Inputs

01 (0x01) Without Status

Object Type

Object Variation Object Variation

Binary Inputs Without Status, Object 01, Variation 01

Object Format : Bit String of 1

[State]

[Bit 0]

Object Type

Page 21: DNP - Daum

- 21 - Tae-Wan Kim

Object Example

01 (0x01) Binary Inputs

02 (0x02) With Status

Binary Inputs With Status, Object 01, Variation 02

Object Format : Bit String of 8

[State, Resrvd, ChatterFilter, LocForce, RemForce, CommLost, Restart, Online]

[Bit07 , . , , , , …, Bit00]

Object Type

Object Variation Object Variation

Object Type

Page 22: DNP - Daum

- 22 - Tae-Wan Kim

Control Block Objects (10 ~ 19)

Binary Output Status(Object 10)

Read status of binary outputs

Control Block (Object 12)

Obj 12, Var 1 = Control Relay Output Block

Function Codes supported

• 03 - Select

• 04 - Operate

• 05 - Direct Operate

• 06 - Direct Operate, No Ack

Page 23: DNP - Daum

- 23 - Tae-Wan Kim

Binary Counter Object (20)

Binary Counter (Object 20)

Obj 20, Var 1 = 32-Bit Binary Counter

Obj 20, Var 2 = 16-Bit Binary Counter

Obj 20, Var 3 = 32-Bit Delta Counter

Obj 20, Var 4 = 16-Bit Delta Counter

Obj 20, Var 5 = 32-Bit Binary Counter w/o Flag

Obj 20, Var 6 = 16-Bit Binary Counter w/o Flag

Obj 20, Var 7 = 32-Bit Delta Counter w/o Flag

Obj 20, Var 8 = 16-Bit Delta Counter w/o Flag

Page 24: DNP - Daum

- 24 - Tae-Wan Kim

Frozen Counter Object (21)

Frozen Counter (Object 21)

Obj 21, Var 1 = 32-Bit Frozen Counter

Obj 21, Var 2 = 16-Bit Frozen Counter

Obj 21, Var 3 = 32-Bit Frozen Delta Counter

Obj 21, Var 4 = 16-Bit Frozen Delta Counter

Obj 21, Var 5 to 8 = Frozen Counters with Time of Freeze

Obj 21, Var 9 to 12 = Frozen Counters w/o Flag

Page 25: DNP - Daum

- 25 - Tae-Wan Kim

Counter Change Event Object (22)

Counter Change Event (Object 22)

Obj 22, Var 1 = 32-Bit Counter Change w/o Time

Obj 22, Var 2 = 16-Bit Counter Change w/o Time

Obj 22, Var 3 = 32-Bit Delta Counter Change w/o Time

Obj 22, Var 4 = 16-Bit Delta Counter Change w/o Time

Obj 20, Var 5 = 32-Bit Binary Counter Change with Time

Obj 20, Var 6 = 16-Bit Binary Counter Change with Time

Obj 20, Var 7 = 32-Bit Delta Counter Change with Time

Obj 20, Var 8 = 16-Bit Delta Counter Change with Time

Page 26: DNP - Daum

- 26 - Tae-Wan Kim

Frozen Counter Event Object (23)

Frozen Counter Event (Object 23)

Obj 23, Var 1 = 32-Bit Frozen Counter Event w/o Time

Obj 23, Var 2 = 16-Bit Frozen Counter Event w/o Time

Obj 23, Var 3 = 32-Bit Frozen Delta Counter Event w/o Time

Obj 23, Var 4 = 16-Bit Frozen Delta Counter Event w/o Time

Obj 23, Var 5 = 32-Bit Frozen Counter Event with Time

Obj 23, Var 6 = 16-Bit Frozen Counter Event with Time

Obj 23, Var 7 = 32-Bit Frozen Delta Counter Event with Time

Obj 23, Var 8 = 16-Bit Frozen Delta Counter Event with Time

Page 27: DNP - Daum

- 27 - Tae-Wan Kim

Analog Input Object (30)

Analog Input (Object 30)

Obj 30, Var 1 = 32-Bit Analog Input

Obj 30, Var 2 = 16-Bit Analog Input

Obj 30, Var 3 = 32-Bit Analog Input without Flag

Obj 30, Var 4 = 16-Bit Analog Input without Flag

Obj 30, Var 5 = Short Floating Analog Input

Obj 30, Var 6 = Long Floating Analog Input

Obj 30, Var 7 = Extended Floating Analog Input

Page 28: DNP - Daum

- 28 - Tae-Wan Kim

Frozen Analog Input Object (31)

Frozen Analog Input (Object 31) Obj 31, Var 1 = 32-Bit Frozen Analog Input

Obj 31, Var 2 = 16-Bit Frozen Analog Input

Obj 31, Var 3 = 32-Bit Frozen Analog Input with Time

Obj 31, Var 4 = 16-Bit Frozen Analog Input with Time

Obj 31, Var 5 = 32-Bit Frozen Analog Input without Time

Obj 31, Var 6 = 16-Bit Frozen Analog Input without Time

Obj 31, Var 7 = Short Floating Frozen Analog Input

Obj 31, Var 8 = Long Floating Frozen Analog Input

Obj 31, Var 9 = Extended Floating Frozen Analog Input

Page 29: DNP - Daum

- 29 - Tae-Wan Kim

Analog Change Event (32)

Analog Change Event (Object 32)

Obj 32, Var 1 = 32-Bit Analog change Event w/o Time

Obj 32, Var 2 = 16-Bit Analog change Event w/o Time

Obj 32, Var 3 = 32-Bit Analog change Event with Time

Obj 32, Var 4 = 16-Bit Analog change Event with Time

Obj 32, Var 5 = Short Floating Analog Input

Obj 32, Var 6 = Long Floating Analog Input

Obj 32, Var 7 = Extended Floating Analog Input

Page 30: DNP - Daum

- 30 - Tae-Wan Kim

Frozen Analog Event (33)

Frozen Analog Event (Object 33)

Obj 33, Var 1 = 32-Bit Analog change Event w/o Time

Obj 33, Var 2 = 16-Bit Analog change Event w/o Time

Obj 33, Var 3 = 32-Bit Analog change Event with Time

Obj 33, Var 4 = 16-Bit Analog change Event with Time

Obj 33, Var 5 = Short Floating Analog Input

Obj 33, Var 6 = Long Floating Analog Input

Obj 33, Var 7 = Extended Floating Analog Input

Page 31: DNP - Daum

- 31 - Tae-Wan Kim

Analog Output Objects (40)

Analog Output Status (Object 40)

Analog Outputs 상태 Read

Obj 40, Var 1 = 32-Bit Analog Output Status

Obj 40, Var 2 = 16-Bit Analog Output Status

Obj 40, Var 3 = Short Floating Analog Output

Obj 40, Var 4 = Long Floating Analog Output

Obj 40, Var 5 = Extended Floating Analog Output

Page 32: DNP - Daum

- 32 - Tae-Wan Kim

Analog Output Objects (41)

Analog Output Block (Object 41)

Analogs Outputs 의 제어용

Obj 41, Var 1 = 32-Bit Analog Output Block

Obj 40, Var 2 = 16-Bit Analog Output Block

Obj 41, Var 3 = Short Floating Analog Output

Obj 41, Var 4 = Long Floating Analog Output

Obj 41, Var 5 = Extended Floating Analog Output

Function Codes supported

• 03 – Select

• 04 – Operate

• 05 – Direct Operate

• 06 – Direct Operate, No Ack

Page 33: DNP - Daum

- 33 - Tae-Wan Kim

Time and Date Objects (50 ~ 59)

Time and Date (Object 50)

Time and Date I/O

Obj 50, Var 1 = Time and Date

Obj 50, Var 2 = Time and Date with Interval

Obj 50, Var 3 = Time and Date to last Recorded Time

Time and Date CTO (Object 51)

Obj 51, Var 1 = Time and Date CTO

Obj 51, Var 2 = Unsynchronized Time and Date CTO

Time Delay (Object 52)

Obj 52, Var 1 = Time Delay Coarse

Obj 52, Var 2 = Time Delay Fine

Page 34: DNP - Daum

- 34 - Tae-Wan Kim

Class Data Objects (Object 60)

Class Data (Object 60)

Obj 60, Var 1 = Class 0 Data

Obj 60, Var 2 = Class 1 Data

Obj 60, Var 3 = Class 2 Data

Obj 60, Var 4 = Class 3 Data

Class 0 Data 는 Static Data Objects

Class 1, 2, 3 Data 는 Event Data Object Buffers

Page 35: DNP - Daum

- 35 - Tae-Wan Kim

Other Objects (70 ~ 113)

File Identifier (Object 70)

Internal Indications (Object 80)

Storage Object (Object 81)

Device Profile (Object 82)

Private Registration Object (Object 83 – Var1)

Private Registration Object Descriptor (Object 83 – Var2)

Application Identifier (Object 90)

Floating Point Objects (Object 100 – Var 1, 2 & 3)

Binary Coded Decimal (Object 101 – Var 1, 2 & 3)

8 – bit unsigned Integer (Object 102)

Octet String – Static (Object 110 – Var String Length)

Octet String – Event (Object 111 – Var String Length)

Virtual Terminal Output Block (Object 112)

Virtual Terminal Event Data (Object 113)

Page 36: DNP - Daum

컴퓨터 및 정보통신 기초 - 36 -

DNP 3.0 Application Layer

Page 37: DNP - Daum

- 37 - Tae-Wan Kim

Application Layer

APPR HDR Object Header DATA Object Header DATA

APPL

CTL

FUNC

CODE

REQUEST HEADER

APPL

CTL

FUNC

CODE

INTERNAL

INDICATIONS

RESPONSE HEADER

Object

Group

Object

Variation Qualifier Range

2 or 4 Byte

1 Byte 1 Byte 1 Byte 1 Byte 2 Byte 1 Byte 1 Byte 1 Byte

OBJECT HEADER

3 ~11 Byte n Byte n Byte 3 ~11 Byte

Page 38: DNP - Daum

- 38 - Tae-Wan Kim

Application control

Request Header

Application

Control Function Code

First 0-more frame

1-last frame

Final 0-not first frame

1- first frame

CON 0-no require

1- require

confirm

Sequence

Response Header와 공통부분

5 bit

1 byte

1 bit 1 bit

• Sequence

– Request or Response 0 to 15

– Unsolicited Response 16 to 31

1 byte

1 bit

Page 39: DNP - Daum

- 39 - Tae-Wan Kim

Fragment

DataTransport

HeaderObject HeaderApplication

HeaderTransport Header Data

Object Header Data

Data

DataObject HeaderApplication

HeaderData

Application

Header

DataTransport

HeaderData

Transport

Header

2,048 bytes 2,048 bytes

292 bytes 292 bytes 292 bytes 292 bytes

Application

Layer-->

Transport

Layer-->

Page 40: DNP - Daum

- 40 - Tae-Wan Kim

Typical Message Transaction Flow

x x 0 0 1 10 1

x x 1 0 1 10 1

x x 0 0 1 10 1

x x 1 1 0 01 0

x x 0 1 0 01 0

x x 0 0 1 10 1

Time

Request.

Response

expected

First Final CON Sequence

<Slave> <Master>

Application Control Field

8bit

8 Bit

8 bit

Response

to master

Confirm

Confirm

Unsolicited

Response

Application Control Field

8bit

Application Control Field 8bit

Application Control Field

8bit

Application Control Field

8bit

Application Header

Application Control Field

8bit

Page 41: DNP - Daum

- 41 - Tae-Wan Kim

Multi-Fragment Response

x x 0 0 0 10 0

x x 1 0 0 10 0

x x 0 0 0 10 0

x x 1 0 0 10 1

x x 0 0 1 00 0

x x 0 0 0 10 1

Request. Response expected

<Slave> <Master>

Confirm

Time Time

Confirm

Request.

Response Frag. 1

Response Frag. 2

x x 0 0 1 10 1

First Final CON Sequence

8 Bit

8 bit

Application Header

Application Control Field

8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Page 42: DNP - Daum

- 42 - Tae-Wan Kim

Confirmation Time-out

x x 0 0 0 10 1

x x 1 0 0 10 1

x x 1 0 0 10 1

x x 0 0 0 10 1

<Master> <Slave>

Time Time

Request. Response expected

Response

Response

Confirm

Response Not received

Confirm not Received. Time out. Resend response

x x 0 0 1 10 1

First Final CON Sequence

8 Bit

8 bit

Application Header

Application Control Field

8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Page 43: DNP - Daum

- 43 - Tae-Wan Kim

collision

Request & Unsolicited Response

무엇을 먼저 처리해야 할 것인가? Master Request

Unsolicited Response

Immediate_Process Mode Master : Slave 의 Response 기다림

Slave : Master Request 에 대한 응답 우선(READ 명령이 아닌 경우)

Process_After_Confirm Mode Master : Unsolicited Response 에 대한 응답 우선

Slave : Unsolicited Response 의 Confirm 기다림 (READ 명령일 경우)

Master

Slave

Request

Unsolicited

Response

Same Time

Page 44: DNP - Daum

- 44 - Tae-Wan Kim

Immediate_Process Mode

single response

x x 0 0 1 10 1 x x 1 1 0 01 0

x x 0 0 1 10 1

x x 1 0 1 10 1

x x 0 1 0 01 0

Time Time

<Slave> <Master>

Request. Response expected

Confirm

Response to master request

Confirm

Unsolicited Response

x x 0 0 1 10 1

First Final CON Sequence

8 Bit

8 bit

Application Header

Application Control Field

8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Page 45: DNP - Daum

- 45 - Tae-Wan Kim

Immediate_Process Mode

multi response

x x 0 0 0 10 0 x x 1 1 0 10 0

x x 0 0 0 10 0

x x 1 0 0 10 0

x x 0 1 0 10 0

x x 1 0 0 10 1

x x 0 0 0 10 1

Time Time

<Master> <Slave>

Response Frag. 2

Request. Response expected

Unsolicited Response

Response Frag. 1

Confirm

Confirm

Confirm

x x 0 0 1 10 1

First Final CON Sequence

8 Bit

8 bit

Application Header

Application Control Field

8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Application Control Field 8bit

Page 46: DNP - Daum

- 46 - Tae-Wan Kim

Process_After_Confirm Mode

Time

x x 0 0 0 10 0 x x 1 1 0 10 0

x x 0 1 0 10 0

x x 1 0 0 10 0

x x 0 0 0 10 0

Time

<Slave> <Master>

Request. Response expected

Confirm

RTU waits for confirm do not process request

Confirm

Unsolicited Response

RTU now processes master request

Response

x x 0 0 1 10 1

First Final CON Sequence

8 Bit

8 bit

Application Header

Application Control Field

8bit

Page 47: DNP - Daum

- 47 - Tae-Wan Kim

Process_After_Confirm Mode

Confirmation Time-out

x x 0 0 0 10 1 x x 1 1 1 01 0

x x 0 1 1 11 0

x x 1 0 0 10 0

x x 0 0 0 10 0

x x 1 1 1 01 0

Time Time

<Master> <Slave>

Response

Request. Response expected

Unsolicited Response

RTU time-out for confirm to unsol. response. resend unsol. response

Master does not receive unsol. response

Confirm

Confirm

Unsolicited Response

x x 0 0 1 10 1

First Final CON Sequence

8 Bit

8 bit

Application Header

Application Control Field

8bit

Page 48: DNP - Daum

- 48 - Tae-Wan Kim

Application Response Header

Response Header

Application

Control Function Code

1 byte 1 byte

INN(Internal Indication)

2 byte

Application Control Field는 Request Header와 동일

INN Slave Device의 통신 응답상태 및 불량 원인 표시

Application response header 에만 있음

7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0

Reserv

ed

Reserv

ed

Bad C

onfig

.

Alre

ady E

xec.

Bu

ffer O

ve

rflow

Out o

f Range

Obje

ct U

nknow

n

Bad F

unctio

n

Devic

e R

esta

rt

De

vic

e T

rou

ble

Local

Need T

ime

Cla

ss 3

Cla

ss 2

Cla

ss 1

All S

tatio

ns

첫 번째 바이트 두 번째 바이트

Page 49: DNP - Daum

- 49 - Tae-Wan Kim

Internal Indications – 첫 번째 바이트

Bit 0 – All Stations

동보통신(Source Address:FFFF) 을 받았을 경우, 1 로 셋팅

다음 응답시에는 0 으로 Reset(다음 응답도 Global 요구에 대한

Response 일 지라도)

Master Station 에서 동보통신 메시지의 송수신 여부를 알기 위해 사용

Bit 1 ~ 3 – Class 1 ~3

Master 로 Class 1 ~ 3 Data 의 전송을 필요

Master 는 해당하는 Class 의 Request 명령 송신

Bit 4 – Time Synchronization

Master 에 시간동기 요청

Master 는 ‘Time and Date’ Object 를 이용하여 시간 동기 맞춤

Page 50: DNP - Daum

- 50 - Tae-Wan Kim

Internal Indications – 첫 번째 바이트

Bit 5 – Local

Digital Output Point 의 전부 혹은 일부가 Local 상태에 있음을

나타냄

DNP Protocol 로 제어가 불가능함을 의미

Bit 6 – Device Trouble

IIN bit의 어느것으로도 나타낼 수 없는 비정상적인 상태

Bit 7 – Device Restart

Device 가 재 시작했을 경우 발생

Master 에서 ‘Internal Indications’ Object 를 이용해 ‘0’으로

Write

Page 51: DNP - Daum

- 51 - Tae-Wan Kim

Internal Indications – 두 번째 바이트

Bit 0 – Bad Function

Function Code 가 구현되어있지 않음(수신된 Function Code 해독 불가능)

Bit 1 – Unknown Object

요구된 Object 가 존재하지 않음(수신된 Object 해독 불가능)

Bit 2 – Out of Range

Qualifier, Range, Data Field가 유효하지 않음

모든 Request Format 에러를 검출

Bit 3 – Buffer Overflow

Event Buffer 또는 다른 응용 버퍼가 Overflow 됨을 의미

사용자(개발자)에 의해 적절한 복구 절차가 정의 되어있어야 함

Page 52: DNP - Daum

- 52 - Tae-Wan Kim

Internal Indications – 두 번째 바이트

Bit 4 – Already Executing

Request 명령을 전송받았지만, 이미 실행하였을 경우(동일 명령 프레임 수신시)

Bit 5 – Bad Config

Remote Device의 현재 환경설정(프로그램 등)이 잘못됨

Master 는 Remote Device 로 새로운 환경설정을 Download 해야 함

대부분, 이경우 통신이 안되는 경우 많음

Bit 6, 7 – Reserved

Default 0

Page 53: DNP - Daum

- 53 - Tae-Wan Kim

Object Header

무엇을 어떻게 읽을 것인가?

Object : 데이터의 특성 및 포맷을 나타냄

Variation : Object 의 세분화

얼마나 많이 읽을 것인가?

Qualifier : 뒤의 Range field 를 어떻게 해석할 것인가를 나타냄

Range : Object의 수와 읽어야 할 포인트의 시작과 끝 등을 나타냄

Object Header Data

Object

Group

Object

Variation Qualifier Range

1 byte 1 byte 1 byte 0~8 bytes

Page 54: DNP - Daum

- 54 - Tae-Wan Kim

Object Header

Object

Group

Object

Variation Qualifier Range

1 byte 1 byte 1 byte 0~8 bytes

QUALIFIER

7 6 5 4 3 2 1 0

INDEX QUALIFIER CODE

QUALIFIER CODE Range Size 0 - 8BIT START AND STOP INDICES 2 1 - 16BIT START AND STOP INDICES 4 2 - 32BIT START AND STOP INDICES 8 3 - 8BIT ABSOLUTE ADDR IDENTIFIERS 4 - 16BIT ABSOLUTE ADDR IDENTIFIERS 5 - 32BIT ABSOLUTE ADDR IDENTIFIERS 6 - NO RANGE FIELD (all of a given type) 0 7 - 8 BIT QUANITY 1 8 - 16BIT QUANITY 2 9 - 32BIT QUANITY 4 11 - (0xB) VARIABLE ARRAY

INDEX SIZE

0 -NO INDEX, PACKED

1 - 1 BYTE INDEX

2 - 2 BYTE INDEX

3 - 4 BYTE INDEX

4 - 1 BYTE OBJECT SIZE

5 - 2 BYTE OBJECT SIZE

6 - 4 BYTE OBJECT SIZE

In a request object header

When qualifier code equals 11

INDEX SIZE

0 –NOT VALID

1 - 1 BYTE IDENTIFIER SIZE

2 - 2 BYTE IDENTIFIER SIZE

3 - 4 BYTE IDENTIFIER SIZE

Page 55: DNP - Daum

- 55 - Tae-Wan Kim

Index Size

DNP의 데이터를 읽을 경우 해당되는 데이터의 Point를

어떤 방식으로 어떤 크기를 가지고 읽을 것인가 나타내는

필드

DNP 3.0 Subset 에서 사용되는 3 가지 인덱스 사이즈

0 - No Index, Packed

1 - 1 byte Index

2 - 2 byte Index

Page 55

Page 55

Page 56: DNP - Daum

- 56 - Tae-Wan Kim

Packed vs Indexed

Packed Data Blocks

Index(Point) number 의 시작과 끝을 Range field 에 정의

Read 명령에 주로 사용

Indexed Data Blocks

데이터 값 전에 인덱스를 하나씩 붙임

Range 필드에는 전송되는 포인트의 수량을 명시함

Operate 명령에 주로 사용

Object

Group

Object

Variation Qualifier

Range

(Start, Stop) Data1 Data 2 . . . Data n-1 Data n

Packed Data Block

Object

Group

Object

Variation Qualifier

Range

(Quantity) Index 1 Data 1 . . . Index n Data n

Indexed Data Block

Page 57: DNP - Daum

- 57 - Tae-Wan Kim

Qualifiers and Ranges

Qualifier (Hex)

Range Size(byte)

Use in a Request Use in a Response

00

01

2

4

포인트 번호가 있는 Static Point

또는 Binary Point Polling Static Objects

06 0 모든 포인트 Not Valid

07

08

1

2

제한된 수의 Events

포인트 번호 없는 Single Point

(I.e. Time and Date)

포인트 번호 없는 Single Point

(I.e. Time and Date)

17

28

1

2 제어(연관성 없는 points) Event object(연관성 없는 points)

Page 58: DNP - Daum

- 58 - Tae-Wan Kim

Function code

0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B

Confirm Read Write Select Operate Direct Operate Direct Op, No Ack Immediate Freeze Immediate Freeze No Ack Freeze and Clear Freeze and Clear No Ack Freeze with Time

0x0C 0x0D 0x0E 0x0F 0X10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18

Freeze with Time No Ack Cold Restart Warm Restart Init Data to Defaults Initialize Application Start Application Stop Application Save Configuration Enable Unsolicited Messages Disable Unsolicited Messages Assign Class Delay Measurement Record Current Time

0x00 0x81 0x82

Confirm Response Unsolicited Response

Request

Response

Application Header

Application

Control Function Code

1 byte 1 byte

Page 59: DNP - Daum

- 59 - Tae-Wan Kim

Transfer Function Codes

– Read (FC=1)

원격설비의 데이터 취득 명령

응답 : 요구하는 데이터

Single Object Request

Multiple Object Request

Request A C

Header FC = 1 Object Qualifier Range

Request A C

Header FC = 1 Object Qualifier Range Object Qualifier Range

1st Read Request 2nd Read Request

Page 60: DNP - Daum

- 60 - Tae-Wan Kim

Read Request(FC=1) example

AC FC = 1

Object gv

Group

= n

Variation

= p

Qualifier

0000 0000

0 0

Range

Start Stop

Read Request Read object group n variation p

The range field specifies 3 objects starting at index 7 to index 9 inclusive

7 9

Byte 1 1 1 1 1 1 1

AC FC = 1

Object gv

Group

= n

Variation

= x

Qualifier

0001 0111

1 7

Range

Byte 1 1 1 1 1 1 1 1 1

3

Quantity

Indices

11 22 108

Read Request Read object group n variation x

The range field specifies that the list contains 3 entries

The index size specifies each entry in the list is a 1byte index

Page 61: DNP - Daum

- 61 - Tae-Wan Kim

Read Response (FC=1) example

Object gv

Group

= n

Variation

= p

Qualifier

0000 0000

0 0

Range

Start Stop

Read Response Object following this header are group n, variation p

7 9

Byte 1 1 1 1 1

Object gv

Group

= n

Variation

= x

Qualifier

0001 0111

1 7

Range

Byte 1 1 1 1

3

Quantity

Read Response Object following this header are n variation x

The range field specifies 3 objects

The index size specifies the objects are prefixed with 1byte index identifiers

Data …

index … Data

Page 62: DNP - Daum

- 62 - Tae-Wan Kim

Transfer Function Codes

– Write(FC=2)

IIN의 값 변경, File Download, Time 설정

응답 : IIN 을 포함한 Response Function Code 로 응답

Free Format

Time and Date Object Write

AC FC = 2

Object gv

Group

= n

Variation

= x

Qualifier

0001 1011

1 11

Range

1

Quantity Identifier

Data

AC FC = 2

Object gv

Group

= n

Variation

= x

Qualifier

0001 1011

1 11

Range

1

Quantity Time Object

Byte 1 1 1 1 1 1

Byte 1 1 1 1 1 1

Page 63: DNP - Daum

- 63 - Tae-Wan Kim

Control Function Codes

– Select & Operate 1

Select(FC=3)

원격설비의 제어대상 Point 선택(Arm) 명령

제어실행 명령인 Operate 명령과의 조합 필요

Operate(FC=4)

원격설비의 제어대상 Point의 외부출력 수행

제어선택 명령인 Select 명령과의 조합 필요

Page 64: DNP - Daum

- 64 - Tae-Wan Kim

Control Function Codes

– Select & Operate 2

Fixed Size Control blocks

Pattern Control Blocks

AC FC = 3,4

Object gv

Group

= n

Variation

= x

Qualifier

0001 0111

1 7

Range

2

Quantity index

AC FC =

3,4

Object gv

Group

= n

Variation

= x

Qualifier

0000 0111

0 7 1

Quantity

Byte 1 1 1 1 1 1

Byte 1 1 1 1 1 1

Control

Block

Object 1

index Control

Block

Object 1

Pattern

Control

block

Object gv

Group

= n

Variation

= x

Qualifier

0000 0000

0 0

Range

Start Stop

5 8

Pattern

Mask

Object 5

Pattern

Mask

Object 6

Pattern

Mask

Object 7

Pattern

Mask

Object 8

Byte 1 1 1 1 1

Page 65: DNP - Daum

- 65 - Tae-Wan Kim

Control Function Codes

– Direct Operate

Direct Operate(FC=5)

명령 내에 내포된 값의 즉각적인 외부출력 수행(Arm 없음)

Select & Operate Code 의 Fixed Size Control Block 을 이용

Direct Operate – No Acknowledgement(FC=6)

Direct Operate와 동일한 기능을 수행

단, ACK 전송하지 않음

Page 66: DNP - Daum

- 66 - Tae-Wan Kim

Freeze Function Codes

– Immediate Freeze

Immediate Freeze(FC=7)

특정 Data Object의 값을 Freeze Buffer로 복사

Data Object는 계속적인 Data 갱신을 해 나가고 다른 요청(Read)에 의해 Frozen

Data를 취득

Immediate Freeze– No Acknowledgement(FC=8)

Immediate Freeze와 동일한 기능을 수행하지만 ACK 전송하지 않음

Request A C

Header FC = 7 Object Header … Object Header

Page 67: DNP - Daum

- 67 - Tae-Wan Kim

Transfer Function Codes

– Freeze and Clear

Freeze and Clear(FC=9)

특정 Data Object의 값을 Freeze Buffer로 복사

특정 Data Object는 0 으로 Reset

Frozen Counter나 Accumulator등에 사용

Freeze and Clear– No Acknowledgement(FC=A)

Freeze and Clear 와 동일한 기능을 수행하지만 ACK 전송하지 않음

Request A C

Header FC = 9 Object Header … Object Header

Page 68: DNP - Daum

- 68 - Tae-Wan Kim

Transfer Function Codes

– Freeze with Time

Freeze with time(FC=B)

특정 시간에 특정 Data Object의 값을 Freeze Buffer로 복사

Freeze with time– No Acknowledgement(FC=C)

Freeze with time 과 동일한 기능을 수행하지만 ACK 전송하지 않음

A C FC = B Object Header for

time object

Time Object

Time and Date | Interval

Object Header for

data objects to

freeze

Time Interval 설 명

X 0 정해진 시간(X)에 한번만 Freeze(1일 1회)

0 0 수신 즉시 Freeze (Immediate Freeze 와 동일)

0 Y 현재 시간에 Freeze하고 Interval 시간(Y) 만큼마다 Freeze

X Y 정해진 시간(X)에 Freeze한 후 Interval 시간(Y)만큼 후에 Freeze(1일 2회)

Page 69: DNP - Daum

- 69 - Tae-Wan Kim

Application Control

Function Codes – Restart

Cold Restart(FC=D)

Device의 초기화를 통한 재시작을 요구하는 기능(전원투입과 같은 효과)

응답 : Time Delay Object(Time Delay Fine 또는 Time Delay Coarse)를 가지고 응

답(원격설비가 정상 동작하는데 걸리는 시간)

Warm Restart(FC=E)

일부 기능 및 Application의 재시작을 요구하기 위한 기능

A C FC = D IIN Object Header for

Time Time Delay Object

A C FC = D Request

Response

Page 70: DNP - Daum

- 70 - Tae-Wan Kim

Application Control

Function Codes – Initialize

Initialize Data(FC=F)

Slave의 일부 Data를 사전에 설정된 값이나 Default 값으로 초기화

요구시 값은 포함하고 있지않음(미리 정해놓아야 함)

Initialize Application(FC=10)

특정 Application을 초기화하기 위하여 사용

A C FC = F Object Header for Data Objects to initialize

A C FC = 10 Object Qualifier

1B

Quantity

1

Application

Identifier Size

Application Object

Identifier

Page 71: DNP - Daum

- 71 - Tae-Wan Kim

Application Control

Function Codes – Application

Start Application(FC=11)

특정 Application을 시작하기 위하여 사용

Initialize Application 과 같은 포맷을 사용(FC 만 틀림)

Stop Application(FC=12)

특정 Application을 중지하기 위하여 사용

Initialize Application 과 같은 포맷을 사용(FC 만 틀림)

Page 72: DNP - Daum

- 72 - Tae-Wan Kim

Configuration Function Codes

Save Configuration(FC=13) Slave의 구성에 관련한 정보를 갱신하기 위하여 사용

Enable Spontaneous(Unsolicited) Messages(FC=14) Unsolicited Response 가 가능하도록 설정

Disable Spontaneous(Unsolicited) Messages(FC=15)

Unsolicited Response 가 불가능하도록 설정

Assign Class(FC=16)

특정 Object를 Class Object로 할당하는 기능

A C FC = 13 Object Qualifier

1B

Quantity

1

File Identifier

Object Size File Identifier Object

A C FC = 16 Class Object

Header

Data Object

Header 1 …

Data Object

Header n

Page 73: DNP - Daum

- 73 - Tae-Wan Kim

Configuration Function Codes

Save Configuration(FC=13) Slave의 구성에 관련한 정보를 갱신하기 위하여 사용

Enable Spontaneous(Unsolicited) Messages(FC=14) Unsolicited Response 가 가능하도록 설정

Disable Spontaneous(Unsolicited) Messages(FC=15)

Unsolicited Response 가 불가능하도록 설정

Assign Class(FC=16)

특정 Object를 Class Object로 할당하는 기능

A C FC = 13 Object Qualifier

1B

Quantity

1

File Identifier

Object Size File Identifier Object

A C FC = 16 Class Object

Header

Data Object

Header 1 …

Data Object

Header n

Page 74: DNP - Daum

- 74 - Tae-Wan Kim

Time Synchronization Function Codes

Delay Measurement(FC=17)

Master와 Slave간 통신상의 지연을 측정하기 위한 기능

FC=24~120 : 향후 사용을 위해 Reserved

FC=121~128 : 테스트용으로 Reserved

A C FC = 17 IIN Time Delay Fine

Header Time Delay Fine Object

A C FC = 17 Request

Response

Page 75: DNP - Daum

컴퓨터 및 정보통신 기초 - 75 -

DNP 3.0 Transport Layer

Page 76: DNP - Daum

- 76 - Tae-Wan Kim

주요내용

1. DNP 개요

2. DNP Layer

3. DNP Object Library

4. DNP Application layer

5. DNP Transport layer

6. DNP DataLink layer

7. DNP Physical layer

8. 일반적인 통신의 개념

Page 77: DNP - Daum

- 77 - Tae-Wan Kim

DNP Transport Layer (Pseudo)

DNP의 Frame 크기가 255 바이트로 한정(8 bits Length

Field)

File Transfer 등의 경우 수용하기에 너무 작음

Transport Layer에서 Segment 서비스 수행

하나의 메시지를 다중 프레임으로 자동 분할/조립 해줌

1 바이트의 Transport Header 첨부

Page 78: DNP - Daum

- 78 - Tae-Wan Kim

Transport Header

고정 길이 헤더 1바이트

FIN(Final) : Message 의 마지막 데이터 프레임을 표시

FIR(First) : Message 의 첫번째 데이터 프레임을 표시

Seq. 6 ~ Seq. 1(Sequence Number) : Frame 전송 번호

: 수신단에서 프레임의 상실이나 중복을 방지하기 위하여 사용

First 0-more frame

1-last frame

Final 0-not first frame

1- first frame

Sequence

6 bit 1 bit 1 bit

Page 79: DNP - Daum

- 79 - Tae-Wan Kim

Transmission of

a Single-Frame Message

Object

Header

Application

HeaderData

Object

Header

Application

HeaderData

Transport

Header

<Application

Layer>

<Transport

Layer>

<Datalink

Layer>

1 1 0 0 0 00 1

8bit

<S e q u e n c e>

FIR FIN

4 Byte 30 Byte

4 Byte 30 Byte

1 Byte

Page 80: DNP - Daum

- 80 - Tae-Wan Kim

Fragmenting of

a Multi-Frame Application Message

Object

Header

Application

HeaderData

Object

Header

Application

HeaderData

Transport

Header

<Application

Layer>

<Datalink

Layer>

<Transport

Layer>

1 0 0 0 0 10 0

8bit

<S e q u e n c e>

FIR FIN

4 Byte 594 Byte

4 Byte 245 Byte

1 Byte

DataTransport

Header

0 0 0 0 0 10 1

8bit

<S e q u e n c e>

FIR FIN

249 Byte 1 Byte

0 1 0 0 1 00 0

8bit

<S e q u e n c e>

FIR FIN

DataTransport

Header

100 Byte 1 Byte

Page 81: DNP - Daum

- 81 - Tae-Wan Kim

Assembling of

Data From Three Data Frames

Object

Header

Application

HeaderData

Object

Header

Application

HeaderData

Transport

Header

<Transport

Layer> <Datalink

Layer>

<Application

Layer>

1 0 0 0 0 10 0

8bit

<S e q u e n c e>

FIR FIN

4 Byte 594 Byte

4 Byte 245 Byte

1 Byte

DataTransport

Header

0 0 0 0 0 10 1

8bit

<S e q u e n c e>

FIR FIN

249 Byte 1 Byte

0 1 0 0 1 00 0

8bit

<S e q u e n c e>

FIR FIN

DataTransport

Header

100 Byte 1 Byte

Object

Header

Application

HeaderData

4 Byte 245 Byte

1 Byte

Data

249 Byte

Data

249 Byte

Page 82: DNP - Daum

컴퓨터 및 정보통신 기초 - 82 -

DNP 3.0 Data Link Layer

Page 83: DNP - Daum

- 83 - Tae-Wan Kim

DNP Data Link

DNP의 Data Link 는 DNP Message의 전송을 담당

화물 운송과 비슷한 절차

화물 운송 DNP Data Link

인식(Ready) 우표(소인) Start Bytes(05 64)

화물 정보 무게( kg) Length( bytes)

배달 방법 -일반 -등기

-Unconfirmed -Confirmed

보내는 사람 ~로 부터(From) Source Address

받는 사람 ~에게(To) Destination Address

Page 84: DNP - Daum

- 84 - Tae-Wan Kim

Data Link Header

모든 DNP Frame 은 05 64 로 시작

전체 길이는 Length Field 1byte 로 정의

Start, Length, CRC 부분 제외(Min = 5, Max = 255)

Destination : 2bytes, 목적지 주소, 0xFFFF는 브로드캐스팅

Source : 2bytes, 출발지 주소

CRC(Cyclic Redundancy Check) : 2bytes, 에러 체크용

주소 및 CRC는 LSB, MSB 순서(Little Endian)

Start

0X05 0x64

8 bytes

Length Control Destination

Address

Source

Address CRC

LSB MSB LSB MSB

2 bytes

LSB MSB

Page 85: DNP - Daum

- 85 - Tae-Wan Kim

Data Link Header-Control Field

FCV (FCB Valid) 0 = FCB 무시 1 = FCB 유효

DFC (Data Flow Control) 1 = 버퍼 full 0 = Normal

PRM (Primary Message) 1 = DL Request 0 = DL Response

Secondary to Primary

Primary to Secondary PRIMARY FUNC CODE

SECONDARY FUNC CODE

Start

0X05 0x64

8 bytes

Length Control Destination

Address

Source

Address CRC

LSB MSB LSB MSB

2 bytes

LSB MSB

DIR (Physical Transmission Direction) 1 = Master 0 = Remote

FCB (Frame Count Bit)

0

FCB(Frame Count Bit)

Frame 의 유실, 중복 방지

1 과 0 이 반전

(Send-Confirm 일 경우)

FCV(FCB Valid)

0 FCB 무시

1 FCB 유효

DFC(Data Flow Control)

2 차측 Buffer Overflow 방지

1 버퍼 full, 0 Normal

DFC가 1로 되면, 1차측에서는 데이터전송을 중지하고, DFC=0이 될때

까지 Request-Respond(Code=9)를 계속 전송

Page 86: DNP - Daum

- 86 - Tae-Wan Kim

Control Function Code

•PRM=1(From Master)

Code Frame Type Service Function FCV

0 Send – Confirm Reset Remote Link 0

1 Send – Confirm Reset User Process 0

2 Send – Confirm Test Link 1

3 Send – Confirm User Data 1

4 Send – No Reply Unconfirmed User Data 0

9 Request – Respond Request Link Status 0

•PRM=0(From Remote)

Code Frame Type Service Function

0 Confirm ACK

1 Confirm NACK

B Respond Status of Link(DFC=0 or DFC=1)

Page 87: DNP - Daum

- 87 - Tae-Wan Kim

Primary Data Link Function Code

Reset Link(FC=0) Primary 와 Secondary 의 동기를 위해 사용

Primary Secondary 로 전송

Reset User Process(FC=1) Data Link User Process 의 Reset 시 사용

다중 Master, 다중 Slave 시 사용

Test Link(FC=2) Secondary 의 데이터 링크 테스트

FCB 상태 체크

Confirmed User Data(FC=3) Primary 가 Secondary 에 데이터 전송시 사용

Primary 는 Data Link Confirm 을 기다림(ACK/NACK)

Unconfirmed User Data(FC=4)

Primary 가 Secondary 에 데이터 전송시 사용

ACK/NACK 기다리지 않음

Request Link Status(FC=9) Secondary 의 데이터 링크의 상태 요구

Buffer Overflow 등의 경우 전송

Page 88: DNP - Daum

- 88 - Tae-Wan Kim

Secondary Data Link Function Code

ACK(FC=0)

Data Link 상의 정상 전송 확인

NACK(FC=1)

Data Link 상의 비정상 전송 확인

Link Status(FC=B)

Link 의 상태 전송

DFC = 0, 정상

DFC = 1, 비정상(Busy)

Page 89: DNP - Daum

- 89 - Tae-Wan Kim

Reset Link (FC = 0)

Primary : 통신의 시작, 에러인지시 전송(다음에 진행될 Send-Confirm transaction 을 위해 사용)

Secondary : Restart, 에러인지시에 Primary의 Reset 명령 기다림

Reset 기능 수행이 완료된 후 Secondary는 Primary 의 다음 Message의 시작이 FCB = "1", FCV = "1" 이어야만 통신(On-Line)을 시작

Primary Station Send : FCV=0, FCB=X, PRM=1, DIR=X(X=Don’t Care)

지정시간(Time-out주기)내 Secondary의 ACK 기다림

ACK 수신 성공 → FCB=1, FCV=1 : Data_Link On-Line 성공

ACK 수신 실패 → 지정횟수 만큼 Retry 후 Data-Link 실패 통보

Secondary Station Secondary 초기화 및 통신 실패후

Primary의 Send (FCV=0, FCB=X, PRM=1, DIR=X) 기다림

ACK 응답 : DFC=X, PRM=0, DIR=X, Reserved=0(X= Don’t Care)

Primary 와 Secondary 사이에 정상적인 Data 교환이 이루어지는 중에 Reset 명령이 수신되면 정상적인 Data 교환은 중지되고 Reset 기능 수행

Page 90: DNP - Daum

- 90 - Tae-Wan Kim

Reset Link (FC = 0)

example

x 1 0 0 0 00 0

x 0 0 x 0 00 0

Reset (Request)

Expected FCB=x (IND) Reset Expected FCB=1

x 0 0 0 0 00 0

8 bit

DataLink Header

Control Field

8bit

DataLink Control Field 8bit

PRIMARY FUNC CODE

SECONDARY FUNC CODE DIR PRM

FCB

0

FCV

DFC

DataLink Control Field 8bit

Confirm

(IND) Positive Next FCB = 1

Send

Page 91: DNP - Daum

- 91 - Tae-Wan Kim

Reset User Process (FC = 1)

Data Link User Process 의 Reset 시 사용

다중 Master, 다중 Slave 시 사용

x 1 0 0 0 00 1

x 0 0 x 0 00 0

Reset User Process (Request)

(IND) Reset User

DataLink Control Field 8bit

DataLink Control Field 8bit

Confirm

(IND) Positive

Send

Page 92: DNP - Daum

- 92 - Tae-Wan Kim

Confirmed User Data (FC = 3)

Secondary에 Send-Confirmed Data를 송신하기 위하여 사용

통신을 시작하기 전에 Secondary는 반드시 Data_Link Reset이 이루어진 상태이어야 함

Primary Send User Data Frame : FCV=1, PRM=1, DIR=X, FCB=1(최초 통신시)

지정시간 (Data Link Time Out) 동안 Secondary의 응답 기다림

ACK 수신 → FCB=값 전환(Toggle), 보낼 데이터가 더 있으면 다시 전송

NACK 수신 → 지정시간만큼 Data_Link Busy상태 해제를 기다린 후 또는 Request Link Status 절차를 수행한 후 재전송 수행

응답이 없을 시는 지정횟수(변경가능)만큼 재전송(Retry) 수행한 후 에도 응답없을 시 Off-Line 처리

Secondary User Data Frame 수신 : FCV=1, PRM=1, DIR=X, 기대한 FCB값(최초통신 FCB=1)

ACK 응답 전송 → DFC=X, PRM=0, DIR=X

NACK 응답 전송 → ACK Frame과 동일, 수신 상태로 대기

Page 93: DNP - Daum

- 93 - Tae-Wan Kim

SEND Multiple Frames

x 1 1 1 0 10 1

x 0 0 x 0 00 0

x 1 0 1 0 10 1

x 0 0 x 0 00 0

x 1 1 1 0 10 1

x 0 0 x 0 00 0

Expected FCB = 1 (IND) User Data Expected FCB = 0

(REQ 1)

(IND) User Data Expected FCB = 1

(IND) Positive (REQ 2)

(IND) User Data

(IND) Positive (REQ 3)

(IND) Positive

DataLink Control Field 8bit

DataLink Control Field 8bit

Confirm

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

Confirm

Confirm

Send

Send

Send

Send

Send

Send

Page 94: DNP - Daum

- 94 - Tae-Wan Kim

Request Link Status (FC = 9)

Secondary의 Data_Link 상태를 확인하기 위하여 사용

Secondary는 Data_Link가 Busy이거나 더 이상 Data

를 받아들이지 못할 때(Buffer Overflow)에

DFC를 “1”로 setting하여 Link Status Confirm(FC=B)

을 전송

Data Link가 Idle하거나 Data를 수신이 가능하면 DFC를

“0"으로 하여 Link Status Confirm을 전송

다중 Master나 다중 Slave에 대하여 사용

Page 94

Page 95: DNP - Daum

- 95 - Tae-Wan Kim

Request/Respond

Frame and DFC Bit Usage

x 1 0 1 0 10 1

x 0 0 1 0 00 0

x 1 1 1 0 10 1

x 0 0 1 0 00 0

x 1 1 0 0 01 1

x 0 0 1 0 11 1

x 1 1 0 0 01 1

x 1 0 1 0 10 1

x 0 0 0 0 11 1

x 0 0 0 0 00 0

(IND) User Data

(IND) User Data

But buffers full now

(IND)

(IND) User Data

(IND) Positive Receipt of CONFIRM frame with DFC = 0 is the condition for transmission of the next SEND user data frame (IND) Positive

(REQ 1)

Receipt of CONFIRM frame with DFC = 0 is the condition for transmission of the next SEND user data frame

(REQ 3 )

Send

Send

Send

Request Respond

Request Respond

Confirm

Confirm

Confirm

Confirm

Confirm

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

DataLink Control Field 8bit

Page 96: DNP - Daum

- 96 - Tae-Wan Kim

Data Link Operation

Send-CFM User Data 전송 전에 반드시 DL Reset 이 선행되어야함

FCB 값은 순차적으로 Toggle

Slave 에서 Send-CFM User Data 전송시에도 DL Reset 선행 되어야함

DL ACK CRC Okay

Length Okay

FCB Okay

Master Slave

Reset DL

SND/CFM

Reset DL

RSP/CFM

SND/CFM

SND/NR

RSP/CFM

SND/CFM