KR102210050B1 - METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet - Google Patents

METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet Download PDF

Info

Publication number
KR102210050B1
KR102210050B1 KR1020190033536A KR20190033536A KR102210050B1 KR 102210050 B1 KR102210050 B1 KR 102210050B1 KR 1020190033536 A KR1020190033536 A KR 1020190033536A KR 20190033536 A KR20190033536 A KR 20190033536A KR 102210050 B1 KR102210050 B1 KR 102210050B1
Authority
KR
South Korea
Prior art keywords
station number
station
slave device
slave
message
Prior art date
Application number
KR1020190033536A
Other languages
Korean (ko)
Other versions
KR20200113403A (en
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 KR1020190033536A priority Critical patent/KR102210050B1/en
Priority to PCT/KR2019/010875 priority patent/WO2020197007A1/en
Publication of KR20200113403A publication Critical patent/KR20200113403A/en
Application granted granted Critical
Publication of KR102210050B1 publication Critical patent/KR102210050B1/en

Links

Images

Classifications

    • H04L61/2046
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/6022
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

본 발명은 RAPIEnet 프로토콜에서 국번 자동 할당 방법에 관한 것이다. 본 발명에 따르면, RAPIEnet 프로토콜이 탑재된 디바이스로 구성된 네트워크에서 마스터 국번 이외의 국번으로 설정된 디바이스는 사용자가 설정한 국번을 적용시키며, 마스터 국번으로 초기 설정된 디바이스에 대해서는 마스터 디바이스와 슬레이브 디바이스간 국번 할당 메시지의 송수신을 통해 슬레이브 디바이스가 스스로 네트워크상 사용되지 않는 국번을 검색하여 자동으로 국번 할당을 수행하도록 하여 사용자에게 국번 설정의 편의성을 제공할 수 있다.The present invention relates to a method for automatically assigning station numbers in the RAPIEnet protocol. According to the present invention, in a network composed of devices equipped with RAPIEnet protocol, a station number set by the user is applied to a device set with a station number other than the master station number, and a message for assigning a station number between the master device and the slave device for the device initially set as the master station number. Through the transmission and reception of, the slave device searches for a station number that is not used on the network by itself and automatically assigns the station number, thereby providing the user with convenience of station number setting.

Description

RAPIEnet 프로토콜에서 국번 자동 할당 방법{METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet}Automatic station number assignment method in RAPIEnet protocol {METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet}

본 발명은 RAPIEnet 프로토콜에 관한 것으로, 보다 상세하게는 RAPIEnet 프로토콜이 탑재된 디바이스로 구성된 네트워크에서 마스터 국번 이외의 국번으로 설정된 디바이스는 사용자가 설정한 국번을 적용시키며, 마스터 국번으로 초기 설정된 디바이스에 대해서는 마스터 디바이스와 슬레이브 디바이스간 국번 할당 메시지의 송수신를 통해 슬레이브 디바이스가 스스로 네트워크상 사용되지 않는 국번을 검색하여 자동으로 국번 할당을 수행하도록 하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법에 관한 것이다.The present invention relates to the RAPIEnet protocol, and more particularly, to a device set with a station number other than the master station number in a network composed of devices equipped with the RAPIEnet protocol, the station number set by the user is applied, and the device initially set as the master station number is The present invention relates to an automatic station number assignment method in RAPIEnet protocol, in which a slave device searches for a station number that is not used on the network by itself and automatically performs station number assignment through transmission and reception of a station number assignment message between a device and a slave device.

RAPIEnet은 이더넷 기반의 산업용 네트워크 프로토콜을 의미한다. 이러한 RAPIEnet 프로토콜을 사용하여 네트워크를 구성할 경우 RAPIEnet 프로토콜이 탑재된 각 네트워크 디바이스의 국번 할당이 선행되어야 한다. RAPIEnet means Ethernet-based industrial network protocol. When configuring a network using such RAPIEnet protocol, the station number assignment of each network device equipped with the RAPIEnet protocol must be preceded.

한편, 이러한 디바이스 국번 할당을 위해 종래에는 도 1에서 보여지는 바와 같이 RAPIEnet 프로토콜에 탑재된 네트워크 디바이스의 외부에 장착되어 있는 로터리 스위치(100)를 돌려서 원하는 국번을 설정하고 있다. Meanwhile, in order to allocate the device station number, as shown in FIG. 1, a desired station number is set by turning a rotary switch 100 mounted outside a network device mounted in the RAPIEnet protocol.

그러나, 위와 같은 종래 국번 설정 방법은 사용자가 네트워크 디바이스의 로터리 스위치를 직접 조작하여 국번을 설정하여야 함에 따라 사용자의 실수로 서로 다른 네트워크 디바이스에 동일한 국번이 설정되는 경우 국번이 충돌하는 문제점이 발생될 수 있다.However, in the conventional station number setting method as described above, since the user must directly manipulate the rotary switch of the network device to set the station number, if the same station number is set in different network devices by mistake of the user, the problem of station number conflict may occur. have.

또한, 위와 같이 국번이 충돌하지 않도록 하기 위해서는 사용자가 모든 네트워크 디바이스의 로터리 스위치를 일일이 변경하여 국번을 설정해야 함에 따라 작업에 번거로움이 있다. In addition, in order to prevent the station numbers from colliding as described above, it is cumbersome to work as the user must set the station numbers by manually changing the rotary switches of all network devices.

또한, 네트워크 디바이스가 장착되어 있는 장소가 분산되어 있다면, 사용자가 모든 장소를 돌아다니면서 국번을 설정해야 하고, 국번 충돌이 발생하게 된다면, 국번 충돌이 발생한 디바이스가 있는 장소로 사용자가 직접 이동하여 다시 로터리 스위치를 변경해야 하는 등 작업상 여러 가지 어려움이 있었다.In addition, if the places where the network device is installed are distributed, the user must set the station number while going around all places. If a station number conflict occurs, the user directly moves to the place where the station number conflict occurs and returns to the rotary. There were various difficulties in the work, such as having to change the switch.

본 발명의 목적은 RAPIEnet 프로토콜이 탑재된 디바이스로 구성된 네트워크에서 마스터 국번 이외의 국번으로 설정된 디바이스는 사용자가 설정한 국번을 적용시키며, 마스터 국번으로 초기 설정된 디바이스에 대해서는 마스터 디바이스와 슬레이브 디바이스간 국번 할당 메시지의 송수신을 통해 슬레이브 디바이스가 스스로 네트워크상 사용되지 않는 국번을 검색하여 자동으로 국번 할당을 수행하도록 하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법을 제공하는 것이다.An object of the present invention is to apply the station number set by the user to a device set with a station number other than the master station number in a network composed of devices equipped with the RAPIEnet protocol, and a station number assignment message between the master device and the slave device for the device initially set as the master station number. This is to provide the automatic station number allocation method in the RAPIEnet protocol that enables the slave device to automatically perform station number assignment by searching for a station number that is not used on the network through transmission and reception of

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention that are not mentioned can be understood by the following description, and will be more clearly understood by examples of the present invention. In addition, it will be easily understood that the objects and advantages of the present invention can be realized by the means shown in the claims and combinations thereof.

본 발명에 따른 하나의 마스터 디바이스와 복수의 슬레이브 디바이스를 포함하는 RAPIEnet 프로토콜이 적용된 네트워크에서 국번 자동 할당 방법은, 상기 마스터 디바이스에서 상기 네트워크에 연결된 모든 슬레이브 디바이스에 할당된 국번 정보를 수집하는 단계와, 상기 마스터 디바이스에서 인접한 슬레이브 디바이스로 국번 할당 메시지를 전송하는 단계와, 상기 국번 할당 메시지를 수신한 슬레이브 디바이스는 상기 네트워크에 할당되지 않은 국번 중 하나를 선택하여 국번을 할당하는 단계와, 상기 슬레이브 디바이스에서 자신이 마지막 슬레이브 디바이스인지 확인하는 단계와, 상기 슬레이브 디바이스는 자신이 마지막 디바이스인 경우 상기 마스터 디바이스로 국번 할당 완료 메시지를 전송하는 단계를 포함할 수 있다.In a network to which a RAPIEnet protocol including one master device and a plurality of slave devices according to the present invention is applied, an automatic station number assignment method includes the steps of collecting station number information allocated to all slave devices connected to the network from the master device, Transmitting a station number assignment message from the master device to an adjacent slave device, and the slave device receiving the station number assignment message selecting one of the station numbers not assigned to the network and allocating a station number; and in the slave device The step of checking whether it is the last slave device, and when the slave device is the last device, transmitting a station number allocation completion message to the master device.

또한, 상기 국번 할당 메시지는, 상기 국번 할당이 필요한 슬레이브 디바이스의 목적지 국번과, 상기 네트워크에서 사용중인 국번 리스트 개수, 국번 리스트별 시작 국번과 마지막 국번을 포함하는 국번 테이블을 포함할 수 있다.In addition, the station number allocation message may include a station number table including a destination station number of a slave device requiring the station number allocation, the number of station number lists used in the network, and a start station number and a last station number for each station number list.

또한, 상기 자동으로 국번을 할당하는 단계는, 상기 슬레이브 디바이스에서 초기 설정된 국번이 상기 목적지 국번에 해당하는지 검사하는 단계와, 상기 초기 설정된 국번이 상기 목적지 국번인 경우 상기 국번 리스트별 시작 국번과 마지막 국번을 확인하는 단계와, 상기 국번 리스트별 등록된 국번을 제외한 나머지 국번 중 하나를 자신의 국번으로 자동 할당하는 단계를 포함할 수 있다.In addition, the automatically allocating station number includes: checking whether the station number initially set in the slave device corresponds to the destination station number, and when the initially set station number is the destination station number, start station number and last station number for each station number list And checking, and automatically allocating one of the remaining station numbers excluding station numbers registered for each station number list as the own station number.

또한, 상기 슬레이브 디바이스는, 상기 국번을 자동 할당한 이후, 상기 국번 테이블상 새로운 국번 리스트를 추가하고 자신에게 할당된 국번을 상기 새로운 국번 리스트의 시작 국번과 마지막 국번으로 등록하여 상기 국번 테이블을 재구성하는 단계를 더 포함할 수 있다.In addition, after automatically allocating the station number, the slave device reconfigures the station number table by adding a new station number list on the station number table and registering the station number assigned to itself as the start station number and the last station number of the new station number list. It may further include a step.

또한, 상기 재구성하는 단계에서, 상기 슬레이브 디바이스는, 상기 자신에게 할당한 새로운 국번이 상기 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우, 상기 새로운 국번을 위한 국번 리스트를 생성하지 않고, 상기 연속되는 숫자에 대응되는 국번의 국번 리스트상 마지막 국번만을 갱신하여 상기 국번 테이블을 재구성할 수 있다.In addition, in the reconfiguration step, the slave device does not generate a station number list for the new station number, if the new station number assigned to the slave device becomes a number consecutive to the station numbers registered in the station number list, and the The station number table can be reconstructed by updating only the last station number in the station number list of station numbers corresponding to consecutive numbers.

또한, 상기 슬레이브 디바이스는 자신이 마지막 슬레이브 디바이스가 아닌 경우, 상기 국번 할당 메시지를 수신한 반대 방향의 인접한 다른 슬레이브 디바이스로 상기 재구성된 국번 테이블과 함께 상기 국번 할당 메시지를 전송하는 단계를 더 포함할 수 있다.In addition, when the slave device is not the last slave device, transmitting the station number allocation message together with the reconstructed station number table to another adjacent slave device in the opposite direction from which the station number allocation message was received. have.

또한, 상기 슬레이브 디바이스는, 상기 초기 설정된 국번이 상기 목적지 국번이 아닌 경우, 상기 국번 할당 메시지를 처리하지 않고, 상기 국번 할당 메시지를 수신한 방향의 인접한 다른 슬레이브 디바이스로 포워딩하는 단계를 더 포함할 수 있다.In addition, the slave device, when the initially set station number is not the destination station number, does not process the station number assignment message and forwards the station number assignment message to another adjacent slave device in the direction from which it was received. have.

또한, 상기 국번 할당 완료 메시지는, 상기 마스터 디바이스에 할당된 마스터 국번이 목적지 국번으로 설정되며, 상기 국번 할당이 완료된 슬레이브 디바이스에서는 처리되지 않고 상기 마스터 디바이스로 포워딩될 수 있다.In addition, in the station number allocation complete message, a master station number allocated to the master device is set as a destination station number, and may be forwarded to the master device without being processed by a slave device in which the station number allocation is completed.

또한, 상기 마스터 디바이스에서 상기 국번 할당 완료 메시지를 수신하는 경우, 상기 네트워크에 대한 국번 할당이 정상적으로 이루어진 것으로 판단하는 단계를 더 포함할 수 있다.In addition, when the master device receives the station number allocation completion message, determining that the station number allocation to the network has been normally performed may be further included.

또한, 상기 국번 정보를 수집하는 단계는, 상기 마스터 디바이스가 상기 네트워크에 연결된 모든 슬레이브 디바이스로 국번 요청 메시지를 브로드캐스트하는 단계와, 각 슬레이브 디바이스에서 상기 국번 요청 메시지에 응답하여 자신에 할당된 국번 정보를 상기 마스터 디바이스로 전송하는 단계와, 상기 마스터 디바이스에서 상기 각 슬레이브 디바이스에서 응답한 국번 정보를 수신하는 단계를 포함할 수 있다.In addition, the collecting of the station number information includes the steps of, by the master device, broadcasting a station number request message to all slave devices connected to the network, and station number information allocated to itself in response to the station number request message from each slave device. Transmitting a signal to the master device, and receiving station number information responded from each of the slave devices by the master device.

또한, 본 발명에 따른 하나의 마스터 디바이스와 복수의 슬레이브 디바이스를 포함하는 RAPIEnet 프로토콜이 적용된 네트워크에서 국번 자동 할당 방법은, 상기 마스터 디바이스에서 상기 마스터 디바이스를 기준으로 상기 네트워크의 양방향 경로에 연결된 모든 슬레이브 디바이스에 할당된 국번 정보를 수집하는 단계와, 상기 마스터 디바이스에서 상기 양방향 경로 중 제1 경로에 존재하는 슬레이브 디바이스에 대한 국번 할당 동작을 제어하는 제1 국번 할당 단계와, 상기 마스터 디바이스에서 상기 양방향 경로 중 제2 경로에 존재하는 슬레이브 디바이스에 대한 국번 할당 동작을 제어하는 제2 국번 할당 단계를 포함할 수 있다.In addition, in the network to which the RAPIEnet protocol including one master device and a plurality of slave devices according to the present invention is applied, the automatic station number assignment method includes, in the master device, all slave devices connected to the bidirectional path of the network based on the master device. Collecting station number information allocated to the master device, and controlling a station number allocation operation for a slave device present in a first path among the bidirectional paths by the master device; and among the bidirectional paths in the master device A second station number allocation step of controlling an operation of allocating a station number to a slave device existing in the second path may be included.

또한, 상기 제1 국번 할당 단계는, 상기 마스터 디바이스에서 상기 양방향 경로 중 제1 경로에 존재하는 인접한 제1 슬레이브 디바이스로 제1 국번 할당 메시지를 전송하는 단계와, 상기 제1 슬레이브 디바이스에서 상기 제1 경로상 네트워크에 할당되지 않은 국번 중 하나를 선택하여 국번을 할당하는 단계와, 상기 제1 슬레이브 디바이스에서 자신이 마지막 슬레이브 디바이스인지 확인하는 단계와, 상기 제1 슬레이브 디바이스는 자신이 마지막 디바이스인 경우 상기 마스터 디바이스로 국번 할당 완료 메시지를 전송하는 단계를 포함할 수 있다.In addition, the first station number assignment step may include transmitting a first station number assignment message from the master device to an adjacent first slave device present in a first path among the bidirectional paths, and the first slave device Selecting one of the station numbers that are not assigned to the network in the path and allocating a station number; checking whether the first slave device is the last slave device; and when the first slave device is the last device, the It may include transmitting a station number assignment complete message to the master device.

또한, 상기 제2 국번 할당 단계는, 상기 마스터 디바이스에서 상기 양방향 경로 중 제2 경로에 존재하는 인접한 슬레이브 디바이스로 제2 국번 할당 메시지를 전송하는 단계와, 상기 제2 국번 할당 메시지를 수신한 제2 슬레이브 디바이스는 상기 제1 경로와 상기 제2 경로상 네트워크에 할당되지 않은 국번 중 하나를 선택하여 국번을 할당하는 단계와, 상기 제2 슬레이브 디바이스에서 자신이 마지막 슬레이브 디바이스인지 확인하는 단계와, 상기 제2 슬레이브 디바이스는 자신이 마지막 디바이스인 경우 상기 마스터 디바이스로 국번 할당 완료 메시지를 전송하는 단계를 포함할 수 있다.In addition, the second station number assignment step may include transmitting a second station number assignment message from the master device to an adjacent slave device present in a second path among the bidirectional paths, and receiving the second station number assignment message. The slave device allocates a station number by selecting one of the station numbers not allocated to the network on the first path and the second path, and confirming that it is the last slave device in the second slave device; and 2 When the slave device is the last device, it may include transmitting a station number assignment completion message to the master device.

본 발명에 따르면, RAPIEnet 프로토콜에서 국번 자동 할당 방법에 있어서, RAPIEnet 프로토콜이 탑재된 디바이스로 구성된 네트워크에서 마스터 국번 이외의 국번으로 설정된 디바이스는 사용자가 설정한 국번을 적용시키며, 마스터 국번으로 초기 설정된 디바이스에 대해서는 마스터 디바이스와 슬레이브 디바이스간 국번 할당 메시지의 송수신을 통해 슬레이브 디바이스가 스스로 네트워크상 사용되지 않는 국번을 검색하여 자동으로 국번 할당을 수행하도록 하여 사용자에게 국번 설정의 편의성을 제공할 수 있다.According to the present invention, in the method of automatically allocating station numbers in RAPIEnet protocol, in a network composed of devices equipped with RAPIEnet protocol, a station number set by the user is applied to a device set with a station number other than the master station number, and the device initially set as the master station number is Regarding, it is possible to provide convenience of station number setting to a user by allowing the slave device to automatically perform station number assignment by searching for a station number that is not used on the network by itself through transmission and reception of a station number assignment message between the master device and the slave device.

또한, 본 발명에 따르면, 라인 네트워크 또는 링 네트워크 형태로 이루어지는 RAPIEnet 시스템에서 슬레이브 디바이스가 스스로 네트워크상 사용되지 않는 국번을 검색하여 자동으로 국번 할당을 수행하도록 함으로써 국번 설정 시 휴먼 에러로 인한 국번 충돌을 방지시킬 수 있다.In addition, according to the present invention, in a RAPIEnet system in the form of a line network or a ring network, the slave device searches for an unused station number on the network and automatically assigns the station number, thereby preventing station number collision due to a human error when setting the station number. I can make it.

또한, 본 발명에 따르면 사용자가 임의로 국번을 할당한 디바이스와 자동으로 국번을 할당하는 디바이스가 혼재된 네트워크 환경에서도 국번 충돌이 발생하지 않도록 디바이스들에 대한 국번을 정확히 할당할 수 있다.In addition, according to the present invention, even in a network environment in which a device to which a user randomly assigns a station number and a device that automatically assigns a station number are mixed, it is possible to accurately allocate station numbers to devices so that station number collisions do not occur.

상술한 효과와 더불어 본 발명의 구체적인 효과는 이하 발명을 실시하기 위한 구체적인 사항을 설명하면서 함께 기술한다. In addition to the above-described effects, specific effects of the present invention will be described together while describing specific details for carrying out the present invention.

도 1은 종래 네트워크 디바이스의 로터리 스위치 예시도.
도 2는 본 발명의 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면.
도 3은 본 발명의 일 실시예에 따른 RAPIEnet 프로토콜이 탑재된 네트워크 디바이스의 기능 블록 구성도.
도 4 내지 도 5는 본 발명의 다른 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면.
도 6a 내지 도 6c는 본 발명의 다른 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면.
도 7a 내지 도 7b는 본 발명의 다른 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면.
1 is an exemplary diagram of a rotary switch of a conventional network device.
2 is a diagram illustrating a method of automatically allocating station numbers in a RAPIEnet protocol according to an embodiment of the present invention.
3 is a functional block diagram of a network device equipped with a RAPIEnet protocol according to an embodiment of the present invention.
4 to 5 are diagrams illustrating a method of automatically allocating station numbers in a RAPIEnet protocol according to another embodiment of the present invention.
6A to 6C are diagrams illustrating a method of automatically allocating station numbers in a RAPIEnet protocol according to another embodiment of the present invention.
7A to 7B are diagrams illustrating a method of automatically allocating station numbers in the RAPIEnet protocol according to another embodiment of the present invention.

전술한 목적, 특징 및 장점은 첨부된 도면을 참조하여 상세하게 후술되며, 이에 따라 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명의 기술적 사상을 용이하게 실시할 수 있을 것이다. 본 발명을 설명함에 있어서 본 발명과 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 상세한 설명을 생략한다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하기로 한다. 도면에서 동일한 참조부호는 동일 또는 유사한 구성요소를 가리키는 것으로 사용된다.The above-described objects, features, and advantages will be described later in detail with reference to the accompanying drawings, and accordingly, one of ordinary skill in the art to which the present invention pertains will be able to easily implement the technical idea of the present invention. In describing the present invention, if it is determined that a detailed description of known technologies related to the present invention may unnecessarily obscure the subject matter of the present invention, a detailed description will be omitted. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to indicate the same or similar elements.

도 2는 본 발명의 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면이다.2 is a diagram illustrating a method of automatically allocating station numbers in the RAPIEnet protocol according to an embodiment of the present invention.

이하, 도 2를 참조하여 라인 네트워크(line network)상 마스터 디바이스(master device)(210)를 기준으로 일방향으로만 복수의 슬레이브 디바이스(220, 230, 240)가 연결되고, 슬레이브 디바이스의 국번(station number : SN)이 자동 할당인 경우를 설명한다.Hereinafter, referring to FIG. 2, a plurality of slave devices 220, 230, and 240 are connected in only one direction based on a master device 210 on a line network, and the station number of the slave device is number: SN) will be described in the case of automatic allocation.

