KR20140103089A - Method and system for ethercat-based distributed clokc synchronization - Google Patents

Method and system for ethercat-based distributed clokc synchronization Download PDF

Info

Publication number
KR20140103089A
KR20140103089A KR1020140018073A KR20140018073A KR20140103089A KR 20140103089 A KR20140103089 A KR 20140103089A KR 1020140018073 A KR1020140018073 A KR 1020140018073A KR 20140018073 A KR20140018073 A KR 20140018073A KR 20140103089 A KR20140103089 A KR 20140103089A
Authority
KR
South Korea
Prior art keywords
delay time
slave devices
ethernet
command message
distributed clock
Prior art date
Application number
KR1020140018073A
Other languages
Korean (ko)
Other versions
KR101492910B1 (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 서울시립대학교 산학협력단
Publication of KR20140103089A publication Critical patent/KR20140103089A/en
Application granted granted Critical
Publication of KR101492910B1 publication Critical patent/KR101492910B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0016Arrangements for synchronising receiver with transmitter correction of synchronization errors
    • H04L7/0033Correction by delay
    • H04L7/0041Delay of data signal
    • 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/407Bus networks with decentralised control

Abstract

The present invention relates to a distributed clock synchronization method and system based on EtherCAT and, more specifically, to a technology to automate a distributed clock configuration of a EtherCAT master stack by calculating a delay time of all slave devices that form an EtherCAT network and by automatically calculating the time from the start of a control cycle until the operation of the slave devices ends. According to an embodiment of the present invention, the distributed clock synchronization method based on EtherCAT comprises a delay time collecting step, an calculating step, a configuration step, and an operating step.

Description

이더캣 기반의 분산 시계 동기화를 위한 방법 및 시스템 {METHOD AND SYSTEM FOR ETHERCAT-BASED DISTRIBUTED CLOKC SYNCHRONIZATION}[0001] METHOD AND SYSTEM FOR ETHERCAT-BASED DISTRIBUTED CLOCK SYNCHRONIZATION [0002]

본 발명은 이더캣 기반의 분산 시계 동기화를 위한 방법 및 시스템에 관한 것으로, 보다 상세하게는 이더캣 네트워크를 구성하는 모든 슬레이브 장치의 지연 시간을 계산함으로써, 제어 주기의 시작 시점부터 모든 슬레이브 장치의 연산이 끝난 시점까지의 시간을 자동으로 계산하여 이더캣 마스터 스택의 분산 시계 설정을 자동화하는 기술에 관한 것이다.[0001] The present invention relates to a method and system for distributed clock synchronization based on an Ethernet, and more particularly, to a method and system for an Ethernet-based distributed clock synchronization by calculating delay times of all slave devices constituting an ethernet network, And automating the distribution clock setting of the EtherCAT master stack.

최근 통신기술의 발전과, 설치의 편리성 및 비용 절감 등의 이유로 산업용 네트워크를 통해 복수의 장치들을 서로 연결하여 제어하고 있다. 복수의 장치들을 연결하는 네트워크들 중에서 이더캣(EtherCAT ; Ethernet for Control Automation Technology) 네트워크는 산업용 이더넷의 한 종류로 빠른 데이터의 업데이트 기능을 가지면서 복수의 장치들 사이의 동기 제어가 가능하다.Background Art [0002] Recently, a plurality of devices are connected and controlled through an industrial network for reasons of development of communication technology, convenience of installation, and cost reduction. Among the networks connecting a plurality of devices, EtherCAT (Ethernet Control Automation Technology) network is one kind of industrial Ethernet and can perform synchronous control among a plurality of devices while having a function of updating data fast.

통상적으로 이더캣 네트워크는 하나의 마스터 장치와 복수의 슬레이브 장치로 이루어진다. 상기 하나의 마스터 장치는 통신모듈로 예를 들면, 표준의 이더넷 집적소자를 사용하고, 복수의 슬레이브 장치들은 통신모듈로 예를 들면, 전용의 이더캣 ASIC(Application Specific Integrated Circuit)를 사용하고 있다.Typically, the EtherCAT network consists of one master device and a plurality of slave devices. The one master device uses a standard Ethernet integrated device, for example, as a communication module, and the plurality of slave devices use a dedicated Ethernet application specific integrated circuit (ASIC) as a communication module, for example.

이더캣 네트워크에서는 복수의 슬레이브 장치들의 동작을 동기시키기 위하여 분산 클럭(Distributed Clock) 기능을 사용하며, 상기 분산 클럭 기능은 복수의 슬레이브 장치들 각각에 구비되어 있는 통신모듈인 이더캣 ASIC에서 관리되는 동기화된 시계와, 상기 동기화된 시계에 맞춰 발생하는 동기 신호로 구현된다. 따라서, 이더캣 네트워크를 통해 연결된 복수의 슬레이브 장치들은 상기 분산 클럭 기능에 의해 동기화된 시계에 맞춰 동기화된 동작을 수행할 수 있다.In the EtherCAT network, a distributed clock function is used to synchronize the operation of a plurality of slave devices. The distributed clock function is a function of synchronizing (synchronizing) a plurality of slave devices, which are managed by an EtherCAT ASIC, And a synchronization signal generated according to the synchronized clock. Accordingly, a plurality of slave devices connected through the EtherCAT network can perform a synchronized operation according to the clock synchronized by the distributed clock function.

하지만, 복수의 슬레이브 장치에 각기 구비되어 데이터를 처리하는 프로세서와, 프로세서의 제어에 의해 액추에이터를 구동시키는 드라이버는 별도의 클럭 신호에 의해 동작되기 때문에, 복수의 슬레이브 장치들의 동작을 동기시키기 위해 분산 클럭 기능을 사용하더라도 복수의 슬레이브 장치들에 각기 구비되어 있는 프로세서들의 동작은 동기가 되지 않음은 물론 슬레이브 장치들에 각기 구비되어 있는 드라이버에 의해 구동되는 액추에이터 또한 동기가 되지 않았다.However, in order to synchronize the operation of a plurality of slave devices, a processor for processing data provided for each of a plurality of slave devices and a driver for driving the actuator under control of the processor are operated by separate clock signals, The operation of the processors provided in the plurality of slave devices is not synchronous and the actuators driven by the drivers provided in the slave devices are not synchronized.

따라서, 이더캣 네트워크에서 액추에이터를 구동시키기 위하여, 마스터 장치가 슬레이브 장치로 액추에이터의 구동에 관한 데이터를 전송한 경우, 상기 전송된 데이터에 의하여 액추에이터가 실제 구동되기 전까지는 각 부분에서의 데이터 처리 지연 시간의 발생이 불가피하였다. 즉, 액추에이터가 실제 구동되기까지 각 슬레이브 장치에 의한 릴레이 지연 시간, 각 슬레이브 장치가 수신한 데이터를 처리하여 출력 값을 계산하는데 필요한 지연 시간 등 다수의 지연 시간 변수들이 발생하기 때문에, 복수의 슬레이브 장치에 의해 구동되는 액추에이터의 구동을 정밀하게 제어하는 것은 한계가 있었다.Therefore, in order to drive the actuator in the EtherCAT network, when the master device transmits data related to the driving of the actuator to the slave device, until the actuator is actually driven by the transmitted data, the data processing delay time . That is, since a plurality of delay time variables such as the relay delay time by each slave device, the delay time required for calculating the output value by processing the data received by each slave device are generated until the actuator is actually driven, There is a limit to precisely control the driving of the actuator driven by the actuator.

한편, 한국등록특허 제 1044521호 "네트워크에 연결된 슬레이브 장치들의 동기 제어장치"는 네트워크에 연결된 복수의 슬레이브 장치들의 동작을 상호간에 동기시키는 동기 제어장치로서, 제1 동기신호가 발생할 때마다 프로세서가 액추에이터를 구동시킬 제어 데이터를 생성하고, 제1 동기신호에 의한 동기 인터럽트가 발생할 경우에 제어데이터를 드라이버로 출력하며, 통신모듈의 수신 데이터를 입력하고 처리하여 상기 제어 데이터를 생성할 수 있도록 하며, 프로세서의 제어에 따라 타이머가 설정된 주기로 타이머 인터럽트를 발생하게 하고, 제1 동기신호가 발생하지 않고, 상기 타이머 인터럽트가 발생할 경우에 프로세서가 제어데이터를 생성하고, 생성한 제어 데이터를 드라이버로 출력하는 기술을 제시한다.Korean Patent No. 1044521 entitled "Synchronous control device of slave devices connected to a network" is a synchronous control device for synchronizing the operations of a plurality of slave devices connected to a network. Each time a first synchronous signal is generated, And outputs the control data to the driver when the synchronous interruption by the first synchronous signal occurs, so that the control data can be generated by inputting and processing the received data of the communication module, The timer generates a timer interruption at a predetermined cycle and the processor generates control data when the first interruption signal is not generated and the timer interruption occurs and outputs the generated control data to the driver present.

상기 선행기술은 제시된 기술을 이용함으로써, 네트워크에 연결되어 있는 복수의 슬레이브 장치 내에 각기 구비되어 있는 프로세서의 동작과 드라이버의 동작을 정확하게 동기시켜 복수의 슬레이브 장치에 의해 구동되는 액추에이터의 구동을 정밀하게 제어하는 것이 가능하다고 기술하고 있으나, 상기 선행기술은 다수의 지연 시간 변수들에 대한 최적의 공정을 진행하지 않으므로, 즉, 네트워크에 연결된 복수의 종속장치들의 동기화된 입출력 공정 중 발생 가능한 지연 시간 변수들(각 슬레이브 장치에 의한 릴레이 지연 시간, 각 슬레이브 장치가 수신한 데이터를 처리하여 출력 값을 계산하는데 필요한 지연 시간 등)을 고려하여 공정을 진행하지 않으므로, 상기 선행기술이 액추에이터의 구동을 최대 성능으로 제어한다고 보기는 어렵다.The prior art described above precisely controls the driving of actuators driven by a plurality of slave devices by precisely synchronizing the operation of the processor and the operation of the driver provided in each of a plurality of slave devices connected to the network However, since the prior art does not perform an optimal process for a plurality of delay time variables, i.e., delay time variables that can be generated during a synchronized input / output process of a plurality of slave devices connected to the network The relay delay time by each slave device, the delay time required for processing the data received by each slave device and calculating the output value, etc.), the prior art does not control the driving of the actuator to the maximum performance It is difficult to see.

