KR20200114629A - Method for setting up communication parameters of network devices connected with modbus/multi-drop - Google Patents

Method for setting up communication parameters of network devices connected with modbus/multi-drop Download PDF

Info

Publication number
KR20200114629A
KR20200114629A KR1020190036705A KR20190036705A KR20200114629A KR 20200114629 A KR20200114629 A KR 20200114629A KR 1020190036705 A KR1020190036705 A KR 1020190036705A KR 20190036705 A KR20190036705 A KR 20190036705A KR 20200114629 A KR20200114629 A KR 20200114629A
Authority
KR
South Korea
Prior art keywords
slave
modbus
master
communication
serial number
Prior art date
Application number
KR1020190036705A
Other languages
Korean (ko)
Inventor
임창준
Original Assignee
엘에스일렉트릭(주)
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘에스일렉트릭(주) filed Critical 엘에스일렉트릭(주)
Priority to KR1020190036705A priority Critical patent/KR20200114629A/en
Priority to PCT/KR2019/012080 priority patent/WO2020204281A1/en
Publication of KR20200114629A publication Critical patent/KR20200114629A/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40052High-speed IEEE 1394 serial bus
    • H04L12/40078Bus configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40169Flexible bus arrangements
    • H04L12/40176Flexible bus arrangements involving redundancy
    • H04L12/40195Flexible bus arrangements involving redundancy by using a plurality of nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40228Modbus

Abstract

The present invention relates to a communication setting of a network device connected in a modbus multi-drop method. According to an embodiment of the present invention, in communication setting of a network device connected by a modbus multi-drop method, communication speed and ID of slaves can be set quickly by automatically generating and registering a slave ID from a master based on a serial number of the slave, and enabling automatic registration of communication speed for each slave ID through identifying the slave ID that responded to data produced by the communication speed using the registered slave ID.

Description

모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법{METHOD FOR SETTING UP COMMUNICATION PARAMETERS OF NETWORK DEVICES CONNECTED WITH MODBUS/MULTI-DROP}Communication setting method of network devices connected by Modbus multi-drop method {METHOD FOR SETTING UP COMMUNICATION PARAMETERS OF NETWORK DEVICES CONNECTED WITH MODBUS/MULTI-DROP}

본 발명은 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법에 관한 것이다.The present invention relates to a communication setting method of a network device connected in a Modbus multi-drop method.

PLC(Programmable Logic Controller)와 같은 산업용 기기는 사용자의 모니터링 또는 제어를 위해 다양한 필드버스 통신을 통해 상호간 통신연결성을 제공한다. 필드버스는, 실시간 분산제어를 위해 사용되는 산업용 컴퓨터 네트워크 프로토콜의 통칭이다.Industrial devices such as PLC (Programmable Logic Controller) provide mutual communication connectivity through various fieldbus communication for user monitoring or control. Fieldbus is a collective name for industrial computer network protocols used for real-time distributed control.

이를 통해 사용자는 필드버스 통신을 통해 최상위 제어시스템에서 PLC와 같은 중간 제어시스템을 모니터링 또는 제어하고, 중간 제어시스템은 필드버스 통신을 통해 인버터 등 최하위 기기를 모니터링 또는 제어한다. 또는, 사용자는 필드버스 통신을 통해 최상위 제어시스템에서 인버터 등 최하위 기기를 직접 모니터링 또는 제어할 수 있다. Through this, the user monitors or controls an intermediate control system such as PLC in the uppermost control system through fieldbus communication, and the intermediate control system monitors or controls the lowest-level devices such as inverters through fieldbus communication. Alternatively, the user can directly monitor or control the lowest order devices such as inverters in the highest level control system through fieldbus communication.

이러한 산업용 기기를 모니터링 또는 제어하기 위한 다양한 필드버스 통신 방식이 존재하며, 그 중 대표적인 통신 방식으로 RS485 모드버스(Modbus)가 있다. Various fieldbus communication methods exist for monitoring or controlling such industrial devices, and RS485 Modbus is a representative communication method among them.

도 1은 종래 RS485 모드버스로 연결된 마스터와 슬레이브간 네트워크 연결 구성을 도시한 것이다.1 shows a network connection configuration between a master and a slave connected by a conventional RS485 Modbus.

도 1에서와 같은 RS485 모드버스 통신 방식에서는 사용자가 마스터(Master)(100)의 통신속도를 확인하여 마스터(100)와 연결된 모든 슬레이브(Slave)(120, 130, 140, 150)의 통신 속도를 수동으로 맞춘 후, 슬레이브(120, 130, 140, 150)의 통신 ID가 서로 다르도록 수동으로 일일이 설정하여야 하였다. In the RS485 Modbus communication method as shown in Fig. 1, the user checks the communication speed of the master 100 and adjusts the communication speed of all slaves 120, 130, 140, 150 connected to the master 100. After manual adjustment, the communication IDs of the slaves 120, 130, 140, 150 had to be manually set so that they were different from each other.

따라서, 위와 같이 종래에는 통신 설정을 사용자가 일일이 수동으로 하여야 함에 따라 마스터와 슬레이브간 통신 설정에 시간 및 비용이 소요되는 문제점이 있었다.Therefore, as described above, in the related art, as the user must manually set the communication, time and cost are required to set the communication between the master and the slave.