먼저, 마스터 디바이스(210)는 라인 네트워크로 연결된 복수의 슬레이브 디바이스(220, 230, 240)의 국번 정보를 확인하기 위해 국번 요청 메시지를 브로드캐스트(broadcast)(250)로 전송한다.First, the master device 210 transmits a station number request message to a broadcast 250 in order to check station number information of a plurality of slave devices 220, 230, and 240 connected through a line network.

이때, 도 2에서는 라인 네트워크의 PORT 0 방향으로만 슬레이브 디바이스(220, 230, 240)가 연결되어 있고, PORT 1 방향에 연결된 슬레이브 디바이스는 없으므로, 마스터 디바이스(210)는 PORT 0 방향으로만 국번 요청 메시지를 전송한다.At this time, in FIG. 2, since the slave devices 220, 230, and 240 are connected only in the PORT 0 direction of the line network, and there is no slave device connected in the PORT 1 direction, the master device 210 requests the station number only in the PORT 0 direction. Send the message.

그러면, 각 슬레이브 디바이스(220, 230, 240)는 위와 같은 국번 요청 메시지에 응답하여 자신에게 할당된 국번 정보를 마스터 디바이스(210)로 전송한다.Then, each of the slave devices 220, 230, and 240 transmits the station number information allocated to itself to the master device 210 in response to the station number request message as described above.

이에 따라 마스터 디바이스(210)는 라인 네트워크상 연결된 모든 슬레이브 디바이스(220, 230, 240)에 할당된 국번 정보를 확인할 수 있게 된다.Accordingly, the master device 210 can check station number information allocated to all slave devices 220, 230, and 240 connected on the line network.

이때, 마스터 디바이스(210)는 슬레이브 디바이스(220, 230, 240)에 할당된 국번 중 "0"이 없는 경우, 이것은 모든 슬레이브 디바이스에 국번이 할당되어 있는 것을 의미하므로 국번 자동 할당 동작을 수행하지 않는다.At this time, if there is no "0" among the station numbers assigned to the slave devices 220, 230, and 240, the master device 210 does not perform the automatic station number assignment operation because it means that all slave devices are assigned station numbers. .

그러나, 마스터 디바이스(210)는 슬레이브 디바이스에 할당된 국번 중 "0"이 있는 경우, 이것은 국번이 할당되지 않은 슬레이브 디바이스가 존재하는 것을 의미하므로 국번 자동 할당 동작을 수행한다.However, if there is "0" among the station numbers allocated to the slave device, this means that there is a slave device to which the station number is not allocated, and thus performs an automatic station number assignment operation.

이하에서는, 국번 자동 할당 동작에 대해서 보다 상세히 설명하기로 한다.Hereinafter, the automatic station number assignment operation will be described in more detail.

국번 자동 할당 동작을 수행하는 경우, 마스터 디바이스(210)는 라인 네트워크의 PORT 0으로 국번 할당 메시지를 전송한다.When performing the automatic station number allocation operation, the master device 210 transmits a station number allocation message to PORT 0 of the line network.

이러한 국번 할당 메시지는 슬레이브 디바이스(220, 230, 240)에게 국번을 스스로 할당하도록 명령하는 메시지일 수 있다. 또한, 이러한 국번 할당 메시지는 참조번호 (290)에서 도시된 바와 같은 국번 테이블(Table)(290)이 포함될 수 있다. 이러한 국번 테이블(290)에는 국번 자동 할당이 필요한 슬레이브 디바이스의 목적지 국번(Destination : DST)과, 네트워크에서 사용중인 국번 리스트 개수(Count : CNT), 국번 리스트별 시작 국번(S_SN)과 마지막 국번(E_SN)에 대한 정보가 포함될 수 있다. 이러한 국번 테이블(290)은 슬레이브 디바이스(220, 230, 240)에서 국번 자동 할당 동작이 수행됨에 따라 각 슬레이브 디바이스에서 갱신될 수 있다. The station number assignment message may be a message instructing the slave devices 220, 230, and 240 to allocate the station number by themselves. In addition, the station number assignment message may include a station number table 290 as shown by reference numeral 290. In this station number table 290, the destination station number (Destination: DST) of the slave device that needs to be automatically assigned the station number, the number of the station number list in use in the network (Count: CNT), the start station number (S_SN) and the last station number (E_SN) for each station number list. ) May be included. The station number table 290 may be updated in each slave device as the automatic station number allocation operation is performed by the slave devices 220, 230, and 240.

이때 국번 리스트는 연속되는 국번의 묶음을 의미합니다. 예를 들어 사용 중인 국번이 0,1,3,4,7 이면, 국번 리스트는 0~1, 3~4 및 7이 됩니다. 따라서 국번 리스트 개수는 3개가 됩니다.참조번호 (290)은 슬레이브 디바이스(220, 230, 240)의 국번 정보를 수집한 마스터 디바이스(210)에서 최초로 생성된 테이블을 도시한 것이다. 목적지 국번은 "0"으로 설정되어 슬레이브 디바이스 중 국번이 "0"번으로 설정된 슬레이브 디바이스가 "0"번 이외의 다른 국번으로 스스로 국번 할당을 수행하도록 한다. 현재 라인 네트워크상에 슬레이브 디바이스에 할당된 국번은 "0"번 밖에 없으므로, 국번 리스트의 시작 국번과 마지막 국번은 "0"으로 설정되고, 국번 리스트 개수는 "1"로 설정된 것을 알 수 있다.At this time, the station number list means a group of consecutive station numbers. For example, if the station number being used is 0,1,3,4,7, the station number list is 0~1, 3~4, and 7. Therefore, the number of the station number list becomes 3. Reference number 290 shows a table initially created by the master device 210 that has collected the station number information of the slave devices 220, 230, and 240. The destination station number is set to "0", so that the slave device whose station number is set to "0" among the slave devices is assigned to a station number other than "0" by itself. Since the current station number allocated to the slave device on the line network is only "0", the start station number and the last station number in the station number list are set to "0", and the number of station number list is set to "1".

라인 네트워크상 제1 슬레이브 디바이스(220)는 위와 같은 국번 할당 메시지를 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message as described above, the first slave device 220 on the line network checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제1 슬레이브 디바이스(220)는 국번 할당 동작을 수행하며, 국번 테이블상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, when its own station number corresponds to the destination station number, the first slave device 220 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table and assigns it to itself. Search for an available station number.

이때, 국번 테이블(290)상 국번 리스트 개수가 "1"이고 국번 리스트의 시작 국번과 마지막 국번이 "0"번이므로 제1 슬레이브 디바이스(220)는 "0"번 국번이 사용 중인 것을 확인할 수 있다.At this time, since the number of the station number list in the station number table 290 is "1" and the start station number and the last station number in the station number list are "0", the first slave device 220 can confirm that the station number "0" is in use. .

이에 따라, 제1 슬레이브 디바이스(220)는 마지막 국번으로 "0"번 국번이 사용 중이기 때문에 자신의 국번을 "1"로 할당한다.Accordingly, since the station number "0" is being used as the last station number, the first slave device 220 allocates its own station number to "1".

위와 같이 국번을 할당한 경우, 제1 슬레이브 디바이스(220)는 참조번호 (292)에서와 같이 국번 테이블(290)상 마지막 국번을 "1"로 설정하여 국번 테이블(292)을 재구성한 후, 국번 할당 메시지가 수신된 반대 방향의 제2 슬레이브 디바이스(230)로 국번 할당 메시지와 재구성된 국번 테이블(292)을 전송하게 된다.When the station number is allocated as above, the first slave device 220 reconfigures the station number table 292 by setting the last station number in the station number table 290 to "1" as in the reference number 292, and then The station number allocation message and the reconstructed station number table 292 are transmitted to the second slave device 230 in the opposite direction from which the allocation message was received.

라인 네트워크상 제2 슬레이브 디바이스(230)는 제1 슬레이브 디바이스(220)로부터 국번 할당 메시지와 국번 테이블(292)을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When the second slave device 230 receives the station number assignment message and the station number table 292 from the first slave device 220 on the line network, it checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제2 슬레이브 디바이스(230)는 국번 할당 동작을 수행하며, 국번 테이블(292)상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if the own station number corresponds to the destination station number, the second slave device 230 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table 292, and Search the station number that can be assigned to

이때, 국번 테이블(292)상 국번 리스트 개수가 "1"이고 국번 리스트의 시작 국번은 "0"번, 마지막 국번은 "1"번이므로 제2 슬레이브 디바이스(230)는 "0"번 국번부터 "1"번 국번까지 사용중인 것을 확인할 수 있다.At this time, since the number of the station number list in the station number table 292 is "1", the start station number of the station number list is "0" and the last station number is "1", the second slave device 230 starts from "0" station number. You can check that the station number 1" is in use.

이에 따라, 제2 슬레이브 디바이스(230)는 마지막 국번으로 "1"번 국번이 사용 중이기 때문에 자신의 국번을 "2"로 할당한다.Accordingly, the second slave device 230 allocates its own station number to "2" because the station number "1" is being used as the last station number.

위와 같이 국번을 할당한 경우, 제2 슬레이브 디바이스(230)는 참조번호 (294)에서와 같이 국번 테이블상 마지막 국번을 "2"로 설정하여 국번 테이블(294)을 재구성한 후, 국번 할당 메시지가 수신된 반대 방향의 제3 슬레이브 디바이스(240)로 국번 할당 메시지와 재구성된 국번 테이블을 전송하게 된다.When the station number is allocated as above, the second slave device 230 reconfigures the station number table 294 by setting the last station number in the station number table to "2" as in the reference number 294, and then the station number assignment message is displayed. The station number assignment message and the reconstructed station number table are transmitted to the received third slave device 240 in the opposite direction.