따라서, 액추에이터의 구동을 최대 성능으로 보다 정밀하게 제어할 수 있는 기술이 요구된다.Therefore, there is a demand for a technique capable of more precisely controlling the driving of the actuator with maximum performance.

한국등록특허 제 1044521호 (등록일: 2011.06.20)Korean Registered Patent No. 1044521 (Registered on Jun. 20, 2011)

본 발명은 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치들의 동기화된 입출력을 지원하기 위하여 이더캣 마스터 스택의 분산 시계 설정을 자동화하는 기술을 제공하려는 것을 목적으로 한다.It is an object of the present invention to provide a technology for automating distributed clock setting of an EtherCAT master stack to support synchronized input / output of a plurality of slave devices connected to an Ethernet based network.

본 발명은 네트워크에 연결된 복수 개의 슬레이브 장치들의 동기화된 입출력 공정에서 발생하는 지연 시간 변수들을 고려하여 액추에이터의 구동을 보다 정밀하게 제어하려는 것을 목적으로 한다.An object of the present invention is to more precisely control driving of an actuator in consideration of delay time variables generated in a synchronized input / output process of a plurality of slave devices connected to a network.

이러한 목적을 달성하기 위하여 본 발명의 일 실시예에 따른 이더캣 기반의 분산 시계 동기화를 위한 방법은 지연 시간 수집 단계, 연산 단계, 설정 단계 및 동작 단계를 포함한다.In order to accomplish the above object, a method for an Ethernet-based distributed clock synchronization according to an embodiment of the present invention includes a delay time collection step, an operation step, a setting step, and an operation step.

상기 지연 시간 수집 단계는 시운전을 실시하여 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치 각각이 명령 메시지를 처리할 때 발생하는 지연 시간을 수집하고, 상기 연산 단계는 상기 수집된 지연 시간을 이용하여 상기 복수 개의 슬레이브 장치가 연결된 상기 이더캣 기반의 네트워크에서 상기 복수개의 슬레이브 장치를 동기화하여 구동하기 위해 필요한 최소 지연 시간 값을 연산하고, 상기 설정 단계는 이더캣 마스터 스택의 분산 시계 설정을 상기 연산된 최소 지연 시간 값을 반영하여 자동으로 설정하며, 상기 동작 단계는 상기 최소 지연 시간 값이 설정된 후 일정 주기마다 분산 시계 이벤트가 발생할 경우, 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치가 상기 연산된 최소 지연 시간 값에 대응하는 시간 이후 동시에 동작하도록 한다.Wherein the collecting of the delay time collects a delay time occurring when each of the plurality of slave devices connected to the Ethernet-based network processes a command message by conducting a trial operation, Wherein the controller calculates a minimum delay time value necessary for synchronously driving the plurality of slave devices in the Ethernet-based network to which a plurality of slave devices are connected, and the setting step sets the distributed clock setting of the EtherCAT master stack to the calculated minimum Wherein the plurality of slave devices connected to the Ethernet-based network are configured to calculate the delay time when the distributed clock event occurs every predetermined period after the minimum delay time value is set, The time corresponding to the minimum delay value .

또한, 상기 지연 시간 수집 단계는 이더캣 마스터에서 송신된 상기 명령 메시지가 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치를 순차적으로 통과한 후 상기 이더캣 마스터로 돌아오는 과정에서 발생하는 지연 시간을 수집할 수 있으며, 이때, 상기 지연 시간 수집 단계는 제어기에 의한 상기 명령 메시지의 처리 지연 시간, 상기 복수 개의 슬레이브 장치 각각에 의한 릴레이 지연 시간, 상기 복수 개의 슬레이브 장치 각각이 상기 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간 및 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 중 마지막 슬레이브 장치를 통과한 상기 명령 메시지가 상기 이더캣 마스터로 돌아오는데 걸리는 지연 시간을 수집할 수 있다.In addition, the delay time collection step may include a delay time step in which the command message transmitted from the EtherCAT master sequentially passes through the plurality of slave devices connected to the Ethernet-based network and then returns to the EtherCAT master Wherein the delay time collection step includes a processing delay time of the command message by the controller, a relay delay time by each of the plurality of slave devices, and a plurality of slave devices each processing the command message The processing time required to calculate the output value and the delay time required for the command message, which has passed through the last slave device among the plurality of slave devices connected to the Ethernet-based network, to return to the ethercart master.

또한, 상기 동작 단계는 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 각각이 모두 상기 명령 메시지를 처리한 시간 이후에 동시에 동작하도록 할 수 있다.In addition, the operating step may cause the plurality of slave devices connected to the Ethernet-based network to simultaneously operate after the time of processing the command message.

한편, 본 발명의 일 실시예에 따른 이더캣 기반의 분산 시계 동기화를 위한 시스템은 지연 시간 수집부, 연산부, 설정부 및 동작부를 포함한다.Meanwhile, the system for EDC-based distributed clock synchronization according to an embodiment of the present invention includes a delay time collection unit, an operation unit, a setting unit, and an operation unit.

상기 지연 시간 수집부는 시운전을 실시하여 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치 각각이 명령 메시지를 처리할 때 발생하는 지연 시간을 수집하고, 상기 연산부는 상기 수집된 지연 시간을 이용하여 상기 복수 개의 슬레이브 장치가 연결된 상기 이더캣 기반의 네트워크에서 상기 복수개의 슬레이브 장치를 동기화하여 구동하기 위해 필요한 최소 지연 시간 값을 연산하고, 상기 설정부는 이더캣 마스터 스택의 분산 시계 설정을 상기 연산된 최소 지연 시간 값을 반영하여 자동으로 설정하며, 상기 동작부는 상기 최소 지연 시간 값이 설정된 후 일정 주기마다 분산 시계 이벤트가 발생할 경우, 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치가 상기 연산된 최소 지연 시간 값에 대응하는 시간 이후 동시에 동작하도록 한다.Wherein the delay time collection unit collects a delay time occurring when each of the plurality of slave devices connected to the Ethernet-based network processes a command message by conducting a trial operation, Wherein the controller calculates a minimum delay time value required for synchronously driving the plurality of slave devices in the Ethernet based network to which the slave device is connected and the setting unit sets the distributed clock setting of the EtherCAT master stack to the calculated minimum delay time value And the operation unit automatically sets the minimum delay time value when the distributed clock event occurs every predetermined period after the minimum delay time value is set, wherein the plurality of slave devices connected to the Ethernet- Lt; RTI ID = 0.0 > It shall be small.