또한, 종래에는 슬레이브에 ID를 표시하여 주는 디스플레이가 없는 경우 ID 확인이 어려워 사용자가 슬레이브에 ID를 설정하는데 어려움이 있었다.In addition, conventionally, when there is no display that displays the ID on the slave, it is difficult for the user to check the ID, so that the user has difficulty in setting the ID on the slave.

본 발명의 목적은 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정에 있어서, 마스터에서 슬레이브의 시리얼 번호에 기반하여 슬레이브 ID를 자동 생성하여 등록하고, 등록된 슬레이브 ID를 이용하여 통신 속도별 제작된 데이터에 응답한 슬레이브 ID를 식별하는 것을 통해 슬레이브 ID별 통신 속도를 자동 등록할 수 있도록 함으로써 슬레이브들의 통신 속도와 ID를 신속하게 설정할 수 있도록 하는 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법을 제공하는 것이다.It is an object of the present invention to automatically generate and register a slave ID based on the serial number of the slave in the master in communication setting of a network device connected by a Modbus multi-drop method, and manufactured for each communication speed using the registered slave ID. By identifying the slave ID that responded to the data, the communication speed of each slave ID can be automatically registered, so that the communication speed and ID of the slaves can be quickly set. To provide.

본 발명의 목적들은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 본 발명의 다른 목적 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 발명의 실시예에 의해 보다 분명하게 이해될 것이다. 또한, 본 발명의 목적 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 쉽게 알 수 있을 것이다.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.

본 발명에 따른 모드버스 멀티 드롭 방식으로 연결된 마스터와 복수의 슬레이브간 통신 설정 방법은, 상기 마스터에서 각 슬레이브로 시리얼 번호 전송을 요청하는 단계와, 상기 요청에 따라 각 슬레이브로부터 송신되는 시리얼 번호를 수신하는 단계와, 상기 시리얼 번호를 기반으로 상기 각 슬레이브의 ID를 생성하고, 상기 ID의 슬레이브를 블랙리스트에 등록하는 단계와, 상기 ID를 대응되는 각각의 슬레이브에 제공하여 ID 등록을 요청하는 단계와, 상기 ID 등록이 정상적으로 이루어진 슬레이브를 상기 블랙리스트에서 제거하는 단계를 포함할 수 있다.The method for setting communication between a master and a plurality of slaves connected by a Modbus multi-drop method according to the present invention includes the steps of requesting a serial number transmission from the master to each slave, and receiving a serial number transmitted from each slave according to the request. Generating an ID of each slave based on the serial number, registering the slave of the ID in a blacklist, and requesting ID registration by providing the ID to each corresponding slave; and , Removing the slave in which the ID registration is normally performed from the black list.

또한, 상기 시리얼 번호를 수신하는 단계는, 상기 각 슬레이브에서 자신의 시리얼 번호로 난수 생성기를 초기화하는 단계와, 상기 초기화된 난수 생성기를 통해 생성된 임의의 난수에 대응하는 시간 지연값만큼 시간 지연 후 상기 자신의 시리얼 번호를 상기 마스터로 전송하는 단계와, 상기 마스터에서 상기 시간 지연값에 따라 서로 다른 시간에 전송되는 상기 각 슬레이브의 시리얼 번호를 수신하는 단계를 포함할 수 있다.In addition, the receiving of the serial number includes initializing a random number generator with its own serial number in each of the slaves, and after a time delay by a time delay value corresponding to a random number generated through the initialized random number generator. Transmitting the own serial number to the master, and receiving a serial number of each slave transmitted at different times according to the time delay value from the master.

또한, 상기 블랙리스트에서 제거하는 단계는, 상기 ID를 자신의 ID로 정상적으로 등록한 슬레이브로부터 ID 정상등록 응답을 수신하는 단계와, 상기 ID 정상등록 응답을 전송한 슬레이브를 상기 블랙리스트에서 제거하는 단계를 포함할 수 있다.In addition, the step of removing from the blacklist includes receiving an ID normal registration response from a slave that has normally registered the ID as its ID, and removing the slave that transmitted the ID normal registration response from the blacklist. Can include.

또한, 상기 ID 정상등록 응답을 수신하지 않은 슬레이브에 상기 마스터에서 일정 시간 경과 후 다시 시리얼 번호와 ID를 전송하여 ID 등록을 요청하는 단계를 더 포함할 수 있다.In addition, the method may further include requesting ID registration by transmitting a serial number and an ID again after a predetermined time elapses from the master to a slave that has not received the ID normal registration response.

또한, 모든 슬레이브에 대한 ID 등록이 완료되는 경우 상기 ID 등록이 완료된 슬레이브에 대한 정보를 화이트리스트로 저장하여 관리하는 단계를 더 포함할 수 있다.In addition, when ID registration for all slaves is completed, the step of storing and managing information on the slaves for which ID registration is completed as a white list may be further included.

또한, 상기 마스터에서 상기 모든 슬레이브의 ID로 기설정된 서로 다른 통신 속도로 통신속도 설정용 데이터를 전송하는 단계와, 통신 속도별 상기 데이터에 응답하는 해당 슬레이브의 ID를 식별하는 단계와, 상기 식별된 ID에 해당하는 슬레이브와의 통신 속도를 상기 데이터를 전송한 통신 속도로 설정하는 단계를 포함할 수 있다.In addition, the steps of transmitting data for setting the communication speed at different communication speeds preset by the IDs of all the slaves from the master, identifying the ID of the slave corresponding to the data for each communication speed, and the identified It may include the step of setting the communication speed with the slave corresponding to the ID as the communication speed at which the data is transmitted.

