KR20040016921A - Control System for Home Appliance Network - Google Patents

Control System for Home Appliance Network Download PDF

Info

Publication number
KR20040016921A
KR20040016921A KR1020040006127A KR20040006127A KR20040016921A KR 20040016921 A KR20040016921 A KR 20040016921A KR 1020040006127 A KR1020040006127 A KR 1020040006127A KR 20040006127 A KR20040006127 A KR 20040006127A KR 20040016921 A KR20040016921 A KR 20040016921A
Authority
KR
South Korea
Prior art keywords
packet
communication
master
slave
network
Prior art date
Application number
KR1020040006127A
Other languages
Korean (ko)
Inventor
하삼철
백승면
이군석
임정현
최환종
구자인
김대웅
강성환
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR1020040006127A priority Critical patent/KR20040016921A/en
Publication of KR20040016921A publication Critical patent/KR20040016921A/en

Links

Classifications

    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02BHYDRAULIC ENGINEERING
    • E02B3/00Engineering works in connection with control or use of streams, rivers, coasts, or other marine sites; Sealings or joints for engineering works in general
    • E02B3/04Structures or apparatus for, or methods of, protecting banks, coasts, or harbours
    • E02B3/12Revetment of banks, dams, watercourses, or the like, e.g. the sea-floor
    • E02B3/129Polyhedrons, tetrapods or similar bodies, whether or not threaded on strings
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02BHYDRAULIC ENGINEERING
    • E02B3/00Engineering works in connection with control or use of streams, rivers, coasts, or other marine sites; Sealings or joints for engineering works in general
    • E02B3/04Structures or apparatus for, or methods of, protecting banks, coasts, or harbours
    • E02B3/12Revetment of banks, dams, watercourses, or the like, e.g. the sea-floor
    • E02B3/14Preformed blocks or slabs for forming essentially continuous surfaces; Arrangements thereof
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02BHYDRAULIC ENGINEERING
    • E02B3/00Engineering works in connection with control or use of streams, rivers, coasts, or other marine sites; Sealings or joints for engineering works in general
    • E02B3/16Sealings or joints
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02DFOUNDATIONS; EXCAVATIONS; EMBANKMENTS; UNDERGROUND OR UNDERWATER STRUCTURES
    • E02D27/00Foundations as substructures
    • E02D27/32Foundations for special purposes
    • E02D27/52Submerged foundations, i.e. submerged in open water
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02DFOUNDATIONS; EXCAVATIONS; EMBANKMENTS; UNDERGROUND OR UNDERWATER STRUCTURES
    • E02D29/00Independent underground or underwater structures; Retaining walls
    • E02D29/02Retaining or protecting walls
    • E02D29/025Retaining or protecting walls made up of similar modular elements stacked without mortar
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02DFOUNDATIONS; EXCAVATIONS; EMBANKMENTS; UNDERGROUND OR UNDERWATER STRUCTURES
    • E02D29/00Independent underground or underwater structures; Retaining walls
    • E02D29/02Retaining or protecting walls
    • E02D29/0258Retaining or protecting walls characterised by constructional features
    • E02D29/0266Retaining or protecting walls characterised by constructional features made up of preformed elements
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02BHYDRAULIC ENGINEERING
    • E02B3/00Engineering works in connection with control or use of streams, rivers, coasts, or other marine sites; Sealings or joints for engineering works in general
    • E02B3/04Structures or apparatus for, or methods of, protecting banks, coasts, or harbours
    • E02B3/046Artificial reefs
    • EFIXED CONSTRUCTIONS
    • E02HYDRAULIC ENGINEERING; FOUNDATIONS; SOIL SHIFTING
    • E02DFOUNDATIONS; EXCAVATIONS; EMBANKMENTS; UNDERGROUND OR UNDERWATER STRUCTURES
    • E02D2600/00Miscellaneous
    • E02D2600/20Miscellaneous comprising details of connection between elements

Abstract

PURPOSE: A system for controlling a network of household appliances is provided to embody an optimized household appliance network in a low cost by embodying the network using a serial communication function of a low function microcomputer used in the household appliance. CONSTITUTION: A plurality of household appliances have a serial communication function, respectively. A communication medium connects a plurality of the household appliances. A communication layer having an application layer, a data link layer and a physical layer is defined for communication among a plurality of the household appliances. If a predetermined communication event is generated, the communication is performed among a plurality of the household appliances through the communication layer.

Description

가전기기 네트워크 제어시스템{Control System for Home Appliance Network}Home Appliance Network Control System

본 발명은 네트워크 제어장치 및 방법에 관한 것으로서, 특히 가전기기 네트워크 제어시스템에 관한 것이다.The present invention relates to network control apparatus and method, and more particularly, to a home appliance network control system.

현재 각 가정 또는 원격에서 가정에 있는 가전기기들을 자동으로 제어하기 위한 홈 오토메이션(Home Automation)은 거의 상용화단계에 이르러 있다. 초기의 홈 오토메이션의 경우 전화 또는 적외선을 이용하여 각 기기를 별도로 제어하는 수준이었고 각 기기간의 연계는 이루어지지 않았으나, 이제는 통신수단을 이용하여 가전기기간의 네트웍망을 구축하고 이 네트웍망을 제어하는 제어기를 두어 통합 관리하도록 하는 방법을 이용하고 있다.At present, home automation for automatically controlling home appliances in each home or remote is almost commercially available. In the early stages of home automation, each device was controlled separately using a telephone or an infrared ray, and there was no linkage between the devices, but now, a communication network is used to establish a network between home appliances and control the network. We are using a method that allows integrated management.

현재 가전기기에 적용되는 많은 마이컴들은 직렬 통신기능을 내장하고 있어 다른 마이컴이나 기기들과 통신할 수 있도록 구성된다. 이러한 마이컴은 제품의 특성에 따라 메모리 등 통신에 사용할 수 있는 자원의 크기가 다양하다. PC(PersonalComputer)와 티브이 또는 오디오 등의 멀티미디어 제품의 경우 다양한 기본기능을 동작시키기 위하여 고기능의 하드웨어 사양이 채택되므로 많은 데이터량과 빠른 속도의 통신을 위한 규격이 필요하다.Many microcomputers currently applied to home appliances have a built-in serial communication function and are configured to communicate with other microcomputers or devices. Such microcomputers have various sizes of resources that can be used for communication, such as memory, depending on the characteristics of the product. In the case of multimedia products such as PC (Personal Computer) and TV or audio, a high-performance hardware specification is adopted to operate various basic functions, so a specification for a large amount of data and high speed communication is required.

반면에, 냉장고, 세탁기, 전자레인지, 전등, 가스 경보기, 스탠드 또는 보일러 등의 경우 그 기능이 상술한 PC 또는 멀티미디어 제품의 기능에 비해 매우 단순하므로 일반적으로 8비트 이하의 저 기능 마이컴을 채용하고 있다. 이와 같은 저 기능 마이컴을 채용한 가전제품의 경우 기본적인 원격제어나 동작상태 모니터링이 주요 통신 목표이기 때문에 소규모의 마이컴 자원을 이용하여 통신할 수 있는 규격이 필요하다.On the other hand, refrigerators, washing machines, microwave ovens, lamps, gas alarms, stands or boilers are generally simpler than the functions of the PC or multimedia products described above. . In the case of home appliances employing such low-function microcomputers, basic remote control and operation status monitoring are the main communication targets. Therefore, a standard for communication using a small microcomputer resource is required.

그러나 현재 가전기기 간의 통신을 목적으로 사용되거나 진행중인 통신 규약들의 경우 상기 PC 또는 멀티미디어 기기에서 사용되는 고사양의 통신규격을 그대로 이용하기 위해 모뎀과 같은 별도의 통신모듈을 각 기기에 부가적으로 설치하거나 상기 고사양의 통신규격을 일부 변형하는 방식을 시도하고 있다.However, in the case of communication protocols used or ongoing for the purpose of communication between home appliances, a separate communication module such as a modem is additionally installed in each device or used to use the high specification communication standards used in the PC or multimedia devices. It is attempting to modify some of the high specification communication standards.

그러나, 종래의 기술에 따른 가전기기는 PC 또는 멀티미디어 기기에서 사용되는 고사양의 통신규격을 적용하여 모뎀과 같은 별도의 하드웨어 통신모듈을 각 기기별로 부가적으로 설치해야하므로 실제 기능 이상의 불필요한 통신규격 적용에 의한 비효율성 및 비용증가의 문제점이 있다.However, the home appliance according to the prior art has to install a separate hardware communication module such as a modem for each device by applying a high specification communication standard used in a PC or a multimedia device to apply unnecessary communication specifications beyond the actual function. There is a problem of inefficiency and cost increase.

본 발명은 상기한 종래의 문제점을 해결하기 위한 것으로서, 현재 가정에서 사용되는 저기능의 마이컴이 채용된 가전기기에 저비용/고효율 특성을 만족할 수있도록 한 가전기기 네트워크 제어시스템을 제공함에 그 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a home appliance network control system capable of satisfying low cost / high efficiency characteristics in home appliances employing low-function microcomputers used at home. .

도 1은 가전기기의 네트웍망을 나타낸 도면1 is a view showing a network of home appliances

도 2는 본 발명에 따른 마스터-슬레이브 방식의 마스터/슬레이브 겸용 기기간의 통신구조를 나타낸 도면2 is a diagram illustrating a communication structure between a master / slave combined device according to the present invention;

도 3은 본 발명에 따른 마스터-슬레이브 통신구조의 세부구성을 나타낸 도면3 is a diagram showing a detailed configuration of a master-slave communication structure according to the present invention;

도 4는 본 발명에 따른 하프 듀플렉스 통신구조를 나타낸 도면4 illustrates a half duplex communication structure according to the present invention.

도 5는 1 리퀘스트-1 리스폰스 통신 싸이클을 나타낸 도면5 shows a 1 Request-1 Response communication cycle.

도 6은 패킷 에러시 통신 싸이클을 나타낸 도면6 is a diagram illustrating a communication cycle in case of a packet error

도 7은 1 리퀘스트-멀티 리스폰스 통신 싸이클을 나타낸 도면7 illustrates a 1 request-multiple response communication cycle.

도 8은 1 리퀘스트 통신 싸이클을 나타낸 도면8 shows a 1 request communication cycle.

도 9는 통신계층의 구분형태를 나타낸 도면9 is a diagram illustrating a division form of a communication layer.

도 10은 계층간 패킷 통신구조를 나타낸 도면10 illustrates an inter-layer packet communication structure.

도 11은 전체 패킷 구조를 나타낸 도면11 shows the overall packet structure

도 12는 리퀘스트/노티피케이션 패킷의 구조를 나타낸 도면12 illustrates the structure of a request / notification packet.

도 13은 리스폰스 패킷의 구조를 나타낸 도면13 illustrates the structure of a response packet.

도 14는 어드레스 구조를 나타낸 도면14 shows an address structure

도 15는 네트워크 코드분류 방법을 나타낸 도면15 is a diagram illustrating a network code classification method.

도 16은 제품 종류에 따른 그룹 어드레스를 나타낸 도면16 is a view showing a group address according to product type

도 17은 설치장소에 따른 그룹 어드레스를 나타낸 도면Fig. 17 shows the group address according to the installation place

도 18은 설치장소와 제품 종류에 따른 그룹 어드레스를 나타낸 도면18 is a view showing group addresses according to installation place and product type

도 19는 이벤트 파일의 헤더구조를 나타낸 도면19 is a diagram illustrating a header structure of an event file.

도 20은 이벤트 파일의 바디구조를 나타낸 도면20 is a view showing the body structure of an event file

도 21은 에러발생시 리스폰스 패킷의 구성을 나타낸 도면21 is a diagram illustrating the configuration of a response packet when an error occurs.

상술한 목적을 달성하기 위하여, 본 발명은 직렬 통신기능을 갖는 다수의 가전기기와, 상기 가전기기들을 연결하는 통신매체를 포함하여 구성되며, 상기 가전기기 사이에 통신을 위하여 응용 계층, 데이터링크 계층 및 물리 계층으로 이루어진 통신계층이 정의되며, 기설정된 통신 이벤트가 발생하면 상기 통신계층을 이용하여 상기 가전기기 사에에서 통신이 수행되는 것을 특징으로 하는 가전기기 네트워크 제어시스템를 제공한다.In order to achieve the above object, the present invention comprises a plurality of home appliances having a serial communication function and a communication medium connecting the home appliances, the application layer, data link layer for communication between the home appliances And a communication layer comprising a physical layer, and when a predetermined communication event occurs, communication is performed at the home appliance using the communication layer.

따라서, 본 발명에 의하면, 저비용으로 간단하면서도 효율적인 가전기기 네트워크 제어시스템을 구현하는 것이 가능하다.Therefore, according to the present invention, it is possible to implement a simple and efficient home appliance network control system at low cost.

이하, 첨부된 도면을 참조하여 본 발명에 따른 가전기기 네트워크 제어시스템의 바람직한 일실시예를 상세히 설명하면 다음과 같다.Hereinafter, a preferred embodiment of a home appliance network control system according to the present invention with reference to the accompanying drawings in detail as follows.

먼저, 본 발명의 네트웍망을 살펴보면, 도 1과 같이, 외부 인터넷망과 연결된 게이트 웨이를 거쳐 A/V 네트워크에 연결된 티브이, 오디오 등 멀티미디어 기기 제품과, PC 네트워크에 연결된 프린터, 스케너, PC 카메라 등의 하위제품들과, 네트워크 관리기를 거쳐 리빙 네트워크로 연결된 냉장고, 에어컨, 세탁기, 청소기, 전자레인지, 가습기, 전등, 스탠드, 가스 경보기 등의 제품들로 구성된다. 이때 네트워크 관리기는 별도의 관리기기 또는 사용자의 PC가 될 수 있다.First, referring to the network of the present invention, as shown in FIG. 1, multimedia device products such as TV and audio connected to an A / V network through a gateway connected to an external Internet network, a printer, a scanner, a PC camera connected to a PC network, etc. Its sub-products include products such as refrigerators, air conditioners, washing machines, vacuum cleaners, microwave ovens, humidifiers, lights, stands, and gas alarms, connected via a network manager to a living network. In this case, the network manager may be a separate management device or a user's PC.

이와 같은 본 발명의 가전기기 네트워크 제어시스템을 살펴보면 다음과 같다.Looking at such a home appliance network control system of the present invention.