또한, 상기 지연 시간 수집부는 이더캣 마스터에서 송신된 상기 명령 메시지가 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치를 순차적으로 통과한 후 상기 이더캣 마스터로 돌아오는 과정에서 발생하는 지연 시간을 수집할 수 있으며, 이때, 상기 지연 시간 수집부는 제어기에 의한 상기 명령 메시지의 처리 지연 시간, 상기 복수 개의 슬레이브 장치 각각에 의한 릴레이 지연 시간, 상기 복수 개의 슬레이브 장치 각각이 상기 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간 및 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 중 마지막 슬레이브 장치를 통과한 상기 명령 메시지가 상기 이더캣 마스터로 돌아오는데 걸리는 지연 시간을 수집할 수 있다.Also, the delay time collection unit may calculate a delay time occurring in the process of returning to the EtherCAT master after the command message transmitted from the EtherCAT sequentially passes through the plurality of slave devices connected to the Ethernet-based network The delay time collecting unit may calculate a delay time of the command message by the controller, a relay delay time of each of the plurality of slave devices, and a delay time of each of the plurality of slave devices by processing the command message, And a delay time for returning the command message, which has passed through the last slave device among the plurality of slave devices connected to the Ethernet-based network, to the ethercart master.

또한, 상기 동작부는 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 각각이 모두 상기 명령 메시지를 처리한 시간 이후에 동시에 동작하도록 할 수 있다.In addition, the operation unit may cause the plurality of slave devices connected to the Ethernet-based network to simultaneously operate after the time of processing the command message.

본 발명은 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치들의 정밀하게 동기화된 입출력을 지원하기 위하여 이더캣 마스터 스택의 분산 시계 설정을 자동화할 수 있는 효과가 있다.The present invention has the effect of automating the distributed clock setting of the EtherCAT master stack to support precisely synchronized input / output of a plurality of slave devices connected to the Ethernet based network.

본 발명은 이더캣 네트워크를 구성하는 모든 슬레이브 장치의 지연 시간을 계산하고, 제어 주기의 시작 시점부터 모든 슬레이브 장치의 연산이 끝난 시점까지의 시간을 자동으로 계산하여 이더캣 마스터 스택의 분산 시계 설정을 자동화함으로써, 액추에이터의 구동을 보다 정밀하게 제어할 수 있는 효과가 있다.The present invention calculates the delay time of all the slave devices constituting the Ethernet network and automatically calculates the time from the start of the control cycle to the end of the operation of all the slave devices to set the distributed clock setting of the Ethernet master stack By the automation, the driving of the actuator can be controlled more precisely.

본 발명은 네트워크에 연결된 복수 개의 슬레이브 장치들의 동기화된 입출력 공정에서 발생하는 지연 시간 변수들을 고려하여 액추에이터의 구동을 보다 정밀하게 제어할 수 있는 효과가 있다.The present invention has the effect of more precisely controlling the driving of the actuator in consideration of the delay time parameters generated in the synchronized input / output process of a plurality of slave devices connected to the network.

본 발명은 수집된 지연 시간, 즉 제어기에 의한 명령 메시지의 처리 지연 시간, 복수 개의 슬레이브 장치 각각에 의한 릴레이 지연 시간, 복수 개의 슬레이브 장치 각각이 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간 및 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치 중 마지막 슬레이브 장치를 통과한 명령 메시지가 이더캣 마스터로 돌아오는데 걸리는 지연 시간을 이용하여, 복수 개의 슬레이브 장치가 연결된 이더캣 기반의 네트워크에서 상기 복수개의 슬레이브 장치를 동기화하여 구동하기 위해 필요한 최소 지연 시간 값을 연산하고, 상기 연산된 최소 지연 시간 값을 기반으로 액추에이터를 구동하므로, 보다 정밀한 제어가 가능한 효과가 있다.The present invention is characterized in that the collected delay time, that is, the processing delay time of the command message by the controller, the relay delay time by each of the plurality of slave devices, the processing time required for each of the plurality of slave devices to process the command message, Based network, in which a plurality of slave devices are connected, using a delay time taken for returning a command message, which has passed through the last slave device among a plurality of slave devices connected to the Ethernet-based network, to the ethercart master, A minimum delay time value necessary for synchronizing and driving the apparatus is calculated, and the actuator is driven based on the calculated minimum delay time value, thereby achieving more accurate control.

도 1은 본 발명의 일 실시예에 따른 이더캣 기반의 분산 시계 동기화를 위한 시스템의 개략적인 구성도이다.
도 2는 본 발명의 일 실시예에 따른 동기화된 출력 공정에서의 자동화 분산 시계 설정을 나타낸 도면이다.
도 3은 본 발명의 일 실시예에 따른 동기화된 입력 공정에서의 자동화 분산 시계 설정을 나타낸 도면이다.
도 4는 본 발명의 일 실시예에 따른 이더캣 기반의 분산 시계 동기화를 위한 방법에 대한 흐름도이다.
FIG. 1 is a schematic block diagram of a system for distributed clock synchronization based on an Ethernet according to an embodiment of the present invention. Referring to FIG.
2 is a diagram illustrating an automated distributed clock setting in a synchronized output process in accordance with an embodiment of the present invention.
3 is a diagram illustrating an automated distributed clock setting in a synchronized input process in accordance with an embodiment of the present invention.
4 is a flowchart illustrating a method for an Ethernet-based distributed clock synchronization according to an embodiment of the present invention.

이하, 본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략하기로 한다. 또한 본 발명의 실시예들을 설명함에 있어 구체적인 수치는 실시예에 불과하다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear. In the following description of the embodiments of the present invention, specific values are only examples.

본 발명은 산업용 실시간 네트워크의 일종인 이더캣(EtherCAT)을 이용하는 공정 자동화(Automated Process) 시스템에서 슬레이브 장치들의 정밀하게 동기화된 입출력을 지원하기 위하여, 이더캣의 분산 시계(DC, Distributed Clock) 설정을 자동화하는 기술에 관한 것이다. 보다 자세하게는, 이더캣 네트워크를 구성하는 모든 슬레이브 장치의 지연 시간을 계산함으로써, 제어 주기의 시작 시점부터 모든 슬레이브 장치의 연산이 끝난 시점까지의 시간을 자동으로 계산하여 이더캣 마스터 스택의 분산 시계 설정을 자동화하는 기술에 관한 것이다In order to support precisely synchronized input and output of slave devices in a process automation system using EtherCAT, which is a kind of industrial real-time network, the Ethernet controller of the present invention is provided with a distributed clock (DC) Automation technology. More specifically, by calculating the delay time of all the slave devices constituting the EtherCAT network, the time from the start of the control cycle to the end of the operation of all the slave devices is automatically calculated and the distributed clock setting of the Ethernet master stack ≪ / RTI >

본 발명에서 제안하는 이더캣 기반의 분산 시계 동기화를 위한 시스템(100)은 마스터 컨트롤러일 수 있으며, 이는 공정의 운영 전 시운전을 실시하고, 복수 개의 슬레이브 장치들의 동기화된 입출력 공정 중 지연이 발생하는 각 부분에서의 지연 시간을 수집하고, 상기 수집된 지연 시간을 이용하여 복수 개의 슬레이브 장치가 연결된 이더캣 기반의 네트워크에서 상기 복수개의 슬레이브 장치를 동기화하여 구동하기 위해 필요한 최소 지연 시간 값을 연산하고, 이더캣 마스터 스택의 분산 시계 설정을 상기 연산된 최소 지연 시간 값을 반영하여 자동으로 설정한다. 그리고, 최소 지연 시간 값이 설정된 후 일정 주기마다 분산 시계 이벤트가 발생할 경우, 상기 이더캣 기반의 네트워크에 연결된 상기 복수개의 슬레이브 장치가 상기 연산된 최소 지연 시간 값에 대응하는 시간 이후 동시에 동작하도록 하므로, 액추에이터의 구동을 보다 정밀하게 제어하는 것이 가능하다.The system 100 for the distributed clock synchronization according to the present invention may be a master controller, which performs a trial operation before the operation of the process, and performs an operation of synchronizing input / output of the plurality of slave devices And calculates a minimum delay time value necessary for synchronizing and driving the plurality of slave devices in a network based on the Ethernet based on the collected delay time, The distributed clock setting of the cat master stack is automatically set to reflect the calculated minimum delay time value. When the distributed clock event occurs every predetermined period after the minimum delay time value is set, the plurality of slave devices connected to the Ethernet based network simultaneously operate after the time corresponding to the calculated minimum delay time value, It is possible to more precisely control the driving of the actuator.