또한, 상기 ID를 생성하는 단계에서, 상기 각 슬레이브의 시리얼 번호를 기반으로 각 시리얼 번호별 서로 다른 ID를 설정할 수 있다.In addition, in the step of generating the ID, a different ID for each serial number may be set based on the serial number of each slave.

본 발명의 일 실시예에 따르면, 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정에 있어서, 마스터에서 슬레이브의 시리얼 번호에 기반하여 슬레이브 ID를 자동 생성하여 등록하고, 등록된 슬레이브 ID를 이용하여 통신 속도별 제작된 데이터에 응답한 슬레이브 ID를 식별하는 것을 통해 슬레이브 ID별 통신 속도를 자동 등록할 수 있도록 함으로써 슬레이브들의 통신 속도와 ID를 신속하게 설정할 수 있다.According to an embodiment of the present invention, in communication setting of a network device connected by a Modbus multi-drop method, a master automatically generates and registers a slave ID based on the serial number of the slave, and communicates using the registered slave ID. By identifying the slave ID that responds to the data produced by the speed, the communication speed for each slave ID can be automatically registered, so that the communication speed and ID of the slaves can be set quickly.

상술한 효과와 더불어 본 발명의 구체적인 효과는 이하 발명을 실시하기 위한 구체적인 사항을 설명하면서 함께 기술한다. 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은 종래 RS485 모드버스로 연결된 마스터와 슬레이브간 네트워크 연결 구성도.
도 2는 본 발명의 일 실시예에 따른 RS485 모드버스로 연결된 마스터와 슬레이브간 네트워크 연결 구성도.
도 3은 본 발명의 일 실시예에 따른 모드버스 멀티 드롭 방식으로 연결된 마스터와 슬레이브간 ID 설정을 위한 신호 처리 흐름도.
도 4는 본 발명의 일 실시예에 따른 모드버스 멀티 드롭 방식으로 연결된 마스터와 슬레이브간 통신 속도 설정을 위한 신호 처리 흐름도.
1 is a block diagram of a network connection between a master and a slave connected by a conventional RS485 Modbus.
2 is a diagram illustrating a network connection configuration between a master and a slave connected by RS485 Modbus according to an embodiment of the present invention.
3 is a signal processing flow diagram for setting an ID between a master and a slave connected in a Modbus multi-drop method according to an embodiment of the present invention.
4 is a signal processing flow diagram for setting a communication speed between a master and a slave connected in a Modbus multi-drop method according to an 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는 본 발명의 일 실시예에 따른 RS485 모드버스로 연결된 마스터와 슬레이브간 네트워크 연결 구성을 도시한 것이다.2 is a diagram showing a network connection configuration between a master and a slave connected by RS485 Modbus according to an embodiment of the present invention.

이때, 마스터(200)는 PLC 등의 네트워크 가능한 기기가 될 수 있으며, 슬레이브(220, 230, 240, 250)는 PLC의해 제어되는 모터 등의 네트워크 가능한 제어 대상 기기가 될 수 있으나, 이에 한정되는 것은 아니다. At this time, the master 200 may be a network capable device such as a PLC, and the slaves 220, 230, 240, 250 may be a network capable control target device such as a motor controlled by a PLC, but are limited thereto. no.

도 2를 참조하면, 먼저, 마스터(200)는 제어부(202), 메모리부(204), 통신부(206) 등을 포함할 수 있다.Referring to FIG. 2, first, the master 200 may include a control unit 202, a memory unit 204, a communication unit 206, and the like.

통신부(206)는 제어부(202)의 제어에 따라 RS485 모드버스 방식으로 슬레이브(220)와 통신을 수행한다. 메모리부(200)는 마스터의 전반적인 동작을 제어하는 동작 프로그램이 저장되어 있으며, 본 발명의 일 실시예에 따라 슬레이브 ID 등록이 완료되지 않은 블랙리스트(black list)와 슬레이브 ID 등록이 완료된 화이트리스트(white list)를 포함할 수 있다.The communication unit 206 communicates with the slave 220 in the RS485 Modbus method under the control of the control unit 202. The memory unit 200 stores an operation program that controls the overall operation of the master, and according to an embodiment of the present invention, a black list for which slave ID registration is not completed and a white list for which slave ID registration is completed ( white list).

제어부(202)는 메모리부(204)에 저장된 동작 프로그램에 따라 마스터(200)의 전반적인 동작을 제어한다. The control unit 202 controls the overall operation of the master 200 according to the operation program stored in the memory unit 204.

또한, 제어부(202)는 본 발명의 실시예에 따라 네트워크로 연결된 복수의 슬레이브에 대한 ID 자동 설정을 위해 모든 슬레이브(220, 230, 240, 250)로 시리얼 번호(serial number) 전송을 요청하는 메시지를 브로드캐스트(broadcast)하고, 각 슬레이브(220, 230, 240, 250)로부터 시리얼 번호를 수신한다. 이러한 시리얼 번호는 각 슬레이브(220, 230, 240, 250)에 할당된 고유한 번호를 의미하며, 각 슬레이브(220, 230, 240, 250)는 마스터(200)로부터 위와 같은 요청을 수신하는 경우 자신의 시리얼 번호를 마스터(200)로 전송하게 된다.In addition, the control unit 202 is a message requesting transmission of a serial number to all slaves 220, 230, 240, 250 for automatic ID setting of a plurality of slaves connected through a network according to an embodiment of the present invention. Broadcast (broadcast), and receives a serial number from each of the slaves (220, 230, 240, 250). This serial number means a unique number assigned to each slave (220, 230, 240, 250), and each slave (220, 230, 240, 250) when receiving the above request from the master 200 itself The serial number of is transmitted to the master 200.