라인 네트워크상 제3 슬레이브 디바이스(240)는 제2 슬라이브 디바이스(230)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message and station number table from the second slave device 230 on the line network, the third slave device 240 checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제3 슬레이브 디바이스(240)는 국번 할당 동작을 수행하며, 국번 테이블(294)상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if its own station number corresponds to the destination station number, the third slave device 240 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table 294 and Search the station number that can be assigned to

이때, 국번 테이블(294)상 국번 리스트 개수가 "1"이고 국번 리스트의 시작 국번은 "0"번, 마지막 국번은 "2"번이므로 제3 슬레이브 디바이스(240)는 "0"번 국번부터 "2"번 국번까지 사용중인 것을 확인할 수 있다. 이에 따라, 제3 슬레이브 디바이스(240)는 마지막 국번으로 "2"번 국번이 사용 중이기 때문에 자신의 국번을 "3"으로 할당한다.At this time, since the number of the station number list in the station number table 294 is "1", the start station number of the station number list is "0" and the last station number is "2", the third slave device 240 starts from "0" station number. You can check that the station number 2" is in use. Accordingly, the third slave device 240 allocates its own station number to "3" because station number "2" is in use as the last station number.

위와 같이 국번을 할당한 경우, 제3 슬레이브 디바이스(240)는 참조번호 (296)에서와 같이 국번 테이블상 마지막 국번을 "3"로 설정하여 국번 테이블(296)을 재구성한다.When the station number is allocated as above, the third slave device 240 reconfigures the station number table 296 by setting the last station number on the station number table to "3" as in reference number 296.

이때, 제3 슬레이브 디바이스(240)는 국번 할당 메시지가 수신된 반대 방향으로 더 이상 연결된 슬레이브 디바이스가 없으므로 재구성한 국번 테이블(296)을 국번 할당 완료 메시지와 함께 마스터 디바이스로 전송한다.At this time, the third slave device 240 transmits the reconfigured station number table 296 to the master device together with the station number allocation completion message because there is no longer a slave device connected in the opposite direction from which the station number allocation message was received.

이때, 국번 할당 완료 메시지에 포함된 목적지 국번이 "0"으로 설정되어 있기 때문에 국번 할당 동작을 통해 이미 "0"번이 아닌 다른 번호로 국번 할당된 제1 슬레이브 디바이스(220) 내지 제2 슬레이브 디바이스(230)는 국번 할당 완료 메시지를 처리하지 않고, 마스터 디바이스(210) 쪽으로 포워딩(Forwarding)시키게 된다.At this time, since the destination station number included in the station number allocation completion message is set to "0", the first slave device 220 to the second slave device that has already been assigned a station number other than "0" through the station number allocation operation. The 230 does not process the station number assignment complete message, but forwards the station number to the master device 210.

그러면, 마스터 디바이스(210)는 목적지 국번이 자신의 국번과 동일하게 때문에 국번 할당 완료 메시지를 수신한다. 이어, 마스터 디바이스(210)는 위와 같이 국번 할당 완료 메시지를 수신하는 경우, 라인 네트워크상 모든 슬레이브 디바이스(220, 230, 240)의 국번 자동 할당이 정상적으로 이루어진 것으로 판단하고, 국번 자동 할당 동작을 완료한다.Then, the master device 210 receives the station number assignment completion message because the destination station number is the same as its own station number. Subsequently, when receiving the station number assignment completion message as described above, the master device 210 determines that automatic station number assignment of all slave devices 220, 230, and 240 on the line network has been normally performed, and completes the automatic station number assignment operation. .

도 3은 본 발명의 일 실시예에 따른 RAPIEnet 프로토콜이 탑재된 네트워크 디바이스의 기능 블록 구성을 도시한 것이다.3 is a block diagram of a network device equipped with a RAPIEnet protocol according to an embodiment of the present invention.

도 3을 참조하면, 위와 같은 네트워크 디바이스(210)의 구조는 마스터 디바이스(210)와 슬레이브 디바이스(220)에 모두 적용될 수 있다.Referring to FIG. 3, the structure of the network device 210 as described above can be applied to both the master device 210 and the slave device 220.

이러한, 네트워크 디바이스(210)는 RAPIEnet 프로토콜이 탑재되며, 일반적으로 두 개의 물리계층부(physical layer)(306, 308)와 매체 제어기(Media Access Controller : MAC)(302, 304), 제어기(300)를 포함할 수 있다. The network device 210 is equipped with a RAPIEnet protocol, and generally two physical layers 306 and 308, a media controller (MAC) 302 and 304, and a controller 300 It may include.

물리계층부(306, 308)는 네트워크 버스(310)로부터 데이터를 수신하여 매체 제어기(302, 304)로 제공하며, 매체 제어기(302, 304)로부터 인가되는 데이터를 네트워크 버스(310)로 전송한다. The physical layer units 306 and 308 receive data from the network bus 310 and provide them to the media controllers 302 and 304, and transmit the data applied from the media controllers 302 and 304 to the network bus 310. .

매체 제어기(302, 304)는 물리계층부(306, 308)를 통해 네트워크 버스(310)를 통해 전송되는 데이터를 수신하고, 제어기(300)로부터 전송되는 데이터를 물리계층부(306, 308)를 통해 네트워크 버스(300)로 전송한다.The media controllers 302 and 304 receive data transmitted through the network bus 310 through the physical layer units 306 and 308, and transfer the data transmitted from the controller 300 to the physical layer units 306 and 308. Through the network bus 300.

제어기(300)는 매체 제어기(302, 304)와 데이터 송수신을 수행하고, 송수신된 데이터를 처리한다.The controller 300 performs data transmission/reception with the media controllers 302 and 304, and processes the transmitted/received data.

또한, 본 발명의 일 실시예에 따라 네트워크 디바이스가 마스터 디바이스(210)인 경우, 제어기(300)는 슬레이브 디바이스(220)와 통신을 수행하고, 국번 요청 메시지를 생성하여 슬레이브 디바이스(220)로 전송하고 슬레이브 디바이스(220)로부터 국번 정보를 수집할 수 있다. 또한, 제어기(300)는 슬레이브 디바이스(220)로 국번 정보를 기반으로 슬레이브 디바이스(220)에서 국번을 할당할 때 참조할 수 있는 국번 테이블을 생성할 수 있다. 또한, 제어기(300)는 국번 할당 메시지를 슬레이브 디바이스(220)로 전송하여 슬레이브 디바이스(220)에서 국번 테이블을 기반으로 스스로 국번을 할당할 수 있도록 제어할 수 있다.In addition, according to an embodiment of the present invention, when the network device is the master device 210, the controller 300 communicates with the slave device 220, generates a station number request message, and transmits it to the slave device 220. And it is possible to collect station number information from the slave device 220. In addition, the controller 300 may generate a station number table that can be referred to when the slave device 220 allocates a station number based on the station number information to the slave device 220. Also, the controller 300 may transmit a station number assignment message to the slave device 220 to control the slave device 220 to allocate the station number by itself based on the station number table.

또한, 본 발명의 일 실시예에 따라 네트워크 디바이스가 슬레이브 디바이스(220)인 경우, 제어기(300)는 마스터 디바이스(210)와 통신을 수행하고, 국번 요청 메시지에 응답하여 자신에게 할당된 국번 정보를 마스터 디바이스(210)로 전송한다.In addition, according to an embodiment of the present invention, when the network device is the slave device 220, the controller 300 communicates with the master device 210 and transmits station number information allocated to itself in response to the station number request message. It is transmitted to the master device 210.

또한, 제어기(300)는 국번 할당 메시지를 수신하는 경우 국번 테이블을 참조하여 현재 네트워크에서 사용되지 않는 국번을 스스로 할당하고 국번 할당 후 국번 테이블을 재구성한다. 이와 같이 재구성된 국번 테이블은 국번 할당이 완료되지 않은 상태에서는 인접한 슬레이브 디바이스(230)로 전송되어 모든 슬레이브 디바이스(220, 230, 240)에서 국번의 오류 없이 정상적인 국번 할당이 가능하도록 하며, 최종적으로는 마스터 디바이스(210)로 전송되어 마스터 디바이스(210)에서 국번 자동 할당을 통해 슬레이브 디바이스(220, 230, 240)에 할당된 국번 정보를 확인할 수 있도록 한다.In addition, when receiving the station number assignment message, the controller 300 refers to the station number table to allocate a station number that is not currently used in the network, and reconfigures the station number table after allocating the station number. The reorganized station number table is transmitted to the adjacent slave device 230 when the station number allocation is not completed, so that all slave devices 220, 230, 240 can allocate the station number without error of the station number, and finally It is transmitted to the master device 210 so that the master device 210 can check the station number information allocated to the slave devices 220, 230, and 240 through automatic assignment of the station number.

도 4는 본 발명의 다른 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면이다.4 is a diagram illustrating a method of automatically allocating station numbers in a RAPIEnet protocol according to another embodiment of the present invention.

이하, 도 4를 참조하여 라인 네트워크상 마스터 디바이스(210)를 기준으로 일방향으로만 복수의 슬레이브 디바이스가 연결되고, 슬레이브 디바이스의 국번이 자동 할당인 경우를 설명한다.Hereinafter, a case in which a plurality of slave devices are connected in only one direction with respect to the master device 210 on the line network and the station number of the slave device is automatically allocated will be described with reference to FIG. 4.

이때, 도 4에서는 도 3에서 설명한 것과는 달리, 라인 네트워크상 "0"국번이 아닌 다른 국번으로 미리 할당된 슬레이브 디바이스(230)가 있는 경우를 예를 들어 설명한다.In this case, in FIG. 4, unlike that described in FIG. 3, a case in which a slave device 230 previously allocated to a station number other than a station number "0" on the line network is present.

먼저, 마스터 디바이스(210)는 라인 네트워크로 연결된 복수의 슬레이브 디바이스(220, 230, 240)의 국번 정보를 확인하기 위해 국번 요청 메시지를 브로드캐스트(broadcast)(450)로 전송한다.First, the master device 210 transmits a station number request message to a broadcast 450 to check station number information of a plurality of slave devices 220, 230, and 240 connected through a line network.

이때, 도 4에서는 라인 네트워크의 PORT 0 방향으로만 슬레이브 디바이스(220, 230, 240)가 연결되어 있고, PORT 1 방향에 연결된 슬레이브 디바이스는 없으므로, 마스터 디바이스(210)는 PORT 0 방향으로만 국번 요청 메시지를 전송한다.At this time, in FIG. 4, since the slave devices 220, 230, and 240 are connected only in the PORT 0 direction of the line network, and there is no slave device connected in the PORT 1 direction, the master device 210 requests the station number only in the PORT 0 direction. Send the message.

그러면 각 슬레이브 디바이스(220, 230, 240)는 위와 같은 국번 요청 메시지에 응답하여 자신에게 할당된 국번 정보를 마스터 디바이스(210)로 전송한다.Then, each of the slave devices 220, 230, and 240 transmits the station number information allocated to itself to the master device 210 in response to the above station number request message.

이에 따라 마스터 디바이스(210)는 라인 네트워크상 연결된 모든 슬레이브 디바이스(220, 230, 240)에 할당된 국번 정보를 확인할 수 있게 된다.Accordingly, the master device 210 can check station number information allocated to all slave devices 220, 230, and 240 connected on the line network.

이때, 마스터 디바이스(210)는 슬레이브 디바이스(220, 230, 240)에 할당된 국번 중 "0"이 없는 경우, 이것은 모든 슬레이브 디바이스에 국번이 할당되어 있는 것을 의미하므로 국번 자동 할당 동작을 수행하지 않는다.At this time, if there is no "0" among the station numbers assigned to the slave devices 220, 230, and 240, the master device 210 does not perform the automatic station number assignment operation because it means that all slave devices are assigned station numbers. .

그러나, 마스터 디바이스(210)는 슬레이브 디바이스에 할당된 국번 중 "0"이 있는 경우, 이것은 국번이 할당되지 않은 슬레이브 디바이스가 존재하는 것을 의미하므로 국번 자동 할당 동작을 수행한다.However, if there is "0" among the station numbers allocated to the slave device, this means that there is a slave device to which the station number is not allocated, and thus performs an automatic station number assignment operation.

이하에서는, 국번 자동 할당 동작에 대해서 보다 상세히 설명하기로 한다.Hereinafter, the automatic station number assignment operation will be described in more detail.

국번 자동 할당 동작을 수행하는 경우, 마스터 디바이스(210)는 라인 네트워크의 PORT 0으로 국번 할당 메시지를 전송한다.When performing the automatic station number allocation operation, the master device 210 transmits a station number allocation message to PORT 0 of the line network.

이러한 국번 할당 메시지는 참조번호 (490)에서 도시된 바와 같은 국번 테이블(490)이 포함될 수 있다. 참조번호 (490)은 슬레이브 디바이스(220, 230, 240)의 국번 정보를 수집한 마스터 디바이스(210)에서 최초로 생성된 국번 테이블을 도시한 것이다. 목적지 국번은 "0"으로 설정되어 슬레이브 디바이스 중 국번 "0"번으로 설정된 슬레이브 디바이스가 "0"번 이외의 다른 국번으로 스스스 국번 할당을 수행하도록 한다. 현재 라인 네트워크상에 슬레이브 디바이스에 할당된 국번은 "0"번 외에 "2"번이 존재하므로, 국번 리스트 개수는 "2"로 설정되며, "0"번 국번에 해당하는 시작 국번과 마지막 국번은 "0"으로 설정되고, "2"번 국번에 해당하는 시작 국번과 마지막 국번은 "2"로 설정된 것을 알 수 있다.The station number assignment message may include a station number table 490 as shown by reference number 490. Reference numeral 490 denotes a station number table initially generated by the master device 210 that has collected the station number information of the slave devices 220, 230, and 240. The destination station number is set to "0" so that the slave device set to station number "0" among the slave devices performs self-station number assignment to a station number other than "0". Since there are "2" in addition to "0" as the station number assigned to the slave device on the current line network, the number of the station number list is set to "2", and the start station number and the last station number corresponding to the station number "0" are It is set as "0", and the start station number and the last station number corresponding to station number "2" are set to "2".

라인 네트워크상 제1 슬레이브 디바이스(220)는 위와 같은 국번 할당 메시지를 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message as described above, the first slave device 220 on the line network checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제1 슬레이브 디바이스(220)는 국번 할당 동작을 수행하며, 국번 테이블(490)상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if the own station number corresponds to the destination station number, the first slave device 220 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table 490, and Search the station number that can be assigned to

이때, 국번 테이블(490)상 국번 리스트 개수가 "2"이고 국번 리스트별 시작 국번과 마지막 국번이 "0"번과 "2"번이므로, 제1 슬레이브 디바이스(220)는 "0"번 국번과 "2"번 국번이 사용 중인 것을 확인할 수 있다.At this time, since the number of the station number list in the station number table 490 is "2" and the start and last station numbers for each station number list are "0" and "2", the first slave device 220 You can check that station number "2" is in use.

이에 따라, 제1 슬레이브 디바이스(220)는 "0"번 국번과 "2"번 국번이 사용 중이기 때문에 자신의 국번을 "1"로 할당한다.Accordingly, since the station numbers "0" and "2" are in use, the first slave device 220 allocates its own station number to "1".