즉, 본 발명은 이더캣 기반의 분산 시계 동기화를 위한 방법 및 시스템에 관한 것으로서, 네트워크에 연결된 복수 개의 슬레이브 장치들의 동기화된 입출력 공정 중 발생하는 지연 시간 변수들(각 슬레이브 장치에 의한 릴레이 지연 시간, 각 슬레이브 장치가 수신한 데이터를 처리하여 출력값을 계산하는데 필요한 지연 시간 등)을 고려하여 공정의 설정을 자동으로 진행함으로써, 액추에이터의 구동을 보다 정밀하게 제어할 수 있다.That is, the present invention relates to a method and a system for distributed clock synchronization based on an Ethernet, and more particularly, to a method and system for distributed clock synchronization based on an Ethernet based on delay time variables (relay delay time by each slave device, The delay time required for processing the data received by each slave device and calculating the output value, and the like), so that the driving of the actuator can be more precisely controlled.

도 1은 본 발명의 일 실시예에 따른 이더캣 기반의 분산 시계 동기화를 위한 시스템의 개략적인 구성도이다.FIG. 1 is a schematic block diagram of a system for distributed clock synchronization based on an Ethernet according to an embodiment of the present invention. Referring to FIG.

도 1을 참조하면, 본 발명의 일 실시예에 따른 이더캣 기반의 분산 시계(DC, Distributed Clock) 동기화를 위한 시스템(100)은 지연 시간 수집부(110), 연산부(120), 설정부(130) 및 동작부(140)를 포함한다.1, a system 100 for synchronizing an Ethernet based Distributed Clock (DC) according to an embodiment of the present invention includes a delay time collection unit 110, an operation unit 120, a setting unit 130 and an operation unit 140.

상기 지연 시간 수집부(110)는 시운전을 실시하여 이더캣 기반의 네트워크에 연결된 복수개의 슬레이브 장치 각각이 명령 메시지를 처리할 때 발생하는 지연 시간을 수집한다. 이때, 명령 메시지는 마스터 장치가 슬레이브 장치(네트워크에 연결된 복수 개의 슬레이브 장치들)로 전송하는 액추에이터의 구동에 관한 데이터(상기 데이터에는 액추에이터를 구동시키기 위한 위치, 속도 및 압력 등의 파라미터가 포함되어 있을 수 있음)일 수 있으며, 이는 이더캣 프레임이라고도 할 수도 있다.The delay time collection unit 110 performs a trial operation and collects a delay time that occurs when each of a plurality of slave devices connected to the Ethernet-based network processes a command message. At this time, the command message includes data regarding driving of the actuator to be transmitted to the slave device (a plurality of slave devices connected to the network) of the master device (the data includes parameters such as position, speed and pressure for driving the actuator Which may be referred to as an ethercat frame.

지연 시간 수집부(110)는 이더캣 마스터에서 송신된 상기 명령 메시지가 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치를 순차적으로 통과한 후 상기 이더캣 마스터로 돌아오는 과정에서 발생하는 지연 시간을 수집한다.The delay time collection unit 110 may receive the delay message from the EtherCAT master after sequentially passing through the plurality of slave devices connected to the EtherCAT-based network and then returning to the EtherCAT master, Lt; / RTI >

이때, 지연 시간 수집부(110)에서 수집하는 지연 시간은 제어기에 의한 상기 명령 메시지의 처리 지연 시간, 상기 복수 개의 슬레이브 장치 각각에 의한 릴레이 지연 시간, 상기 복수 개의 슬레이브 장치 각각이 상기 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간 및 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 중 마지막 슬레이브 장치를 통과한 상기 명령 메시지가 상기 이더캣 마스터로 돌아오는데 걸리는 지연 시간 등일 수 있다.In this case, the delay time collected by the delay time collection unit 110 is determined by a processing delay time of the command message by the controller, a relay delay time by each of the plurality of slave devices, A processing time required to calculate an output value, and a delay time taken for the command message, which has passed through the last slave device among the plurality of slave devices connected to the Ethercat-based network, to return to the EtherCAT master.

연산부(120)는 지연 시간 수집부(110)에서 수집된 지연 시간을 이용하여 복수 개의 슬레이브 장치가 연결된 이더캣 기반의 네트워크에서 상기 복수개의 슬레이브 장치를 동기화하여 구동하기 위해 필요한 최소 지연 시간 값을 연산한다. 즉, 연산부(120)는 수집된 지연 시간을 이용하여, 복수개의 슬레이브 장치가 연결된 이더캣 기반의 네트워크에서 상기 이더캣 기반의 네트워크에 연결된 모든 슬레이브 장치의 연산이 끝난 후, 분산 시계에 의해 동기화된 동기 신호를 발생시키기 위해 필요한 최소 지연 시간 값을 연산한다. 수집된 지연 시간을 이용하여 최소 지연 시간 값을 연산하는 과정은 이후에 자세히 설명하기로 한다.The arithmetic unit 120 calculates a minimum delay time value required for synchronously driving the plurality of slave devices in a network based on the Ethernet based on the delay times collected by the delay time collection unit 110 and connected to a plurality of slave devices do. That is, using the collected delay time, the arithmetic unit 120 calculates the delay time of each slave device connected to the Ethernet-based network in the Ethernet-based network to which a plurality of slave devices are connected, And calculates the minimum delay time value necessary for generating the synchronous signal. The process of calculating the minimum delay time value using the collected delay time will be described in detail later.

설정부(130)는 이더캣 마스터 스택의 분산 시계 설정을 연산부(120)에서 연산된 최소 지연 시간 값을 반영하여 자동으로 설정한다. 즉, 설정부(130)는 이더캣 마스터 스택의 기 설정된 분산 시계 설정을 연산부(120)에서 연산된 최소 지연 시간 값으로 자동으로 설정 변경을 할 수 있다.The setting unit 130 automatically sets the distributed clock setting of the EtherCAT master stack to reflect the minimum delay time value calculated by the operation unit 120. That is, the setting unit 130 can automatically change the predetermined distributed clock setting of the EtherCAT master stack to the minimum delay time value calculated by the operation unit 120.

동작부(140)는 설정부(130)에서 최소 지연 시간 값이 설정된 후 일정 주기마다 분산 시계 이벤트(DC 이벤트)가 발생할 경우, 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치가 상기 연산된 최소 지연 시간 값에 대응하는 시간 이후 동시에 동작하도록 한다. 이때, 최소 지연 값에 대응하는 시간(Tclock)이라 함은 이더캣 기반의 네트워크에 연결된 모든 슬레이브 장치들이 명령 메시지의 처리를 완료한 시점일 수 있다. 따라서, 동작부(140)는 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 각각이 모두 상기 명령 메시지를 처리한 시간 이후(즉, Tclock 이후)에 동시에 동작하도록 한다.When a distributed clock event (DC event) occurs every predetermined period after the minimum delay time value is set in the setting unit 130, the operation unit 140 determines whether the plurality of slave devices connected to the Ethernet- To operate simultaneously after a time corresponding to the minimum delay time value. At this time, the time corresponding to the minimum delay value (T clock ) may be the time at which all slave devices connected to the Ethernet-based network have completed the processing of the command message. Accordingly, the operation unit 140 allows the plurality of slave devices connected to the Ethernet-based network to simultaneously operate after the time of processing the command message (i.e., after T clock ).

따라서, 본 발명은 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치들을 최소 지연 시간 이후 동시에 동작하도록 하므로, 액추에이터의 구동을 보다 정밀하게 제어하는 것이 가능하다.Therefore, the present invention enables a plurality of slave devices connected to the Ethernet-based network to operate simultaneously after the minimum delay time, thereby enabling more precise control of the driving of the actuator.

이하는 최적의 분산 시계 설정을 위한 파라미터의 계산 과정, 즉, 이더캣 마스터 스택의 분산 시계 설정을 상기 연산된 최소 지연 시간 값을 반영하여 자동으로 설정하는 과정을 도 2 및 도 3을 참조하여 자세히 기술한다. 이때, 도 2 내지 도 3에 기술된 계산 괴정은 연산부(120)를 통해 연산될 수 있으며, 이더캣 마스터 스택의 분산 시계 설정은 설정부(130)에 의해 상기 연산된 최소 지연 시간 값으로 자동 설정될 수 있다.Hereinafter, a process of calculating a parameter for an optimal distributed clock setting, that is, a process of automatically setting a distributed clock setting of the EtherCAT master stack to reflect the calculated minimum delay time value will be described in detail with reference to FIGS. 2 and 3 . 2 to 3 can be calculated through the arithmetic unit 120 and the distributed clock setting of the EtherCAT master stack can be automatically set to the calculated minimum delay time value by the setting unit 130 .

본 발명에서 제시하는 자동화된 분산 시계 설정, 즉 최소 지연 시간으로 분산 시계의 주기 값을 자동화하는 설정은 복수의 슬레이브 장치들의 동기화된 출력 공정에서의 분산 시계 설정과 동기화된 입력 공정에서의 분산 시계 설정의 두가지 경우로 나눌 수 있다.The automatic distributed clock setting according to the present invention, that is, the setting for automating the periodic value of the distributed clock with the minimum delay time, is performed by setting the distributed clock in the synchronized output process of the plurality of slave devices, Can be divided into two cases.

도 2는 본 발명의 일 실시예에 따른 동기화된 출력 공정에서의 자동화 분산 시계 설정을 나타낸 도면이다.2 is a diagram illustrating an automated distributed clock setting in a synchronized output process in accordance with an embodiment of the present invention.

도 2를 참조하면, 공정 사이클의 시작 시점부터 슬레이브 장치 k에서의 실제 출력되는 시점까지의 소요 시간을 종단간 출력 지연(end-to-end output delay) DFO(k)라 하면, DFO(k)는 수학식 1과 같이 표현할 수 있다.Referring to FIG. 2, when the time required from the start of the process cycle to the actual output of the slave device k is an end-to-end output delay D FO (k), D FO k) can be expressed by Equation (1).