또한, 제어부(202)는 수신된 시리얼 번호를 기반으로 각 슬레이브(220, 230, 240, 250)의 ID를 생성하고 ID 등록이 정상적으로 이루어진 슬레이브를 블랙리스트에서 제거하고 화이트리스트에 등록한다. In addition, the control unit 202 generates an ID of each slave 220, 230, 240, 250 based on the received serial number, removes the slave whose ID registration is normally performed from the black list, and registers it in the white list.

한편, 제어부(202)는 각 슬레이브(220, 230, 240, 250)의 ID를 생성한 후 슬레이브(220)에게 해당 ID 정보를 전송하여 자신의 ID로 등록하도록 요청하게 되고, ID를 정상적으로 등록한 각 슬레이브(220, 230, 240, 250)로부터 ID를 정상적으로 등록했음을 알리는 응답을 수신하게 된다. 이때, 제어부(200)는 정상등록 응답이 수신되지 않은 슬레이브에 대해서는 일정 시간 경과 후 다시 시리얼 번호와 ID를 전송하여 ID 등록을 다시 요청하게 된다.On the other hand, the control unit 202 generates the ID of each of the slaves 220, 230, 240, 250, and then sends the corresponding ID information to the slave 220 to request registration as its own ID. A response indicating that the ID has been normally registered is received from the slaves 220, 230, 240, 250. At this time, the control unit 200 requests ID registration again by transmitting the serial number and ID again after a certain period of time for the slave for which the normal registration response has not been received.

또한, 제어부(202)는 모든 슬레이브(220, 230, 240, 250)에 대한 ID 등록이 완료되는 경우 각 슬레이브(220, 230, 240, 250)와의 통신 속도를 결정한다. 이때 통신 속도를 결정함에 있어서, 제어부(202)는 통신부(206)를 통해 기설정된 여러 가지의 통신 속도로 통신속도 설정용 데이터를 각 슬레이브(220, 230, 240, 250)로 전송한 후, 통신속도 설정용 데이터에 응답하는 해당 슬레이브의 ID를 식별한다. 이어, 제어부(202)는 식별된 ID에 해당하는 슬레이브와의 통신 속도를 통신속도 설정용 데이터에 대응하는 통신 속도로 설정한다.In addition, the controller 202 determines a communication speed with each of the slaves 220, 230, 240, 250 when ID registration for all the slaves 220, 230, 240, 250 is completed. At this time, in determining the communication speed, the control unit 202 transmits the communication speed setting data to each of the slaves 220, 230, 240, 250 at various communication speeds preset through the communication unit 206, and then communicates Identifies the slave ID that responds to the speed setting data. Subsequently, the control unit 202 sets the communication speed with the slave corresponding to the identified ID as the communication speed corresponding to the communication speed setting data.

즉, 각 슬레이브(220, 230, 240, 250)는 제조시 특정 통신 속도를 가지고 있으며, 슬레이브에 따라 이러한 특정 통신 속도는 같거나 다를 수 있다. 이때, 마스터(200)에서는 네트워크에 연결된 슬레이브(220, 230, 240, 250)가 가질 수 있는 서로 다른 통신 속도에 대한 정보를 알고 있는 상태에서 특정 통신 속도로 데이터를 전송하여 보고, 해당 통신 속도의 데이터에 응답하는 슬레이브가 있는 경우 해당 슬레이브의 통신 속도를 데이터를 전송한 통신 속도로 설정하는 것이다.That is, each of the slaves 220, 230, 240, 250 has a specific communication speed at the time of manufacture, and the specific communication speed may be the same or different depending on the slaves. At this time, the master 200 transmits and reports data at a specific communication speed while knowing information about different communication speeds that the slaves 220, 230, 240, 250 connected to the network may have, and If there is a slave that responds to data, the communication speed of the slave is set to the transmission speed of the data.

다음으로, 슬레이브(220, 230, 240, 250)는 제어부(226), 난수 생성기(224), 통신부(222) 등을 포함할 수 있다.Next, the slaves 220, 230, 240, 250 may include a control unit 226, a random number generator 224, a communication unit 222, and the like.

통신부(222)는 제어부(226)의 제어에 따라 RS485 모드버스 방식으로 마스터와 통신을 수행한다. The communication unit 222 communicates with the master through the RS485 Modbus method under the control of the control unit 226.

제어부(226)는 본 발명의 실시예에 따른 슬레이브 ID 자동 설정을 위해 마스터(200)로부터 요청이 있는 경우 슬레이브(220)의 시리얼 번호를 전송하고, 시리얼 번호에 따라 마스터(200)로부터 설정된 슬레이브 ID를 수신하여 해당 슬레이브의 ID로 등록한다.The control unit 226 transmits the serial number of the slave 220 when there is a request from the master 200 for automatic setting of the slave ID according to the embodiment of the present invention, and the slave ID set by the master 200 according to the serial number. And register it as the slave ID.