위와 같이 국번을 할당한 경우, 제1 슬레이브 디바이스(220)는 자신에게 할당한 "1"국번에 해당하는 국번 리스트를 추가하여 국번 테이블을 재구성할 수 있다. 그러나, 이때, 자신에게 할당한 국번이 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우 제1 슬레이브 디바이스(220)는, 참조번호 (492)에서와 같이 국번 리스트를 하나로 통합하고 국번 리스트의 시작 국번과 마지막 국번을 마스터 디바이스(210)와 제1 슬레이브 디바이스(220), 제2 슬레이브 디바이스(220)에 할당된 국번이 모두 포함되도록 설정하여 국번 테이블(492)을 재구성한다. 이에 따라, 통합된 국번 리스트의 시작 국번은 마스터 디바이스(210)의 국번인 "0"번으로 설정되고 마지막 국번은 제2 슬레이브 디바이스(230)의 국번인 "2"번으로 설정된다.When the station number is allocated as described above, the first slave device 220 may reconfigure the station number table by adding a station number list corresponding to the station number "1" allocated to it. However, at this time, if the station number assigned to itself becomes a number consecutive to the station numbers registered in the station number list, the first slave device 220 unifies the station number list into one, as in reference number 492, and The station number table 492 is reconstructed by setting the start station number and the last station number to include all station numbers allocated to the master device 210, the first slave device 220, and the second slave device 220. Accordingly, the start station number of the integrated station number list is set to "0", which is the station number of the master device 210, and the last station number is set to "2", which is the station number of the second slave device 230.

이어, 제1 슬레이브 디바이스(220)는 국번 할당 메시지가 수신된 반대 방향의 제2 슬레이브 디바이스(230)로 국번 할당 메시지와 재구성된 국번 테이블(492)을 전송하게 된다.Subsequently, the first slave device 220 transmits the station number allocation message and the reconstructed station number table 492 to the second slave device 230 in the opposite direction from which the station number allocation message was received.

라인 네트워크상 제2 슬레이브 디바이스(230)는 제1 슬레이브 디바이스(220)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When the second slave device 230 receives the station number assignment message and the station number table from the first slave device 220 on the line network, it checks whether the station number currently set to itself corresponds to the destination station number.

이때, 제2 슬레이브 디바이스(230)는 이미 "2"번으로 국번이 할당된 상태여서 목적지 국번에 해당하지 않기 때문에 제2 슬레이브 디바이스(230)는 국번 할당 메시지를 처리하지 않고, 제3 슬레이브 디바이스(240)로 해당 국번 할당 메시지를 포워딩시키게 된다.At this time, the second slave device 230 does not process the station number assignment message and does not process the station number assignment message because the second slave device 230 has already been assigned a station number to "2" and does not correspond to the destination station number. 240), the corresponding station number assignment message is forwarded.

라인 네트워크상 제3 슬레이브 디바이스(240)는 제2 슬라이브 디바이스(230)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message and station number table from the second slave device 230 on the line network, the third slave device 240 checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제3 슬레이브 디바이스(240)는 국번 할당 동작을 수행하며, 국번 테이블(492)상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if its own station number corresponds to the destination station number, the third slave device 240 performs the station number allocation operation, and checks the station number already in use in the line network by referring to the station number list on the station number table 492. Search the station number that can be assigned to

이때, 국번 테이블(492)상 국번 리스트가 "1"이고 국번 리스트의 시작 국번은 "0"번, 마지막 국번은 "2"번이므로, 제3 슬레이브 디바이스(240)는 "0"번 국번부터 "2"번 국번까지 사용중인 것을 확인할 수 있다. 이에 따라, 제3 슬레이브 디바이스(240)는 마지막 국번으로 "2"번 국번이 사용 중이기 때문에 자신의 국번을 "3"으로 할당한다.At this time, since the station number list in the station number table 492 is "1", the start station number of the station number list is "0" and the last station number is "2", the third slave device 240 starts from "0" station number. You can check that the station number 2" is in use. Accordingly, the third slave device 240 allocates its own station number to "3" because station number "2" is in use as the last station number.

위와 같이 국번을 할당한 경우, 제3 슬레이브 디바이스(240)는 참조번호 (494)에서와 같이 국번 테이블(494)상 마지막 국번을 "3"로 설정하여 국번 테이블을 재구성한다.When the station number is assigned as above, the third slave device 240 reconfigures the station number table by setting the last station number in the station number table 494 to "3" as in reference number 494.

이때, 제3 슬레이브 디바이스(240)는 국번 할당 메시지가 수신된 반대 방향으로 더 이상 연결된 슬레이브 디바이스가 없으므로 재구성한 국번 테이블을 국번 할당 완료 메시지와 함께 마스터 디바이스로 전송한다.At this time, the third slave device 240 transmits the reconfigured station number table to the master device together with the station number allocation completion message since there is no longer a slave device connected in the opposite direction from which the station number allocation message was received.

이때, 국번 할당 완료 메시지에 포함된 목적지 국번이 "0"으로 설정되어 있기 때문에 국번 할당 동작을 통해 이미 "0"번이 아닌 다른 번호로 국번 할당된 제1 슬레이브 디바이스(220) 내지 제2 슬레이브 디바이스(230)는 국번 할당 완료 메시지를 처리하지 않고, 마스터 디바이스(210) 쪽으로 포워딩(Forwarding)시키게 된다.At this time, since the destination station number included in the station number allocation completion message is set to "0", the first slave device 220 to the second slave device that has already been assigned a station number other than "0" through the station number allocation operation. The 230 does not process the station number assignment complete message, but forwards the station number to the master device 210.

그러면, 마스터 디바이스(210)는 목적지 국번이 자신의 국번과 동일하게 때문에 국번 할당 완료 메시지를 수신한다. 이어, 마스터 디바이스(210)는 위와 같이 국번 할당 완료 메시지를 수신하는 경우, 라인 네트워크상 모든 슬레이브 디바이스(220, 230, 240)의 국번 자동 할당이 정상적으로 이루어진 것으로 판단하고, 국번 자동 할당 동작을 완료한다.Then, the master device 210 receives the station number assignment completion message because the destination station number is the same as its own station number. Subsequently, when receiving the station number assignment completion message as described above, the master device 210 determines that automatic station number assignment of all slave devices 220, 230, and 240 on the line network has been normally performed, and completes the automatic station number assignment operation. .

도 5는 본 발명의 다른 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면이다.5 is a diagram illustrating a method of automatically allocating station numbers in a RAPIEnet protocol according to another embodiment of the present invention.

이하, 도 5를 참조하여 라인 네트워크상 마스터 디바이스(210)를 기준으로 일방향으로만 복수의 슬레이브 디바이스(220, 230, 240)가 연결되고, 슬레이브 디바이스의 국번이 자동 할당인 경우를 설명한다.Hereinafter, a case in which a plurality of slave devices 220, 230, and 240 are connected only in one direction based on the master device 210 on the line network and the station number of the slave device is automatically assigned will be described with reference to FIG. 5.

이때, 도 5에서는 도 4에서 설명한 것과는 달리, 라인 네트워크상 마지막 슬레이브 디바이스(240)가 "0"국번이 아닌 다른 국번으로 미리 할당된 경우를 예를 들어 설명한다.In this case, in FIG. 5, unlike that described in FIG. 4, a case in which the last slave device 240 on the line network is previously allocated to a station number other than the “0” station number will be described as an example.

먼저, 마스터 디바이스(210)는 라인 네트워크로 연결된 복수의 슬레이브 디바이스(220, 230, 240)의 국번 정보를 확인하기 위해 국번 요청 메시지를 브로드캐스트(broadcast)(550)로 전송한다.First, the master device 210 transmits a station number request message to a broadcast 550 in order to check station number information of a plurality of slave devices 220, 230, and 240 connected through a line network.

이때, 도 5에서는 라인 네트워크의 PORT 0 방향으로만 슬레이브 디바이스(220, 230, 240)가 연결되어 있고, PORT 1 방향에 연결된 슬레이브 디바이스는 없으므로, 마스터 디바이스(210)는 PORT 0 방향으로만 국번 요청 메시지를 전송한다.In this case, in FIG. 5, since the slave devices 220, 230, and 240 are connected only in the direction of PORT 0 of the line network, and there is no slave device connected in the direction of PORT 1, the master device 210 requests the station number only in the direction of PORT 0. Send the message.

그러면 각 슬레이브 디바이스(220, 230, 240)는 위와 같은 국번 요청 메시지에 응답하여 자신에게 할당된 국번 정보를 마스터 디바이스(210)로 전송한다.Then, each of the slave devices 220, 230, and 240 transmits the station number information allocated to itself to the master device 210 in response to the above station number request message.

이에 따라 마스터 디바이스(210)는 라인 네트워크상 연결된 모든 슬레이브 디바이스(220, 230, 240)에 할당된 국번 정보를 확인할 수 있게 된다.Accordingly, the master device 210 can check station number information allocated to all slave devices 220, 230, and 240 connected on the line network.

이때, 마스터 디바이스(210)는 슬레이브 디바이스(220, 230, 240)에 할당된 국번 중 "0"이 없는 경우, 이것은 모든 슬레이브 디바이스에 국번이 할당되어 있는 것을 의미하므로 국번 자동 할당 동작을 수행하지 않는다.At this time, if there is no "0" among the station numbers assigned to the slave devices 220, 230, and 240, the master device 210 does not perform the automatic station number assignment operation because it means that all slave devices are assigned station numbers. .

그러나, 마스터 디바이스(210)는 슬레이브 디바이스에 할당된 국번 중 "0"이 있는 경우, 이것은 국번이 할당되지 않은 슬레이브 디바이스가 존재하는 것을 의미하므로 국번 자동 할당 동작을 수행한다.However, if there is "0" among the station numbers allocated to the slave device, this means that there is a slave device to which the station number is not allocated, and thus performs an automatic station number assignment operation.

이하에서는, 국번 자동 할당 동작에 대해서 보다 상세히 설명하기로 한다.Hereinafter, the automatic station number assignment operation will be described in more detail.

국번 자동 할당 동작을 수행하는 경우, 마스터 디바이스(210)는 라인 네트워크의 PORT 0으로 국번 할당 메시지를 전송한다.When performing the automatic station number allocation operation, the master device 210 transmits a station number allocation message to PORT 0 of the line network.

이러한 국번 할당 메시지는 참조번호 (590)에서 도시된 바와 같은 국번 테이블이 포함될 수 있다. 참조번호 (590)은 슬레이브 디바이스(220, 230, 240)의 국번 정보를 수집한 마스터 디바이스(210)에서 최초로 생성된 국번 테이블을 도시한 것이다. 목적지 국번은 "0"으로 설정되어 슬레이브 디바이스 중 국번 "0"번으로 설정된 슬레이브 디바이스가 "0"번 이외의 다른 국번으로 국번 할당을 수행하도록 한다. 현재 라인 네트워크상에 슬레이브에 할당된 국번은 "0"번 외에 "3"번이 존재하므로, 국번 리스트 개수는 "2"로 설정되며, "0"번 국번에 해당하는 국번 리스트의 시작 국번과 마지막 국번은 "0"으로 설정되고, "3"번 국번에 해당하는 국번 리스트의 시작 국번과 마지막 국번은 "3"으로 설정된 것을 알 수 있다.This station number assignment message may include a station number table as shown by reference numeral 590. Reference numeral 590 denotes a station number table initially generated by the master device 210 that has collected the station number information of the slave devices 220, 230, and 240. The destination station number is set to "0" so that the slave device set to station number "0" among the slave devices is assigned to a station number other than "0". As the station number assigned to the slave on the current line network exists as "3" in addition to "0", the number of the station number list is set to "2", and the start and end of the station number list corresponding to the station number "0" It can be seen that the station number is set to "0", and the start station number and the last station number in the station number list corresponding to station number "3" are set to "3".

라인 네트워크상 제1 슬레이브 디바이스(220)는 위와 같은 국번 할당 메시지를 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message as described above, the first slave device 220 on the line network checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제1 슬레이브 디바이스(220)는 국번 할당 동작을 수행하며, 국번 테이블상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, when its own station number corresponds to the destination station number, the first slave device 220 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table and assigns it to itself. Search for an available station number.

이때, 국번 테이블(590)상 국번 리스트 개수가 "2"이고 국번 리스트별 시작 국번과 마지막 국번이 각각 "0"번과 "3"번이므로, 제1 슬레이브 디바이스(220)는 "0"번 국번과 "3"번 국번이 사용 중인 것을 확인할 수 있다.At this time, since the number of the station number list in the station number table 590 is "2" and the start station number and the last station number for each station number list are "0" and "3", respectively, the first slave device 220 is the station number "0". And station number "3" are in use.

이에 따라, 제1 슬레이브 디바이스(220)는 "0"번 국번과 "3"번 국번이 사용 중이기 때문에 자신의 국번을 "1"로 할당한다.Accordingly, the first slave device 220 allocates its own station number to "1" because station numbers "0" and "3" are in use.

위와 같이 국번을 할당한 경우, 제1 슬레이브 디바이스(220)는 자신에게 할당한 "1"국번에 해당하는 국번 리스트를 추가하여 국번 테이블을 재구성할 수 있다. 그러나, 이때, 자신에게 할당한 국번이 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우 제1 슬레이브 디바이스(220)는 참조번호 (592)에서와 같이 국번 리스트를 하나로 통합하고 국번 리스트의 시작 국번과 마지막 국번을 마스터 디바이스(210)와 제1 슬레이브 디바이스(220)에 할당된 국번이 모두 포함되도록 설정하여 국번 테이블(592)을 재구성한다. 이에 따라, 통합된 국번 리스트의 시작 국번은 마스터 디바이스(210)의 국번인 "0"번으로 설정되고 마지막 국번은 제1 슬레이브 디바이스(220)의 국번인 "1"번으로 설정된다. 또한, 이때, "3"번 국번은 연속된 숫자가 아니므로 "3"번으로 국번이 설정된 제3 슬레이브 디바이스(240)에 대한 국번 리스트는 통합시키지 않고 그대로 남겨지게 된다. When the station number is allocated as described above, the first slave device 220 may reconfigure the station number table by adding a station number list corresponding to the station number "1" allocated to it. However, in this case, if the station number assigned to itself becomes a number consecutive to the station numbers registered in the station number list, the first slave device 220 unifies the station number list into one as in reference number 592 and starts the station number list. The station number table 592 is reconfigured by setting the station number and the last station number to include all the station numbers assigned to the master device 210 and the first slave device 220. Accordingly, the start station number of the integrated station number list is set to "0", which is the station number of the master device 210, and the last station number is set to "1", which is the station number of the first slave device 220. Also, at this time, since the station number "3" is not a continuous number, the station number list for the third slave device 240 whose station number is set to "3" is not integrated and is left as it is.

이어, 제1 슬레이브 디바이스(220)는 국번 할당 메시지가 수신된 반대 방향의 제2 슬레이브 디바이스(230)로 국번 할당 메시지와 재구성된 국번 테이블(592)을 전송하게 된다.Subsequently, the first slave device 220 transmits the station number allocation message and the reconstructed station number table 592 to the second slave device 230 in the opposite direction from which the station number allocation message was received.

라인 네트워크상 제2 슬레이브 디바이스(230)는 제1 슬레이브 디바이스(220)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When the second slave device 230 receives the station number assignment message and the station number table from the first slave device 220 on the line network, it checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제2 슬레이브 디바이스(220)는 국번 할당 동작을 수행하며, 국번 테이블(592)상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if the own station number corresponds to the destination station number, the second slave device 220 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table 592, and Search the station number that can be assigned to

이때, 국번 테이블(592)상 국번 리스트 개수가 "2"이고 국번 리스트별 시작 국번과 마지막 국번이 각각 "0"번과 "1"번, 그리고 "3"번이므로, 제2 슬레이브 디바이스(230)는 "0"번 국번과 "1"번 국번, 그리고 "3"번 국번이 사용 중인 것을 확인할 수 있다. 이에 따라, 제2 슬레이브 디바이스(230)는 "0"번 국번, "1"번 국번 및 "3"번 국번이 사용 중이기 때문에 자신의 국번을 "2"로 할당한다.At this time, since the number of the station number list in the station number table 592 is "2" and the start station number and the last station number for each station number list are "0", "1", and "3", respectively, the second slave device 230 Can check that station number "0", station number "1" and station number "3" are in use. Accordingly, the second slave device 230 allocates its own station number to "2" because station numbers "0", "1", and "3" are being used.