[수학식 1][Equation 1]

DFO(k) = Dcon + k·Drelay + Dslv _ out D FO (k) = D con + k D relay + D slv _ out

이때, Dcon은 제어기에 의한 명령 메시지(이더캣 프레임)의 처리 지연 시간을 나타내고, Drelay는 각 슬레이브 장치에 의한 명령 메시지의 릴레이 시간을 나타내며, Dslv _ out은 각 슬레이브 장치가 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간을 나타낸다. 이때, 명령 메시지는 이더캣 프레임과 상응하며, 이는 마스터 장치가 슬레이브 장치(네트워크에 연결된 복수 개의 슬레이브 장치들)로 전송하는 액추에이터의 구동에 관한 데이터를 의미한다.In this case, D con indicates the processing delay time of the command message (Ether Cat frame) by the controller, D relay denotes a relay time of the command message by each slave device, D slv _ out is the that each slave device command message And processing time required to calculate the output value. At this time, the command message corresponds to the Ethercat frame, which means data regarding the driving of the actuator which the master device transmits to the slave device (a plurality of slave devices connected to the network).

좀더 자세히 설명하자면, Dcon은 제어기 내부에서 명령 메시지를 처리할 때 발생하는 지연 시간으로 수학식 2와 같이 표현할 수 있다.More specifically, D con is a delay time occurring when a command message is processed in the controller, and can be expressed by Equation (2).

[수학식 2]&Quot; (2) "

Dcon = Jcon _ task + Dcon _ task D con = J con _ task + D con _ task

이때, Jcon _ task는 제어기 내의 주기적 실시간 태스크의 주기 편차를 나타내며, 이는 사용자가 정의한 사이클에서 실제 측정된 사이클의 차이로 정의할 수 있다. Dcon_task는 태스크의 실행 시간을 나타내며, 이는 태스크가 실행을 시작한 시점에서 이더캣 프레임을 송신한 시점까지의 경과 시간을 측정하여 나타낼 수 있다. max(Dcon)은 시운전 단계에서 관측된 Dcon의 최대값으로 정한다.In this case, con J _ task represents a period of periodic variations in the real-time task controller, which may be defined as the difference between the actual measurement cycle in the cycle, defined by the user. D con_task represents the task execution time, which can be measured by measuring the elapsed time from when the task started execution to when it sent the ethercat frame. max (D con ) is the maximum value of D con observed in the commissioning phase.

그리고, Drelay는 각 슬레이브 장치에 의한 명령 메시지(이더캣 프레임)의 릴레이 시간으로서, 각 슬레이브 장치별로 계산될 수 있으며, 이는 이더캣 분산 시계 표준에 기술된 전파 지연 시간(propagation delay) 계산 방법을 통해 얻어진 슬레이브 장치별 전파 지연 값을 바탕으로 계산될 수 있다. max(Drelay)는 네트워크 구성시 측정된 최대의 Drelay로 정한다.D relay can be calculated for each slave device as the relay time of a command message (Ethercat frame) by each slave device, which is a method of calculating the propagation delay described in the Ethercat distributed clock standard Can be calculated based on the slave device-specific propagation delay value obtained through the slave device. max (D relay ) is the maximum D relay measured in network configuration.

그리고 Dslv _ out는 각 슬레이브 장치가 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간으로서, 슬레이브 장치의 제조사에 의해 제공된다. 본 발명은 슬레이브 장치의 ESC(EtherCAT Slave Controller)의 메모리 주소 0x1C32에 존재하는 "Calc and Copy Time" (0x1C32:06)과 "Delay Time" (0x1C32:09)의 합으로 Dslv _ out을 결정한다(EtherCAT 표준 문서, ETC.1020 Ethercat Protocol Enhancements 참조).And D slv _ out is a processing time required for each slave unit processes the command message to calculate the output value, is provided by the manufacturer of the slave device. The invention "Calc and Copy Time" that exists in memory address 0x1C32 of ESC (EtherCAT Slave Controller) of the slave device to determine the D slv _ out by the sum of:: (09 0x1C32) (0x1C32 06) and "Delay Time" (See the EtherCAT standard document, ETC.1020 Ethercat Protocol Enhancements).

한편, 매 주기의 시작으로부터 Tclock 시간 후에 DC(Distributed Clock) 이벤트를 발생시킨다고 하자. Tclock은 모든 슬레이브 장치들이 명령 메시지의 처리를 완료한 시점이어야 하며, 최대 성능을 위해 Tclock을 최소화함으로써, 액추에이터의 구동을 정밀하게 제어할 수 있게 된다.On the other hand, assume that a DC (Distributed Clock) event is generated after T clock time from the beginning of each cycle. The T clock should be at the time when all slave devices have completed processing the command message and minimize the T clock for maximum performance so that the actuator can be precisely controlled.

즉, Tclock은 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치 각각이 명령 메시지를 처리할 때 발생하는 모든 지연 시간을 말하며, 이를 최소화(최소 지연 시간을 연산)함으로써 액추에이터의 동기화가 가능하다.That is, T clock refers to all the delay time that occurs when a plurality of slave devices connected to the Ethernet-based network processes a command message, and the actuator can be synchronized by minimizing it (calculating the minimum delay time).

이더캣 네트워크 시스템을 구성하는 복수 개의 슬레이브 장치들이 N개라고 하면, Tclock의 최소값은 수학식 3과 같이 표현할 수 있다.Assuming that there are N slave devices constituting the EtherCAT network system, the minimum value of T clock can be expressed by Equation (3).

[수학식 3]&Quot; (3) "

Tclock ≥ max(Dcon) + N×max(Drelay) + max(Dslv _ out) + max(σclock)T clock ≥ max (D con) + N × max (D relay) + max (D slv _ out) + max (σ clock)

이때, max(Dcon), max(Drelay), max(Dslv _ out), max(σclock)는 각각 Dcon , Drelay , Dslv_out, σclock의 최대값을 나타낸다. σclock는 DC 이벤트의 편차이며, 정해진 DC 이벤트의 주기와 실측된 주기와의 차이로 정의된다.At this time, max (D con), max (D relay), max (D slv _ out), max (σ clock) represents the maximum value of D con, relay D, D slv_out, σ clock respectively. The σ clock is the deviation of the DC event and is defined as the difference between the period of the specified DC event and the measured period.

본 발명은 시운전을 실시하여 명령 메시지 처리 시 발생하는 모든 지연 시간을 수집하고, 수집된 지연 시간을 이용해 최소 지연 시간 값을 연산하며, 이더캣 마스터 스택의 분산 시계 설정을 상기 연산된 최소 지연 시간 값으로 자동 변경한다. 그리고 이후 DC 이벤트가 발생하면, 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치가 상기 연산된 최소 지연 시간 값에 대응하는 시간 이후 동시에 동작하도록 함으로써, 액추에이터를 정밀하게 동기화하는 것이 가능하다.The present invention collects all the delay times that occur during command message processing by commissioning, calculates the minimum delay time value using the collected delay time, and sets the distributed clock setting of the EtherCAT master stack to the calculated minimum delay time value . Then, when a DC event occurs later, it is possible to precisely synchronize the actuators by causing the plurality of slave devices connected to the Ethernet-based network to operate simultaneously after a time corresponding to the calculated minimum delay time value.