이때, 제어부(226)는 마스터(200)의 요청에 따라 슬레이브(220)의 시리얼 번호를 전송함에 있어서, 슬레이브(220)에 할당된 고유의 시리얼 번호로 난수 생성기(224)를 초기화하고 임의의 난수 시간만큼 시간 지연 후 자신의 시리얼 번호를 통신부(222)를 통해 마스터(200)로 전송하게 된다.At this time, the control unit 226 initializes the random number generator 224 with a unique serial number assigned to the slave 220 in transmitting the serial number of the slave 220 at the request of the master 200 After a time delay by the amount of time, it transmits its own serial number to the master 200 through the communication unit 222.

또한, 제어부(226)는 슬레이브(220)의 ID 등록 후, 마스터(200)로부터 특정 통신 속도로 데이터가 전송되는 경우 해당 데이터가 슬레이브(220)에 설정된 통신 속도로 전송되는 데이터인 경우 해당 데이터를 수신하고 응답을 마스터(200)로 전송한다. 이에 따라, 마스터(200)에서 슬레이브(220)의 데이터 응답을 기반으로 슬레이브(220)에 설정된 통신 속도를 확인할 수 있게 되는 것이다.In addition, the control unit 226 registers the ID of the slave 220, and when data is transmitted from the master 200 at a specific communication speed, if the data is transmitted at a communication speed set in the slave 220, the corresponding data is It receives and transmits a response to the master 200. Accordingly, the master 200 can check the communication speed set in the slave 220 based on the data response of the slave 220.

도 3은 본 발명의 일 실시예에 따른 모드버스 멀티 드롭 방식으로 연결된 마스터와 슬레이브간 ID 설정을 위한 신호 처리 흐름을 도시한 것이다.3 is a diagram illustrating a signal processing flow for setting an ID between a master and a slave connected in a Modbus multi-drop method according to an embodiment of the present invention.

이하에서는 설명의 편의상 복수의 슬레이브 중 슬레이브(220)와의 동작에 대해 주로 설명하나 복수의 슬레이브 각각에 대해 동일하게 적용 가능하다.Hereinafter, for convenience of description, the operation with the slave 220 is mainly described, but the same can be applied to each of the plurality of slaves.

먼저, 마스터(200)는 슬레이브(220)에 대한 ID 자동 설정을 위해 슬레이브(220)로 시리얼 번호의 전송을 요청한다(S300). 이때, 이러한 시리얼 번호 전송 요청은 브로드캐스트(broadcast)로 전송하여 모든 슬레이브에서 수신할 수 있도록 한다.First, the master 200 requests transmission of a serial number to the slave 220 in order to automatically set the ID for the slave 220 (S300). At this time, the serial number transmission request is transmitted by broadcast so that all slaves can receive it.

그러면, 슬레이브(220)는 마스터(200)로부터 시리얼 번호 요청을 수신하는 경우 자신의 슬레이브(220)에 할당된 고유의 시리얼 번호로 난수 생성기(224)를 초기화하고, 임의의 난수 시간에 대응하는 시간 지연값을 생성한다(S302).Then, when the slave 220 receives a serial number request from the master 200, it initializes the random number generator 224 with a unique serial number assigned to its slave 220, and a time corresponding to a random number time A delay value is generated (S302).

이때, 각 슬레이브(220, 230, 240, 250)에서 자신의 고유의 시리얼 번호로 시간 지연값을 생성함에 따라 시간 지연값은 모두 다르게 설정되며, 이에 따라 슬레이브(220)에서 마스터(200)로 전송되는 시리얼 번호가 서로 다른 시간에 전송되어 데이터 충돌이 방지될 수 있다.At this time, as each slave (220, 230, 240, 250) generates a time delay value with its own serial number, all time delay values are set differently, and accordingly, the time delay value is transmitted from the slave 220 to the master 200 The serial number is transmitted at different times to prevent data collision.

이어, 슬레이브(220)는 시간 지연값 만큼 지연하여 자신에게 할당된 시리얼 번호를 마스터(200)로 전송한다(S304).Subsequently, the slave 220 delays by a time delay value and transmits the serial number assigned to it to the master 200 (S304).

그러면, 마스터(200)는 슬레이브(220)로부터 해당 슬레이브(220)에 할당된 고유의 시리얼 번호를 수신하고, 수신된 시리얼 번호를 기반으로 해당 슬레이브(220)의 ID를 생성한 후, ID가 생성된 슬레이브(220)에 대해서는 블랙리스트에 등록한다(S306).Then, the master 200 receives a unique serial number assigned to the slave 220 from the slave 220, generates an ID of the slave 220 based on the received serial number, and then generates an ID. The registered slave 220 is registered in the blacklist (S306).

이어, 마스터(200)는 위와 같이 슬레이브(220)의 ID를 생성한 후 해당 슬레이브(220)에게 ID 정보를 전송하여 해당 슬레이브(220)의 ID로 등록하도록 요청한다(S308).Subsequently, after generating the ID of the slave 220 as above, the master 200 transmits the ID information to the corresponding slave 220 and requests to be registered as the ID of the slave 220 (S308).

이에 따라, 슬레이브(220)는 마스터(200)로부터 생성되어 전송되는 ID를 자신의 슬레이브 ID로 등록하고(S310), ID를 정상적으로 등록했음을 알리는 응답을 마스터로 전송하게 된다(S312).Accordingly, the slave 220 registers the ID generated and transmitted from the master 200 as its slave ID (S310), and transmits a response notifying that the ID has been normally registered to the master (S312).