위와 같이 국번을 할당한 경우, 제2 슬레이브 디바이스(230)는 자신에게 할당한 "2"국번에 해당하는 국번 리스트를 추가하여 국번 테이블을 재구성할 수 있다. 그러나, 이때, 자신에게 할당한 국번이 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우, 제2 슬레이브 디바이스(230)는 참조번호 (594)에서와 같이 국번 리스트를 하나로 통합하고 국번 리스트의 시작 국번과 마지막 국번을 마스터 디바이스(210)와 제1 슬레이브 디바이스(220), 제2 슬레이브 디바이스(220), 제3 슬레이브 디바이스(240)에 할당된 국번이 모두 포함되도록 설정하여 국번 테이블(594)을 재구성한다. 이에 따라, 통합된 국번 리스트의 시작 국번은 마스터 디바이스(210)의 국번인 "0"번으로 설정되고 마지막 국번은 제3 슬레이브 디바이스(240)의 국번인 "3"번으로 설정된다.When the station number is allocated as described above, the second slave device 230 may reconfigure the station number table by adding a station number list corresponding to the station number "2" allocated to it. However, in this case, if the station number assigned to itself becomes a number consecutive to the station numbers registered in the station number list, the second slave device 230 unifies the station number list into one as in reference number 594 and The station number table 594 by setting the start station number and the last station number to include all station numbers allocated to the master device 210, the first slave device 220, the second slave device 220, and the third slave device 240. Reconstruct Accordingly, the start station number of the integrated station number list is set to "0", which is the station number of the master device 210, and the last station number is set to "3", which is the station number of the third slave device 240.

이어, 제2 슬레이브 디바이스(230)는 국번 할당 메시지가 수신된 반대 방향의 제3 슬레이브 디바이스(240)로 국번 할당 메시지와 재구성된 국번 테이블(594)을 전송하게 된다.Subsequently, the second slave device 230 transmits the station number allocation message and the reconstructed station number table 594 to the third slave device 240 in the opposite direction from which the station number allocation message was received.

라인 네트워크상 제3 슬레이브 디바이스(240)는 제2 슬레이브 디바이스(230)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message and station number table from the second slave device 230 on the line network, the third slave device 240 checks whether the station number currently set to itself corresponds to the destination station number.

이때, 제3 슬레이브 디바이스(240)는 이미 "3"번으로 국번이 할당된 상태여서 목적지 국번에 해당하지 않기 때문에 제3 슬레이브 디바이스(240)는 국번 할당 메시지를 처리하지 않는다. 또한, 이때 제3 슬레이브 디바이스(240)는 국번 할당 메시지가 수신된 반대 방향으로 더 이상 연결된 슬레이브 디바이스가 없으므로 제2 슬레이브 디바이스(230)로부터 수신한 국번 테이블(594)을 국번 할당 완료 메시지와 함께 마스터 디바이스로 전송한다.At this time, the third slave device 240 does not process the station number assignment message because the third slave device 240 has already been assigned a station number to "3" and does not correspond to the destination station number. In addition, at this time, since the third slave device 240 no longer has a slave device connected in the opposite direction from which the station number assignment message was received, the station number table 594 received from the second slave device 230 is mastered together with the station number assignment completion message. To the device.

이때, 국번 할당 완료 메시지에 포함된 목적지 국번이 "0"으로 설정되어 있기 때문에 국번 할당 동작을 통해 이미 "0"번이 아닌 다른 번호로 국번 할당된 제1 슬레이브 디바이스(220) 내지 제2 슬레이브 디바이스(230)는 국번 할당 완료 메시지를 처리하지 않고, 마스터 디바이스(210) 쪽으로 포워딩(Forwarding)시키게 된다.At this time, since the destination station number included in the station number allocation completion message is set to "0", the first slave device 220 to the second slave device that has already been assigned a station number other than "0" through the station number allocation operation. The 230 does not process the station number assignment complete message, but forwards the station number to the master device 210.

그러면, 마스터 디바이스(210)는 목적지 국번이 자신의 국번과 동일하게 때문에 국번 할당 완료 메시지를 수신한다. 이어, 마스터 디바이스(210)는 위와 같이 국번 할당 완료 메시지를 수신하는 경우, 라인 네트워크상 모든 슬레이브 디바이스(220, 230, 240)의 국번 자동 할당이 정상적으로 이루어진 것으로 판단하고, 국번 자동 할당 동작을 완료한다.Then, the master device 210 receives the station number assignment completion message because the destination station number is the same as its own station number. Subsequently, when receiving the station number assignment completion message as described above, the master device 210 determines that automatic station number assignment of all slave devices 220, 230, and 240 on the line network has been normally performed, and completes the automatic station number assignment operation. .

도 6a 내지 도 6d는 본 발명의 다른 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면이다.6A to 6D are diagrams illustrating a method of automatically allocating station numbers in the RAPIEnet protocol according to another embodiment of the present invention.

이하, 도 6a 내지 도 6d를 참조하여 라인 네트워크상 마스터 디바이스(210)를 기준으로 양방향으로 복수의 슬레이브 디바이스(220, 230, 240, 250, 260, 270)가 연결되고, 슬레이브 디바이스의 국번이 자동 할당인 경우를 설명한다.Hereinafter, a plurality of slave devices 220, 230, 240, 250, 260, 270 are connected in both directions based on the master device 210 on the line network with reference to FIGS. 6A to 6D, and the station number of the slave device is automatically The case of assignment will be described.

이때, 도 6a 내지 도 6d에서는 라인 네트워크상 PORT 0방향으로 "0"국번이 아닌 다른 국번으로 미리 할당된 슬레이브 디바이스가 있는 경우를 예를 들어 설명한다.In this case, in FIGS. 6A to 6D, a case where there is a slave device previously allocated to a station number other than a station number "0" in the PORT 0 direction on the line network will be described as an example.

먼저, 도 6a를 참조하면, 마스터 디바이스(210)는 라인 네트워크로 연결된 복수의 슬레이브 디바이스(220, 230, 240, 250, 260, 270)의 국번 정보를 확인하기 위해 국번 요청 메시지를 브로드캐스트(broadcast)(650, 652)로 전송한다.First, referring to FIG. 6A, the master device 210 broadcasts a station number request message to check station number information of a plurality of slave devices 220, 230, 240, 250, 260, 270 connected through a line network. ) (650, 652).

이때, 도 6a에서는 라인 네트워크의 PORT 0과 PORT 1 방향으로 모두 슬레이브 디바이스(220, 230, 240, 250, 260, 270)가 존재하기 때문에 마스터 디바이스(210)는 PORT 0, PORT 1 양방향으로 국번 요청 메시지를 전송한다.In this case, in FIG. 6A, since slave devices 220, 230, 240, 250, 260, 270 exist in both the PORT 0 and PORT 1 directions of the line network, the master device 210 requests the station number in both directions of PORT 0 and PORT 1. Send the message.

그러면 PORT 0과 PORT 1 방향에 연결된 각 슬레이브 디바이스(220, 230, 240, 250, 260, 270)는 위와 같은 국번 요청 메시지에 응답하여 자신에게 할당된 국번 정보를 마스터 디바이스(210)로 전송한다.Then, the slave devices 220, 230, 240, 250, 260, and 270 connected to the PORT 0 and PORT 1 directions transmit station number information allocated to themselves to the master device 210 in response to the station number request message as described above.

이에 따라 마스터 디바이스(210)는 라인 네트워크상 양방향으로 연결된 모든 슬레이브 디바이스(220, 230, 240, 250, 260, 270)에 할당된 국번 정보를 확인할 수 있게 된다.Accordingly, the master device 210 can check station number information allocated to all slave devices 220, 230, 240, 250, 260, and 270 connected in both directions on the line network.

이때, 마스터 디바이스(210)는 슬레이브 디바이스(220, 230, 240, 250, 260, 270)에 할당된 국번 중 "0"이 없는 경우, 이것은 모든 슬레이브 디바이스에 국번이 할당되어 있는 것을 의미하므로 국번 자동 할당 동작을 수행하지 않는다.At this time, if the master device 210 does not have "0" among the station numbers allocated to the slave devices 220, 230, 240, 250, 260, 270, this means that all slave devices are assigned station numbers. Do not perform the assignment operation.

그러나, 마스터 디바이스(210)는 슬레이브 디바이스에 할당된 국번 중 "0"이 있는 경우, 이것은 국번이 할당되지 않은 슬레이브 디바이스가 존재하는 것을 의미하므로 국번 자동 할당 동작을 수행한다.However, if there is "0" among the station numbers allocated to the slave device, this means that there is a slave device to which the station number is not allocated, and thus performs an automatic station number assignment operation.

이하에서는, 도 6b 내지 도 6d를 참조하여 국번 자동 할당 동작에 대해서 보다 상세히 설명하기로 한다.Hereinafter, the automatic station number allocation operation will be described in more detail with reference to FIGS. 6B to 6D.

국번 자동 할당 동작을 수행하는 경우, 마스터 디바이스(210)는 라인 네트워크의 PORT 0으로 국번 할당 메시지를 전송한다.When performing the automatic station number allocation operation, the master device 210 transmits a station number allocation message to PORT 0 of the line network.

이러한 국번 할당 메시지는 참조번호 (690)에서 도시된 바와 같은 국번 테이블(690)이 포함될 수 있다. 참조번호 (690)은 슬레이브 디바이스의 국번 정보를 수집한 마스터 디바이스(210)에서 최초로 생성된 국번 테이블을 도시한 것이다. 목적지 국번은 "0"으로 설정되어 슬레이브 디바이스 중 국번이 "0"번으로 설정된 슬레이브 디바이스가 "0"번 이외의 다른 국번으로 국번 할당을 수행하도록 한다. 현재 라인 네트워크상 PORT 1 방향으로는 슬레이브 디바이스에 할당된 국번이 "0"번 외에 "2"번이 존재하므로, 국번 리스트 개수는 "2"로 설정되며, "0"번 국번에 해당하는 국번 리스트의 시작 국번과 마지막 국번은 "0"으로 설정되고, "2"번 국번에 해당하는 국번 리스트의 시작 국번과 마지막 국번은 "2"로 설정된 것을 알 수 있다.This station number assignment message may include a station number table 690 as shown by reference number 690. Reference number 690 denotes a station number table initially generated by the master device 210 that has collected station number information of the slave device. The destination station number is set to "0" so that the slave device whose station number is set to "0" among the slave devices is assigned to a station number other than "0". In the PORT 1 direction on the current line network, the number of station number list is set to "2" because the station number assigned to the slave device is "2" in addition to "0", the station number list corresponding to the station number "0" You can see that the start station number and the last station number of are set to "0", and the start station number and the last station number of the station number list corresponding to station number "2" are set to "2".

라인 네트워크상 제1 슬레이브 디바이스(220)는 위와 같은 국번 할당 메시지를 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message as described above, the first slave device 220 on the line network checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제1 슬레이브 디바이스(220)는 국번 할당 동작을 수행하며, 국번 테이블상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, when its own station number corresponds to the destination station number, the first slave device 220 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table and assigns it to itself. Search for an available station number.

이때, 국번 테이블(690)상 국번 리스트 개수가 "2"이고 국번 리스트별 시작 국번과 마지막 국번이 각각 "0"번과 "2"번이므로, 제1 슬레이브 디바이스(220)는 "0"번 국번과 "2"번 국번이 사용 중인 것을 확인할 수 있다.At this time, since the number of the station number list in the station number table 690 is "2" and the start station number and the last station number for each station number list are "0" and "2", respectively, the first slave device 220 is the station number "0". And station number "2" are in use.

이에 따라, 제1 슬레이브 디바이스(220)는 "0"번 국번과 "2"번 국번이 사용 중이기 때문에 자신의 국번을 "1"로 할당한다.Accordingly, since the station numbers "0" and "2" are in use, the first slave device 220 allocates its own station number to "1".

위와 같이 국번을 할당한 경우, 제1 슬레이브 디바이스(220)는 자신에게 할당한 "1"국번에 해당하는 국번 리스트를 추가하여 국번 테이블을 재구성할 수 있다. 그러나, 이때, 자신에게 할당한 국번이 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우, 제1 슬레이브 디바이스(220)는 참조번호 (692)에서와 같이 국번 리스트를 하나로 통합하고 국번 리스트의 시작 국번과 마지막 국번을 마스터 디바이스(210)와 제1 슬레이브 디바이스(220), 제2 슬레이브 디바이스(230)에 할당된 국번이 모두 포함되도록 설정하여 국번 테이블(692)을 재구성한다. 이에 따라, 통합된 국번 리스트의 시작 국번은 마스터 디바이스(210)의 국번인 "0"번으로 설정되고 마지막 국번은 제2 슬레이브 디바이스(230)의 국번인 "2"번으로 설정된다.When the station number is allocated as described above, the first slave device 220 may reconfigure the station number table by adding a station number list corresponding to the station number "1" allocated to it. However, at this time, if the station number assigned to itself becomes a number consecutive to the station numbers registered in the station number list, the first slave device 220 unifies the station number list into one as shown in reference number 692 and The station number table 692 is reconfigured by setting the start station number and the last station number to include all station numbers allocated to the master device 210, the first slave device 220, and the second slave device 230. Accordingly, the start station number of the integrated station number list is set to "0", which is the station number of the master device 210, and the last station number is set to "2", which is the station number of the second slave device 230.

이어, 제1 슬레이브 디바이스(220)는 국번 할당 메시지가 수신된 반대 방향의 제2 슬레이브 디바이스(230)로 국번 할당 메시지와 재구성된 국번 테이블을 전송하게 된다.Subsequently, the first slave device 220 transmits the station number allocation message and the reconstructed station number table to the second slave device 230 in the opposite direction from which the station number allocation message was received.

라인 네트워크상 제2 슬레이브 디바이스(230)는 제1 슬레이브 디바이스(220)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When the second slave device 230 receives the station number assignment message and the station number table from the first slave device 220 on the line network, it checks whether the station number currently set to itself corresponds to the destination station number.

이때, 제2 슬레이브 디바이스(230)는 이미 "2"번으로 국번이 할당된 상태여서 목적지 국번에 해당하지 않기 때문에 제2 슬레이브 디바이스(230)는 국번 할당 메시지를 처리하지 않고, 제3 슬레이브 디바이스(240)로 해당 국번 할당 메시지를 포워딩시키게 된다.At this time, the second slave device 230 does not process the station number assignment message and does not process the station number assignment message because the second slave device 230 has already been assigned a station number to "2" and does not correspond to the destination station number. 240), the corresponding station number assignment message is forwarded.

라인 네트워크상 제3 슬레이브 디바이스(240)는 제2 슬라이브 디바이스(230)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message and station number table from the second slave device 230 on the line network, the third slave device 240 checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제3 슬레이브 디바이스(240)는 국번 할당 동작을 수행하며, 국번 테이블(692)상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if the own station number corresponds to the destination station number, the third slave device 240 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table 692 Search the station number that can be assigned to

이때, 국번 테이블상 국번 리스트가 "1"이고 국번 리스트의 시작 국번은 "0"번, 마지막 국번은 "2"번이므로, 제3 슬레이브 디바이스(240)는 "0"번 국번부터 "2"번 국번까지 사용중인 것을 확인할 수 있다. 이에 따라, 제3 슬레이브 디바이스(240)는 마지막 국번으로 "2"번 국번이 사용 중이기 때문에 자신의 국번을 "3"으로 할당한다.At this time, since the station number list on the station number table is "1", the starting station number of the station number list is "0", and the last station number is "2", the third slave device 240 starts from station number "0" to "2". You can check that the station number is in use. Accordingly, the third slave device 240 allocates its own station number to "3" because station number "2" is in use as the last station number.

위와 같이 국번을 할당한 경우, 제3 슬레이브 디바이스(240)는 참조번호 (694)에서와 같이 국번 테이블(694)상 마지막 국번을 "3"으로 설정하여 국번 테이블을 재구성한다.When the station number is allocated as above, the third slave device 240 reconfigures the station number table by setting the last station number in the station number table 694 to "3" as in reference number 694.