따라서, 제어기는 시운전 기간 동안 사이클과 동일한 시간 값으로 DC 주기를 설정할 수 있으며, 각 슬레이브 장치는 발생한 DC 이벤트의 주기를 측정하고 설정된 주기와의 차이값 σclock을 계산할 수 있다.Therefore, the controller can set the DC period with the same time value as the cycle during the commissioning period, and each slave apparatus can measure the period of the generated DC event and calculate the difference value? Clock with the set period.

max(σclock)은 관측된 σclock의 최대값으로 정하며, 각 슬레이브 장치는 이를 별도의 CANopen 객체로 관리하고, 제어기는 EtherCAT SDO(Service Data Object) 통신 방식을 이용하여 이 값을 비동기적으로 읽어올 수 있다.max (σ clock ) is defined as the maximum value of the observed σ clock , each slave device manages it as a separate CANopen object, and the controller uses the EtherCAT SDO (Service Data Object) communication method to read this value asynchronously Can come.

한편, 도 3은 본 발명의 일 실시예에 따른 동기화된 입력 공정에서의 자동화 분산 시계 설정을 나타낸 도면이다.3 is a diagram illustrating an automatic distributed clock setting in a synchronized input process according to an exemplary embodiment of the present invention.

도 3을 참조하면, DC 이벤트가 발생하여, 슬레이브 장치에 의한 입력(센싱) 시점부터 해당 입력 값을 담은 이더캣 프레임(명령 메시지)이 제어기에 도착하는 시점까지의 소요 시간을 종단간 입력 지연(end-to-end input delay) DCI라고 하면, DCI는 수학식 4와 같이 표현할 수 있다.3, when the DC event occurs, the time required from the input (sensing) time by the slave device to the time when the Ethercat frame (command message) containing the input value arrives at the controller is called an end-to-end input delay end-to-end input delay) D CI , D CI can be expressed by Equation (4).

[수학식 4]&Quot; (4) "

DCI = Tclock - (Dclock + Tshift) + Dcon + N·Drelay + Dreturn D CI = T clock - (D clock + T shift ) + D con + N D relay + D return

이때, Tshift는 의도된 지연 시간을 나타내며, Dreturn은 마지막 슬레이브 장치를 통과한 명령 메시지(이더캣 프레임)가 다시 제어기까지 돌아오는데 걸리는 지연 시간을 나타낸다.In this case, T shift represents the intended delay time, and D return represents the delay time taken for the command message (the ether frame) passing through the last slave device to return to the controller again.

이더캣 기반의 네트워크에 연결된 각각의 슬레이브 장치들은 DC 이벤트 발생 후 의도된 지연 시간(Tclock) 후 입력을 실행하게 되며, 이때 입력된 값을 처리하여 이더캣 프레임에 실을 준비가 될 때까지 슬레이브 장치의 내부 처리 시간(Dslv _ in)이 발생하게 된다. 이렇게 슬레이브 장치의 내부 처리를 거쳐 준비된 입력 값은 다음 사이클에 도착하는 이더캣 프레임에 실려 제어기로 전송된다. 이때, 다음 사이클의 이더캣 프레임이 슬레이브 장치에 도착할 때까지 입력 값이 준비되어 있으려면 수학식 5의 조건을 만족해야 한다.Each slave device connected to the EtherCAT-based network executes input after the intended delay time (T clock ) after the DC event occurs. At this time, the slave device processes the input value, the internal processing time (D slv _ in) of the apparatus is generated. The input value prepared through the internal processing of the slave device is transmitted to the controller by the EtherCAT frame arriving at the next cycle. In this case, the condition of Equation (5) must be satisfied so that the input value is prepared until the next cycle of the Ethercat frame reaches the slave device.

[수학식 5]&Quot; (5) "

Tclock + Tshift ≤ Tcycle + min(Dcon) + min(Drelay) - max(σclock) - max(Dslv _ in)T clock + T shift ≤ T cycle + min ( D con) + min (D relay) - max (σ clock) - max (D slv _ in)

이때, min(Dcon), min(Drelay)는 각각 Dcon, Drelay의 최소값을 나타내고, max(σclock), max(Dslv _ in)는 각각 σclock, Dslv _ in의 최대값을 나타낸다.At this point, min (D con), min (D relay) represents the minimum value of D con, D relay, respectively, max (σ clock), max (D slv _ in) are each σ clock, D slv _ maximum value of the in .

따라서, 상기에 제시된 계산 과정으로 이더캣 마스터 스택의 분산 시계 설정을 자동화한다면, 액추에이터의 구동을 최대 성능으로 보다 정밀하게 제어하는 것이 가능하다.Therefore, if the distributed clock setting of the EtherCAT master stack is automated by the above-described calculation process, it is possible to more precisely control the driving of the actuator with the maximum performance.

도 4는 본 발명의 일 실시예에 따른 이더캣 기반의 분산 시계 동기화를 위한 방법에 관한 흐름도이다. 이는 상기에 자세히 기술한 설명을 기반으로 간단히 설명하기로 한다.FIG. 4 is a flow chart of a method for distributed clock synchronization based on an Ethernet according to an embodiment of the present invention. This will be briefly described based on the description described in detail above.

우선, 설명에 앞서, 본 발명은 시운전을 실시하기 전에 다음과 같은 설정이 이루어질 수 있다. 통신 준비 및 실제 공정에 사용되는 환경과 동일하게 구성(PDO 등)하고, 동기 제어 신호의 주기를 설정할 수 있다. 이때, 상기 동기 제어 신호는 제어 주기와 동일하고, 오프셋 없이 설정할 수 있다. 또한, 측정 변수 저장 공간을 초기화하고, 슬레이브 장치 내 시운전 플래그를 활성화할 수 있다. 또한, 네트워크 구성 시 측정된 각 슬레이브 장치별 전달 지연 시간 중 가장 큰 값으로 Drealy를 선정할 수 있다.First, prior to the explanation, the following setting can be made before the commissioning of the present invention. (PDO or the like) in the same manner as the environment used for the communication preparation and the actual process, and the period of the synchronous control signal can be set. At this time, the synchronization control signal is the same as the control period and can be set without offset. It is also possible to initialize the measurement variable storage space and activate the trial run flag in the slave device. Also, D realy can be selected as the largest value among the propagation delay times measured for each slave device in the network configuration.

다음으로, 지연 시간 수집부(110)는 이더캣 기반의 네트워크에 연결된 모든 복수 개의 슬레이브 장치가 명령 메시지를 처리할 때 발생하는 모든 지연 시간을 수집한다(S410).Next, the delay time collection unit 110 collects all the delay times that occur when all the slave devices connected to the Ethernet-based network process the command message (S410).

이때, 시운전은 약 5분간 시행될 수 있다. 본 발명은 시운전 구동 시 매 주기별 제어 태스크 활성화 시점을 측정하고, 편차를 기록한다. 그리고 태스크 활성화 시점부터 전송 명령이 완료되는 시점(즉, 마스터 장치가 명령 데이터를 슬레이브 장치에 송신한 시점부터 명령 데이터에 의해 액추에이터가 구동되는 시점)까지의 경과 시간을 측정한다. 또한, 각 슬레이브 장치의 매 주기별 동기화 태스크 활성화 시점을 측정하고, 편차를 기록한다. At this time, the test run can be performed for about 5 minutes. The present invention measures the activation timing of each control cycle for each cycle in trial drive operation, and records the deviation. Then, the elapsed time from the time of activating the task to the time when the transfer command is completed (i.e., the time when the master device transmits the command data to the slave device and the time when the actuator is driven by the command data) is measured. In addition, the activation timing of the synchronization task for each cycle of each slave device is measured and a deviation is recorded.

따라서, 지연 시간 수집부(110)는 시운전이 실시된 후 측정된 데이터(태스크 활성화 시점에 관한 데이터, 편차 데이터 등)를 수집할 수 있다.Accordingly, the delay time collection unit 110 can collect the measured data (data regarding the task activation time, deviation data, etc.) after the trial operation is performed.

지연 시간 수집부(110)는 이더캣 마스터에서 송신된 상기 명령 메시지가 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치를 순차적으로 통과한 후 상기 이더캣 마스터로 돌아오는 과정에서 발생하는 지연 시간을 수집하며, 이때, 수집되는 지연 시간은 제어기에 의한 상기 명령 메시지의 처리 지연 시간, 상기 복수 개의 슬레이브 장치 각각에 의한 릴레이 지연 시간, 상기 복수 개의 슬레이브 장치 각각이 상기 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간 및 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 중 마지막 슬레이브 장치를 통과한 상기 명령 메시지가 상기 이더캣 마스터로 돌아오는데 걸리는 지연 시간 등일 수 있다.The delay time collection unit 110 may receive the delay message from the EtherCAT master after sequentially passing through the plurality of slave devices connected to the EtherCAT-based network and then returning to the EtherCAT master, The collected delay time is calculated by a processing delay time of the command message by the controller, a relay delay time by each of the plurality of slave devices, and an output value by processing each of the plurality of slave devices with the command message A processing time required for calculation, and a delay time for the command message, which has passed through the last slave device among the plurality of slave devices connected to the Ethernet-based network, to return to the ethercart master.

다음으로, 연산부(120)는 단계S410에서 수집된 지연 시간을 이용하여 복수 개의 슬레이브 장치가 연결된 이더캣 기반의 네트워크에서 상기 복수개의 슬레이브 장치를 동기화하여 구동하기 위해 필요한 최소 지연 시간 값을 연산한다(S420).Next, the operation unit 120 calculates a minimum delay time value necessary for synchronizing and driving the plurality of slave devices in the Ethernet-based network to which a plurality of slave devices are connected, using the delay time collected in step S410 S420).

연산부(120)는 수집된 지연 시간을 이용하여 최적의 분산 시계 설정 값을 연산(즉, 최소 분산 시계 오프셋을 연산)할 수 있다. 이때, 최적의 분산 시계 오프셋(즉, 전송 명령(명령 데이터)이 처리될 때까지 발생하는 지연 시간 변수들의 최소 지연 시간 값)은 상기에 제시된 수학식 1 내지 수학식 5를 통해 연산 가능하다.The operation unit 120 can calculate an optimal distributed clock setting value (i.e., calculate a minimum distributed clock offset) using the collected delay time. At this time, the optimal dispersion clock offset (i.e., the minimum delay time value of the delay time variable occurring until the transmission command (command data) is processed) can be calculated through Equations 1 to 5 shown above.

다음으로, 설정부(130)는 이더캣 마스터 스택의 분산 시계 설정을 단계S420에서 연산된 최소 지연 시간 값을 반영하여 자동으로 설정한다(S430). 이때, 설정부(130)는 단계S420에서 연산된 최적의 분산 시계 설정 값(즉, 최소 지연 시간 값)을 제어기 및 각 슬레이브 장치에 적용할 수 있다. 다시말해, 설정부(130)는 이더캣 마스터 스택의 기 설정된 분산 시계 설정 값을 단계S420에서 연산된 최소 지연 시간 값으로 자동으로 변경하는 것이 가능하다.Next, the setting unit 130 automatically sets the distributed clock setting of the EtherCAT master stack to reflect the minimum delay time calculated in step S420 (S430). At this time, the setting unit 130 may apply the optimum distributed clock setting value calculated in step S420 (i.e., the minimum delay time value) to the controller and each slave device. In other words, the setting unit 130 can automatically change the predetermined distributed clock setting value of the ethercart master stack to the minimum delay time value calculated in step S420.

다음으로, 동작부(140)는 단계S430에서 최소 지연 시간 값이 설정된 후 일정 주기마다 분산 시계 이벤트(DC 이벤트)가 발생할 경우, 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치가 상기 연산된 최소 지연 시간 값에 대응하는 시간 이후 동시에 동작하도록 한다(S440).Next, when a distributed clock event (DC event) occurs every predetermined period after the minimum delay time value is set in step S430, the operation unit 140 determines whether the slave devices connected to the Ethernet- And operates simultaneously after the time corresponding to the delay time value (S440).

따라서, 본 발명은 이더캣 마스터 스택의 분산 시계 설정을 연산부(120)에서 연산된 최소 지연 시간 값을 반영하여 자동으로 설정 변경함으로써, 복수 개의 슬레이브 장치가 연결된 이더캣 기반의 네트워크에서 분산 시계를 정밀하게 동기화하는 것이 가능하다. 즉, 액추에이터의 구동을 보다 정밀하게 제어하는 것이 가능한 효과가 있다.Therefore, according to the present invention, the distributed clock setting of the ethercart master stack is automatically changed by reflecting the minimum delay time value calculated by the operation unit 120, whereby the distributed clock is precisely controlled in the Ethernet-based network to which a plurality of slave devices are connected It is possible to synchronize to. That is, there is an effect that the driving of the actuator can be controlled more precisely.

이상과 같이 본 발명에서는 구체적인 구성 요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다.As described above, the present invention has been described with reference to particular embodiments, such as specific elements, and specific embodiments and drawings. However, it should be understood that the present invention is not limited to the above- And various modifications and changes may be made thereto by those skilled in the art to which the present invention pertains.

따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.Accordingly, the spirit of the present invention should not be construed as being limited to the embodiments described, and all of the equivalents or equivalents of the claims, as well as the following claims, belong to the scope of the present invention .

100: 이더캣 기반의 분산 시계 동기화를 위한 시스템
110: 지연 시간 수집부 120: 연산부
130: 설정부 140: 동작부
100: System for distributed clock synchronization based on Ethernet
110: delay time collection unit 120:
130: setting unit 140:

Claims (8)

시운전을 실시하여 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치 각각이 명령 메시지를 처리할 때 발생하는 지연 시간을 수집하는 지연 시간 수집 단계;
상기 수집된 지연 시간을 이용하여 상기 복수 개의 슬레이브 장치가 연결된 상기 이더캣 기반의 네트워크에서 상기 복수개의 슬레이브 장치를 동기화하여 구동하기 위해 필요한 최소 지연 시간 값을 연산하는 연산 단계;
이더캣 마스터 스택의 분산 시계 설정을 상기 연산된 최소 지연 시간 값을 반영하여 자동으로 설정하는 설정 단계; 및
상기 최소 지연 시간 값이 설정된 후 일정 주기마다 분산 시계 이벤트가 발생할 경우, 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치가 상기 연산된 최소 지연 시간 값에 대응하는 시간 이후 동시에 동작하도록 하는 동작 단계;
를 포함하는 이더캣 기반의 분산 시계 동기화를 위한 방법.
A delay time collection step of performing a trial operation and collecting a delay time occurring when each of a plurality of slave devices connected to the Ethernet-based network processes a command message;
An operation step of calculating a minimum delay time value necessary for synchronizing and driving the plurality of slave devices in the Ethernet based network to which the plurality of slave devices are connected using the collected delay time;
A setting step of automatically setting a distributed clock setting of the ethercast master stack to reflect the calculated minimum delay time value; And
When the distributed clock event occurs every predetermined period after the minimum delay time value is set, causing the plurality of slave devices connected to the Ethernet-based network to simultaneously operate after a time corresponding to the calculated minimum delay time value ;
A method for an Ethernet-based distributed clock synchronization.
제1항에 있어서,
상기 지연 시간 수집 단계는
이더캣 마스터에서 송신된 상기 명령 메시지가 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치를 순차적으로 통과한 후 상기 이더캣 마스터로 돌아오는 과정에서 발생하는 지연 시간을 수집하는 것
을 특징으로 하는 이더캣 기반의 분산 시계 동기화를 위한 방법.
The method according to claim 1,
The delay time collection step
The command message transmitted from the EtherCAT master collects a delay time occurring in the process of returning to the EtherCAT master after sequentially passing through the plurality of slave devices connected to the Ethernet based network
A method for an Ethernet-based distributed clock synchronization.
제2항에 있어서,
상기 지연 시간 수집 단계는
제어기에 의한 상기 명령 메시지의 처리 지연 시간, 상기 복수 개의 슬레이브 장치 각각에 의한 릴레이 지연 시간, 상기 복수 개의 슬레이브 장치 각각이 상기 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간 및 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 중 마지막 슬레이브 장치를 통과한 상기 명령 메시지가 상기 이더캣 마스터로 돌아오는데 걸리는 지연 시간을 수집하는 것
을 특징으로 하는 이더캣 기반의 분산 시계 동기화를 위한 방법.
3. The method of claim 2,
The delay time collection step
A processing delay time of the command message by the controller, a relay delay time by each of the plurality of slave devices, a processing time required for each of the plurality of slave devices to calculate the output value by processing the command message, Collecting a delay time required for the command message, which has passed through the last slave device among the plurality of slave devices connected to the network, to return to the ethercart master
A method for an Ethernet-based distributed clock synchronization.
제1항에 있어서,
상기 동작 단계는
상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 각각이 모두 상기 명령 메시지를 처리한 시간 이후에 동시에 동작하도록 하는 것
을 특징으로 하는 이더캣 기반의 분산 시계 동기화를 위한 방법.
The method according to claim 1,
The operating step
Wherein the plurality of slave devices connected to the Ethernet-based network operate simultaneously after the time of processing the command message
A method for an Ethernet-based distributed clock synchronization.
시운전을 실시하여 이더캣 기반의 네트워크에 연결된 복수 개의 슬레이브 장치 각각이 명령 메시지를 처리할 때 발생하는 지연 시간을 수집하는 지연 시간 수집부;
상기 수집된 지연 시간을 이용하여 상기 복수 개의 슬레이브 장치가 연결된 상기 이더캣 기반의 네트워크에서 상기 복수개의 슬레이브 장치를 동기화하여 구동하기 위해 필요한 최소 지연 시간 값을 연산하는 연산부;
이더캣 마스터 스택의 분산 시계 설정을 상기 연산된 최소 지연 시간 값을 반영하여 자동으로 설정하는 설정부; 및
상기 최소 지연 시간 값이 설정된 후 일정 주기마다 분산 시계 이벤트가 발생할 경우, 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치가 상기 연산된 최소 지연 시간 값에 대응하는 시간 이후 동시에 동작하도록 하는 동작부;
를 포함하는 이더캣 기반의 분산 시계 동기화를 위한 시스템.
A delay time collection unit for performing a trial operation and collecting a delay time occurring when each of the plurality of slave devices connected to the Ethernet-based network processes a command message;
An operation unit for calculating a minimum delay time value necessary for synchronizing and driving the plurality of slave devices in the Ethernet based network to which the plurality of slave devices are connected using the collected delay time;
A setting unit for automatically setting a distributed clock setting of the ethercast master stack to reflect the calculated minimum delay time value; And
And a plurality of slave devices connected to the Ethernet-based network to simultaneously operate after a time corresponding to the calculated minimum delay time value when a distributed clock event occurs every predetermined period after the minimum delay time value is set. ;
Based system for distributed clock synchronization.
제5항에 있어서,
상기 지연 시간 수집부는
이더캣 마스터에서 송신된 상기 명령 메시지가 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치를 순차적으로 통과한 후 상기 이더캣 마스터로 돌아오는 과정에서 발생하는 지연 시간을 수집하는 것
을 특징으로 하는 이더캣 기반의 분산 시계 동기화를 위한 시스템.
6. The method of claim 5,
The delay time collector
The command message transmitted from the EtherCAT master collects a delay time occurring in the process of returning to the EtherCAT master after sequentially passing through the plurality of slave devices connected to the Ethernet based network
A system for distributed clock synchronization based on Ethernet.
제6항에 있어서,
상기 지연 시간 수집부는
제어기에 의한 상기 명령 메시지의 처리 지연 시간, 상기 복수 개의 슬레이브 장치 각각에 의한 릴레이 지연 시간, 상기 복수 개의 슬레이브 장치 각각이 상기 명령 메시지를 처리하여 출력 값을 계산하는데 필요한 처리 시간 및 상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 중 마지막 슬레이브 장치를 통과한 상기 명령 메시지가 상기 이더캣 마스터로 돌아오는데 걸리는 지연 시간을 수집하는 것
을 특징으로 하는 이더캣 기반의 분산 시계 동기화를 위한 시스템.
The method according to claim 6,
The delay time collector
A processing delay time of the command message by the controller, a relay delay time by each of the plurality of slave devices, a processing time required for each of the plurality of slave devices to calculate the output value by processing the command message, Collecting a delay time required for the command message, which has passed through the last slave device among the plurality of slave devices connected to the network, to return to the ethercart master
A system for distributed clock synchronization based on Ethernet.
제5항에 있어서,
상기 동작부는
상기 이더캣 기반의 네트워크에 연결된 상기 복수 개의 슬레이브 장치 각각이 모두 상기 명령 메시지를 처리한 시간 이후에 동시에 동작하도록 하는 것
을 특징으로 하는 이더캣 기반의 분산 시계 동기화를 위한 시스템.
6. The method of claim 5,
The operation unit
Wherein the plurality of slave devices connected to the Ethernet-based network operate simultaneously after the time of processing the command message
A system for distributed clock synchronization based on Ethernet.
KR20140018073A 2013-02-15 2014-02-17 Method and system for ethercat-based distributed clokc synchronization KR101492910B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20130016116 2013-02-15
KR1020130016116 2013-02-15

Publications (2)

Publication Number Publication Date
KR20140103089A true KR20140103089A (en) 2014-08-25
KR101492910B1 KR101492910B1 (en) 2015-02-12

Family

ID=51747588

Family Applications (1)

Application Number Title Priority Date Filing Date
KR20140018073A KR101492910B1 (en) 2013-02-15 2014-02-17 Method and system for ethercat-based distributed clokc synchronization

Country Status (1)

Country Link
KR (1) KR101492910B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824275A (en) * 2016-05-17 2016-08-03 深圳市雷赛智能控制股份有限公司 Method of controlling slave station servo driver synchronization master station
KR20210026241A (en) * 2019-08-29 2021-03-10 주식회사 효원파워텍 System and method for clock synchronization based on ethercat network
CN112910593A (en) * 2021-03-09 2021-06-04 华南理工大学 Synchronous control system and method applied to servo motor driver

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101731045B1 (en) * 2015-09-09 2017-04-27 서울시립대학교 산학협력단 Apparatus for precise-adjustment of frame transmission time in the motion control system based on EtherCAT, method thereof and computer recordable medium storing the method
CN112486112A (en) * 2020-11-19 2021-03-12 珠海格力电器股份有限公司 EtherCAT master station control system and control method thereof

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7483448B2 (en) * 2004-03-10 2009-01-27 Alcatel-Lucent Usa Inc. Method and system for the clock synchronization of network terminals
KR101449719B1 (en) * 2008-05-21 2014-10-13 삼성전자 주식회사 Time synchronizing method and apparatus of network

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105824275A (en) * 2016-05-17 2016-08-03 深圳市雷赛智能控制股份有限公司 Method of controlling slave station servo driver synchronization master station
CN105824275B (en) * 2016-05-17 2018-07-10 深圳市雷赛智能控制股份有限公司 A kind of method that slave station servo-driver is controlled to synchronize main website
KR20210026241A (en) * 2019-08-29 2021-03-10 주식회사 효원파워텍 System and method for clock synchronization based on ethercat network
CN112910593A (en) * 2021-03-09 2021-06-04 华南理工大学 Synchronous control system and method applied to servo motor driver

Also Published As

Publication number Publication date
KR101492910B1 (en) 2015-02-12

Similar Documents

Publication Publication Date Title
KR101492910B1 (en) Method and system for ethercat-based distributed clokc synchronization
KR101044521B1 (en) Apparatus for controlling synchronization between slave devices connected to network
US10908579B2 (en) Controller, control program, and control system
JP6404975B2 (en) Slave, serial communication system, and communication method of serial communication system
EP3026515B1 (en) Programmable controller system
US10284692B2 (en) Control device and communication device
EP3223093B1 (en) Optical measurement device
US20220147022A1 (en) Control system
JP2007213474A (en) Motion control system
JP2001027904A (en) Numerical control system
US11379391B2 (en) Real-time automation device having a real-time data bus
US20150318939A1 (en) Relay device, relay method, and relay program
JP6408277B2 (en) Data collection device and industrial network system
JP6400553B2 (en) Numerical control system with synchronous control function between units
US11251990B2 (en) Control device, control system, control method, and non-transitory storage medium storing control program
US20220376806A1 (en) Control system, communication control method of control system, and control device
EP3767407B1 (en) Field bus system diagnosis using propagation delay measurements
KR20170135384A (en) Apparatus for distributed clock synchronization based on EtherCAT, method thereof and computer recordable medium storing the method
KR101894311B1 (en) Method for simulating about automatic transmission control
JP5187669B2 (en) Distributed control system and distributed control method
KR101050666B1 (en) Network simulation device considering vehicle control algorithm
JP2008067487A (en) Motor drive device

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20180124

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20190201

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20200203

Year of fee payment: 6