그러면, 마스터(200)는 ID가 정상적으로 등록된 슬레이브(220)에 대해서는 ID 등록이 필요한 슬레이브 목록을 저장하고 있는 블랙리스트에서 제거하고(S314), 화이트리스트에 등록한다(S316). 이러한 화이트리스트는 ID 등록이 정상적으로 수행된 슬레이브 목록을 저장하고 있는 리스트를 의미할 수 있다.Then, the master 200 removes the slave 220 for which the ID is normally registered from the black list storing the slave list requiring ID registration (S314), and registers it in the white list (S316). Such a white list may mean a list storing a list of slaves for which ID registration is normally performed.

한편, 마스터(200)는 ID 등록이 정상적으로 수행되었다는 응답이 수신되지 않는 슬레이브(220)에 대해서는 해당 슬레이브(220)를 블랙리스트에서 제거하지 않고, 일정 시간 경과 후 다시 해당 슬레이브(220)의 시리얼 번호와 ID를 전송하여 ID 등록을 다시 요청하게 된다.On the other hand, the master 200 does not remove the slave 220 from the blacklist for the slave 220 that does not receive a response indicating that the ID registration was normally performed, and the serial number of the slave 220 again after a certain period of time has elapsed. And ID to request ID registration again.

도 4는 본 발명의 일 실시예에 따른 모드버스 멀티 드롭 방식으로 연결된 마스터와 슬레이브간 통신 속도 설정을 위한 신호 처리 흐름을 도시한 것이다.4 is a diagram illustrating a signal processing flow for setting a communication speed between a master and a slave connected in a Modbus multi-drop method according to an embodiment of the present invention.

이하에서는 설명의 편의상 복수의 슬레이브 중 슬레이브(220)와의 동작에 대해 주로 설명하나 복수의 슬레이브 각각에 대해 동일하게 적용 가능하다.Hereinafter, for convenience of description, the operation with the slave 220 is mainly described, but the same can be applied to each of the plurality of slaves.

먼저, 마스터(200)는 도 3의 과정을 통해 슬레이브(220)에 대한 ID 설정이 완료되는 경우, 슬레이브(220)와의 통신 속도를 결정한다.First, when ID setting for the slave 220 is completed through the process of FIG. 3, the master 200 determines a communication speed with the slave 220.

이때, 마스터(200)와 연결되는 슬레이브(220)는 해당 기기의 특성에 따라 마스터(200)와 통신 가능한 속도가 서로 다를 수 있다. 이러한 마스터(200)와 슬레이브(220)간 통신 가능한 다양한 통신 속도에 대한 정보는 마스터(200)에 제공될 수 있으나, 마스터(200)는 어떤 슬레이브가 어떤 통신 속도로 설정되어 있는지는 알 수 없는 상태이다.In this case, the slave 220 connected to the master 200 may have different communication speeds with the master 200 according to characteristics of the corresponding device. Information on various communication speeds capable of communication between the master 200 and the slave 220 may be provided to the master 200, but the master 200 does not know which slave is set to which communication speed. .

따라서, 마스터(200)는 기설정된 복수의 통신 속도에 대해 하나의 통신 속도를 선택하여 선택된 통신 속도로 통신속도 설정용 데이터를 생성하여 슬레이브(220)로 전송한다(S400). Accordingly, the master 200 selects one communication speed for a plurality of preset communication speeds, generates data for setting the communication speed at the selected communication speed, and transmits the data to the slave 220 (S400).

그러면, 슬레이브(220)는 통신속도 설정용 데이터를 수신하는 경우 해당 데이터를 분석하여 데이터가 전송된 통신 속도를 확인한 후, 자신에 설정된 통신 속도와 일치하는지 여부를 검사한다(S402). Then, when receiving the data for setting the communication speed, the slave 220 analyzes the data to check the transmission speed at which the data is transmitted, and then checks whether it matches the communication speed set therein (S402).

이때, 통신 속도가 서로 일치하지 않는 경우, 슬레이브(220)는 통신속도 설정용 데이터를 인접한 다음 슬레이브로 포워딩(forwarding)시킨다(S404).At this time, if the communication speeds do not match each other, the slave 220 forwards the communication speed setting data to the next adjacent slave (S404).

그러나, 통신 속도가 서로 일치하는 경우, 슬레이브(220)는 마스터(200)로부터 전송된 통신속도 설정용 데이터에 대한 응답(ACK response)을 마스터(200)로 전송한다(S406).However, when the communication speeds coincide with each other, the slave 220 transmits an ACK response to the communication speed setting data transmitted from the master 200 to the master 200 (S406).

그러면, 마스터(200)는 통신 속도 설정용 데이터에 응답한 해당 슬레이브(220)의 ID를 식별하고(S408), 식별된 슬레이브 ID의 통신 속도를 통신 속도 설정용 데이터에 대응되는 통신 속도로 등록한다(S410).Then, the master 200 identifies the ID of the slave 220 in response to the communication speed setting data (S408), and registers the communication speed of the identified slave ID as the communication speed corresponding to the communication speed setting data. (S410).