이때, 제3 슬레이브 디바이스(240)는 국번 할당 메시지가 수신된 반대 방향으로 더 이상 연결된 슬레이브 디바이스가 없으므로 재구성한 국번 테이블을 국번 할당 완료 메시지와 함께 마스터 디바이스로 전송한다.At this time, the third slave device 240 transmits the reconfigured station number table to the master device together with the station number allocation completion message since there is no longer a slave device connected in the opposite direction from which the station number allocation message was received.

이때, 국번 할당 완료 메시지에 포함된 목적지 국번이 "0"으로 설정되어 있기 때문에 국번 할당 동작을 통해 이미 "0"번이 아닌 다른 번호로 국번 할당된 제1 슬레이브 디바이스(220) 내지 제2 슬레이브 디바이스(230)는 국번 할당 완료 메시지를 처리하지 않고, 마스터 디바이스(210) 쪽으로 포워딩(Forwarding)시키게 된다.At this time, since the destination station number included in the station number allocation completion message is set to "0", the first slave device 220 to the second slave device that has already been assigned a station number other than "0" through the station number allocation operation. The 230 does not process the station number assignment complete message, but forwards the station number to the master device 210.

그러면, 마스터 디바이스(210)는 목적지 국번이 자신의 국번과 동일하게 때문에 국번 할당 완료 메시지를 수신한다. 이어, 마스터 디바이스(210)는 위와 같이 국번 할당 완료 메시지를 수신하는 경우, 라인 네트워크상 PORT 0 방향에 연결된 슬레이브 디바이스들(220, 230, 240)의 국번 자동 할당이 정상적으로 이루어진 것으로 판단하고, PORT 0 방향에 대한 국번 자동 할당 동작을 완료한다.Then, the master device 210 receives the station number assignment completion message because the destination station number is the same as its own station number. Subsequently, when receiving the station number assignment completion message as described above, the master device 210 determines that the automatic assignment of the station numbers of the slave devices 220, 230, 240 connected in the PORT 0 direction on the line network has been normally performed, and the PORT 0 The automatic station number assignment operation for the direction is completed.

위와 같이 PORT 0 방향에 대한 국번 자동 할당 동작을 완료한 경우, 마스터 디바이스(210)는 다시 라인 네트워크의 PORT 1 방향으로 국번 할당 메시지를 전송한다.When the automatic station number assignment operation for the PORT 0 direction is completed as above, the master device 210 transmits the station number assignment message again in the PORT 1 direction of the line network.

이때, 마스터 디바이스(210)는 PORT 1 방향에 "10"번으로 국번 할당된 슬레이브 디바이스(250)가 존재하므로, PORT 0 방향에서 수신된 국번 테이블(694)에 "10"번 국번의 슬레이브 디바이스(250)에 대한 정보가 포함되도록 국번 테이블(696)을 재구성하여 전송한다.At this time, since the master device 210 has a slave device 250 assigned a station number "10" in the PORT 1 direction, the slave device of station number "10" in the station number table 694 received in the PORT 0 direction ( The station number table 696 is reconstructed and transmitted to include information about 250).

라인 네트워크상 제4 슬레이브 디바이스(250)는 위와 같은 국번 할당 메시지를 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message as described above, the fourth slave device 250 on the line network checks whether the station number currently set to itself corresponds to the destination station number.

이때, 제4 슬레이브 디바이스(250)는 이미 "10"번으로 국번이 할당된 상태여서 목적지 국번에 해당하지 않기 때문에 제4 슬레이브 디바이스(250)는 국번 할당 메시지를 처리하지 않고, 제5 슬레이브 디바이스(260)로 해당 국번 할당 메시지를 포워딩시키게 된다.At this time, the fourth slave device 250 does not process the station number assignment message because the fourth slave device 250 has already assigned a station number to “10” and does not correspond to the destination station number. 260), the corresponding station number assignment message is forwarded.

라인 네트워크상 제5 슬레이브 디바이스(260)는 제4 슬라이브 디바이스(250)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message and station number table from the fourth slave device 250 on the line network, the fifth slave device 260 checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제5 슬레이브 디바이스(260)는 국번 할당 동작을 수행하며, 국번 테이블(696)상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if the own station number corresponds to the destination station number, the fifth slave device 260 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table 696, and Search the station number that can be assigned to

이때, 국번 테이블상 국번 리스트가 "2"이고 국번 리스트별 마지막 국번이 각각 "3"번과 "10"번이므로 제5 슬레이브 디바이스(260)는 "0"번 국번부터 "3"번 국번, 그리고 "10"번 국번이 사용 중인 것을 확인할 수 있다.At this time, since the station number list on the station number table is "2" and the last station number for each station number list is "3" and "10", respectively, the fifth slave device 260 starts with station number "0" to station number "3", and You can check that station number "10" is in use.

이에 따라, 제5 슬레이브 디바이스(260)는 "0"번 국번부터 "3"번 국번까지 사용 중이고, "10"번 국번이 사용 중이기 때문에 자신의 국번을 "4"로 할당한다.Accordingly, the fifth slave device 260 is in use from station number "0" to station number "3" and assigns its own station number to "4" because station number "10" is in use.

위와 같이 국번을 할당한 경우, 제5 슬레이브 디바이스(260)는 자신에게 할당한 "4"국번에 해당하는 국번 리스트를 추가하여 국번 테이블을 재구성할 수 있다. 그러나, 이때, 자신에게 할당한 국번이 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우, 제5 슬레이브 디바이스(260)는 참조번호 (698)에서와 같이 국번 리스트를 하나로 통합하고 국번 리스트의 시작 국번과 마지막 국번을 마스터 디바이스(210)와 제5 슬레이브 디바이스(260)에 할당된 국번이 모두 포함되도록 설정하여 국번 테이블(698)을 재구성한다. 이에 따라, 통합된 국번 리스트의 시작 국번은 마스터 디바이스(210)의 국번인 "0"번으로 설정되고 마지막 국번은 제5 슬레이브 디바이스(260)의 국번인 "4"번으로 설정된다. 또한, 이때, 제4 슬레이브 디바이스(250)에 할당된 "10"번 국번은 연속된 숫자가 아니므로 "10"번으로 국번이 설정된 제4 슬레이브 디바이스(250)에 대한 국번 리스트는 통합시키지 않고 그대로 남겨지게 된다. When the station number is allocated as described above, the fifth slave device 260 may reconfigure the station number table by adding a station number list corresponding to the station number "4" allocated to it. However, at this time, if the station number assigned to itself becomes a number consecutive to the station numbers registered in the station number list, the fifth slave device 260 unifies the station number list into one as in reference number 698 and The station number table 698 is reconstructed by setting the start station number and the last station number to include all station numbers assigned to the master device 210 and the fifth slave device 260. Accordingly, the start station number of the integrated station number list is set to "0", which is the station number of the master device 210, and the last station number is set to "4", which is the station number of the fifth slave device 260. Also, at this time, since the station number "10" assigned to the fourth slave device 250 is not a continuous number, the station number list for the fourth slave device 250, which is set to "10", is not integrated. Will be left.

이어, 제5 슬레이브 디바이스(260)는 국번 할당 메시지가 수신된 반대 방향의 제6 슬레이브 디바이스(270)로 국번 할당 메시지와 재구성된 국번 테이블(698)을 전송하게 된다.Subsequently, the fifth slave device 260 transmits the station number allocation message and the reconstructed station number table 698 to the sixth slave device 270 in the opposite direction from which the station number allocation message was received.

라인 네트워크상 제6 슬레이브 디바이스(270)는 제5 슬레이브 디바이스(260)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message and station number table from the fifth slave device 260 on the line network, the sixth slave device 270 checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제6 슬레이브 디바이스(270)는 국번 할당 동작을 수행하며, 국번 테이블상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if its own station number corresponds to the destination station number, the sixth slave device 270 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table and assigns it to itself. Search for an available station number.

이때, 국번 테이블상 국번 리스트 개수가 "2"이고 국번 리스트별 시작 국번과 마지막 국번이 각각 "0"번과 "4"번, 그리고 "10"번이므로 제6 슬레이브 디바이스(270)는 "0"번 국번부터 "4"번 국번, 그리고 "10"번 국번이 사용 중인 것을 확인할 수 있다. 이에 따라, 제6 슬레이브 디바이스(270)는 "0"번 국번부터 "4"번 국번 및 "10"번 국번이 사용 중이기 때문에 자신의 국번을 "5"로 할당한다.At this time, since the number of the station number list on the station number table is "2", and the start station number and the last station number for each station number list are "0", "4", and "10", respectively, the sixth slave device 270 is "0". From station number, you can see that station number "4" and station number "10" are in use. Accordingly, the sixth slave device 270 allocates its own station number to "5" since station numbers "4" and "10" are being used from station numbers "0".

위와 같이 국번을 할당한 경우, 제6 슬레이브 디바이스(270)는 자신에게 할당한 "5"국번에 해당하는 국번 리스트를 추가하여 국번 테이블을 재구성할 수 있다. 그러나, 이때, 자신에게 할당한 국번이 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우, 제6 슬레이브 디바이스(270)는 참조번호 (699)에서와 같이 국번 리스트를 하나로 통합하고 국번 리스트의 시작 국번과 마지막 국번을 마스터 디바이스(210)와 제1 슬레이브 디바이스(220), 제2 슬레이브 디바이스(230), 제3 슬레이브 디바이스(240), 제5 슬레이브 디바이스(260)에 할당된 국번이 모두 포함되도록 설정하여 국번 테이블(699)을 재구성한다. 이에 따라, 통합된 국번 리스트의 시작 국번은 마스터 디바이스(210)의 국번인 "0"번으로 설정되고 마지막 국번은 제6 슬레이브 디바이스(270)의 국번인 "5"번으로 설정된다.When the station number is allocated as described above, the sixth slave device 270 may reconfigure the station number table by adding a station number list corresponding to the station number "5" allocated to it. However, at this time, if the station number assigned to itself becomes a number consecutive to the station numbers registered in the station number list, the sixth slave device 270 unifies the station number list into one as shown in reference number 699, and The station numbers allocated to the master device 210, the first slave device 220, the second slave device 230, the third slave device 240, and the fifth slave device 260 are all included in the start station number and the last station number. It is set so that the station number table 699 is reconstructed. Accordingly, the start station number of the integrated station number list is set to "0", which is the station number of the master device 210, and the last station number is set to "5", which is the station number of the sixth slave device 270.

또한, 이때, 제4 슬레이브 디바이스(250)에 할당된 "10"번 국번은 연속된 숫자가 아니므로 "10"번으로 국번이 설정된 제4 슬레이브 디바이스(250)에 대한 국번 리스트는 통합시키지 않고 그대로 남겨지게 된다. Also, at this time, since the station number "10" assigned to the fourth slave device 250 is not a continuous number, the station number list for the fourth slave device 250, which is set to "10", is not integrated. Will be left.

이때, 제6 슬레이브 디바이스(270)는 국번 할당 메시지가 수신된 반대 방향으로 더 이상 연결된 슬레이브 디바이스가 없으므로 재구성한 국번 테이블을 국번 할당 완료 메시지와 함께 마스터 디바이스(210)로 전송한다.At this time, the sixth slave device 270 transmits the reconfigured station number table to the master device 210 together with the station number allocation completion message because there is no longer a slave device connected in the opposite direction from which the station number allocation message was received.

이때, 국번 할당 완료 메시지에 포함된 목적지 국번이 "0"으로 설정되어 있기 때문에 국번 할당 동작을 통해 이미 "0"번이 아닌 다른 번호로 국번 할당된 제4 슬레이브 디바이스(250) 내지 제5 슬레이브 디바이스(260)는 국번 할당 완료 메시지를 처리하지 않고, 마스터 디바이스(210) 쪽으로 포워딩(Forwarding)시키게 된다.At this time, since the destination station number included in the station number allocation completion message is set to "0", the 4th slave device 250 to the 5th slave device already assigned a station number other than "0" through the station number allocation operation. The 260 does not process the station number assignment complete message, but forwards the station number to the master device 210.

그러면, 마스터 디바이스(210)는 목적지 국번이 자신의 국번과 동일하게 때문에 국번 할당 완료 메시지를 수신한다. 이어, 마스터 디바이스(210)는 위와 같이 국번 할당 완료 메시지를 수신하는 경우, 라인 네트워크상 PORT 1 방향에 연결된 슬레이브 디바이스들(250, 260, 270)의 국번 자동 할당이 정상적으로 이루어진 것으로 판단하고, PORT 1 방향에 대한 국번 자동 할당 동작을 완료한다.Then, the master device 210 receives the station number assignment completion message because the destination station number is the same as its own station number. Subsequently, when receiving the station number assignment completion message as above, the master device 210 determines that the automatic assignment of the station numbers of the slave devices 250, 260, and 270 connected in the PORT 1 direction on the line network has been normally performed, and PORT 1 The automatic station number assignment operation for the direction is completed.

도 7a 내지 도 7b는 본 발명의 다른 일 실시예에 따른 RAPIEnet 프로토콜에서 자동으로 국번을 할당하는 방법을 예시한 도면이다.7A to 7B are diagrams illustrating a method of automatically allocating station numbers in the RAPIEnet protocol according to another embodiment of the present invention.

이하, 도 7a 내지 도 7b를 참조하여 링 네트워크상 마스터 디바이스(210)를 기준으로 양방향으로 복수의 슬레이브 디바이스(220, 230, 240, 250)가 연결되고, 슬레이브 디바이스의 국번이 자동 할당인 경우를 설명한다.Hereinafter, a case where a plurality of slave devices 220, 230, 240, 250 are connected in both directions with respect to the master device 210 on the ring network and the station number of the slave device is automatically assigned with reference to FIGS. 7A to 7B Explain.

이때, 도 7a 내지 도 7b에서는 링 네트워크상 "0"국번이 아닌 다른 국번으로 미리 할당된 슬레이브 디바이스가 있는 경우를 예를 들어 설명한다.In this case, in FIGS. 7A to 7B, a case where there is a slave device previously allocated to a station number other than the station number "0" on the ring network will be described as an example.

먼저, 도 7a를 참조하면, 마스터 디바이스(210)는 링 네트워크로 연결된 복수의 슬레이브 디바이스(220, 230, 240, 250)의 국번 정보를 확인하기 위해 국번 요청 메시지를 브로드캐스트(broadcast)(750, 752)로 전송한다.First, referring to FIG. 7A, the master device 210 broadcasts a station number request message to check station number information of a plurality of slave devices 220, 230, 240, and 250 connected through a ring network. 752).

이때, 도 7a에서는 링 네트워크의 PORT 0과 PORT 1 방향으로 모두 슬레이브 디바이스(220, 230, 240, 250)가 존재하기 때문에 마스터 디바이스(210)는 PORT 0, PORT 1 양방향으로 국번 요청 메시지를 전송한다.At this time, in FIG. 7A, since slave devices 220, 230, 240, 250 exist in both PORT 0 and PORT 1 directions of the ring network, the master device 210 transmits the station number request message in both directions of PORT 0 and PORT 1. .

그러면 PORT 0과 PORT 1 방향에 연결된 각 슬레이브 디바이스(220, 230, 240, 250)는 위와 같은 국번 요청 메시지에 응답하여 자신에게 할당된 국번 정보를 마스터 디바이스(210)로 전송한다.Then, each of the slave devices 220, 230, 240, and 250 connected to the PORT 0 and PORT 1 directions transmits the station number information allocated to them to the master device 210 in response to the station number request message as described above.

이에 따라 마스터 디바이스(210)는 링 네트워크상 연결된 모든 슬레이브 디바이스(220, 230, 240, 250)에 할당된 국번 정보를 확인할 수 있게 된다.Accordingly, the master device 210 can check station number information allocated to all the slave devices 220, 230, 240, and 250 connected on the ring network.