먼저, 본 발명은 마스터(master)-슬레이브(slave) 방식이 적용된다. 즉, 모든 통신 싸이클은 마스터에 의해 시작되고 마스터 디바이스에 의해 종료된다. 어떠한 기기도 마스터가 될 수 있지만 그러기 위해서는 통신 선로상의 데이터 흐름을 제어할 수 있는 기능을 가져야하고 네트워크에 연결된 제품들에 대한 정보와 제어코드를 가지고 있어야 하는데, 본 발명은 비교적 저사양의 가전기기간의 네트워크이므로 PC와 같이 사용자 인터페이스 기능을 갖춘 디바이스만이 마스터의 모든 기능을 탑재하고 그 이외의 디바이스는 이미 정해진 슬레이브와의 통신 또는 간단한 제어코드에 의한 통신 등 제한된 기능의 마스터로서의 역할만 가능하도록 한다.First, the present invention is applied to the master (slave) method. In other words, all communication cycles are initiated by the master and terminated by the master device. Any device can be a master, but in order to do so, it must have a function to control the flow of data on a communication line and have information and control codes for products connected to a network. Therefore, only a device with a user interface function such as a PC is equipped with all the functions of the master, and other devices can only serve as masters of limited functions such as communication with a predetermined slave or communication by a simple control code.

또한 이와 같이 기본적인 마스터-슬레이브 통신방식을 유지하면서 디바이스간의 직접 통신 즉, 피어 투 피어(peer-to-peer) 통신이 가능하도록 마스터와 슬레이브가 논리적으로 공존하는 디바이스를 정의한다. 즉, 도 2와 같이, 물리적으로 하나의 디바이스이지만 논리적으로 독립된 마스터와 슬레이브로 구분되는 디바이스(이하, P2P 디바이스)가 정의된다.In addition, while maintaining the basic master-slave communication method as described above, a device in which the master and the slave logically coexist so as to enable direct communication between devices, that is, peer-to-peer communication. That is, as shown in FIG. 2, a device (hereinafter, referred to as a P2P device) that is physically one device but logically independent of a master and a slave is defined.

네트워크에 연결되는 모든 제품은 P2P 디바이스를 기본으로 하지만 도 3과 같이, 제품의 하드웨어 특성상 마스터, 슬레이브, 송신전용, 수신전용으로 정의될 수 있다.All products connected to the network are based on P2P devices, but, as shown in FIG. 3, may be defined as master, slave, transmit only, or receive only due to the hardware characteristics of the product.

즉, 마스터의 경우 새로운 통신 싸이클을 시작하기 위하여 최종 사용자 또는 디바이스 내부의 상태변화에 의하여 통신시작 이벤트가 발생하면 해당되는 슬레이브와의 통신을 시작하고 종료시키는 기능을 갖는다.That is, the master has a function of starting and terminating communication with the corresponding slave when a communication start event occurs due to a change of state in the end user or device in order to start a new communication cycle.

슬레이브의 경우 항상 수신대기 상태이며 스스로 다른 디바이스로 통신을 요청할 수 없다.In case of slave, it is always in standby state and cannot request communication from other device by itself.

P2P 디바이스의 경우 내부에 마스터와 슬레이브가 논리적으로 공존하는 디바이스로서 최종 사용자 또는 디바이스 내부 상태변화에 의하여 통신시작 이벤트가 발생하면 마스터로서 동작하여 통신 싸이클을 주도하며, 해당 통신 종료후에는 슬레이브로 동작하여 수신대기 상태로된다.In the case of P2P device, the master and slave logically coexist inside, and when communication start event occurs due to the change of end user or device internal state, it acts as master and leads the communication cycle. Receive standby.

송신전용 디바이스의 경우 하드웨어 특성상 송신만 가능한 디바이스로서, 적외선 리모컨이 이에 해당된다.In the case of a transmission-only device, only a transmission is possible due to hardware characteristics. An infrared remote controller corresponds to this.

수신전용 디바이스의 경우 하드웨어 특성상 수신만 가능한 디바이스로서 적외선 수신기만 장착되고 건전지로 동작하는 제품이 이에 해당된다.Receiving-only device is a device capable of receiving only due to the hardware characteristics, and this includes a product that is equipped with an infrared receiver and is operated by a battery.

다음으로, 본 발명에 따른 가전기기 네트워크 제어시스템은 도 4와 같이, 하나의 버스를 이용한 하프 듀플렉스(Half-Duflex) 방식으로 신호전송을 수행한다.Next, the home appliance network control system according to the present invention performs signal transmission in a half-duplex method using one bus, as shown in FIG. 4.

즉, 송신 시에는 다른 디바이스로부터 송신되는 데이터를 수신하지 않고, 수신시에는 다른 디바이스로 데이터를 송신하지 않는다. 이는 통신을 위한 메모리 사용을 최소화하기 위한 것이고, 동시에 본 발명의 가전기기 네트워크처럼 직렬통신 기능을 이용한 하나의 버스로 구성되는 네트워크에 대응하기 위한 것이다.In other words, data is not received from another device at the time of transmission, and data is not transmitted to the other device at the time of reception. This is to minimize the use of memory for communication, and at the same time to correspond to a network composed of one bus using a serial communication function, such as the home appliance network of the present invention.

따라서 마스터, 슬레이브의 경우에도 모두 송신과 수신을 위한 메모리를 공유할 수 있으며, P2P 디바이스의 경우에도 마스터와 슬레이브가 동시에 동작하지 않으므로 송신과 수신을 위한 메모리를 하나로 공유할 수 있으므로 송/수신 과정 모두를 인터럽트(Interupt) 처리할 필요가 없어 제품 측면에서의 프로그래밍의 자유도를 높여준다.Therefore, both the master and slave can share the memory for transmission and reception. In the case of P2P devices, since the master and slave do not operate at the same time, the memory for transmission and reception can be shared as one. This eliminates the need for Interupt, which increases programming freedom on the product side.

다음으로, 본 발명에 따른 가전기기 네트워크 시스템은 1-싸이클(cycle) 방식으로 통신을 수행한다. 1-싸이클 방식은 1 리퀘스트(request)-1 리스폰스(response) 방식과, 1 리퀘스트-멀티 리스폰스 방식, 그리고 1 리퀘스트 방식으로 구분할 수 있다.Next, the home appliance network system according to the present invention performs communication in a one-cycle manner. The 1-cycle method may be divided into a 1 request-1 response method, a 1 request-multi response method, and a 1 request method.

이때 1 리퀘스트-1 리스폰스 방식은 도 5와 같이, 하나의 마스터가 하나의 슬레이브에 1 패킷(packet)만을 송신하고 슬레이브는 그에 대한 응답으로 1 패킷을 송신하면 이를 마스터가 수신하여 종료되는 방식이다. 그리고 도 7과 같이, 1 리퀘스트-멀티 리스폰스 방식은 하나의 마스터가 다수의 슬레이브들에게 1 패킷을 송신하고 각 슬레이브는 그에 대한 응답으로 1 패킷을 송신하며, 마스터는 계속 응답을 대기하다가 기설정된 최대 수신시간이 경과하면 통신을 종료하는 방식이다. 그리고 도 8과 같이, 1 리퀘스트 방식은 하나의 마스터가 하나 또는 다수의 슬레이브를 대상으로 1 패킷을 송신하고 응답을 기다리지 않고 통신을 종료하는 방식이다. 이때 여러개의 패킷으로 구성된 데이터 송신이 있을 경우 마스터에서 해당 슬레이브에 맞는 크기의 패킷으로 분할하여 1 패킷 단위로 송신을 수행한다. 한편, 도 6은 슬레이브에서 리스폰스 에러 발생시 리퀘스트를 재송신하고 그에 따른 리스폰스를 받아 통신을 종료하는 방식을 나타낸다.In this case, the 1 request-1 response method is a method in which one master transmits only 1 packet to one slave and the slave receives 1 packet in response thereto, and the master receives and terminates it. And, as shown in FIG. 7, in the one request-multi-response scheme, one master transmits one packet to multiple slaves, and each slave transmits one packet in response thereto, and the master continues to wait for a response and then sets a predetermined maximum. The communication is terminated when the reception time elapses. As shown in FIG. 8, the one request method is a method in which one master transmits one packet to one or more slaves and terminates communication without waiting for a response. At this time, if there is data transmission composed of several packets, the master divides the packet into the size of the corresponding slave and transmits the data in one packet unit. Meanwhile, FIG. 6 illustrates a method in which a response is resent when a response error occurs in a slave and communication is terminated by receiving a response accordingly.

다음으로, 본 발명에 따른 가전기기 네트워크 제어시스템은 물리 계층과 데이터 링크 계층 및 응용 계층으로 이루어진 프로토콜(Protocol)을 갖는다.Next, the home appliance network control system according to the present invention has a protocol consisting of a physical layer, a data link layer, and an application layer.

현재 인터넷 프로토콜로 사용되는 TCP/IP 프로토콜의 경우 그 통신계층을 살펴보면, 응용 계층, 트랜스포트 계층, 네트워크 계층, 데이터 링크 계층, 물리 계층으로 구분된다. 그 이외의 가전제품 또는 공장자동화를 위한 프로토콜의 경우에도 기본적으로 응용 계층, 데이터 링크 계층 및 물리 계층을 구비하고 부가적으로 트랜스포트 계층 또는 네트워크 계층을 구비한다. 그러나 본 발명은 저사양의 가전기기를 대상으로 상술한 통신방식에 대응하기 위한 것이므로 물리 계층과 데이터 링크 계층 및 응용 계층만으로 이루어진 통신계층을 가지며, 마스터-슬레이브 방식과 하프 듀플렉스 방식 등에 맞도록 마이컴의 부하를 최소화하기 위하여 물리계층과 데이터 링크 계층을 최대한 간소화하고 제품 동작을 위한 많은 부분을 응용계층에 할당한다.In the case of the TCP / IP protocol currently used as an Internet protocol, the communication layer is divided into an application layer, a transport layer, a network layer, a data link layer, and a physical layer. Other protocols for home appliances or factory automation also include an application layer, a data link layer, and a physical layer, and additionally, a transport layer or a network layer. However, since the present invention is intended to correspond to the above-described communication method for home appliances of low specification, it has a communication layer consisting of only a physical layer, a data link layer, and an application layer, and loads of a microcomputer to fit into a master-slave method and a half duplex method. Minimize the physical and data link layers as much as possible and allocate a large portion of the product's operation to the application layer.

상술한 통신 계층의 세부구성을 살펴보면, 도 9에 도시된 바와 같이, 먼저, 슬레이브의 경우 응용 소프트웨어와 메시지 구성과 메시지 실행과 메시지 조합 및 메시지 중복 체크영역으로 이루어진 응용 계층과, 패킷 구성과 패킷 송신과 CSMA/CD와 패킷 체크와 어드레스 체크와 패킷 데이터 수신영역으로 이루어진 데이터링크 계층과, UART로 이루어진 물리 계층으로 구성된다. 이때 물리 계층에는 전력선 통신을 이용할 경우 선택되는 어뎁터(Adaptor)를 포함할 수 있다.Referring to the detailed configuration of the above-described communication layer, as shown in FIG. 9, first, in the case of a slave, an application layer consisting of application software, message configuration, message execution, message combination, and message duplication check area, packet configuration, and packet transmission And a data link layer consisting of a CSMA / CD, a packet check, an address check, and a packet data receiving area, and a physical layer consisting of a UART. In this case, the physical layer may include an adapter selected when power line communication is used.

그리고 마스터의 경우 응용 소프트웨어와 메시지 구성과 메시지 분할 및 메시지 조합영역으로 이루어진 응용 계층과, 패킷 구성과 패킷 송신과 패킷 전송확인과 CSMA/CD와 패킷 체크와 어드레스 체크와 패킷 데이터 수신영역으로 이루어진 데이터링크 계층과, UART로 이루어진 물리 계층으로 구성된다. 마스터의 물리 계층의 경우에도 슬레이브와 마찬가지로 전력선 통신을 이용할 경우 선택되는 어뎁터(Adapter)를 포함할 수 있다.In the case of the master, the application layer consists of application software, message composition, message partitioning, and message combination areas, and data link consisting of packet configuration, packet transmission, packet transmission confirmation, CSMA / CD, packet check, address check, and packet data reception area. It consists of a layer and a physical layer consisting of a UART. The physical layer of the master may include an adapter that is selected when using power line communication like the slave.

이때 물리 계층은 통신 선로에서의 Bit 신호들을 수신하여 패킷을 구성하거나 데이터 링크 계층에서 넘겨받은 패킷을 통신선로에 비트(Bit)신호로 실어 보내는 역할을 한다.At this time, the physical layer is configured to receive the bit signals on the communication line to form a packet or to send the packet received from the data link layer as a bit signal on the communication line.

데이터 연결링크 계층은 응용 계층에서 넘겨받은 데이터를 이용해 패킷을 구성한 후 물리계층으로 송신하거나, 물리계층에서 넘겨받은 패킷을 처리하여 응용계층에 넘겨준다. 데이터 연결 계층은 마스터와 슬레이브의 역할이 약간 다른 데, 마스터에서는 물리계층으로의 패킷 전송을 보장하기 위한 과정이 포함된다. 물리계층과 데이터 연결 계층은 슬레이브로 작용하는 제품은 동일한 구조를 가지고 있다.The data link link layer configures a packet using data received from the application layer and transmits the packet to the physical layer, or processes the packet received from the physical layer and hands it over to the application layer. The data link layer has a slightly different role between the master and the slave. The master includes a process for ensuring packet transmission to the physical layer. The physical layer and the data connection layer have the same structure as the product acting as a slave.

응용계층은 메시지 셋(Message Set)으로 구성되며 메시지를 해석하여 처리하는 역할을 한다. 메시지는 슬레이브로 작용하는 제품에서는 부하 제어나 메모리 제어 등의 방법이 포함되고, 마스터에서는 슬레이브가 메시지를 처리한 결과를 이용하여 슬레이브들을 관리하거나 전체 네트워크를 제어하는 역할을 한다. 따라서 응용계층은 제품마다 다른 내용을 포함한다. 마스터의 응용계층에서는 전송할 데이터가 하나의 패킷 범위보다 많을 때 패킷을 분할하여 송신하거나, 분할된 패킷이 수신될 때 이들을 조합하여 처리하는 전송계층 역할도 포함한다. 전송계층을 구분하지 않는 것은 패킷의 분할 및 조합이 모든 메시지가 아닌 특정한 메시지에 대해서만 이루어지는 작업이기 때문에 응용계층에 포함시킨다.The application layer consists of a message set and is responsible for interpreting and processing messages. In the product acting as a slave, the message includes methods such as load control and memory control, and in the master, the slave manages the slave or controls the entire network by using the result of processing the message. The application layer therefore contains different content for different products. The application layer of the master also includes a role of a transport layer that divides and transmits a packet when there is more data to transmit than one packet range, or combines and processes a packet when the divided packet is received. The distinction between transport layers is included in the application layer because the splitting and combining of packets is done only for a specific message and not all messages.