상술한 바와 같이, 본 발명의 일 실시예에 따르면, 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정에 있어서, 마스터에서 슬레이브의 시리얼 번호에 기반하여 슬레이브 ID를 자동 생성하여 등록하고, 등록된 슬레이브 ID를 이용하여 통신 속도별 제작된 데이터에 응답한 슬레이브 ID를 식별하는 것을 통해 슬레이브 ID별 통신 속도를 자동 등록할 수 있도록 함으로써 슬레이브들의 통신 속도와 ID를 신속하게 설정할 수 있다.As described above, according to an embodiment of the present invention, in the communication setting of a network device connected by a Modbus multi-drop method, the master automatically generates and registers a slave ID based on the serial number of the slave, and the registered slave The communication speed and ID of the slaves can be set quickly by automatically registering the communication speed for each slave ID by identifying the slave ID that responds to the data produced for each communication speed using the ID.

이상과 같이 본 발명에 대해서 예시한 도면을 참조로 하여 설명하였으나, 본 명세서에 개시된 실시 예와 도면에 의해 본 발명이 한정되는 것은 아니며, 본 발명의 기술사상의 범위 내에서 통상의 기술자에 의해 다양한 변형이 이루어질 수 있음은 자명하다. 아울러 앞서 본 발명의 실시 예를 설명하면서 본 발명의 구성에 따른 작용 효과를 명시적으로 기재하여 설명하지 않았을 지라도, 해당 구성에 의해 예측 가능한 효과 또한 인정되어야 함은 당연하다.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.

200 : 마스터 202 : 제어부
204 : 메모리부 206 : 통신부
220 : 슬레이브 222 : 통신부
224 : 난수 생성기 226 : 제어부
200: master 202: control unit
204: memory unit 206: communication unit
220: slave 222: communication unit
224: random number generator 226: control unit

Claims (9)

모드버스 멀티 드롭 방식으로 연결된 마스터와 복수의 슬레이브간 통신 설정 방법으로서,
상기 마스터에서 각 슬레이브로 시리얼 번호 전송을 요청하는 단계와,
상기 요청에 따라 각 슬레이브로부터 송신되는 시리얼 번호를 수신하는 단계와,
상기 시리얼 번호를 기반으로 상기 각 슬레이브의 ID를 생성하고, 상기 ID의 슬레이브를 블랙리스트에 등록하는 단계와,
상기 ID를 대응되는 각각의 슬레이브에 제공하여 ID 등록을 요청하는 단계와,
상기 ID 등록이 정상적으로 이루어진 슬레이브를 상기 블랙리스트에서 제거하는 단계
를 포함하는 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
This is a communication setting method between a master and multiple slaves connected by Modbus multi-drop method,
Requesting transmission of a serial number from the master to each slave; and
Receiving a serial number transmitted from each slave according to the request,
Generating an ID of each slave based on the serial number, and registering the slave of the ID in a blacklist;
Providing the ID to each corresponding slave to request ID registration; and
Removing the slave on which the ID registration was normally performed from the blacklist
Communication setting method of a network device connected by a Modbus multi-drop method including a.
제 1 항에 있어서,
상기 시리얼 번호를 수신하는 단계는,
상기 각 슬레이브에서 자신의 시리얼 번호로 난수 생성기를 초기화하는 단계와,
상기 초기화된 난수 생성기를 통해 생성된 임의의 난수에 대응하는 시간 지연값만큼 시간 지연 후 상기 자신의 시리얼 번호를 상기 마스터로 전송하는 단계와,
상기 마스터에서 상기 시간 지연값에 따라 서로 다른 시간에 전송되는 상기 각 슬레이브의 시리얼 번호를 수신하는 단계
를 포함하는 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
The method of claim 1,
Receiving the serial number,
Initializing a random number generator with its own serial number in each of the slaves,
Transmitting the own serial number to the master after a time delay by a time delay value corresponding to a random number generated through the initialized random number generator;
Receiving serial numbers of the slaves transmitted at different times according to the time delay value from the master
Communication setting method of a network device connected by a Modbus multi-drop method including a.
제 1 항에 있어서,
상기 ID 등록이 정상적으로 이루어진 슬레이브를 상기 블랙리스트에서 제거하는 단계는,
상기 ID를 자신의 ID로 정상적으로 등록한 슬레이브로부터 ID 정상등록 응답을 수신하는 단계와,
상기 ID 정상등록 응답을 전송한 슬레이브를 상기 블랙리스트에서 제거하는 단계
를 포함하는 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
The method of claim 1,
The step of removing the slave on which the ID registration is normally performed from the blacklist,
Receiving an ID normal registration response from a slave that has normally registered the ID as its ID,
Removing the slave that has transmitted the ID normal registration response from the blacklist
Communication setting method of a network device connected by a Modbus multi-drop method including a.
제 1 항에 있어서,
상기 ID 정상등록 응답을 수신하지 않은 슬레이브에 상기 마스터에서 일정 시간 경과 후 다시 시리얼 번호와 ID를 전송하여 ID 등록을 요청하는 단계를 더 포함하는 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
The method of claim 1,
And requesting ID registration by transmitting a serial number and an ID again after a predetermined time elapses from the master to a slave that has not received the normal ID registration response.
제 1 항에 있어서,
모든 슬레이브에 대한 ID 등록이 완료되는 경우 상기 ID 등록이 완료된 슬레이브에 대한 정보를 화이트리스트로 저장하여 관리하는 단계를 더 포함하는 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
The method of claim 1,
When ID registration for all slaves is completed, the method of setting communication of a network device connected by a Modbus multi-drop method, further comprising storing and managing information on the slaves for which ID registration has been completed as a white list.
제 1 항에 있어서,
상기 마스터에서 상기 모든 슬레이브의 ID로 기설정된 서로 다른 통신 속도로 통신속도 설정용 데이터를 전송하는 단계와,
통신 속도별 상기 데이터에 응답하는 해당 슬레이브의 ID를 식별하는 단계와,
상기 식별된 ID에 해당하는 슬레이브와의 통신 속도를 상기 데이터를 전송한 통신 속도로 설정하는 단계
를 포함하는 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
The method of claim 1,
Transmitting communication speed setting data at different communication speeds preset by the master IDs of all the slaves,
Identifying the ID of the slave corresponding to the data for each communication speed,
Setting a communication speed with a slave corresponding to the identified ID as a communication speed at which the data is transmitted
Communication setting method of a network device connected by a Modbus multi-drop method including a.
제 1 항에 있어서,
상기 ID를 생성하는 단계에서,
상기 각 슬레이브의 시리얼 번호를 기반으로 각 시리얼 번호별 서로 다른 ID를 설정하는 모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
The method of claim 1,
In the step of generating the ID,
Communication setting method of a network device connected by a Modbus multi-drop method in which different IDs are set for each serial number based on the serial number of each slave.
제 1 항에 있어서,
상기 블랙리스트는
슬레이브 ID 등록이 완료되지 않은 슬레이브의 목록인
모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
The method of claim 1,
The blacklist is
Slave ID registration is not completed.
Communication setting method of network devices connected by Modbus multi-drop method.
제 5 항에 있어서,
상기 화이트리스트는
슬레이브 ID 등록이 완료된 슬레이브의 목록인
모드버스 멀티 드롭 방식으로 연결된 네트워크 기기의 통신 설정 방법.
The method of claim 5,
The above white list is
The list of slaves for which slave ID registration has been completed.
Communication setting method of network devices connected by Modbus multi-drop method.
KR1020190036705A 2019-03-29 2019-03-29 Method for setting up communication parameters of network devices connected with modbus/multi-drop KR20200114629A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020190036705A KR20200114629A (en) 2019-03-29 2019-03-29 Method for setting up communication parameters of network devices connected with modbus/multi-drop
PCT/KR2019/012080 WO2020204281A1 (en) 2019-03-29 2019-09-18 Method for setting communication between network devices connected by modbus multi-drop method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190036705A KR20200114629A (en) 2019-03-29 2019-03-29 Method for setting up communication parameters of network devices connected with modbus/multi-drop