이때, 마스터 디바이스(210)는 슬레이브 디바이스(220, 230, 240, 250)에 할당된 국번 중 "0"이 없는 경우, 이것은 모든 슬레이브 디바이스에 국번이 할당되어 있는 것을 의미하므로 국번 자동 할당 동작을 수행하지 않는다.At this time, if the master device 210 does not have "0" among the station numbers allocated to the slave devices 220, 230, 240, 250, this means that the station numbers are allocated to all slave devices, so the automatic station number assignment operation is performed. I never do that.

그러나, 마스터 디바이스(210)는 슬레이브 디바이스에 할당된 국번 중 "0"이 있는 경우, 이것은 국번이 할당되지 않은 슬레이브 디바이스가 존재하는 것을 의미하므로 국번 자동 할당 동작을 수행한다.However, if there is "0" among the station numbers allocated to the slave device, this means that there is a slave device to which the station number is not allocated, and thus performs an automatic station number assignment operation.

이때, 마스터 디바이스(210)는 브로드캐스트로 전송한 국번 요청 메시지를 마스터 디바이스(210)에서 수신하게 되면 국번 자동 할당을 수행하는 네트워크 토폴리지가 링 네트워크인 것으로 판단할 수 있다.In this case, when the master device 210 receives the station number request message transmitted by broadcast, the master device 210 may determine that the network topology performing automatic station number assignment is a ring network.

이하에서는, 도 7b를 참조하여 링 네트워크에서 국번 자동 할당 동작에 대해서 보다 상세히 설명하기로 한다.Hereinafter, the automatic station number assignment operation in the ring network will be described in more detail with reference to FIG. 7B.

국번 자동 할당 동작을 수행하는 경우, 마스터 디바이스(210)는 링 네트워크의 PORT 0으로 국번 할당 메시지를 전송한다.When performing the automatic station number assignment operation, the master device 210 transmits a station number assignment message to PORT 0 of the ring network.

이러한 국번 할당 메시지는 참조번호 (790)에서 도시된 바와 같은 국번 테이블이 포함될 수 있다. 참조번호 (790)은 슬레이브 디바이스의 국번 정보를 수집한 마스터 디바이스(210)에서 최초로 생성된 국번 테이블을 도시한 것이다. 목적지 국번은 "0"으로 설정되어 슬레이브 디바이스 중 국번이 "0"번으로 설정된 슬레이브 디바이스가 "0"번 이외의 다른 국번으로 국번 할당을 수행하도록 한다. 현재 링 네트워크상 슬레이브 디바이스에 할당된 국번이 "0"번 외에 "2"번과 "10"번이 존재하므로, 국번 리스트 개수는 "3"로 설정되며, "0"번 국번에 해당하는 국번 리스트의 시작 국번과 마지막 국번은 "0"으로 설정되고, "2"번 국번에 해당하는 국번 리스트의 시작 국번과 마지막 국번은 "2"로 설정되며, "10"번 국번에 해당하는 시작 국번과 마지막 국번은 "10"으로 설정된 것을 알 수 있다.This station number assignment message may include a station number table as shown by reference numeral 790. Reference number 790 denotes a station number table initially generated by the master device 210 that has collected the station number information of the slave device. The destination station number is set to "0" so that the slave device whose station number is set to "0" among the slave devices is assigned to a station number other than "0". As the station numbers assigned to slave devices on the current ring network are "2" and "10" in addition to "0", the number of station number list is set to "3", and the station number list corresponding to station number "0" The starting station number and the last station number of are set as "0", the starting station number and the last station number of the station number list corresponding to station number "2" are set as "2", and the starting station number and the last station number corresponding to station number "10" You can see that the station number is set to "10".

링 네트워크상 제1 슬레이브 디바이스(220)는 위와 같은 국번 할당 메시지를 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message as described above, the first slave device 220 on the ring network checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제1 슬레이브 디바이스(220)는 국번 할당 동작을 수행하며, 국번 테이블상 국번 리스트를 참조하여 링 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if its own station number corresponds to the destination station number, the first slave device 220 performs the station number assignment operation, and checks the station number already in use in the ring network by referring to the station number list on the station number table and assigns it to itself. Search for an available station number.

이때, 국번 테이블(790)상 국번 리스트 개수가 "3"이고 국번 리스트별 시작 국번과 마지막 국번이 각각 "0"번, "2"번, "10"번이므로 제1 슬레이브 디바이스(220)는 "0"번 국번, "2"번 국번과 "10"번 국번이 사용 중인 것을 확인할 수 있다. 이에 따라, 제1 슬레이브 디바이스(220)는 "0"번 국번, "2"번 국번과 "10"번 국번이 사용 중이기 때문에 자신의 국번을 "1"로 할당한다.At this time, since the number of the station number list in the station number table 790 is "3" and the start station number and the last station number for each station number list are "0", "2", and "10", respectively, the first slave device 220 is " You can check that station number 0", station number "2" and station number "10" are in use. Accordingly, the first slave device 220 allocates its own station number to "1" because station numbers "0", "2" and "10" are in use.

위와 같이 국번을 할당한 경우, 제1 슬레이브 디바이스(220)는 자신에게 할당한 "2"국번에 해당하는 국번 리스트를 추가하여 국번 테이블을 재구성할 수 있다. 그러나, 이때, 자신에게 할당한 국번이 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우, 제1 슬레이브 디바이스(220)는 참조번호 (792)에서와 같이 국번 리스트를 하나로 통합하고 국번 리스트의 시작 국번과 마지막 국번을 마스터 디바이스(210)와 제2 슬레이브 디바이스(230)에 할당된 국번이 모두 포함되도록 설정하여 국번 테이블을 재구성한다. 이에 따라, 통합된 국번 리스트의 시작 국번은 마스터 디바이스(210)의 국번인 "0"번으로 설정되고 마지막 국번은 제2 슬레이브 디바이스(230)의 국번인 "2"번으로 설정된다. 또한, 이때, 제4 슬레이브 디바이스(250)에 할당된 "10"번 국번은 연속된 숫자가 아니므로 "10"번으로 국번이 설정된 제4 슬레이브 디바이스(250)에 대한 국번 리스트는 통합시키지 않고 그대로 남겨지게 된다. When the station number is allocated as described above, the first slave device 220 may reconfigure the station number table by adding a station number list corresponding to the station number "2" allocated to it. However, at this time, if the station number assigned to itself becomes a number consecutive to the station numbers registered in the station number list, the first slave device 220 unifies the station number list into one as in the reference number 792 and The station number table is reconfigured by setting the start station number and the last station number to include all the station numbers allocated to the master device 210 and the second slave device 230. Accordingly, the start station number of the integrated station number list is set to "0", which is the station number of the master device 210, and the last station number is set to "2", which is the station number of the second slave device 230. Also, at this time, since the station number "10" assigned to the fourth slave device 250 is not a continuous number, the station number list for the fourth slave device 250, which is set to "10", is not integrated. Will be left.

라인 네트워크상 제2 슬레이브 디바이스(230)는 제1 슬레이브 디바이스(220)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When the second slave device 230 receives the station number assignment message and the station number table from the first slave device 220 on the line network, it checks whether the station number currently set to itself corresponds to the destination station number.

이때, 제2 슬레이브 디바이스(230)는 이미 "2"번으로 국번이 할당된 상태여서 목적지 국번에 해당하지 않기 때문에 제2 슬레이브 디바이스(230)는 국번 할당 메시지를 처리하지 않고, 제3 슬레이브 디바이스(240)로 해당 국번 할당 메시지를 포워딩시키게 된다.At this time, the second slave device 230 does not process the station number assignment message and does not process the station number assignment message because the second slave device 230 has already been assigned a station number to "2" and does not correspond to the destination station number. 240), the corresponding station number assignment message is forwarded.

라인 네트워크상 제3 슬레이브 디바이스(240)는 제2 슬라이브 디바이스(230)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message and station number table from the second slave device 230 on the line network, the third slave device 240 checks whether the station number currently set to itself corresponds to the destination station number.

이때, 자신의 국번이 목적지 국번에 해당하는 경우, 제3 슬레이브 디바이스(240)는 국번 할당 동작을 수행하며, 국번 테이블상 국번 리스트를 참조하여 라인 네트워크에서 이미 사용중인 국번을 확인하고 자신에게 할당할 수 있는 국번을 검색한다.At this time, if its own station number corresponds to the destination station number, the third slave device 240 performs the station number assignment operation, and checks the station number already in use in the line network by referring to the station number list on the station number table and assigns it to itself. Search for an available station number.

이때, 국번 테이블상 국번 리스트가 "3"이고 국번 리스트의 시작 국번은 "0"번, 마지막 국번은 "2"번이므로 제3 슬레이브 디바이스(240)는 "0"번 국번부터 "2"번 국번까지 사용중인 것을 확인할 수 있다. 이에 따라, 제3 슬레이브 디바이스(240)는 마지막 국번으로 "2"번 국번이 사용 중이기 때문에 자신의 국번을 "3"으로 할당한다.At this time, since the station number list on the station number table is "3", the starting station number of the station number list is "0", and the last station number is "2", the third slave device 240 starts from station number "0" to station number "2". You can check what is being used until. Accordingly, the third slave device 240 allocates its own station number to "3" because station number "2" is in use as the last station number.

위와 같이 국번을 할당한 경우, 제3 슬레이브 디바이스(240)는 자신에게 할당한 "3"국번에 해당하는 국번 리스트를 추가하여 국번 테이블을 재구성할 수 있다. 그러나, 이때, 자신에게 할당한 국번이 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우, 제3 슬레이브 디바이스(240)는 참조번호 (794)에서와 같이 국번 리스트를 하나로 통합하고 국번 리스트의 시작 국번과 마지막 국번을 마스터 디바이스(210)와 제3 슬레이브 디바이스(240)에 할당된 국번이 모두 포함되도록 설정하여 국번 테이블(794)을 재구성한다. 이에 따라, 통합된 국번 리스트의 시작 국번은 마스터 디바이스(210)의 국번인 "0"번으로 설정되고 마지막 국번은 제3 슬레이브 디바이스(240)의 국번인 "3"번으로 설정된다. 또한, 이때, 제4 슬레이브 디바이스(250)에 할당된 "10"번 국번은 연속된 숫자가 아니므로 "10"번으로 국번이 설정된 제4 슬레이브 디바이스(250)에 대한 국번 리스트는 통합시키지 않고 그대로 남겨지게 된다. When the station number is allocated as described above, the third slave device 240 may reconfigure the station number table by adding a station number list corresponding to the station number "3" allocated to it. However, in this case, if the station number assigned to itself becomes a number consecutive to the station numbers registered in the station number list, the third slave device 240 unifies the station number list into one as in the reference number 794 and The station number table 794 is reconfigured by setting the start station number and the last station number to include all station numbers assigned to the master device 210 and the third slave device 240. Accordingly, the start station number of the integrated station number list is set to "0", which is the station number of the master device 210, and the last station number is set to "3", which is the station number of the third slave device 240. Also, at this time, since the station number "10" assigned to the fourth slave device 250 is not a continuous number, the station number list for the fourth slave device 250, which is set to "10", is not integrated. Will be left.

링 네트워크상 제4 슬레이브 디바이스(250)는 제3 슬레이브 디바이스(240)로부터 국번 할당 메시지와 국번 테이블을 수신하는 경우, 자신에게 현재 설정된 국번이 목적지 국번에 해당하는지 검사한다. When receiving the station number assignment message and station number table from the third slave device 240 on the ring network, the fourth slave device 250 checks whether the station number currently set to itself corresponds to the destination station number.

이때, 제4 슬레이브 디바이스(250)는 이미 "10"번으로 국번이 할당된 상태여서 목적지 국번에 해당하지 않기 때문에 제4 슬레이브 디바이스(250)는 국번 할당 메시지를 처리하지 않는다. 또한, 이때 제4 슬레이브 디바이스(250)는 국번 할당 메시지가 수신된 반대 방향으로 더 이상 연결된 슬레이브 디바이스가 없으므로 제3 슬레이브 디바이스(240)로부터 수신한 국번 테이블을 국번 할당 완료 메시지와 함께 마스터 디바이스(210)로 전송한다.At this time, the fourth slave device 250 does not process the station number assignment message because the fourth slave device 250 has already been assigned a station number "10" and does not correspond to the destination station number. In addition, at this time, since the fourth slave device 250 no longer has a slave device connected in the opposite direction from which the station number assignment message was received, the station number table received from the third slave device 240 is read together with the station number assignment completion message. ).

그러면, 마스터 디바이스(210)는 위와 같이 국번 할당 완료 메시지를 수신하는 경우, 링 네트워크상 슬레이브 디바이스들(220, 230, 240, 250)의 국번 자동 할당이 정상적으로 이루어진 것으로 판단하고, 국번 자동 할당 동작을 완료한다.Then, when receiving the station number assignment completion message as described above, the master device 210 determines that the automatic station number assignment of the slave devices 220, 230, 240, 250 on the ring network has been normally performed, and performs the automatic station number assignment operation. Complete.

이때, 마스터 디바이스(210)는 링 네트워크이기 때문에 PORT 0방향으로 전송한 국번 할당 메시지가 PORT 1으로 수신되는 경우 링 네트워크에 연결된 모든 슬레이브 디바이스(220, 230, 240, 250)에 대한 국번 자동 할당이 정상적으로 이루어진 것으로 판단할 수 있다.At this time, since the master device 210 is a ring network, when the station number assignment message transmitted in the PORT 0 direction is received through PORT 1, the automatic assignment of station numbers to all slave devices 220, 230, 240, 250 connected to the ring network is performed. It can be determined that it has been done normally.

상술한 바와 같이, 본 발명에 따르면, RAPIEnet 프로토콜에서 국번 자동 할당 방법에 있어서, RAPIEnet 프로토콜이 탑재된 디바이스로 구성된 네트워크에서 마스터 국번 이외의 국번으로 설정된 디바이스는 사용자가 설정한 국번을 적용시키며, 마스터 국번으로 초기 설정된 디바이스에 대해서는 마스터 디바이스와 슬레이브 디바이스간 국번 할당 메시지의 송수신을 통해 슬레이브 디바이스가 스스로 네트워크상 사용되지 않는 국번을 검색하여 자동으로 국번 할당을 수행하도록 하여 사용자에게 국번 설정의 편의성을 제공할 수 있다.As described above, according to the present invention, in the method of automatically allocating station numbers in RAPIEnet protocol, in a network composed of devices equipped with RAPIEnet protocol, devices set to station numbers other than the master station number apply the station number set by the user, For devices initially set to as, the slave device searches for a station number that is not used on the network by itself through sending/receiving the station number assignment message between the master device and the slave device, and automatically assigns the station number to provide users with convenience of station number setting. have.

이상과 같이 본 발명에 대해서 예시한 도면을 참조로 하여 설명하였으나, 본 명세서에 개시된 실시 예와 도면에 의해 본 발명이 한정되는 것은 아니며, 본 발명의 기술사상의 범위 내에서 통상의 기술자에 의해 다양한 변형이 이루어질 수 있음은 자명하다. 아울러 앞서 본 발명의 실시 예를 설명하면서 본 발명의 구성에 따른 작용 효과를 명시적으로 기재하여 설명하지 않았을 지라도, 해당 구성에 의해 예측 가능한 효과 또한 인정되어야 함은 당연하다.As described above with reference to the drawings illustrated for the present invention, the present invention is not limited by the embodiments and drawings disclosed in the present specification, and various by a person skilled in the art within the scope of the technical idea of the present invention. It is obvious that transformation can be made. In addition, even if not explicitly described and described the effects of the configuration of the present invention while describing the embodiments of the present invention, it is natural that the predictable effects of the configuration should also be recognized.

100: 로터리 스위치 210 : 마스터 디바이스
220, 230, 240 : 슬레이브 디바이스 300 : 제어기
302, 304 : MAC 306, 308 : 물리계층부
100: rotary switch 210: master device
220, 230, 240: slave device 300: controller
302, 304: MAC 306, 308: physical layer