이와 같은 통신 계층간의 패킷 통신 구조는 도 10에 도시된 바와 같다. 즉, 응용계층과 데이터 연결 계층 간에는 메시지 단위로, 데이터 연결계층과 물리계층 간에는 풀(Full) 패킷단위로 인터페이스(Interface)한다. 데이터 연결 계층과 물리계층 간에는 통신할 때 계층별로 따로 패킷을 구성할 필요 없이 그대로 패킷을 이용할 수 있도록 풀 패킷 단위로 통신한다. 그러나 응용 계층에서는 데이터 연결 계층과 물리계층에서 덧붙여질 헤더의 길이(length)를 알 수 없기 때문에 풀 패킷 단위로 인터페이싱하기는 어렵고 대신 응용 계층에서 데이터 연결 계층으로 넘겨줄 데이터를 메시지 단위로 전달한다. 패킷은 통신하고자 하는 모든 정보를 포함할 수 있어야 하고, 향후에 통신기능이 확장되었을 때 대처할 수 있는 구조이어야 한다.Such a packet communication structure between communication layers is shown in FIG. In other words, the application layer and the data connection layer are interfaced in a message unit, and the data connection layer and physical layer are interfaced in a full packet unit. When communicating between the data connection layer and the physical layer, communication is performed in full packet units so that the packet can be used as it is without having to configure packets for each layer. However, since the length of the header to be added in the data connection layer and the physical layer is not known at the application layer, it is difficult to interface in the full packet unit. Instead, data to be transferred from the application layer to the data connection layer is transmitted in message units. The packet should contain all the information you want to communicate with, and it should be structured to cope with future extended communication.

패킷은 기본적으로 도 11에 도시된 바와 같이, 패킷 헤더 필드와 향후 패킷 기능 추가를 위한 필드(필드)로 이루어진 헤더 영역과, 메시지 헤더 필드와 향후 메시지 기능 추가 필드와 메시지 필드로 이루어진 바디(body) 영역 및 트레일러(trailer) 영역으로 구성된다.As shown in FIG. 11, a packet basically includes a header area consisting of a packet header field and a field (field) for future packet function addition, a body consisting of a message header field, a future message function addition field, and a message field. It consists of a zone and a trailer zone.

그리고 패킷중 마스터에서 사용하는 리퀘스트/노티피케이션(Notification) 패킷의 세부 구성은 도 12에 도시된 바와 같이, 8 비트로 이루어져 네트웍망이 형성된 가정을 구분하기 위한 홈 코드(Home code)(HC), 16 비트로 이루어져 수신자를 표시하기 위한 리시버 어드레스(Receiver address)(RA), 16 비트로 이루어져 송신자를 표시하기 위한 샌더 어드레스(Sender address)(SA), 8 비트로 이루어져 패킷의 길이를 표시하기 위한 패킷 랭쓰(Packet Length)(PL), 3 비트로 이루어져 전송 우선순위를 표시하기 위한 억세스 프리아러티(Access Priority)(AP), 5 비트로 이루어져 패킷 헤더의 길이를 표시하기 위한 패킷 헤더 랭쓰(Packet Header Length)(PHL), 8 비트로 이루어져 프로토콜의 버전을 표시하기 위한 프로토콜 버전(Protocol Version)(PV), 4 비트로 이루어져 패킷 타입을 표시하기 위한 패킷타입(packet Type)(PT), 2 비트로 이루어져 재전송 횟수를 표시하기 위한 리트랜스미션 카운터(Retransmission Counter)(RC), 그리고 2 비트로 이루어져 새로운 패킷 전송을 표시하기 위한 패킷 넘버(Packet Number)(PN), 8 비트의 메시지 랭쓰(Message Length)(ML), 8 비트의 메시지 헤더 랭쓰(Message Header Length)(MHL), 8 비트의 포트(Port)(PO)로 구성됨을 특징으로 하는 가전기기 네트워크 제어시스템. 8 비트의 코멘드 코드(Command Code)(CC) 및 비트수가 가변되는 아규먼트(Argument)(ARG), 16 비트의 에러체크(CRC) 및 8 비트로 이루어져 패킷의 끝을 표시하기 위한 이티엑스(ETX)를 포함하여 최소 17-Byte, 최대 255-Byte로 구성된다.The detailed configuration of the request / notification packet used in the master of the packet is made up of 8 bits, as shown in FIG. 12, for a home code (HC) for identifying a home on which a network is formed. A receiver address (RA) consisting of 16 bits to indicate the receiver, a sender address (SA) consisting of 16 bits to indicate the sender, and a packet length to indicate the length of the packet consisting of 8 bits. Length (PL), Access Priority (AP) consisting of 3 bits to indicate transmission priority, Packet Header Length (PHL) consisting of 5 bits to indicate the length of the packet header, Protocol Version (PV) for indicating the version of the protocol, consisting of 8 bits, Packet Type (packe) for indicating the packet type, consisting of 4 bits t Type) (PT), a Retransmission Counter (RC) for indicating the number of retransmissions consisting of 2 bits, and a Packet Number (PN) for indicating a new packet transmission, consisting of 2 bits, 8 bits Home appliance network control system comprising a Message Length (ML) of, Message Header Length (MHL) of 8 bits, Port (PO) of 8 bits. An 8-bit Command Code (CC) and Argument (ARG) with variable number of bits, 16-bit error check (CRC), and 8-bit ETIX (ETX) to mark the end of the packet. It consists of minimum 17-byte and maximum 255-Byte.

또한 슬레이브에서 사용하는 리스폰스 패킷은 도 13에 도시된 바와 같이, 바디 부분에 8 비트의 ACK/NAK가 포함되는 것을 제외하고는 리퀘스트/노티피케이션(Notification) 패킷과 동일하다.In addition, the response packet used by the slave is the same as the request / notification packet except that an 8-bit ACK / NAK is included in the body part as shown in FIG. 13.

이때 홈 코드(HC)는 네트워크가 구성된 가정을 논리적으로 구분하기 위한 코드로서 특히 전력선 같이 각 가정간 전송 선로가 구분되지 않고 연결되어 있을 경우 각 가정을 구분하기 위해 핵사값 0x03 ~ 0xFE 범위내에서 사용된다.In this case, the home code (HC) is a code for logically classifying households configured with a network, and is used within the range of nucleus values 0x03 to 0xFE to distinguish each household, especially when a transmission line between households such as a power line is connected without distinction. do.

리시버 어드레스(RA)는 샌더 어드레스(SA) 앞에 위치하며, 이는 수신자가 패킷을 수신하기 시작할 때 계속 수신할 것인지 아니면 무시할 것인지를 조기에 판단하기 위함이다. 상위 Bit부터 차례로 2Bit는 네트워크의 종류, 6Bit는 세탁기, 냉장고 등 독립적인 기능을 가지는 제품을 구분하며, 하위 8Bit는 같은 종류의 제품들이 다수 개 있을 때 서로 구분하기 위하여 할당된다.The receiver address RA is located in front of the sander address SA in order to early determine whether the receiver will continue to receive or ignore the packet when it begins to receive the packet. In order from the upper bit, 2Bit classifies the network type, 6Bit classifies products with independent functions such as washing machine and refrigerator, and the lower 8Bit class is allocated to distinguish each other when there are many products of the same type.

패킷 랭쓰(PL)는 홈 코드부터 ETX까지 패킷의 Byte단위로 계산된 수를 저장하고 있는 1-Byte로 구성된다. 수신자는 패킷 길이(PL) 데이터 값을 받은 후에 이 값만큼의 데이터만 수신하여 이후의 단계를 처리한다. 따라서 패킷 길이(PL) 값은 수신 시 필요한 버퍼의 크기를 미리 알게 해주고, 수신 된 패킷 데이터의 오류를 검출하는 데 이용된다. 즉, 패킷의 마지막 Byte를 읽고 나서 그 값이 ETX가 아니면 패킷 에러로 판단할 수 있다.The packet length (PL) is composed of 1-byte that stores the number of bytes calculated from the home code to ETX. After receiving the packet length (PL) data value, the receiver receives only this much data and processes subsequent steps. Therefore, the packet length (PL) value is used to know in advance the size of the buffer required for reception, and is used to detect errors in the received packet data. That is, after reading the last byte of the packet, if the value is not ETX, it can be determined as a packet error.

억세스 프리아러티(AP)는 응용 계층에서 긴급한 메시지를 보내야 하거나 전송에 실패하여 재전송해야 하는 패킷, 또는 일반 통신보다 중요하지 않은 메시지 등 전송에 우선 순위를 주어야 하는 메시지에 우선 순위를 주어 물리 계층에서 CSMA/CD 기능을 수행할 수 있도록 전송 우선 순위를 표시하는 필드(field)이다. 이 필드는 CSMA/CD 기능을 수행하는 어뎁터에서 우선 순위에 따른 전송이 가능할 때 의미가 있고, 그 외의 경우에는 무시한다. 각 통신 경우에 따르는 억세스 피리아러티(Access Priority) 값은 다음과 같다.Access Priority (AP) prioritizes messages that need to be prioritized, such as packets that need to send urgent messages at the application layer, packets that have failed to be transmitted, or need to be retransmitted, or are less important than general communication. Field indicating the priority of transmission to perform / CD function. This field is meaningful when the adapter performing the CSMA / CD function can transmit according to priority. Otherwise, this field is ignored. The access priority values according to each communication case are as follows.

0 : 충돌로 재전송 시 또는 긴급 사태일 때0: Retransmission due to collision or emergency

1 : 메시지 분할을 통한 대량 데이터 송신 시1: When sending bulk data through message segmentation

2: 평상시 통신2: normal communication

3 : 네트워크 접속 상태 신고시(충돌인 경우도 Priority를 3으로 유지)3: Report network connection status (in case of conflict, Priority is kept at 3)

패킷 헤더 랭쓰(PHL)는 패킷 헤더의 확장성을 위한 필드로서, 현 패킷 헤더에 확장 필드를 추가했을 때, 그에 따라 패킷 헤더 랭쓰를 변경한다. 변경 내용이 없을 때에는 9 byte이며, 최대 32 byte까지 확장 가능하다.The packet header length (PHL) is a field for scalability of the packet header. When the extension field is added to the current packet header, the packet header length (PHL) is changed accordingly. If there is no change, it is 9 bytes and can be extended up to 32 bytes.

프로토콜 버전(PV)은 채용된 프로토콜의 버전을 나타내는 1Byte 필드이다. 버전과 서브 버전은 업데이트되는 순서대로 0 ~ 15의 값을 순서대로 취한다.The protocol version (PV) is a 1 byte field indicating the version of the adopted protocol. Versions and subversions take values from 0 to 15 in order in which they are updated.

패킷 타입(PT)은 패킷을 송신할 때 지정하는 4Bit 필드 값으로 리퀘스트 패킷과 리스폰스 패킷, 노티피케이션(Notification) 패킷으로 나눈다. 리스폰스 패킷은 다시 Successful 리스폰스와 Failed 리스폰스로 나눈다. 마스터는 리퀘스트 패킷으로 설정하고 슬레이브는 리스폰스 패킷으로 설정해야 한다. 디바이스가 슬레이브만으로 동작할 때는 리퀘스트 패킷에 대해서만 처리해야 한다. 리스폰스 패킷을 두 가지로 다시 나눈 이유는 데이터 링크 계층에서 메시지 내용을 모르더라도 패킷 헤더에 있는 패킷 타입(PT) 필드만 보고 Failed 리스폰스일 때 응용 계층으로 패킷을 전송하지 않고 바로 재전송하기 위한 것이다. 노티피케이션(Notification) 패킷은 리스폰스를 요구하지 않는 패킷을 나타낸다. 어레이드(Arrayed) 패킷은 대량의 데이터를 고속으로 파일을 전송할 때 각 패킷에 대한 응답이 없이 모든 데이터를 분할하여 보낼 때 이용하며, 그 핵사값은 아래와 같다.The packet type (PT) is a 4Bit field value specified when transmitting a packet, and is divided into a request packet, a response packet, and a notification packet. The response packet is divided into a successful response and a failed response. The master should be set to the request packet and the slave to the response packet. When the device operates only as a slave, it should only process request packets. The reason for splitting the response packet into two is to see only the packet type (PT) field in the packet header even if the data link layer does not know the message contents, and to retransmit the packet immediately without sending the packet to the application layer when the failed response is failed. Notification packets indicate packets that do not require a response. An arrayed packet is used to send a large amount of data at high speed when transferring all the data without sending a response to each packet. The nucleus value is as follows.

0 : request packet0: request packet

1 ~ 3: Reserved1 to 3: Reserved

4 : Successful response packet4: Successful response packet

5 : Failed response packet5: Failed response packet

6 ~ 7: Reserved6 to 7: Reserved

8 : Broadcast Notification packet8: Broadcast Notification packet

9 : Arrayed packet9: Arrayed packet

10: End packet of arrayed data10: End packet of arrayed data

11 ~ 15: Reserved11-15: Reserved

리트랜스미션 카운트(RC)는 통신 에러가 발생했을 때 같은 메시지의 중복처리를 방지하기 위한 2Bit 필드 값이다. 마스터는 수신한 리스폰스 패킷에 CRC 에러 코드가 포함되어 있거나, 수신 패킷이 CRC 에러, 또는 수신 byte time over이면 최대 3회까지 재전송 가능하다. 슬레이브는 항상 1회 전송이다.The retransmission count RC is a 2Bit field value for preventing duplication of the same message when a communication error occurs. The master may retransmit up to three times if the received response packet contains a CRC error code or if the received packet is a CRC error or a received byte time over. The slave is always one transmission.

패킷 넘버(PN)는 역시 통신 에러가 발생했을 때 같은 메시지의 중복처리를 방지하기 위한 2Bit 필드 값이다. 마스터는 새로운 패킷을 전송할 때마다 패킷 넘버를 1씩 증가시키고, 같은 패킷을 재전송할 경우에는 이전과 같은 패킷 넘버를 유지한다. 따라서, 슬레이브는 이전 메시지의 패킷 넘버와 송신 주소를 기억하고 있다가 같은 메시지가 다시 수신되면 중복 메시지이므로 무시하고, 다를 경우에는 수행한다. 슬레이브는 수신한 메시지에 응답할 때 수신 메시지의 패킷 넘버를 복사하여 응답 패킷을 구성한다.The packet number PN is also a 2Bit field value for preventing duplication of the same message when a communication error occurs. The master increments the packet number by 1 each time a new packet is transmitted, and maintains the same packet number when retransmitting the same packet. Therefore, the slave memorizes the packet number and the transmission address of the previous message, and if the same message is received again, the slave ignores the duplicate message and performs the difference if it is different. When the slave responds to the received message, the slave constructs a response packet by copying the packet number of the received message.

메시지 랭쓰(ML)는 메시지 필드의 길이가 가변적이기 때문에 이를 알기 위한 정보이다. 따라서 응용 계층에서는 메시지 랭쓰를 보고 메시지 필드의 길이를 알아서 처리한다.The message length (ML) is information for knowing this because the length of the message field is variable. Therefore, the application layer handles the length of the message field by looking at the message length.

메시지 헤더 랭쓰(MHL)는 향후 메시지 필드의 확장을 위한 필드로서 메시지 필드의 암호화, 응용 프로토콜의 변경 등의 경우 메시지 헤더를 추가할 수 있다.The message header length (MHL) is a field for future expansion of the message field and may add a message header in the case of encryption of the message field, change of an application protocol, and the like.

포트 넘버(PO)는 메시지 set의 확장을 위한 필드로서 메시지 set을 포트별로 구분할 수 있다. 메시지 set의 Version-up, 또는 타 응용 프로토콜과의 호환을 위해 포트별로 메시지 set을 둘 수 있다.The port number (PO) is a field for the extension of the message set, which can classify the message set by port. Message sets can be placed per port for version-up of message sets or compatibility with other application protocols.

메시지는 마스터가 슬레이브로 기능수행을 요청하기 위한 코멘드(Command) 코드와 이 Command를 수행하는 데 필요한 입력 인자들, 그리고 슬레이브가 Command를 수행하고 나서 마스터로 전송하는 인자들로 구성된다. 또한 8 Bit급 마이컴에서의 프로그램 작업이 용이하도록 구성되고 정의되어야 한다. 즉, 메시지가 첨삭되더라도 쉽게 반영할 수 있도록 모듈화 프로그래밍이 가능해야 한다. 이를 위하여 모든 메시지는 각각에 대해 독립적인 기능을 가지고 있어야 한다. 이는 모든 메시지가 그에 따르는 하위 개념의 메시지를 포함할 수 없고, 또한 S/W 구현에서도 각각의 루틴(Routine)들간의 인과관계는 없다는 것을 의미한다. 메시지들이 서로 독립적인 기능을 가진다면 메시지들을 조합하여 제품을 제어 및 모니터링(Monitoring)을 위한 기능들을 확장할 수 있다. 슬레이브가 Command를 정상적으로 수행했다면 마스터로 전송하는 인자들은 {ACK + Return arguments}이고, 그렇지 않다면 {NAK + 에러 코드}이다. 디바이스별로 최대 256개의 Command를 가질 수 있으며 반드시 포함되는 요소이다. Input Arguments와 Return Arguments는 Command 코드에 따라 유무와 Byte 수가 결정된다.The message consists of command code to request the master to perform a function, input parameters required to execute this command, and parameters sent to the master after the slave executes the command. In addition, it should be configured and defined to facilitate program work in 8-bit microcomputer. In other words, modular programming should be possible to easily reflect the message even if it is corrected. To do this, every message must have an independent function for each. This means that every message cannot contain a subordinate message, and there is no causal relationship between the routines in the S / W implementation. If the messages have functions that are independent of each other, the messages can be combined to extend the functions for controlling and monitoring the product. If the slave executes the command normally, the arguments sent to the master are {ACK + Return arguments}, otherwise it is {NAK + error code}. Each device can have up to 256 Commands and is included. Input Arguments and Return Arguments are determined according to the command code and the number of bytes.

이때 Arguments의 데이타 형식은 다음과 같다.The data format of Arguments is as follows.

boolean : 1Byteboolean: 1Byte

char, unsigned char : 1Bytechar, unsigned char: 1Byte

int, unsigned int, short int, unsigned short int : 2 Byteint, unsigned int, short int, unsigned short int: 2 Byte

long, undigned long : 4Bytelong, undigned long: 4Byte

string : NULL을 포함하여 송수신.string: Send and receive including NULL.

또한, Command 코드를 분류하기 위해 다음과 같은 기본 개념을 둔다.In addition, the following basic concepts are used to classify the Command code.

모든 제품은 256개(0x00 ~ 0xFF)의 명령어 코드를 독립적으로 사용하지만, 모든 제품에 공통적으로 사용되는 명령어는 공통 코드를 사용한다. 제품의 기능을 일반화된 구조에 포함시켜 항목의 첨삭이 수월하게 한다. 모든 Command 코드는 필수적인 것과 선택적인 것으로 구분된다. 필수적인 것으로는 디바이스의 기본적인 정보에 관한 것과 통신에 필요한 Command들이다. 기능상으로는 순시 Command(I 로 표시)와 Program Command(P로 표시)로 구분된다. 순시 Command는 슬레이브가 수신 즉시 수행 가능하고 Program Command는 수행을 위한 Sequence가 필요하다. Algorithm Area에 있는 Command 코드들은 모든 제품에 대한 표준화코드가 지정하지 않는다. 같은 종류의 제품도 모델명 또는 제품 메이커에 따라 다른 알고리듬을 이용하여 통신할 수 있기 때문에 같은 Command 코드를 이용하여 다른 기능을 수행할 수 있다. 따라서 이 영역의 모든 Comand 코드는 제품모델의 고유번호를 부여받아 인자로 포함되어야 한다. 또한 메시지는 응용계층에서 처리하기 위한 규약으로 마스터에서 송신할 때와 슬레이브가 마스터에 대한 응답을 할 때의 구조가 다르다. 마스터에서 송신할 때는 Command 코드와 이를 수행하기 위한 입력 인자 즉, 아규먼트(ARG)로 구성된다. 인자의 수 및 인자의 데이터 형은 Command 코드에 따라 달라진다. 마스터로부터 하나의 패킷을 받은 슬레이브가 송신할 때의 메시지의 구조는 마스터로부터 받은 패킷의 에러 또는 Command 코드를 수행할 때 에러가 있을 경우와 없을 경우 두 가지로 나누어진다. 마스터로부터 받은 패킷의 에러가 없고Command 코드도 정상적으로 수행되었다면 메시지의 구조는 Command 코드, ACK, Command 코드 수행한 결과 인자(ARG)들로 구성된다. 결과 인자의 수와 데이터 형도 Command 코드에 따라 달라진다. 마스터로부터 받은 패킷에 에러가 발생했다면 Command 코드, NAK 그리고 패킷 에러 코드로 구성된다. 패킷은 정상적이지만 Command 코드수행 중에 에러가 발생했다면 Command 코드, NAK 그리고 에러 코드로 구성된다.All products use 256 command codes (0x00 ~ 0xFF) independently, but the commands commonly used in all products use common code. Incorporate the product's functions into a generalized structure to facilitate item addition. All Command codes are classified as mandatory and optional. Essential are the basic information of the device and the commands necessary for communication. Functionally, it is divided into instantaneous command (indicated by I) and program command (indicated by P). Instant Command can be executed immediately by Slave and Program Command needs Sequence to execute. Command codes in the Algorithm Area are not specified by standard codes for all products. Since the same type of product can communicate using different algorithms depending on the model name or product manufacturer, different functions can be performed using the same command code. Therefore, all Comand codes in this area should be given as unique numbers of product models and included as arguments. In addition, the message is a protocol for processing at the application layer. The structure of the message is different from that transmitted from the master and when the slave responds to the master. When transmitting from the master, it consists of a command code and an input argument (ARG) to perform it. The number of arguments and their data types depend on the Command code. When a slave receives one packet from the master, the message structure is divided into two types, one with an error and the other with no error. If there is no error in the packet received from the master and the command code is normally executed, the message structure consists of the command code, the ACK, and the result of executing the command code (ARG). The number and data types of the result arguments also depend on the Command code. If an error occurs in a packet received from the master, it consists of a command code, a NAK, and a packet error code. If the packet is normal but an error occurred during the execution of the command code, it consists of a command code, a NAK, and an error code.

CRC는 수신된 패킷의 에러를 검출하거나 송신 시 수신자가 패킷 에러를 검출할 수 있도록 하는 값이다. CRC는 16-Bit로 처리하며, ETX부터 CRC 필드 직전의 Byte까지의 Data를 이용하여 그 값을 생성하거나 에러를 검출한다.CRC is a value that detects an error in a received packet or allows a receiver to detect a packet error in transmission. CRC is processed by 16-Bit, and its value is generated by using data from ETX to byte just before CRC field or error is detected.

ETX(0x03)는 패킷의 끝임을 의미하는 통신 문자로 수신시에 패킷 길이 필드와 함께 CRC를 이용하지 않고 패킷 에러를 검출할 수 있는 방법을 제공한다. 즉, 패킷길이 만큼의 Byte 데이터를 수신할 때, 마지막 Byte가 ETX가 아니면 패킷 에러로 판단할 수 있다. 이때는 CRC를 이용한 패킷 에러 Check를 생략할 수 있다.ETX (0x03) is a communication character indicating the end of a packet, and provides a method of detecting a packet error without using a CRC with a packet length field at the time of reception. That is, when receiving the byte length of the packet length, if the last byte is not ETX can be determined as a packet error. In this case, the packet error check using the CRC may be omitted.

상술한 패킷의 구성중 어드레스에 대하여 상세히 설명하면 다음과 같다.The address in the configuration of the above-described packet will be described in detail as follows.

네트워크상의 각 마스터와 슬레이브는 하나의 어드레스(Address)로 인식된다. 각 시스템은 2 byte의 할당된 어드레스를 가지게 되고 할당된 어드레스를 통해 해당되는 상대방에게 패킷을 전송할 수 있다. 어드레스는 도 14에 도시된 바와 같이, 3비트의 네크워크 코드와 5비트의 제품 코드로 이루어져 제품 출하시 확정되고 바꿀 수 없는 피지컬(Physical) 어드레스와 제품별 복수제품을 구분하거나 그룹 어드레스로 사용되고 통신 등에 의해 바꿀 수 있는 8비트의 로지컬(Logical) 어드레스로 구분된다.Each master and slave on the network are recognized as one address. Each system has an assigned address of 2 bytes and can transmit a packet to the corresponding party through the assigned address. As shown in FIG. 14, an address is composed of a 3-bit network code and a 5-bit product code, which distinguishes a physical address and a plurality of products for each product that are not determined and cannot be changed at the time of product shipment, and are used as a group address or a communication. It is divided into 8-bit logical addresses that can be changed by

집안에서의 네트워크는 크게 PC 계열, AV 계열, 리빙(Living) 즉, 가전기기 계열 등으로 나눌 수 있고 이러한 네트워크를 구분하기 위해 3비트의 네트워크 코드가 사용되는데, 가전기기 네트워크와 집안에서의 다른 서브네트워크와는 통신 규격이 다르더라도 상기 PC 계열 및 AV 계열 제품과의 통신을 위해서는 네트워크 구분 필드가 필요하다. 네트워크 코드의 분류예는 도 15와 같다.Networks in the home can be divided into PC series, AV series, Living, that is, household appliances, etc. A 3-bit network code is used to distinguish these networks. Although the communication standard is different from that of the network, a network classification field is required for communication with the PC series and AV series products. An example of classification of network codes is shown in FIG.

제품 코드 즉, 제품이름(세탁기, 냉장고,건강 기구, 전등, 보안, )을 위해 5-Bit를 할당하고 각 제품별로 복수개의 제품을 구분하기 위해 8-Bit를 할당한다. 이는 여관이나 호텔등과 같은 조건을 고려한 것이다.Allocate 5-Bit for the product code, namely product name (washer, refrigerator, health appliance, lamp, security, etc.) and 8-Bit to distinguish multiple products for each product. This takes into consideration conditions such as inns and hotels.

8-bit의 복수 제품을 구분하기 위한 필드는 제품의 설치장소에 따라 나누어지는 Group 어드레스로도 사용된다. 제품의 설치장소는 사용자가 네트워크 관리기에서 네트워크에 제품을 등록할 때 같이 입력한다.The field for distinguishing multiple 8-bit products is also used as a group address divided according to the installation location of the product. The installation location of the product is entered when the user registers the product on the network in the network manager.

이때 제품의 Group을 설정하는 방법은 두 가지가 있다. 첫번째 Group 어드레스는 각 필드의 값을 모두 '1'로 채움으로써 하위 필드에 해당하는 모든 대상을 설정할 수 있다. 이때의 Group의 의미는 동일 제품 또는 동일 네트워크에 속한 제품이라는 의미이다. 가령 네트워크 코드의 값이 '111'이면 집안의 모든 네트워크를 가리키고, 제품 코드 값이 '11111'이면 해당 네트워크에서의 모든 제품을 의미하며, 도 16과 같이, 그룹 어드레스에 따라 소정 제품 그룹을 선택할 수 있으며, 그 값이 '11111111'이면 해당하는 네트워크와 제품 코드에 해당하는 모든 제품을 의미한다. 두 번째 Group 어드레스는 도 17과 같이, 그룹 어드레스에 따라 소정 설치장소에 있는 제품그룹을 선택할 수 있다. 이때 제품 코드는 모든 제품을 지정하도록 '11111'이 되고 Logical 어드레스 값은 설치장소에 따라서 지정된다. 네트워크 코드가 '111'이고 제품 코드가 '11111'이면 Logical 어드레스 필드는 장소 코드를 나타내는 필드가 된다. 또한 도 18과 같이, 그룹 어드레스를 지정하여 소정 설치장소에 있는 소정 제품 그룹을 선택할 수도 있다.At this time, there are two ways to set the group of products. The first group address can be set to all targets corresponding to the lower fields by filling each field with '1'. At this time, the group means the same product or a product belonging to the same network. For example, if the value of the network code is '111', it indicates all the networks in the house. If the product code value is '11111', it means all the products in the network. As shown in FIG. 16, a predetermined product group can be selected according to the group address. If the value is '11111111', it means all products corresponding to the corresponding network and product code. As the second Group address, as shown in FIG. 17, a product group at a predetermined installation location may be selected according to the group address. At this time, the product code is '11111' to designate all products and the logical address value is designated according to the installation location. If the network code is '111' and the product code is '11111', the Logical Address field is a field indicating a place code. In addition, as shown in Fig. 18, a group address may be designated to select a predetermined product group at a predetermined installation location.

다음으로 플러그 앤 플레이(Plug and play) 과정 즉, 디바이스를 네트웍으로 연결하여 초기 홈 코드 및 어드레스를 할당하고 통신환경 설정과정에 대하여 설명하면 다음과 같다.Next, a plug and play process, that is, a process of assigning an initial home code and address by connecting a device to a network, and setting a communication environment will be described.

네트워크에 연결된 디바이스들이 통신하기 위해서는 모든 디바이스들이 동일한 통신 속도로 설정되고, 물리적 네트워크 내에서 유일한 주소를 할당받아야 하며, 마스터는 모든 디바이스들의 이름과 어드레스에 대한 데이터 베이스를 가지고 있어야 한다. 또한, 전력선 같이 각 가정간 전송 선로가 구분되지 않고 연결되어 있을 경우 각 가정을 구분할 수 있어야 한다. 이를 위해서 플러그 앤 플레이(Plug and Play)를 담당하는 네트워크 관리기는 먼저, 전원이 입력되는 초기에 각 가정을 구분할 수 있는 홈 코드를 설정한다. 홈 코드를 설정한 다음 네트워크 관리기는 디바이스가 최초로 네트워크에 연결됐을 때, 사용자로부터 디바이스에 대한 정보를 입력 받고 해당 디바이스에 대해 주소를 할당하는 디스커버리 앤 어드레싱(Discovery & Addressing) 단계를 거친다. 이 과정이 끝나면 통신하고자 하는 디바이스의 모델명이나 컨트롤러 버전 등의 제품정보, 패킷 구성을 위한 버퍼(Buffer)의 크기 또는 통신 속도를 변경하기 위한 프리-리퀘스트(Pre-request)단계가 필요하다. 프리-리퀘스트 단계는 항상 필요한 단계는 아니며 필요에 따라 수행된다. 제품정보는 연결되어 있는 제품의 이름을 알고자 할 때 필요하고, 버퍼 크기 요청은 마스터에서 슬레이브로 대량의 데이터를 보내기 위해 패킷의 길이를 정할 때 사용된다. 속도 변경 요청은 대량의 데이터를 송수신 하고자 할 때 또는 송수신이 끝났을 때 마스터에서 슬레이브로 요청한다. 프리-리퀘스트단계가 끝나면 일반적인 통신 모드로 들어간다. 원래 사용자 입장에서 보는 플러그 앤 플레이 개념은 사용자의 추가 설치 작업이나 입력 작업 없이 디바이스의 전원을 입력하면 바로 사용할 수 있어야 한다. 그러나 디바이스를 네트워크에 연결한 후 네트워크 관리기에 디바이스에 대한 정보를 입력하도록 하고 있다. 이러한 이유는 네트워크의 미디어로 전력선의 경우를 고려해서인데, 전력선의 경우 디바이스를 네트워크에 연결하게 되면 이웃한 가정간 전송 선로가 구분되지 않기 때문에 네트워크 관리기가 이웃집에도 존재한다면 이웃집의 네트워크 관리기에 의해 주소를 할당받을 수 있는 문제가 있다. 따라서, 우선 네트워크 관리기에 디바이스 정보를 입력하여 네트워크 관리기가 디바이스에 주소 등록 요청을 하도록 하고 있다.In order for devices connected to the network to communicate, all devices must be set to the same communication speed, assigned a unique address within the physical network, and the master must have a database of names and addresses of all devices. In addition, each transmission line should be distinguished when the transmission lines between the homes are not separated, such as a power line. To do this, the network manager in charge of Plug and Play first sets a home code for distinguishing each home at the initial power-on. After setting the home code, the network manager goes through the Discovery & Addressing step of receiving information about the device from the user and assigning an address to the device when the device is first connected to the network. After this process, a pre-request step is required to change product information such as the model name or controller version of the device to be communicated, the size of the buffer for packet construction, or the communication speed. The pre-request step is not always necessary and is performed as needed. Product information is needed to know the name of the connected product, and a buffer size request is used to determine the length of a packet to send a large amount of data from the master to the slave. The rate change request is requested from the master to the slave when sending or receiving a large amount of data. When the pre-request phase ends, it enters the normal communication mode. The plug-and-play concept from the point of view of the user should be readily available when the device is powered up without any additional installation or input from the user. However, after connecting the device to the network, the network manager prompts the user for information about the device. The reason for this is to consider the power line as the media of the network. In the case of the power line, when the device is connected to the network, the transmission line between neighboring homes is not distinguished. There is a problem that can be assigned. Therefore, first, device information is input to the network manager so that the network manager requests an address registration from the device.

상술한 홈 코드 설정과정을 살펴보면, 네트워크 관리기는 전원이 입력되는 초기에 다른 가정과 구분될 수 있는 고유의 홈 코드를 설정하기 위해 수신 주소를 모든 디바이스로 해서 홈 코드 확인 메시지를 송신한다. 이때 인자는 0x03~0xFF 범위 내에서 임의의 홈 코드로서 발생시킨 값이다. 만약 아무 응답이 없다면 네트워크 관리기가 연결된 물리적 네트워크 내에서 해당 홈 코드는 유일한 값이 되므로 자신의 홈 코드로 설정하고, 응답이 있다면 유일한 값이 아니므로 임의의 홈 코드를 다시 발생시켜 상기 과정을 반복한다. 이렇게 해서 설정된 홈 코드는 네트워크 관리기가 각 제품의 주소를 확정할 때 동시에 각 제품에 설정됨으로써 동일 가정 내 제품은 같은 홈 코드를 사용하여 가정 간 구분을 가능하게 해준다. 그런데 홈 코드를 포함한 주소 관련 정보는 각 제품의 불휘발성 메모리에 저장되므로 각 제품의 주소 할당 후 이사를 하는 경우에는 문제가 발생할 수 있다. 즉, 이사한 가정과 같은 물리적 네트워크에 연결된 다른 가정이 동일한 홈 코드를 사용한다면 가정 간 홈 코드가 충돌하므로 홈 코드로 가정이 구분되지 않는 문제점이 발생하는 것이다. 따라서, 이사시에는 모든 제품의 전원을 off한 상태에서 네트워크 관리기의 전원만 입력하여 초기 홈 코드 설정시 홈 코드 충돌 확인하는 과정을 반복한다. 충돌하지 않는다면 홈 코드 변경없이 그대로 사용하면 되고, 충돌한다면 모든 제품의 홈 코드를 리셋(reset)한 후 홈 코드를 다시 설정한다. 이 때, 홈 코드가 충돌하는 가정의 제품과 구분하기 위해 사용자 ID를 인자로 사용한다. 사용자 ID는 디바이스를 최초로 네트워크에 연결할 때 네트워크 관리기를 통해 입력한다.Referring to the above-described home code setting process, the network manager transmits a home code confirmation message using the reception address as all devices to set a unique home code that can be distinguished from other homes at the initial power-on. At this time, the argument is a value generated as an arbitrary home code within the range of 0x03 to 0xFF. If there is no response, the home code is set to its own home code in the physical network to which the network manager is connected. If there is a response, the home code is not the only value. . The home code set in this way is set to each product at the same time when the network manager confirms each product's address, so that the products in the same home can use the same home code to distinguish between homes. However, address-related information, including the home code, is stored in the nonvolatile memory of each product, which can cause problems if you move after assigning each product's address. In other words, if another home connected to the same physical network as the moving home uses the same home code, there is a problem in that the home code is not divided by the home code because the home code is collided between homes. Therefore, at the time of moving, all the products are turned off, and only the network manager is inputted to repeat the process of checking the home code conflict when setting the initial home code. If there is no conflict, you can use it without changing the home code. If there is a conflict, reset all the product's home code and reset the home code. In this case, the user ID is used as a parameter to distinguish the home product from the conflicting home code. The user ID is entered through the network manager when the device is first connected to the network.

다음으로, 디스커버리 앤 어드레싱 과정을 살펴보면, 사용자는 디바이스를 최초로 네트워크에 연결할 때 네트워크를 관장할 수 있는 네트워크 관리기에 전원을 연결한 디바이스의 제품명, 제품 개수, 설치 장소, 사용자 ID를 입력한다. 그러면 네트워크 관리기는 입력된 디바이스 즉, 네트워크에 최초로 연결된 디바이스에게 등록을 요청하고 디바이스로부터 임시 번지 등록 메시지를 수신하면 주소를 할당한다. 이때 같은 종류의 제품이 복수 개 있는 경우에도 주소가 충돌되지 않도록 새로운 번지를 지정한다. 제품 개수를 입력받는 이유는 동일 종류의 제품 여러 개가 동시에 네트워크에 연결되었을 때 연결된 제품 모두로부터의 등록 메시지 수신 여부를 알기 위함이다. 또한, 설치 장소를 입력받는 이유는 사용자가 네트워크 관리기의 화면에 나타나는 제품의 위치 정보를 통해 쉽게 제품을 식별할 수 있도록 하기 위함이다. 사용자 ID는 위에서 설명한 대로 홈 코드 리셋(reset)시 제품을 확인하기 위한 것이다. 네트워크 관리기의 번지는 전원의 ON/Off에 상관없이 0x00로 고정되어 있다. 하지만 다른 디바이스들은 마스터와 슬레이브 구분없이 전원 Off시 공장 출하시 부여받은 제품 대표번지를 가지고 있다. 네트워크 관리기는'Join request'라는 Command를 이용하여 제품들이 선택할 수 있는 여유 번지의 영역을 설정하고, 사용자가 입력한 어드레스 지정이 안된 디바이스들(제품별 대표번지로 지정된 디바이스)에게 임시 번지로 등록 할 것을 요청한다. 에어컨의 경우 수신자 번지로 0x20을 선택하고 여유번지는 0x21 ~ 0x2E를 인자로 한다. 'Join request' Command는 번지 확정이 안된 제품만 인식할 수 있다. 호출되는 제품들은 난수발생기를 작동시켜 설정된 여유 범위의 번지 중에서 임의로 선택하여 자신의 번지로 설정하고(임시 번지) 그 값을 네트워크 관리기로 알려준다. 0x21 ~ 0x2E중에서 0x25가 선택되면 0x25를 네트워크 관리기로 송신한다. 임시 번지는 네트워크 관리기 또는 마스터가'Address Change' Command를 이용하여 바꾸거나 제품의 전원을 끄기 전까지는 해당 제품의 번지로 작용한다. 네트워크 관리기는 'Address Change' Command를 이용하여 중복된 번지의 제품들은 대표번지로 리셋시키고, 중복되지 않는 임시번지를 선택한 제품들의 번지는 여유번지에서 순서대로 확정하여 해당 제품들을 재 호출한다. 이 때 네트워크 관리기 자신의 홈 코드와 사용자가 입력한 UserID도 함께 전송하여 해당 제품들의 홈 코드와 User ID도 설정한다. 중복되지 않은 임시 번지가 0x2A, 0x25, 0x23가 있고, 여유 번지가 0x21 ~ 0x2E 라면 임시번지 0x23인 제품은 0x21, 0x25는 0x252, 0x2A는 0x23로 확정된다. 중복된 임시번지가 있을 때는 위의 과정을 되풀이 한다. 상술한 디스커버리 앤 어드레싱 과정은 모든 제품 종류에 대해 14번 반복한다(0x01 ~ 0x0F).Next, in the discovery and addressing process, a user inputs a product name, number of products, installation location, and user ID of a device connected to a network manager capable of managing the network when the device is first connected to the network. The network manager then requests registration from the input device, that is, the device connected to the network for the first time, and assigns an address when receiving a temporary address registration message from the device. At this time, even if there are plural products of the same type, a new address is designated so that the address does not conflict. The reason for receiving the number of products is to know whether registration messages are received from all connected products when several products of the same type are connected to the network at the same time. In addition, the reason for receiving the installation place is to allow the user to easily identify the product through the location information of the product appearing on the screen of the network manager. The user ID is to identify the product at the time of home code reset as described above. The address of the network manager is fixed to 0x00 regardless of power on / off. However, other devices have the product address assigned to the factory when the power is off, regardless of the master and slave. The network manager sets the area of free address that can be selected by the products by using 'Join request' command and registers as a temporary address to unaddressed devices (device designated as the representative address for each product) entered by the user. To ask. In case of air conditioner, select 0x20 as receiver address and spare address as 0x21 ~ 0x2E. 'Join request' Command can recognize only those products whose address is not confirmed. Called products operate random number generator and randomly select among the set range of address, set it as own address (temporary address) and inform the network manager of the value. If 0x25 is selected among 0x21 ~ 0x2E, 0x25 is sent to the network manager. The temporary address remains as the address of the product until the network manager or master changes it using the 'Address Change' command or turns off the product. Network manager uses 'Address Change' command to reset the duplicated address to the representative address, and the address of the products that have selected the temporary address that does not overlap is determined in order from the free address and recalls the relevant products. At this time, the network manager's own home code and the user ID entered by the user are also transmitted to set the home code and user ID of the corresponding products. If non-overlapping temporary addresses are 0x2A, 0x25, 0x23, and free addresses are 0x21 ~ 0x2E, the product with temporary address 0x23 is 0x21, 0x25 is 0x252, 0x2A is 0x23. If there are duplicate temporary addresses, repeat the above process. The above discovery and addressing process is repeated 14 times for all product types (0x01 to 0x0F).

상술한 바와 같이, 디스커버리 앤 어드레싱 과정이 끝나면 디바이스들의 이름과 번지, 설치 장소는 네트워크 관리기의 데이터 베이스로 저장되어 있다. 네트워크 관리기에 연결된 디바이스들은 네트워크 관리기에 의한 번지지정이 완료 된 후에 비로소 마스터 또는 슬레이브로서 동작하기 시작한다. 이때 마스터로 동작하는 디바이스들은 네트워크 관리기로부터 디바이스들의 이름과 번지 데이터 베이스를 읽어 자신의 메모리에 저장한 다음 슬레이브들과 통신을 시작하게 된다. 주소 할당을 받기 전에는 모든 디바이스는 슬레이브로 동작할 수 밖에 없다. 주소 할당을 받은 디바이스들은 자신의 존재를 알리기 위한 메시지를 주기적으로 방송한다. 왜냐하면, 각 디바이스를 제어 가능한 마스터들은 각 디바이스가 네트워크에 연결되어 있는지 알아야 하기 때문이다. 연결된 디바이스와 연결되어 있지 않은 디바이스가 구분이 되지 않는다면 통신 불능의 원인이 전원 off때문인지 디바이스 고장 때문인지 구분하기 힘들 것이다. 또한, 네트워크 관리기 화면에 연결되어 있지 않은 디바이스는 비활성화시켜 표시함으로써 사용자가 알 수 있도록 한다. 주소 할당을 받은 모든 디바이스는 얼라이브 메시지(Alive Message)를 통해 주기적으로 자신의 존재를 방송하게 되는데, 이때 주기를 조절해 주는 것이 필요하다. 디바이스 수가 적으면 상관 없지만, 많을 때 주기가 너무 짧으면 네트워크 내에 얼라이브 메시지가 너무 많이 전송되어 네트워크의 성능이 저하된다. 초기 주기는 길게 설정해 주고, 디바이스 개수에 비례해서 설정해 준다. 즉, 디바이스 개수가 적을 때는 주기가 작고, 많을 때는 크게 잡아 줌으로써 네트워크의 성능을 유지시킨다. 이때, 주기를 설정해 주는 것은 네트워크 관리기이고, 각 디바이스는 얼라이브 메시지의 인자로서 자신의 주기를 설정하여 방송한다. 네트워크 관리기는 각 디바이스의 얼라이브 메시지를 수신하여 자신이 설정한 주기와 다르다면 해당 디바이스의 주기를 자신의 주기로 설정해준다.As described above, after the discovery and addressing process, the names, addresses, and installation locations of the devices are stored in a database of the network manager. Devices connected to the network manager start to operate as masters or slaves after addressing by the network manager is completed. At this time, the device acting as the master reads the device name and address database from the network manager, stores it in its memory, and starts communication with the slaves. All devices must act as slaves before address assignment. Devices assigned an address periodically broadcast a message indicating their presence. This is because masters that can control each device must know that each device is connected to the network. If there is no distinction between the connected device and the non-connected device, it may be difficult to distinguish whether the communication failure is due to a power off or a device failure. In addition, devices that are not connected to the network manager screen are displayed by being deactivated so that the user can know them. Every device assigned an address will periodically broadcast its presence in an Alive Message, which needs to be adjusted. It doesn't matter if the number of devices is small, but if the period is too short for too many devices, too many alive messages are sent in the network, which degrades the performance of the network. Set the initial period long and set it in proportion to the number of devices. In other words, when the number of devices is small, the period is small, and when the number is large, the network performance is maintained by holding it large. At this time, it is the network manager that sets the period, and each device broadcasts its own period as a factor of the live message. The network manager receives the alive message of each device and sets the period of the device as its own period if it is different from the period set by the network manager.

다음으로, 디바이스의 통신조건을 발생시키는 이벤트에 대하여 설명하기로 한다.Next, an event that generates a communication condition of the device will be described.

이벤트(event)란 디바이스에 어떤 상태 변화가 발생한 경우를 말하며 발생원인에 따라 다음의 5가지로 분류할 수 있다. 먼저, User가 키등을 통하여 디바이스에 직접 명령을 내릴 때 발생하는 사용자 이벤트, 일정시간 간격으로 자동발생하는 Periodic 이벤트(예: 일정 주기로 네트워크 관리기에서 Alive Notification 메시지 송신), 시스템의 상태를 감시하다가 디바이스의 자발적 상태 변화로 발생하는 Status 이벤트(예: 온도, 습도, 세탁 행정 등이 변화), 시스템에서 동작과 관련된 에러가 있을 때 발생하는 에러 이벤트, 웹 서버 등 시스템 외부에서 요청할 때 발생하는 External 이벤트(예: 네트워크 관리기가 홈 서버의 역할을 할 때 원격지에서 통신 요청)가 있다.An event refers to a case where a state change occurs in a device, and may be classified into the following five types according to the cause of occurrence. First, user events that occur when a user commands a device directly through a key, etc., Periodic events that occur automatically at regular intervals (for example, Alive Notification messages are sent from the network manager at regular intervals), and the status of the device is monitored. Status events (e.g. changes in temperature, humidity, laundry administration, etc.) due to voluntary status changes, error events that occur when there are errors related to operation in the system, or external events that occur when requested from outside the system, such as a web server. There is a request for communication from a remote location when the network manager acts as a home server.

키보드, 마우스, 모니터 같은 사용자 인터페이스(User Interface)를 갖춘 디바이스는 5가지 이벤트에 모두에 의하여 모든 디바이스와 직접(Peer-to-Peer) 통신이 가능하지만 사용자 인터페이스가 부족한 디바이스가 Peer-to-Peer 통신기능을 수행하기 위해서는 통신이 이루어지기 위한 조건을 사전에 정하거나 또는 디바이스의 내부적인 요인에 의해서 발생하는 이벤트들(User 이벤트, Status 이벤트, 에러 이벤트)에 의해서만 가능하다.Devices equipped with user interfaces such as keyboards, mice, and monitors can be peer-to-peer communication with all devices by all five events, but devices lacking a user interface can be peer-to-peer communication. In order to perform the function, it is possible to set the conditions for communication in advance or only by the events (User event, Status event, Error event) generated by internal factors of the device.

본 발명의 경우 이벤트가 발생하게 되면 스스로 자신의 상태 변화를 notification 패킷으로 모든 디바이스에 알림으로써 통신 기능을 수행한다. 이벤트가 중요한 의미를 갖는 이유는 사용자가 디바이스의 상태를 모니터링하는 경우, 디바이스의 상태를 알고 싶을 때마다 매번 상태 값을 요청하는 것보다는 디바이스의 상태 값이 변했을 때, 디바이스가 스스로 그 상태 변화를 알려주는 것이 훨씬 효율적이기 때문이다. 또한, 디바이스 고장이나 에러 발생의 경우 발생하는 즉시 알려주어야 하기 때문에 이벤트 발생시 상태 변화를 즉시 통보하는 과정이 필요하다.In the present invention, when an event occurs, it performs a communication function by notifying all devices of its own state change by a notification packet. The reason why an event is important is that when a user monitors the device's status, when the device's status value changes, rather than requesting a status value each time it wants to know the device's status, the device will notify itself of the status change. Because it is much more efficient. In addition, in the event of a device failure or error, it should be notified immediately when it occurs, so it is necessary to notify the status change immediately when an event occurs.

각 제품에서 구현하는 이벤트는 1 byte의 이벤트 코드로 나타내며, 모든 디바이스에서 공통적으로 구현하는 구현 방법에 따라 common 이벤트와 제품별로 구현하는 private 이벤트의 두 종류로 크게 나뉜다. 코드의 분류는 항목별로 향후 추가될 수 있는 수가 다를 수 있기 때문에 필드 분류 보다는 Area 분류를 이용한다.Events implemented in each product are represented by 1 byte event code, and there are two types of events, common events and private events implemented by products, according to the implementation method common to all devices. The classification of codes uses area classification rather than field classification because the number of items that can be added in the future may vary.

Common 이벤트는 다시 사용자 조작에 관련된 이벤트와 모든 디바이스에 공통된 에러 이벤트 영역으로 나뉠 수 있다. 사용자 조작에 관련된 이벤트는 키 및 다이얼 입력, 도어 개폐 여부, 부하 입력 등의 이벤트로서 0x00~0x2F의 이벤트 코드 값을 갖는다. 공통 이벤트는 운전 중 도어 open 등의 이벤트로서 0x30~0x4F의 이벤트 코드 값을 갖는다. Private 이벤트는 제품별 에러 이벤트, 제품별 Status 이벤트로 분류할 수 있다. 제품별 에러 이벤트는 각 제품 고유의 에러 상태나 고장 상태를 나타내는 이벤트로서 0x70~0xAF의 이벤트 코드 값을 갖고, 제품별 동작 상태 이벤트는 제품 동작 시 상태가 변할 때마다 발생하는 이벤트로서 0xB0~0xFF의 이벤트 코드 값을 갖는다.Common events can be further divided into event-related events and error event areas common to all devices. Events related to user operation are events such as key and dial input, door opening and closing, load input, etc., and have event code values of 0x00 to 0x2F. The common event is an event such as a door open during operation and has an event code value of 0x30 to 0x4F. Private events can be classified into error events by product and status events by product. The error event for each product is the event code value of 0x70 ~ 0xAF, which indicates the error state or failure state inherent to each product, and the operation status event for each product is the event that occurs whenever the state changes during product operation. It has an event code value.

이벤트 코드에는 모든 디바이스가 필수적으로 구현해야 할 필수 이벤트 코드(ex : 고장 이벤트 코드)와 선택적으로 구현할 수 있는 이벤트 코드로 분류할 수 있다. 필수 이벤트 코드는 기본적으로 이벤트 발생시 상태 변화를 notification 패킷으로 방송하도록 하여 다른 디바이스가 상태 변화를 모니터링할 수 있도록 한다. 이때, 사용하는 command 코드는 이벤트 Notification Command이고 인자로는 이벤트 코드(1byte)와 이벤트 코드의 상태 값(4bytes)을 갖는다. 한 디바이스에서 이벤트가 발생했을 때 단순히 notification 패킷을 방송해서 그 사실을 통보할 수도 있지만, 다른 디바이스의 동작을 명령할 수도 있다. 가령 세탁기의 세탁 과정이 종료되었을 때, 베란다의 불을 켜거나, 에어컨에 문자 메시지를 표시할 수도 있다. 이를 위해서는 각 디바이스가 이벤트 코드 발생시마다 통신을 할 대상 주소와 통신 대상의 동작 command 코드 및 인자에 대한 정보를 저장하고 있어야 한다. 그런데, 이러한 정보는 사용자의 취향에 따라 다르기 때문에 사용자가 네트워크 관리기를 통해 각 디바이스에 이벤트 발생시 통신 조건을 설정해 주어야 한다. 이때, 다른 디바이스의 동작을 명령하는 것뿐만 아니라 이벤트를 통보하기 위해 방송하는 경우에도 선택적인 경우는 사용자가 설정해 주어야 한다. 이벤트 통신 조건을 설정해줄 때 고려해야 할 것이 또 하나 있다. 바로 이벤트 통보간의 시간 간격이다. 이벤트 통신을 설정한 온도 상태나 센서 상태 등이 빠르게 변할 때, 네트워크에는 이러한 이벤트 통신 패킷이 너무 많아져 네트워크의 성능을 떨어뜨릴 수 있으므로 최소한의 이벤트 발생 인터벌(interval)이 필요하다. 따라서, 사용자가 네트워크 관리기를 통해 이벤트 발생시 통신 조건을 설정할 때는 이벤트 코드, 통신 상대 디바이스, 최소 이벤트 발생 interval time, 통신 메시지 등을 지정해 주어야 한다.Event codes can be categorized into mandatory event codes (e.g., fault event codes) that must be implemented by all devices and event codes that can be optionally implemented. The required event code basically broadcasts the status change in a notification packet when an event occurs so that other devices can monitor the status change. At this time, the command code used is an event notification command and has an event code (1 byte) and a state value (4 bytes) of the event code. When an event occurs in one device, it can simply broadcast a notification packet to notify the fact, but can also command the operation of another device. For example, when the washing process of the washing machine is finished, the porch light may be turned on or a text message may be displayed on the air conditioner. To do this, each device should store the information of the target address to communicate with and the operation command code and arguments of the communication target whenever an event code occurs. However, since such information varies according to the user's taste, the user must set communication conditions when an event occurs in each device through the network manager. In this case, in case of broadcasting not only for commanding the operation of another device but also for notifying the event, the user should set the case. Another thing to consider when setting the event communication conditions. This is the time interval between event notifications. When the temperature state or the sensor state, etc., which set up event communication change rapidly, the network has too many such event communication packets, which may degrade the network performance. Therefore, a minimum event interval is required. Therefore, when a user sets a communication condition when an event occurs through a network manager, an event code, a communication counterpart device, a minimum event occurrence interval time, and a communication message should be specified.

이벤트 통신 조건은 각 디바이스의 비휘발성 메모리에 도 19의 헤더와 도 20의 바디로 이루어진 이벤트 파일(file)로 저장한다. 재설정할 경우는 네트워크 관리기에서 사용자가 다시 설정해 주면 되며, 최초 설정 시에는 현재 디바이스의 비휘발성 메모리(non-volatile memory)의 사이즈(Size)가 여유가 있는지 먼저 확인(이벤트 코드 Buffer Size Read Command)한 후 여유가 있다면 설정한다. 또한, 비휘발성 메모리의 사이즈는 한계가 있기 때문에 불필요한 이벤트 통신 조건에 대한 정보는 삭제해야 한다. 이를 위한 메시지 역시 존재하며 사용자가 이를 이용해 불필요한 이벤트 통신 조건을 삭제할 수 있다(이벤트 코드 Delete Command 코드).The event communication condition is stored in the nonvolatile memory of each device as an event file consisting of the header of FIG. 19 and the body of FIG. 20. In case of resetting, user can set it again in the network manager.In the initial setting, first check whether the size of the current device's non-volatile memory is enough (Event Code Buffer Size Read Command). If there is room, set it. In addition, since the size of the nonvolatile memory is limited, information on unnecessary event communication conditions should be deleted. There is also a message for this purpose and the user can use it to delete unnecessary event communication conditions (event code Delete Command code).

이벤트 코드를 실행하기 위해서는 우선 비휘발성 메모리에 저장되어 있는 이벤트 파일의 헤더에서 실행해야 하는 총 이벤트 수(total_이벤트_no)와 이벤트 코드를 읽는다. 시스템 메인 프로그램에서는 동작 중에 정의된 변수의 상태가 바뀌면 해당 메모리에 저장한다. 이벤트 코드 실행 루틴은 시스템 상태 값과 이벤트 파일에서 읽은 이벤트 코드와 비교하여 실행여부를 판단한다. 여러 가지의 시스템의 상태가 동시에 변할 때 이벤트 코드의 연속 실행으로 마이컴의 자원을 점유하는 것을방지하기 위하여 한번에 하나의 이벤트 코드만 실행되도록 한다.To execute the event code, first read the total number of events (total_event_no) and event codes that need to be executed from the header of the event file stored in nonvolatile memory. In the system main program, when the state of the defined variable changes during operation, it is saved in the relevant memory. The event code execution routine determines whether to execute by comparing the system state value with the event code read from the event file. When the state of various systems changes at the same time, only one event code is executed at a time to prevent the microcomputer from occupying the resources of the microcomputer.

다음으로, 각종 에러를 제어하는 방법에 대하여 설명하기로 한다.Next, a method of controlling various errors will be described.

통신 에러는 통신선로의 노이즈에 의한 데이터 비트 에러, 통신 주파수가 다를 때의 에러, 데이터 충돌로 인한 데이터 비트 에러, 선로와 디바이스들간의 임피던스가 맞지 않을 때 전송 신호의 감쇄에 의한 에러, 그리고 데이터 비트 오류는 없지만 수신 디바이스가 처리할 수 없는 데이터의 송수신에 의한 에러로 나누어진다. 통신선로의 노이즈는 수신측 물리계층 즉, UART 프레임 에러를 유발하기도 하고 데이터 값을 바꾸는 역할을 하기도 한다. 송수신 디바이스의 통신 주파수가 다르면 대부분이 수신측에서 UART 프레임 에러가 발생한다. 여러 개의 디바이스가 동시에 송신할 때도 대부분이 수신측에서 UART 프레임 에러가 발생한다. 선로와 디바이스들간의 임피던스가 맞지 않을 때는 수신측이 어떤 신호를 받지 못하게 된다.Communication errors include data bit errors due to noise on communication lines, errors when communication frequencies are different, data bit errors due to data collisions, errors due to attenuation of transmission signals when impedances between lines and devices are not matched, and data bits. There is no error, but it is divided into an error due to transmission and reception of data that the receiving device cannot process. The noise in the communication line may cause a receiving physical layer, that is, a UART frame error, or change a data value. If the communication frequencies of the transmitting and receiving devices are different, most of them generate a UART frame error on the receiving side. Even when multiple devices transmit simultaneously, most receive UART frame errors on the receiving side. If the impedance between the line and the device is not correct, the receiver will not receive any signal.

마스터가 슬레이브로 리퀘스트 패킷을 송신하면 슬레이브는 패킷을 수신하여 정의된 에러들을 검출한다. 슬레이브가 수신된 데이터 비트들에서 에러를 검출했을 때 송신측에 검출된 에러에 대한 코드 값을 포함한 도 21과 같은 리스폰스 패킷을 마스터로 송신하고, 마스터는 에러코드에 따라 재송신 또는 에러 처리를 위한 기능을 수행한다.When the master sends a request packet to the slave, the slave receives the packet and detects the defined errors. When the slave detects an error in the received data bits, it sends a response packet as shown in FIG. 21 including the code value for the detected error to the sender, and the master functions for retransmission or error processing according to the error code. Do this.

이때 에러 코드는 1 Byte로 구성되며, 모든 디바이스가 공통으로 사용하는 영역(0x00 ~ 0x9F)에 할당된 공통 에러 코드와, 디바이스별로 독립적으로 사용하는 영역(0xA0 ~ 0xFF)에 할당된 고장 코드로 나누어진다. 공통 에러 코드는 통신 에러에 대한 값들이고 고장 코드는 통신기능과는 별도로 센서 등 디바이스가 가지는 고유 기능들의 고장여부를 진단하기 위한 값들로서, 디바이스별로 96개를 가질 수 있으며, 패킷 에러, 수신자 에러, Bad command, Illegal arguments, Illegal access, 고장 코드로 구분할 수 있고 그 세부사항을 설명하면 다음과 같다.At this time, the error code is composed of 1 byte, and divided into common error code assigned to the area (0x00 ~ 0x9F) commonly used by all devices and fault code assigned to the area (0xA0 ~ 0xFF) independently used for each device. Lose. Common error codes are values for communication error, and fault codes are values for diagnosing the inherent functions of devices such as sensors apart from communication functions. They can have 96 items per device, including packet error, receiver error, It can be divided into Bad command, Illegal arguments, Illegal access, and fault code. Details are as follows.

먼저, 패킷 에러는 수신된 패킷의 CRC 에러, 1 Byte 수신 Time Over, Response Waiting Time Over로 세분화된다.First, a packet error is subdivided into a CRC error of a received packet, a 1 byte reception time over, and a response waiting time over.

수신된 패킷의 CRC 에러는 마스터와 슬레이브 모두에서 수신 패킷에 포함된 CRC값과 계산한 CRC 값이 다를 때 발생한다. 슬레이브에서 수신된 리스폰스 패킷에서 CRC 에러가 발생하면 CRC 에러 값이 포함된 리스폰스 패킷을 마스터로 송신한다. 마스터가 이 리스폰스 패킷을 수신하면 최대 3회까지 재 전송한다. 마스터에서 수신된 패킷에서 CRC 에러가 발생했을 때도 최대 3회까지 재 전송한다.The CRC error of the received packet occurs when the calculated CRC value and the CRC value included in the received packet are different in both the master and the slave. If a CRC error occurs in the response packet received from the slave, the response packet including the CRC error value is transmitted to the master. When the master receives this response packet, it resends up to three times. When a CRC error occurs in a packet received from the master, it is retransmitted up to three times.

1 Byte 수신 Time Over 에러는 통신선로상의 노이즈나 기타 원인으로 인하여 Byte수신간의 시간 간격이 2BTU(최소 시간 3mSec : 9600bps 기준)을 벗어날 때 발생한다. 단 이때 수신자 측에서 패킷 Length 필드까지 수신되어야 한다. 만약 패킷 Length 필드를 수신하기 전에 Byte 시간 간격이 지정된 값보다 벌어지면 수신된 데이터를 무시한다. 1 바이트 수신 타임 오버 에러가 발생하면 수신자는 수신을 중단하고 수신 패킷 버퍼의 나머지 영역에 0으로 채우고 상위 계층으로 전달한다. 결국 수신자에서는 CRC 에러가 발생한다. 마스터가 슬레이브로 리퀘스트 패킷을 송신할 때 선로의 노이즈 등에 의하여 슬레이브에서 에러가 발생하면 CRC 에러가 포함된 리스폰스 패킷을 마스터로 송신한다. 만일 마스터가 리스폰스 패킷을 정상적으로 수신했다면 최대 3회까지 재전송한다. 슬레이브는 정상적으로 리퀘스트 패킷을 수신하여 정상적인 리스폰스 패킷을 송신했지만 마스터의 수신 시 1 Byte 수신 Timer Over 에러가 발생한 경우도 마스터는 최대 3회까지 재전송 한다. 마스터와 슬레이브 모두에서 Byte 수신 Time Over 에러가 발생할 수 있지만 각각의 통신 계층간에 필요한 에러 코드이고 송신자에게는 1 Byte 수신 Time Over 에러의 정보를 주지 않는다. 즉, Byte 수신 Time Over 에러는 디바이스 내부에서의 처리를 위한 값이고 마스터-슬레이브간에는 전달되지 않는다. 수신 Time Over의 제한 시간은 Busy Check와 관련이 있다. 본 발명은 패킷 단위로 송수신하기 때문에 Byte 송신간의 시간 간격을 짧게 해야 다른 디바이스에 의한 Busy Check시 버스가 점유되고 있다는 것을 알릴 수 있다. 만일 수신 Time Over의 제한시간이 크다면 1 패킷을 송신하는 도중에 시간 지연이 나타날 수 있고, 이때 송신을 시도하는 다른 디바이스가 Busy Check시에는 버스가 Idle로 판단하고 바로 송신을 시작하고, 따라서 데이터 충돌이 발생한다.1 Byte Receive Time Over error occurs when the time interval between Byte Receive is out of 2BTU (minimum time 3mSec: 9600bps) due to noise or other causes on communication line. In this case, however, the receiver side must receive up to the Packet Length field. If the Byte time interval exceeds the specified value before receiving the Packet Length field, the received data is ignored. If a one-byte receive time-out error occurs, the receiver stops receiving and fills the rest of the receive packet buffer with zeros and forwards it to the upper layer. Eventually, the receiver will receive a CRC error. When the master sends a request packet to the slave, if an error occurs in the slave due to noise on the line, a response packet including a CRC error is transmitted to the master. If the master has successfully received the response packet, it will resend up to three times. Slave normally receives request packet and transmits normal response packet. However, even if 1 byte receive timer error occurs when master receives, the master retransmits up to 3 times. Byte Receive Time Over error may occur in both master and slave, but it is an error code required between each communication layer and does not give information of 1 Byte Receive Time Over error to sender. In other words, the Byte Receive Time Over error is for internal processing and is not transmitted between master and slave. The timeout of the receive time over is related to the busy check. Since the present invention transmits and receives data in packet units, the time interval between byte transmissions should be shortened to inform that the bus is occupied at the time of busy check by another device. If the time-out of the receive time over is large, a time delay may appear during the transmission of one packet.In this case, when another device attempting to transmit has a busy check, the bus determines that it is idle and starts transmitting immediately. This happens.

Response Waiting Time Over 에러는 마스터가 리퀘스트 패킷송신하고 어떠한 데이터도 수신되지 않을 때 발생한다. 즉, 통신 대상 슬레이브가 없을 때 발생한다. 마스터의 물리계층에서는 최대 5초까지 기다리고 아무런 데이터가 수신되지 않으면 Response Waiting Time Over 코드를 포함하는 패킷을 만들어 데이터 링크 계층으로 보낸다. 데이터 링크 계층에서는 메시지를 응용계층에 보내고 응용계층에서는 해당 디바이스가 존재하지 않음을 알 수 있다.A Response Waiting Time Over error occurs when the master sends a request packet and no data is received. That is, it occurs when there is no communication target slave. The master's physical layer waits for up to 5 seconds and if no data is received, it creates a packet containing a Response Waiting Time Over code and sends it to the data link layer. In the data link layer, the message is sent to the application layer, and it can be seen that the device does not exist in the application layer.

다음으로, 수신자 에러는 메모리 부족, 통신 Reject, 원격제어 거부, 프로토콜 버전 언매치, 메시지 포트 언매치로 세분화된다.Next, the receiver error is subdivided into insufficient memory, communication reject, remote control rejection, protocol version unmatch, and message port unmatch.

Memory 부족 에러는 마스터가 Memory Write, LCD Write, EEPROM Write등의 Command 코드를 송신할 때 슬레이브측에서 지정된 데이터를 Write하기 위한 메모리 여유가 없을 때 발생한다.An out of memory error occurs when the master does not have enough memory to write the specified data when sending a command code such as memory write, LCD write, or EEPROM write.

통신 Reject 에러는 슬레이브가 마스터로부터 리퀘스트 패킷을 정상적으로 수신했지만 통신이외의 다른 기능을 우선적으로 수행하고자 할 때 발생한다. 통신 Reject 에러를 수신한 마스터는 최소 5초(마스터의 최대 Waiting 시간)후 재 시도 할 수 있다.A communication reject error occurs when the slave receives a request packet from the master normally but tries to perform other functions other than communication. Master receiving communication reject error can retry after minimum 5 seconds (master's maximum waiting time).

원격제어 거부 에러는 슬레이브가 원격제어가 가능한 상태로 되어 있지 않은 상태에서 제어용 Command 메시지를 수신할 때 발생한다.The remote control rejection error occurs when the slave receives a command message for control while the slave is not in the state of remote control.

다음으로, 배드 코멘드는 수행할 수 없는 Command 코드와 수행할 수 없는 인자값으로 세분화된다.Next, the bad commands are subdivided into commands that can't be executed and arguments that can't.

수행할 수 없는 코멘드 코드 에러는 슬레이브가 마스터로부터 리퀘스트 패킷을 정상적으로 수신했지만 슬레이브가 수행할 수 없는 Command 코드를 포함할 때 발생한다.Unable to execute a command code error occurs when the slave normally receives a request packet from the master but contains a command code that the slave cannot execute.

수행할 수 없는 인자 값 에러는 수행할 수 있는 Comamnd 코드를 수신했고 인자의 범위도 정의된 범위안에서 설정되었지만 그 값이 디바이스에서 수행할 수 없는 경우 발생한다. 예를 들어, 전자레인지의 부하 On/Off◎Command에서 예를 들어, 후드 팬(Hood Fan)을 입력값으로 했는데, Hood Fan이 없는 전자레인지인 경우는 수행할 수 없는 인자 값 에러가 발생한다.Unable to perform an argument value error occurs when an executable Comamnd code has been received and the scope of the argument has also been set within the defined range but the value cannot be performed on the device. For example, in a load On / Off? Command of a microwave oven, for example, a hood fan is an input value, but in a microwave oven without a hood fan, a parameter value error that cannot be performed occurs.

다음으로, Illegal Arguments는 정의된 수와 다른 인자 수 에러와, 오버 레인지 에러로 세분화된다.Next, Illegal Arguments are subdivided into defined and different number argument errors and over range errors.

정의된 수와 다른 인자 수 에러는 슬레이브가 마스터로부터 리퀘스트 패킷을 정상적으로 수신했지만 Command 코드를 수행하기 위한 입력 인자수가 메시지 Set에 규정된 수와 다를 때 발생한다. 이때의 인자 수는 Byte수이다. 입력인자가 unsigned int로 정의된 하나의 변수이면 2-Byte로 구성되기 때문에 입력 인자 수는 2가 된다.A number argument that is different from the defined number error occurs when the slave normally receives a request packet from the master, but the number of input arguments to execute the command code is different from the number specified in the message set. The number of arguments is the number of bytes. If the input argument is a variable defined as an unsigned int, the number of input arguments is 2 because it consists of 2-bytes.

Over Range 에러는 슬레이브가 마스터로부터 리퀘스트 패킷을 정상적으로 수신했지만 Command 코드를 수행하기 위한 입력 인자 값이 메시지 Set에 규정된 범위를 벗어났을 때 발생한다.An Over Range error occurs when the slave normally receives a request packet from the master but the input parameter value for executing the command code is out of the range specified in the message set.

다음으로, 금지된 Action 검출에 의한 lllegal Access 에러는 슬레이브가 마스터로부터 리퀘스트 패킷을 정상적으로 수신했지만 Command 코드를 수행하기 위한 입력 인자 값이 금지된 메모리 영역을 지정하거나 제어 금지된 부하를 지정할 때 발생한다.Next, the lllegal Access error due to the prohibited action detection occurs when the slave normally receives the request packet from the master, but the input argument value for executing the command code specifies the prohibited memory area or the control prohibited load.

다음으로, 고장 코드에 대하여 설명하면 다음과 같다.Next, the fault code will be described.

모든 Device는 통신 이외의 고유의 기능을 가지고 있으며 그러한 기능들에 이상이 있는지 원격으로 진단할 수 있다. 이때 디바이스의 기능에 이상이 있을 때 Reponse 패킷에 포함시켜 보내는 값이 고장 코드이다. 예를 들어 온도센서 값을 읽는 Command 코드를 포함하는 리퀘스트 패킷이 슬레이브에서 수신 됐는데, 센서가 고장으로 판단되면 'NAK'와 함께 온도센서 고장 코드 값을 리스폰스 패킷에 포함시켜 마스터로 송신한다. 고장 코드는 모든 디바이스가 공통 영역을 이용하여 값을지정한다.All devices have their own functions other than communication and can remotely diagnose if there are any problems with those functions. At this time, when there is an error in the function of the device, the value sent in the response packet is the fault code. For example, if a request packet containing a command code for reading a temperature sensor value is received from a slave, and the sensor is determined to be faulty, the fault code value is included in the response packet along with 'NAK' and sent to the master. The fault code is assigned by all devices using a common area.

본 발명은 패킷을 구성하고 있는 데이터들의 비트에 이상이 있을 때 즉, 수신자 어드레스 에러/송신자 어드레스 에러/송.수신 어드레스 에러/패킷 길이 에러의 경우를 모두 CRC 에러로 처리하는데, 그 처리동작을 설명하면 다음과 같다.The present invention treats all cases of abnormality in the bits of the data constituting the packet, namely, receiver address error / sender address error / transmit / receive address error / packet length error, as CRC errors. Is as follows.

먼저, 수신자 어드레스 에러에 대하여 설명하기로 한다.First, the receiver address error will be described.

수신자 번지 필드의 비트에 에러가 발생했을 때는 호출하지 않는 디바이스가 수신하게 된다. 이때 수신된 디바이스는 수신자 번지 필드의 비트에 에러로 인하여 CRC 에러를 검출하게 된다. 첫째 경우, 에러 패킷이 마스터 (A)가 리퀘스트 패킷으로 슬레이브 (A)로 송신한 것이고, 이것을 다른 슬레이브 (B)가 수신했다면 슬레이브 (B)는 CRC 에러 값을 포함하는 리스폰스 패킷을 마스터 (A)로 송신한다. 슬레이브 (B)로부터 리스폰스 패킷을 수신한 마스터(A)는 본래 호출하고자 했던 슬레이브 (A)가 아닌 다른 디바이스가 응답을 해 왔지만 이때의 송신자 어드레스는 무시하고 본래의 호출하고자 했던 슬레이브 (A)가 응답한 것으로 간주한다. 즉, 1패킷을 송신한 뒤 수신되는 1패킷은 호출하고자 하는 디바이스로부터의 리스폰스 패킷으로 간주한다. 리스폰스 패킷을 수신한 마스터 (A)는 최대 3회까지 슬레이브 (A)로 재전송한다. 둘째 경우, 마스터 (A)가 슬레이브 (A)로 송신한 리퀘스트 패킷에 대해 슬레이브 (A)가 마스터 (A)로 송신한 리스폰스 패킷을 수신자 번지 필드의 에러로 인하여 다른 슬레이브 (B)가 수신했다면 슬레이브 (B)는 CRC 에러 값을 포함한 리스폰스 패킷을 슬레이브 (A)로 송신하게 된다. 이때 패킷 에러가 없다면 슬레이브 (A)는 패킷 종류 필드 값에서 리스폰스 패킷임을 알 기 때문에 수신한 패킷을 무시한다. 마스터 (A)는 계속 슬레이브 (A)로부터의 리스폰스 패킷을 최대 10초 동안 기다린다. 10초가 지나면 마스터 (A)가 슬레이브 (A)로 송신한 리퀘스트 패킷으로부터 시작한 통신은 슬레이브측에서 아무런 Command 코드도 수행하지 않고 종료된다.If an error occurs in a bit in the receiver address field, the device that is not calling will receive it. At this time, the received device detects a CRC error due to an error in a bit of a receiver address field. In the first case, the error packet was sent by the master (A) as a request packet to the slave (A), and if it was received by another slave (B), the slave (B) mastered the response packet containing the CRC error value. Send to The master (A) receiving the response packet from the slave (B) responded by a device other than the slave (A) originally intended to call, but the slave (A) attempting to call the original response was ignored while ignoring the sender address. Count as one. That is, one packet received after transmitting one packet is regarded as a response packet from the device to be called. Receiving the response packet, the master (A) retransmits to the slave (A) up to three times. In the second case, if the other slave (B) receives a response packet sent by the slave (A) to the master (A) for a request packet sent by the master (A) to the slave (A), the slave is received. (B) transmits a response packet including the CRC error value to the slave (A). At this time, if there is no packet error, the slave (A) knows that it is a response packet in the packet type field value and ignores the received packet. Master (A) continues to wait for a response packet from slave (A) for up to 10 seconds. After 10 seconds, the communication started from the request packet sent by the master (A) to the slave (A) is terminated without executing any command code on the slave side.

다음으로, 송신자 어드레스 에러에 대하여 설명하기로 한다.Next, the sender address error will be described.

송신자 번지 필드의 비트에 에러가 발생했을 때는 송신자가 호출하고자 하는 디바이스가 수신하게 되지만 송신자 번지 필드의 비트에 에러로 인하여 CRC 에러를 검출하게 된다. 첫째 경우, 마스터 (A)가 리퀘스트 패킷을 슬레이브 (A)로 송신할 때 송신자 번지 필드에 에러가 발생하면 패킷을 수신한 슬레이브 (A)는 송신자 번지 필드에 있는 번지 값의 디바이스(마스터 또는 슬레이브)로 리스폰스 패킷을 송신하게 된다. 이 리스폰스 패킷이 에러 없이 전송되고, 다른 슬레이브 (B)가 수신했다면 슬레이브 (B)는 패킷 종류 필드값에서 리스폰스 패킷임을 알 기 때문에 수신한 패킷을 무시한다. 이 리스폰스 패킷을 다른 마스터 (B)가 수신했다면 마스터 (B)는 리퀘스트 패킷을 송신하지 않았기 때문에 1패킷 송신-1패킷 수신 원칙에 따라 수신한 패킷을 무시한다. 마스터 (A)는 슬레이브 (A)부터의 리스폰스 패킷을 최대 10초간 기다린다. 10초가 지나면 슬레이브측에서 아무런 Command 코드도 수행하지 않고 통신은 종료된다. 둘째, 마스터 (A)가 리퀘스트 패킷을 슬레이브 (A)로는 정상적으로 송신 되었는 데, 슬레이브 (A)가 마스터 (A)로 리스폰스 패킷 송신자 번지 필드 에 에러가 발생한 경우이다. 이 리스폰스 패킷이 에러 없이 전송되고, 다른 슬레이브 (B)가 수신했다면 슬레이브 (B)는 패킷 종류 필드 값에서 리스폰스패킷임을 알 기 때문에 수신한 패킷을 무시한다. 이 리스폰스 패킷을 다른 마스터 (B)가 수신했다면 마스터 (B)는 리퀘스트 패킷을 송신하지 않았기 때문에 1패킷 송신-1패킷 수신 원칙에 따라 수신한 패킷을 무시한다. 마스터 (A)는 슬레이브 (A)부터의 리스폰스 패킷을 최대 10초간 기다린다. 10초가 지나면 슬레이브측에서 아무런 Command 코드도 수행하지 않고 통신은 종료된다.When an error occurs in a bit of the sender's address field, the device the sender wants to call receives. However, a CRC error is detected due to an error in the bit of the sender's address field. In the first case, if an error occurs in the sender address field when the master (A) sends a request packet to the slave (A), the slave (A) receiving the packet is the device of the address value in the sender address field (master or slave). The response packet is sent. If the response packet is transmitted without error and the other slave (B) receives it, the slave (B) ignores the received packet because it knows that it is a response packet in the packet type field value. If the response packet is received by another master B, the master B ignores the received packet according to the principle of one packet transmission-one packet reception because the master B has not sent a request packet. Master (A) waits for up to 10 seconds for a response packet from slave (A). After 10 seconds, communication is terminated without executing any command code on the slave side. Second, the master A normally transmits a request packet to the slave A, but the slave A receives an error in the response packet sender address field to the master A. If the response packet is transmitted without error and received by another slave (B), the slave (B) ignores the received packet because it knows that it is a response packet in the packet type field value. If the response packet is received by another master B, the master B ignores the received packet according to the principle of one packet transmission-one packet reception because the master B has not sent a request packet. Master (A) waits for up to 10 seconds for a response packet from slave (A). After 10 seconds, communication is terminated without executing any command code on the slave side.

다음으로, 송수신 번지 에러에 대하여 설명하기로 한다.Next, transmission / reception address errors will be described.

수신자 번지 필드와 송신자 번지 필드의 비트에 에러가 발생했을 때는 송신자가 호출을 원치 않는 다른 디바이스가 수신하게 되지만 CRC 에러를 검출하게 된다. 이 경우는 수신자 번지 에러와 송신자 번지 에러와 같은 Sequence로 디바이스들간에 통신이 이루어지다가 종료된다.If an error occurs in the bits in the receiver address field and the sender address field, another device that the sender does not want to call will receive a CRC error. In this case, communication between the devices is completed in the same sequence as the recipient address error and the sender address error, and then terminates.

마지막으로, 패킷 길이 에러에 대하여 설명하기로 한다.Finally, the packet length error will be described.

수신자는 패킷 길이 필드의 값만큼의 Byte 수를 이용해 수신 패킷 Buffer를 구성한다. 첫째, 패킷 길이 필드의 값이 실제보다 큰 경우, 수신자는 실제 Packe의 마지막 Byte까지 수신했지만 계속 데이터를 기다린다. 더 이상의 Byte 수신이 안되고 Byte간의 수신 제한 시간이 지나면 Time Over 에러가 발생하고 수신자는 수신 패킷 Buffer의 나머지를 임의의 데이터로 채우기 때문에 CRC 에러가 발생한다. 따라서 마스터는 최대 3회까지 재 전송한다. 둘째, 패킷 길이 필드의 값이 실제보다 작은 경우도 수신자는 CRC 에러를 검출하게 된다.The receiver constructs the received packet buffer by using the number of bytes corresponding to the value of the packet length field. First, if the value of the packet length field is larger than the actual value, the receiver has received up to the last byte of the actual packe but continues to wait for data. When no more bytes are received and the time limit between bytes passes, a Time Over error occurs and a CRC error occurs because the receiver fills the rest of the received packet buffer with random data. Therefore, the master retransmits up to three times. Second, even if the value of the packet length field is smaller than the actual value, the receiver detects a CRC error.

본 발명에 따른 가전기기 네트워크 제어시스템은 다음과 같은 효과가 있다.Home appliance network control system according to the present invention has the following effects.

첫째, 본 발명은 마스터-슬레이브 방식, 1-싸이클 방식 및 하프 듀플렉스(Half-Duplex) 방식의 통신체계와, 기존에 비해 간소화되고 정형화된 프로토콜을 적용하여 가전기기에 사용되는 저기능 마이컴의 직렬 통신기능을 이용하여 네트워크를 구현하므로 저비용으로 최적화된 가전기기 네트워크를 구현할 수 있다.First, the present invention is a communication system of the master-slave, 1-cycle and half-duplex method, and serial communication of low-performance microcomputers used in home appliances by applying a simplified and standardized protocol. Implementing a network using features enables a low cost optimized home appliance network.

둘째, 본 발명은 네트워크에 연결된 가전기기중 어느 한 기기의 동작상태 변화를 네트워크상의 다른 기기를 통해 사용자에게 알릴 수 있도록 하고 그 통신조건 및 대상기기 등을 사용자가 선택할 수 있도록 하므로 사용자 편의를 극대화시킬 수 있다.Second, the present invention is to maximize the user's convenience, so that the user can be informed of the change in the operation state of any one of the home appliances connected to the network through the other devices on the network and the user can select the communication conditions and target devices, etc. Can be.

셋째, 본 발명은 통신매체로서 전력선을 이용할 수 있으므로 별도의 조작없이 가전기기의 전원 플러그를 콘센트에 연결함으로서 네트워크 연결이 가능하다.Third, since the present invention can use a power line as a communication medium, a network connection is possible by connecting a power plug of a home appliance to an outlet without a separate operation.

Claims (1)

직렬 통신기능을 갖는 다수의 가전기기와;A plurality of home appliances having a serial communication function; 상기 가전기기들을 연결하는 통신매체를 포함하여 구성되며,It comprises a communication medium for connecting the home appliances, 상기 가전기기 사이에 통신을 위하여 응용 계층, 데이터링크 계층 및 물리 계층으로 이루어진 통신계층이 정의되며, 기설정된 통신 이벤트가 발생하면 상기 통신계층을 이용하여 상기 가전기기 사에에서 통신이 수행되는 것을 특징으로 하는 가전기기 네트워크 제어시스템.A communication layer consisting of an application layer, a data link layer, and a physical layer is defined for communication between the home appliances, and when a predetermined communication event occurs, communication is performed at the home appliance using the communication layer. Home appliance network control system.
KR1020040006127A 2004-01-30 2004-01-30 Control System for Home Appliance Network KR20040016921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040006127A KR20040016921A (en) 2004-01-30 2004-01-30 Control System for Home Appliance Network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040006127A KR20040016921A (en) 2004-01-30 2004-01-30 Control System for Home Appliance Network

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
KR10-2001-0030036A Division KR100434270B1 (en) 2001-05-30 2001-05-30 Control System for Home Appliance Network

Publications (1)

Publication Number Publication Date
KR20040016921A true KR20040016921A (en) 2004-02-25

Family

ID=37322700

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040006127A KR20040016921A (en) 2004-01-30 2004-01-30 Control System for Home Appliance Network

Country Status (1)

Country Link
KR (1) KR20040016921A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190023704A (en) * 2017-08-30 2019-03-08 엘에스산전 주식회사 Apparatus for determining communication connecting
KR20190023703A (en) * 2017-08-30 2019-03-08 엘에스산전 주식회사 Method for determining communication connecting

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190023704A (en) * 2017-08-30 2019-03-08 엘에스산전 주식회사 Apparatus for determining communication connecting
KR20190023703A (en) * 2017-08-30 2019-03-08 엘에스산전 주식회사 Method for determining communication connecting

Similar Documents

Publication Publication Date Title
KR100434270B1 (en) Control System for Home Appliance Network
KR100605207B1 (en) Service managing apparatus for network device
KR100440969B1 (en) Method and apparatus of networking
KR100559025B1 (en) Home network management system
US20040240451A1 (en) Connection handling, service management, and channel handling devices of home network management system
US8484323B2 (en) Network system connected with multiple master devices and method for operating the same
US20090022151A1 (en) Packet structure and packet transmission method of network control protocol
US20090213848A1 (en) Packet Structure and Packet Transmission Method of Network Control Protocol
Lee et al. A new control protocol for home appliances-LnCP
KR20040016921A (en) Control System for Home Appliance Network
KR100431523B1 (en) Control System for Home Appliance Network
KR100425762B1 (en) Control System for Home Appliance Network
WO2009086529A1 (en) System, method, and computer-readable medium for dynamic device discovery for servers binding to multiple masters
WO2006091039A1 (en) Network control protocol device and network connection method
CN101164294A (en) Network control protocol device and net connecting method thereof
KR20060090356A (en) Method for controling transmission and receive using a communication cycle service in living network control system
CN1767478A (en) Household network system and item information processing method and electrical appliance device
KR20060089855A (en) Method for communicating based event in living network control system

Legal Events

Date Code Title Description
A107 Divisional application of patent
WITN Withdrawal due to no request for examination