Publications (1)

Publication Number Publication Date
KR20200114629A true KR20200114629A (en) 2020-10-07

Family

ID=72666549

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190036705A KR20200114629A (en) 2019-03-29 2019-03-29 Method for setting up communication parameters of network devices connected with modbus/multi-drop

Country Status (2)

Country Link
KR (1) KR20200114629A (en)
WO (1) WO2020204281A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE19939568C1 (en) * 1999-08-20 2001-02-08 Pilz Gmbh & Co Data transmission rate setting method for field bus system for safety critical process control has transmission rate set to higher data rate by central control after intial signalling of substations connected to field bus
US7246193B2 (en) * 2003-01-30 2007-07-17 Rosemount, Inc. Interface module for use with a Modbus device network and a Fieldbus device network
US8190697B2 (en) * 2009-05-20 2012-05-29 Square D Company Automated configuration of device communication settings
JP5519734B2 (en) * 2012-06-26 2014-06-11 ファナック株式会社 Master device that changes data communication speed when motor drive preparation is complete
TWI481245B (en) * 2012-12-19 2015-04-11 Motech Ind Inc Address setting method for slave devices of communication network

Also Published As

Publication number Publication date
WO2020204281A1 (en) 2020-10-08

Similar Documents

Publication Publication Date Title
JP5536958B2 (en) How to automatically assign addresses to similar bus subscribers
CN100501614C (en) Method and system for automated configuring of a HART multi-drop system
CN101167341A (en) Address assignment for safe users of a field bus
JP2004048304A (en) Data transmission method for network
US20010021897A1 (en) Method for monitoring a control system
CA2816323A1 (en) Field panel with embedded webserver and method of accessing the same
US11379391B2 (en) Real-time automation device having a real-time data bus
JP5792866B2 (en) Profibus DP master device
EP3417679B1 (en) Secure network commissioning for lighting systems
US9501440B2 (en) Slave control device and method for programming a slave control device
JPH0946361A (en) Serial data transmitter and its controlling method
KR20200114629A (en) Method for setting up communication parameters of network devices connected with modbus/multi-drop
US10313040B2 (en) Communication device, communication system, and method for synchronized transmission of telegrams
US20210377068A1 (en) Aggregator apparatus for standardized access to a plurality of network segments of a field bus system
JP5262353B2 (en) COMMUNICATION SYSTEM, COMMUNICATION DEVICE, AND COMMUNICATION METHOD
US7730240B2 (en) Method for controlling the access times to a system bus and communication module
CN102301655B (en) Network system
US10524219B2 (en) Communication apparatus, communication system and communication method
WO2010087496A1 (en) Network system
KR101294308B1 (en) Facilities control system and operating method of the system
JP2006319394A (en) Network diagnostic apparatus, and network diagnostic method
JP2000227803A (en) Method and system for controlling transmission in data link system of programmable controller
JP2007243747A (en) Transmission timing setting method of on-vehicle lan and electronic control unit
JP3813824B2 (en) Device startup interval management device, startup interval management system, and startup interval management method
KR101870560B1 (en) Apparatus for identifying network information

Legal Events

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