Claims (12)

하나의 마스터 디바이스와 복수의 슬레이브 디바이스를 포함하는 RAPIEnet 프로토콜이 적용된 네트워크에서 국번 자동 할당 방법으로서,
상기 마스터 디바이스에서 상기 네트워크에 연결된 모든 슬레이브 디바이스에 할당된 국번 정보를 수집하는 단계와,
상기 마스터 디바이스에서 인접한 슬레이브 디바이스로 국번 할당 메시지를 전송하는 단계와,
상기 국번 할당 메시지를 수신한 슬레이브 디바이스는 상기 네트워크에 할당되지 않은 국번 중 하나를 선택하여 국번을 할당하는 단계와,
상기 슬레이브 디바이스에서 자신이 마지막 슬레이브 디바이스인지 확인하는 단계와,
상기 슬레이브 디바이스는 자신이 마지막 디바이스인 경우 상기 마스터 디바이스로 국번 할당 완료 메시지를 전송하는 단계
를 포함하고
상기 국번 할당 메시지는,
상기 국번 할당이 필요한 슬레이브 디바이스의 목적지 국번과, 상기 네트워크에서 사용중인 국번 리스트 개수, 국번 리스트별 시작 국번과 마지막 국번을 포함하는 국번 테이블을 포함하며,
상기 국번을 할당하는 단계는,
상기 슬레이브 디바이스에서 초기 설정된 국번이 상기 목적지 국번에 해당하는지 검사하는 단계와,
상기 초기 설정된 국번이 상기 목적지 국번인 경우 상기 국번 리스트별 시작 국번과 마지막 국번을 확인하는 단계와,
상기 국번 리스트별 등록된 국번을 제외한 나머지 국번 중 하나를 자신의 국번으로 자동 할당하는 단계
를 포함하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
As a method for automatically assigning station numbers in a network to which RAPIEnet protocol including one master device and multiple slave devices is applied,
Collecting station number information allocated to all slave devices connected to the network from the master device,
Transmitting a station number assignment message from the master device to an adjacent slave device,
Allocating a station number by selecting one of the station numbers not allocated to the network by the slave device receiving the station number assignment message;
Checking whether the slave device is the last slave device,
When the slave device is the last device, transmitting a station number assignment completion message to the master device
Including
The station number assignment message,
It includes a station number table including a destination station number of the slave device that needs to be assigned the station number, the number of station number lists being used in the network, and a start station number and a last station number for each station number list,
The step of allocating the station number,
Checking whether the station number initially set in the slave device corresponds to the destination station number, and
If the initially set station number is the destination station number, checking a start station number and a last station number for each station number list;
Automatically allocating one of the remaining station numbers as the own station number except for the station numbers registered for each station number list
Automatic station number assignment method in RAPIEnet protocol including a.
삭제delete 제 1 항에 있어서,
상기 슬레이브 디바이스는, 상기 국번을 자동 할당한 이후, 상기 국번 테이블상 새로운 국번 리스트를 추가하고 자신에게 할당된 국번을 상기 새로운 국번 리스트의 시작 국번과 마지막 국번으로 등록하여 상기 국번 테이블을 재구성하는 단계를 더 포함하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
The method of claim 1,
After automatically allocating the station number, the slave device reconfigures the station number table by adding a new station number list on the station number table and registering the station number assigned to itself as a start station number and a last station number in the new station number list. A method for automatically assigning station numbers in the RAPIEnet protocol that further includes.
제 3 항에 있어서,
상기 재구성하는 단계에서, 상기 슬레이브 디바이스는, 상기 자신에게 할당한 새로운 국번이 상기 국번 리스트에 등록된 국번들과 연속되는 숫자가 되는 경우, 상기 새로운 국번을 위한 국번 리스트를 생성하지 않고, 상기 연속되는 숫자에 대응되는 국번의 국번 리스트상 마지막 국번만을 갱신하여 상기 국번 테이블을 재구성하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
The method of claim 3,
In the reconfiguration step, the slave device does not generate a station number list for the new station number, when the new station number assigned to the slave device becomes a number consecutive to the station numbers registered in the station number list, Automatic station number allocation method in RAPIEnet protocol in which the station number table is reconstructed by updating only the last station number in the station number list of the station number corresponding to the number.
제 3 항에 있어서,
상기 슬레이브 디바이스는 자신이 마지막 슬레이브 디바이스가 아닌 경우,
상기 국번 할당 메시지를 수신한 반대 방향의 인접한 다른 슬레이브 디바이스로 상기 재구성된 국번 테이블과 함께 상기 국번 할당 메시지를 전송하는 단계를 더 포함하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
The method of claim 3,
If the slave device is not the last slave device,
And transmitting the station number allocation message together with the reconstructed station number table to another adjacent slave device in the opposite direction from which the station number allocation message was received.
제 1 항에 있어서,
상기 슬레이브 디바이스는,
상기 초기 설정된 국번이 상기 목적지 국번이 아닌 경우, 상기 국번 할당 메시지를 처리하지 않고, 상기 국번 할당 메시지를 수신한 방향의 인접한 다른 슬레이브 디바이스로 포워딩하는 단계를 더 포함하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
The method of claim 1,
The slave device,
If the initially set station number is not the destination station number, the method of automatically allocating a station number in a RAPIEnet protocol, further comprising the step of forwarding the station number assignment message to another adjacent slave device in the direction in which the station number assignment message was not processed.
제 1 항에 있어서,
상기 국번 할당 완료 메시지는, 상기 마스터 디바이스에 할당된 마스터 국번이 목적지 국번으로 설정되며, 상기 국번 할당이 완료된 슬레이브 디바이스에서는 처리되지 않고 상기 마스터 디바이스로 포워딩되는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
The method of claim 1,
In the station number allocation complete message, the master station number allocated to the master device is set as a destination station number, and the station number automatic allocation method in the RAPIEnet protocol is forwarded to the master device without being processed by the slave device for which the station number allocation has been completed.
제 1 항에 있어서,
상기 마스터 디바이스에서 상기 국번 할당 완료 메시지를 수신하는 경우, 상기 네트워크에 대한 국번 할당이 정상적으로 이루어진 것으로 판단하는 단계를 더 포함하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
The method of claim 1,
When the master device receives the station number allocation completion message, determining that the station number allocation to the network has been normally performed. The automatic station number allocation method in the RAPIEnet protocol.
제 1 항에 있어서,
상기 국번 정보를 수집하는 단계는,
상기 마스터 디바이스가 상기 네트워크에 연결된 모든 슬레이브 디바이스로 국번 요청 메시지를 브로드캐스트하는 단계와,
각 슬레이브 디바이스에서 상기 국번 요청 메시지에 응답하여 자신에 할당된 국번 정보를 상기 마스터 디바이스로 전송하는 단계와,
상기 마스터 디바이스에서 상기 각 슬레이브 디바이스에서 응답한 국번 정보를 수신하는 단계를 포함하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
The method of claim 1,
The step of collecting the station number information,
Broadcasting, by the master device, a station number request message to all slave devices connected to the network,
Transmitting station number information allocated to itself to the master device in response to the station number request message from each slave device; and
And receiving, from the master device, station number information responded from each of the slave devices, and automatically assigning station numbers in a RAPIEnet protocol.
하나의 마스터 디바이스와 복수의 슬레이브 디바이스를 포함하는 RAPIEnet 프로토콜이 적용된 네트워크에서 국번 자동 할당 방법으로서,
상기 마스터 디바이스에서 상기 마스터 디바이스를 기준으로 상기 네트워크의 양방향 경로에 연결된 모든 슬레이브 디바이스에 할당된 국번 정보를 수집하는 단계와,
상기 마스터 디바이스에서 상기 양방향 경로 중 제1 경로에 존재하는 슬레이브 디바이스에 대한 국번 할당 동작을 제어하는 제1 국번 할당 단계와,
상기 마스터 디바이스에서 상기 양방향 경로 중 제2 경로에 존재하는 슬레이브 디바이스에 대한 국번 할당 동작을 제어하는 제2 국번 할당 단계
를 포함하고,
상기 제1 국번 할당 단계는,
상기 마스터 디바이스에서 상기 양방향 경로 중 제1 경로에 존재하는 인접한 제1 슬레이브 디바이스로 제1 국번 할당 메시지를 전송하는 단계와,
상기 제1 슬레이브 디바이스에서 상기 제1 경로상 네트워크에 할당되지 않은 국번 중 하나를 선택하여 국번을 할당하는 단계와,
상기 제1 슬레이브 디바이스에서 자신이 마지막 슬레이브 디바이스인지 확인하는 단계와,
상기 제1 슬레이브 디바이스는 자신이 마지막 디바이스인 경우 상기 마스터 디바이스로 국번 할당 완료 메시지를 전송하는 단계
를 포함하고,
상기 제1 국번 할당 메시지는,
상기 국번 할당이 필요한 슬레이브 디바이스의 목적지 국번과, 상기 네트워크에서 사용중인 국번 리스트 개수, 국번 리스트별 시작 국번과 마지막 국번을 포함하는 국번 테이블을 포함하며,
상기 제1 국번 할당 단계는,
상기 슬레이브 디바이스에서 초기 설정된 국번이 상기 목적지 국번에 해당하는지 검사하는 단계와,
상기 초기 설정된 국번이 상기 목적지 국번인 경우 상기 국번 리스트별 시작 국번과 마지막 국번을 확인하는 단계와,
상기 국번 리스트별 등록된 국번을 제외한 나머지 국번 중 하나를 자신의 국번으로 자동 할당하는 단계
를 포함하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
As a method for automatically assigning station numbers in a network to which RAPIEnet protocol including one master device and multiple slave devices is applied,
Collecting station number information allocated to all slave devices connected to the bidirectional path of the network from the master device based on the master device,
A first station number assignment step of controlling an operation of allocating a station number to a slave device existing in a first path among the bidirectional paths by the master device;
A second station number assignment step of controlling an operation of allocating a station number to a slave device existing in a second path among the bidirectional paths by the master device
Including,
The first station number assignment step,
Transmitting a first station number assignment message from the master device to a first slave device adjacent to the first path among the bidirectional paths,
Allocating a station number by selecting one of the station numbers not allocated to the network on the first route by the first slave device,
Checking that the first slave device is the last slave device,
When the first slave device is the last device, transmitting a station number assignment completion message to the master device
Including,
The first station number assignment message,
It includes a station number table including a destination station number of the slave device that needs to be assigned the station number, the number of station number lists being used in the network, and a start station number and a last station number for each station number list,
The first station number assignment step,
Checking whether the station number initially set in the slave device corresponds to the destination station number, and
If the initially set station number is the destination station number, checking a start station number and a last station number for each station number list; and
Automatically allocating one of the remaining station numbers as the own station number except for the station numbers registered for each station number list
Automatic station number assignment method in RAPIEnet protocol including a.
삭제delete 제 10 항에 있어서,
상기 제2 국번 할당 단계는,
상기 마스터 디바이스에서 상기 양방향 경로 중 제2 경로에 존재하는 인접한 슬레이브 디바이스로 제2 국번 할당 메시지를 전송하는 단계와,
상기 제2 국번 할당 메시지를 수신한 제2 슬레이브 디바이스는 상기 제1 경로와 상기 제2 경로상 네트워크에 할당되지 않은 국번 중 하나를 선택하여 국번을 할당하는 단계와,
상기 제2 슬레이브 디바이스에서 자신이 마지막 슬레이브 디바이스인지 확인하는 단계와,
상기 제2 슬레이브 디바이스는 자신이 마지막 디바이스인 경우 상기 마스터 디바이스로 국번 할당 완료 메시지를 전송하는 단계
를 포함하는 RAPIEnet 프로토콜에서 국번 자동 할당 방법.
The method of claim 10,
The second station number assignment step,
Transmitting a second station number assignment message from the master device to an adjacent slave device in a second path among the bidirectional paths,
Receiving the second station number assignment message, the second slave device selecting one of the first path and the station number not allocated to the network on the second path and allocating a station number;
Checking in the second slave device whether it is the last slave device,
When the second slave device is the last device, transmitting a station number assignment completion message to the master device
Automatic station number assignment method in RAPIEnet protocol including a.
KR1020190033536A 2019-03-25 2019-03-25 METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet KR102210050B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020190033536A KR102210050B1 (en) 2019-03-25 2019-03-25 METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet
PCT/KR2019/010875 WO2020197007A1 (en) 2019-03-25 2019-08-27 Method of automatically assigning station number in rapienet protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190033536A KR102210050B1 (en) 2019-03-25 2019-03-25 METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet

Publications (2)

Publication Number Publication Date
KR20200113403A KR20200113403A (en) 2020-10-07
KR102210050B1 true KR102210050B1 (en) 2021-01-29

Family

ID=72610639

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190033536A KR102210050B1 (en) 2019-03-25 2019-03-25 METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet

Country Status (2)

Country Link
KR (1) KR102210050B1 (en)
WO (1) WO2020197007A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19733906C2 (en) * 1997-08-05 1999-09-30 Siemens Ag Method for automatic address assignment, bus system for automatic address assignment and communication participants that can be used in the bus system or in the context of the method
EP2287689B1 (en) * 2009-07-27 2012-11-14 Ziehl-Abegg AG Apparatus and method for addressing a slave unit
KR20150061348A (en) * 2013-11-27 2015-06-04 삼성전기주식회사 Method and Apparatus for setting up device address for I2C communication
KR102244260B1 (en) * 2015-06-02 2021-04-26 엘에스일렉트릭(주) METHOD OF ROUTING RAPIEnet NETWORK
US20170083468A1 (en) * 2015-09-21 2017-03-23 Qualcomm Incorporated Identifying multiple identical devices on a shared bus

Also Published As

Publication number Publication date
WO2020197007A1 (en) 2020-10-01
KR20200113403A (en) 2020-10-07

Similar Documents

Publication Publication Date Title
JP3349861B2 (en) Wireless LAN system
US5719868A (en) Dynamic distributed, multi-channel time division multiple access slot assignment method for a network of nodes
US5805924A (en) Method and apparatus for configuring fabrics within a fibre channel system
US9241332B2 (en) System and method for managing resources in a communication system
KR940001820B1 (en) Automatic equivalent temporary talkgroup assignment
CN109428840B (en) Communication method, device and storage medium
JP4765973B2 (en) Communication route construction method and communication terminal
CN103039096B (en) Be used for the grading control signaling of the mobile client of distributed wireless controller system
CN103795636A (en) Multicast processing method, device and system
CN103814554A (en) Communication method, device and system of virtual extensible local area network
CN116233950A (en) Routing method and device
CN102263835B (en) The automatic addressing scheme of two-wire serial bus interface
EP1499072B1 (en) Method for interconnecting a PLC LAN with any other non-PLC LAN
KR100407527B1 (en) Wireless network system and network address assigning method
KR102109911B1 (en) Method and its apparatus for controlling topology in beamforming system
JP5476287B2 (en) Bluetooth network communication method and wireless information distribution apparatus thereof
JP6574906B2 (en) Method, apparatus, and system for assigning IP address for master / slave network
KR102210050B1 (en) METHOD FOR AUTOMATICALLY ASSIGNING STATION NUMBER IN A PROTOCOL OF RAIPEnet
ES2250056T3 (en) COMBINED PROCESS OF MASTER / SLAVE-PRODUCER / CONSUMER COMMUNICATION FOR A NETWORK.
JP3406768B2 (en) Packet transfer method and packet transfer device
JP2004511145A (en) Radio access network for mobile radio communication system and driving method thereof
US8929395B2 (en) Multicast system and multicast method using shortened address and apparatus applied to the same
JP4940707B2 (en) IP address assignment system and IP address assignment method
KR100424754B1 (en) Communication terminal accommodation apparatus and scheduling method
JP2002185462A (en) Radio data communication apparatus and system thereof

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant