KR20200116340A - Method for compensating control data in a network based drive - Google Patents

Method for compensating control data in a network based drive Download PDF

Info

Publication number
KR20200116340A
KR20200116340A KR1020190038006A KR20190038006A KR20200116340A KR 20200116340 A KR20200116340 A KR 20200116340A KR 1020190038006 A KR1020190038006 A KR 1020190038006A KR 20190038006 A KR20190038006 A KR 20190038006A KR 20200116340 A KR20200116340 A KR 20200116340A
Authority
KR
South Korea
Prior art keywords
drive
control data
control
network
command
Prior art date
Application number
KR1020190038006A
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 KR1020190038006A priority Critical patent/KR20200116340A/en
Publication of KR20200116340A publication Critical patent/KR20200116340A/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/10Programme control other than numerical control, i.e. in sequence controllers or logic controllers using selector switches
    • G05B19/102Programme control other than numerical control, i.e. in sequence controllers or logic controllers using selector switches for input of programme steps, i.e. setting up sequence
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
    • G05B19/402Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by control arrangements for positioning, e.g. centring a tool relative to a hole in the workpiece, additional detection means to correct position

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Numerical Control (AREA)

Abstract

The present invention relates to a method for compensating control data of a drive based on a network. According to one embodiment of the present invention, the method for compensating control data of a drive based on a network may stably control a motor even when a communication error occurs by generating the following control data using a target value and command deviation of control data received before the communication error occurred in the drive when the communication error occurs due to an external noise or physical shock at the time of communication processing to transmit control data from a motion controller to the drive connected to a network, and the control data cannot be normally transmitted to the drive.

Description

네트워크 기반 드라이브의 제어 데이터 보상방법{METHOD FOR COMPENSATING CONTROL DATA IN A NETWORK BASED DRIVE}Control data compensation method of network-based drive {METHOD FOR COMPENSATING CONTROL DATA IN A NETWORK BASED DRIVE}

본 발명은 네트워크 기반 드라이브의 제어 데이터 보상방법에 관한 것이다.The present invention relates to a method for compensating control data for a network-based drive.

모션제어기는 적어도 하나의 모터를 포함하는 대상 기기의 모션을 제어하는 장치이다. 이때, 위와 같은 대상 기기는 이동 또는 형태 변형 등과 같은 모션이 각 모터의 구동에 의해 도출될 수 있다. 이에 따라, 모션제어기는 대상 기기의 모션에 대응한 사용자프로그램에 기초하여 각 모터의 속도 및 위치값 등에 관한 제어 데이터를 생성하고, 생성된 제어 데이터를 드라이브를 통해 각 모터에 주기적으로 전달할 수 있다.The motion controller is a device that controls motion of a target device including at least one motor. At this time, in the target device as described above, a motion such as movement or shape transformation may be derived by driving each motor. Accordingly, the motion controller may generate control data on the speed and position values of each motor based on a user program corresponding to the motion of the target device, and periodically transmit the generated control data to each motor through the drive.

이러한 모션제어기는 PLC시스템 등에 적용되는 것이 일반적이다. PLC시스템은 사용자에 의해 설정된 공정 순서에 따라 제어대상기기들의 순차 구동을 제어하는 장비이다. 이러한 PLC시스템을 이용하여 자동화 설비를 구현하면, 공정의 순서 변경, 추가 및 삭제가 용이해질 수 있는 장점이 있다. 이에 따라, 자동화 설비를 구현하기 위하여 각 공정을 수행하는 제어대상기기들을 공정의 순서에 따라 순차적으로 연결하는 릴레이 및 카운터 등은 PLC시스템으로 대체되고 있는 추세이다. These motion controllers are generally applied to PLC systems. The PLC system is an equipment that controls the sequential operation of control target devices according to the process sequence set by the user. When an automation facility is implemented using such a PLC system, there is an advantage in that the order of processes can be changed, added, and deleted easily. Accordingly, in order to implement an automated facility, relays and counters that sequentially connect control target devices that perform each process according to the order of the process are being replaced by PLC systems.

한편, 모션제어기는 소정의 제어주기마다 사용자프로그램을 실행하고 사용자프로그램의 실행 결과에 기초하여 제어 데이터를 갱신하며, 소정의 통신주기마다 제어 데이터를 드라이브를 통해 제어대상기기로 송신할 수 있다. Meanwhile, the motion controller may execute a user program every predetermined control period, update control data based on the execution result of the user program, and transmit control data to a control target device through a drive every predetermined communication period.

이때, 각 통신주기의 제어 데이터에 의해 모터의 구동제어가 정상적으로 실시되기 위해서는, 제어 데이터가 갱신된 이후에 제어 데이터의 송신이 실시될 필요가 있다.At this time, in order to normally perform the driving control of the motor by the control data of each communication period, it is necessary to transmit the control data after the control data is updated.

도 1 및 도 2는 모션 제어기(10)와 드라이브(20)의 연결 방법을 도시한 것이다. 드라이브(20)는 모터(21)를 제어하는 명령을 받는 방법에 따라 네트워크 형과 펄스형의 두가지 종류로 구분된다. 1 and 2 illustrate a connection method between the motion controller 10 and the drive 20. The drive 20 is divided into two types, a network type and a pulse type, according to a method of receiving a command to control the motor 21.

도 1은 모션 제어기(10)와 드라이브(20) 사이가 네트워크(22)로 연결된 구성을 나타낸다. 드라이브(20)는 모션 제어기(10)로부터 통신으로 제어 데이터를 전달 받는다. 1 shows a configuration in which a motion controller 10 and a drive 20 are connected through a network 22. The drive 20 receives control data from the motion controller 10 through communication.

도 2는 모션 제어기(10)와 드라이브(20) 사이가 펄스 출력 신호선들(23)로 연결된 구성을 나타낸다. 드라이브(20)는 모션 제어기(10)로부터 직접 정/역 방향의 이동량을 나타내는 펄스 신호를 전달 받는다.2 shows a configuration in which the motion controller 10 and the drive 20 are connected by pulse output signal lines 23. The drive 20 receives a pulse signal indicating the amount of movement in the forward/reverse direction directly from the motion controller 10.

도 3은 일반적인 모션 제어기(10)의 블록 구성을 도시한 것이다. 3 shows a block configuration of a general motion controller 10.

도 3을 참조하면, 모션 제어기(10)는 사용자 프로그램(11)을 이용하여 시퀀스 제어와 모션 제어를 실행한다. Referring to FIG. 3, the motion controller 10 executes sequence control and motion control using a user program 11.

사용자 프로그램(11)에서 실행된 모션 제어 명령은 모션 제어부(12)에서 처리된다. 모션 제어기(10)는 제어 주기라 불리는 일정한 주기마다 사용자 프로그램(11)과 모션 제어부(12)를 통한 모션 제어(14)를 반복적으로 실행한다. The motion control command executed by the user program 11 is processed by the motion control unit 12. The motion controller 10 repeatedly executes the motion control 14 through the user program 11 and the motion controller 12 at regular intervals called a control cycle.

모션 제어부(12)에서는 사용자 프로그램(11)에서 실행된 모션 제어 명령에 대하여 제어 주기마다 제어 데이터를 생성한다. 이와 같이 모션 제어부(12)에서 생성된 제어 데이터는 모터를 구동시키기 위하여 드라이브(20)에 전달된다. The motion control unit 12 generates control data for each control period with respect to the motion control command executed in the user program 11. In this way, the control data generated by the motion controller 12 is transmitted to the drive 20 to drive the motor.

이때, 모션 제어기(10)는 모션 제어부(12)에서 생성된 제어 데이터를 통신 처리부(13)에 전달하고, 통신 처리부(13)에서 매 통신 주기마다 드라이브(20)에 전송한다(15). 한편, 도 2에서 도시된 펄스 출력을 이용한 모션 제어기(10)는 이 제어 데이터를 펄스 형태로 변환하여 드라이브(20)에 출력한다.At this time, the motion controller 10 transfers the control data generated by the motion controller 12 to the communication processing unit 13, and transmits the control data generated by the motion controller 12 to the drive 20 at every communication period (15). Meanwhile, the motion controller 10 using the pulse output shown in FIG. 2 converts the control data into a pulse form and outputs it to the drive 20.

도 4는 모션 제어기(10)에서 드라이브(20)를 제어하기 위한 통신 처리 실행 타이밍도를 도시한 것이다. 4 is a diagram showing a timing diagram of execution of communication processing for controlling the drive 20 in the motion controller 10.

도 4를 참조하면, 모션 제어기(10)에서 일반적으로 제어 데이터를 생성하는 제어 주기(14)와 생성한 제어 데이터를 드라이브(20)로 전송하는 통신 주기(15)는 동일하다. 네트워크(22)를 이용한 모션 제어기(10)에서는 정주기 마다 제어 데이터를 드라이브(20)에 전송(32)하는 것이 가장 중요하다. Referring to FIG. 4, a control period 14 in which the motion controller 10 generally generates control data and a communication period 15 in which the generated control data is transmitted to the drive 20 are the same. In the motion controller 10 using the network 22, it is most important to transmit 32 control data to the drive 20 every fixed period.

따라서, 동일한 제어 주기(14)와 통신 주기(15)에서 가장 먼저 수행되는 작업은 통신 처리부(13)에서 제어 데이터를 드라이브(20)에 전송(32)하는 것이다. 통신 처리부(13)에서의 통신 처리(31) 작업이 완료되면 그 다음으로 사용자 프로그램이 실행된다(11). 사용자 프로그램 실행(11)이 완료되면 그 다음으로 프로그램에서 실행(11)된 모션 명령을 처리하는 모션 제어부(12)의 동작이 실행된다. Accordingly, the first operation performed in the same control period 14 and communication period 15 is to transmit 32 control data from the communication processing unit 13 to the drive 20. When the operation of the communication processing 31 in the communication processing unit 13 is completed, the user program is then executed (11). When the user program execution 11 is completed, the motion control unit 12 processes the motion command executed 11 in the program.

모션 제어부(12)의 실행에 따라 모터를 제어하기 위한 제어 데이터가 생성되며, 제어 데이터는 통신 처리부(13)에 전달되고(33), 앞에서 설명한 것과 같이 다음 제어 주기(통신 주기)에 드라이브(20)에 전송된다(32). 이러한 프로그램 & 모션 제어(30), 통신 처리(31)의 작업이 매 제어주기(통신주기) 마다 반복 실행되면서 모션 제어가 이루어지게 된다. 도 2에 도시된 펄스 출력형 모션 제어기(10)의 경우 프로그램 & 모션 제어(30) 실행 후의 제어 데이터를 펄스 출력 신호로 변환하여 드라이브(20)에 전달하게 된다.Control data for controlling the motor is generated according to the execution of the motion controller 12, and the control data is transmitted to the communication processing unit 13 (33), and the drive 20 is transferred to the next control cycle (communication cycle) as described above. ) Is transmitted to (32). The program & motion control 30 and the communication processing 31 are repeatedly executed in every control period (communication period), so that motion control is performed. In the case of the pulse output type motion controller 10 shown in FIG. 2, the control data after execution of the program & motion control 30 is converted into a pulse output signal and transmitted to the drive 20.

한편, 모션 제어기(10)는 제어 주기(14) 안에 프로그램(PG) & 모션제어(MC) 동작을 완료하여야 다음 통신 주기(15)가 시작되면 이전 제어 주기(14)의 모션 제어부(12)에서 생성된 제어 데이터(33)를 드라이브(20)에 정상적으로 전달할 수 있다(32). On the other hand, the motion controller 10 must complete the program (PG) & motion control (MC) operation within the control period 14, when the next communication period 15 starts, the motion controller 12 of the previous control period 14 The generated control data 33 can be normally transmitted to the drive 20 (32).

하지만, 만약 사용자 프로그램(PG)의 처리 시간이나 모션제어(MC)의 처리 시간이 길어져서 프로그램 & 모션 제어(30)의 실행 시간(16)이 제어 주기(14) 시간을 넘어서게 된다면 드라이브(20)를 제어하는 동작에 문제가 발생하게 된다.However, if the processing time of the user program (PG) or the processing time of the motion control (MC) becomes longer, the execution time (16) of the program & motion control (30) exceeds the control period (14), the drive (20) A problem occurs in the operation of controlling

즉, 도 4에서 보여지는 것과 같이 프로그램 & 모션 제어(30)의 실행 시간(16)이 제어 주기(14) 시간을 넘어가면 다음 통신 주기(15)가 시작되었을 때 모션 제어부(12)에서 새로운 제어 데이터 설정(33)이 되지 않기 때문에 이전에 생성된 제어 데이터가 그대로 유지되고(34), 해당 제어 데이터가 드라이브(20)에 전달되게 된다. 이 경우 드라이브(20)에 전달된 데이터는 이전 제어 주기(14)에서 전달된 제어 데이터와 동일하다. That is, as shown in Fig. 4, when the execution time 16 of the program & motion control 30 exceeds the control period 14 time, the motion control unit 12 controls the new control when the next communication period 15 starts. Since the data setting 33 is not performed, the previously generated control data is maintained as it is (34), and the corresponding control data is transmitted to the drive 20. In this case, the data transmitted to the drive 20 is the same as the control data transmitted in the previous control period 14.

이때 만일, 제어 데이터가 명령 위치인 경우 명령 위치 그래프(37)에서 보여지는 바와 같이 명령 위치가 업데이트 되지 않게 된다(38). 이와 같이 명령 위치가 업데이트 되지 않으면, 속도 그래프(39)에서 보여지는 바와 같이 명령 속도가 0으로 되고(40), 모터(21)의 운전이 정지되었다가 다시 구동되는 동작을 하게 된다. At this time, if the control data is the command position, the command position is not updated as shown in the command position graph 37 (38). If the command position is not updated in this way, as shown in the speed graph 39, the command speed becomes 0 (40), and the operation of the motor 21 is stopped and then driven again.

도 2에 도시된 펄스 출력형 모션 제어기(10)의 경우에도 프로그램 & 모션 제어(30)의 실행 시간(16)이 제어 주기(14) 시간을 넘어가면 다음 제어 주기(14)에서 출력할 펄스가 계산되지 않아, 펄스 출력이 되지 않는다. 마찬가지로, 드라이브(20)에서는 펄스를 수신하지 못하므로 명령 위치가 이전과 동일하게 되고(38), 속도는 명령 속도가 0으로 되고(40), 모터(21)의 운전이 정지되었다가 다시 구동되는 동작을 하게 된다. In the case of the pulse output type motion controller 10 shown in FIG. 2, when the execution time 16 of the program & motion control 30 exceeds the control period 14, the pulse to be output in the next control period 14 is It is not calculated, and pulse output is not possible. Likewise, since the drive 20 cannot receive the pulse, the command position becomes the same as before (38), the speed becomes the command speed 0 (40), and the operation of the motor 21 is stopped and then driven again. It works.

위와 같이 종래 기술에서의 모션 제어기(10)는 프로그램(PG) & 모션 제어(MC)가 제어 주기(14)안에 동작이 완료되지 못하는 경우 앞에서 설명한 것과 같이 모터(21)가 원하는 명령 위치/속도로 구동되지 못하는 문제점이 있다.As described above, when the motion controller 10 in the prior art does not complete the operation within the control period 14 in the program (PG) & motion control (MC), as described above, the motor 21 is at the desired command position/speed. There is a problem that it cannot be driven.

또한, 도 4에서 보여지는 바와 같이 통신 처리(31)에서 드라이브(20)에 제어 데이터를 전달(33)할 때 모션제어기(10)에 외부 노이즈(noise) 또는 물리적인 충격 등이 발생하여 일시적인 통신 오류(41)가 발생할 수 있다. 이러한 경우 드라이브(20)에서는 새로운 제어 데이터를 수신하지 못하기 때문에 이전에 전달된 제어 데이터가 그대로 유지되고, 이 제어 데이터로 모터(21)를 제어하게 된다. In addition, as shown in FIG. 4, when the control data is transmitted to the drive 20 in the communication processing 31, an external noise or a physical shock occurs in the motion controller 10, so that temporary communication An error 41 may occur. In this case, since the drive 20 cannot receive new control data, the previously transmitted control data is maintained as it is, and the motor 21 is controlled with this control data.

이때 만일, 제어 데이터가 명령 위치인 경우 위치 그래프(37)에서 보여지는 바와 같이 명령 위치가 업데이트 되지 않게 된다(43). 이와 같이 명령 위치가 업데이트 되지 않으면, 속도 그래프(39)에서 보여지는 바와 같이 명령 속도가 0으로 되었다가 다음 제어 주기(14)에는 정상적인 속도보다 더 큰 속도로 운전하게 된다(44). 따라서, 일시적으로 모터(21)의 운전이 정지되었다가 더 빨리 구동되는 속도 불연속인 동작을 하게 되는 문제점이 있다.At this time, if the control data is the command position, the command position is not updated as shown in the position graph 37 (43). If the command position is not updated as described above, as shown in the speed graph 39, the command speed becomes 0, and the next control cycle 14 operates at a higher speed than the normal speed (44). Accordingly, there is a problem in that the operation of the motor 21 is temporarily stopped and then a speed discontinuous operation that is driven faster is performed.

본 발명의 목적은 모션 제어기에서 네트워크로 연결된 드라이브로 제어 데이터를 전송하는 통신 처리 시점에 외부 노이즈 또는 물리적인 충격으로 통신 오류가 발생하여 제어 데이터가 드라이브로 정상적으로 전송되지 못하는 경우, 드라이브에서 통신 오류 발생 전에 수신된 제어 데이터의 목표값과 명령편차를 이용하여 다음 제어 데이터를 생성함으로써 통신 오류 발생시에도 모터를 안정적으로 제어할 수 있도록 하는 네트워크 기반 드라이브의 제어 데이터 보상방법을 제공하는 것이다.An object of the present invention is to cause a communication error in the drive when a communication error occurs due to external noise or physical shock at the time of communication processing in which control data is transmitted from a motion controller to a drive connected to a network and control data cannot be transmitted normally to the drive. It provides a control data compensation method for a network-based drive that enables stable control of a motor even in the event of a communication error by generating the following control data using the target value and command deviation of the previously received control data.

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

본 발명에 따른 모션제어기와 네트워크로 연결되는 네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법은, 상기 드라이브에서 상기 네트워크상 오류가 발생하는지 검사하는 단계와, 상기 네트워크 오류 발생 시, 상기 모션제어기로부터 수신한 이전 제어 주기의 제어 데이터로부터 상기 드라이브의 현재 동작 모드에서의 제1 목표값과 명령편차를 읽어오는 단계와, 상기 네트워크 오류 발생한 시점에서, 상기 네트워크 오류가 복구되는 시점까지 상기 모션제어기로부터 제어 데이터가 발생하는 구간수를 카운트하는 단계와, 상기 명령편차를 각 구간 별로 해당 구간수에 대응하게 가산 또는 감산시킨 후, 상기 명령편차를 상기 이전 제어 주기의 제1 목표값에서 가산 또는 감산하여 다음 제어 주기의 제2 목표값으로 순차적으로 생성하는 단계를 포함할 수 있다.The control data compensation method in case of a network error in a network-based drive connected to a motion controller and a network according to the present invention includes the steps of checking whether an error occurs on the network in the drive, and receiving from the motion controller when the network error occurs. Reading the first target value and command deviation in the current operation mode of the drive from control data of one previous control period, and control data from the motion controller from the time when the network error occurs to the time when the network error is recovered. Counting the number of sections in which is generated, and after adding or subtracting the command deviation according to the number of sections for each section, the command deviation is added or subtracted from the first target value of the previous control period to control the next It may include the step of sequentially generating the second target value of the period.

또한, 상기 다음 제어 주기의 상기 제2 목표값을 생성한 후에도 상기 네트워크 오류가 복구되지 않는 경우, 상기 구간수를 1씩 감소시키면서 상기 구간수가 0이 될 때까지 상기 다음 제어 주기의 상기 제2 목표값을 반복적으로 생성할 수 있다.In addition, if the network error is not recovered even after generating the second target value of the next control period, the second target of the next control period is reduced by 1 and the number of segments reaches 0. You can generate values iteratively.

또한, 상기 구간수가 통신 타임 아웃 구간 수보다 큰 경우, 상기 통신 타임 아웃 구간 수를 초과하는 구간에 대해서는 상기 제2 목표값을 생성하지 않는 단계를 더 포함할 수 있다.In addition, when the number of intervals is greater than the number of communication timeout intervals, the step of not generating the second target value for an interval exceeding the number of communication timeout intervals may be further included.

또한, 상기 드라이브의 동작 모드는, 상기 드라이브에 의해 제어되는 대상 기기에 대하 가속 모드, 등속 모드 또는 감속 모드를 포함하며, 각 동작 모드별 명령편차는 상기 모션제어기에서 각 동작 모드의 특성에 따라 서로 다르게 산출된 후, 상기 제어 데이터에 포함되어 상기 드라이브로 전송될 수 있다.In addition, the operation mode of the drive includes an acceleration mode, a constant speed mode, or a deceleration mode for the target device controlled by the drive, and the command deviation for each operation mode is determined from each other according to the characteristics of each operation mode in the motion controller. After calculating differently, it may be included in the control data and transmitted to the drive.

또한, 상기 구간수 내에서 상기 드라이브의 동작 모드가 변경되는 경우, 상기 동작 모드가 변경된 구간에 대해서는 상기 변경된 구간에 대응하는 새로운 명령편차를 읽어온 후, 상기 동작 모드가 변경되기 전 최종 구간에서 계산된 제2 목표값에서 상기 새로운 명령편차를 가산 또는 감산하여 상기 다음 제어 주기의 제2 목표값으로 생성하는 단계를 더 포함할 수 있다.In addition, when the operation mode of the drive is changed within the number of sections, a new command deviation corresponding to the changed section is read for the section in which the operation mode is changed, and then calculated in the last section before the operation mode is changed. The method may further include adding or subtracting the new command deviation from the determined second target value to generate a second target value for the next control period.

또한, 상기 목표값은, 상기 드라이브에 의해 제어되는 대상 기기를 가속, 등속 또는 감속시키기 위한 제어값이며, 상기 명령편차는, 각 동작 모드별 이전 제어 주기의 목표값과 다음 제어 주기의 목표값간 차이값인 것을 특징으로 한다.In addition, the target value is a control value for accelerating, constant speed, or decelerating the target device controlled by the drive, and the command deviation is the difference between the target value of the previous control period and the target value of the next control period for each operation mode. It is characterized by a value.

또한, 상기 네트워크 오류는, 상기 모션제어기와 상기 드라이브간 연결된 네트워크상 물리적인 원인으로 인해 상기 제어 데이터가 상기 드라이브로 정상적으로 전송되는 않는 상태를 의미할 수 있다.Further, the network error may mean a state in which the control data is not normally transmitted to the drive due to a physical cause on a network connected between the motion controller and the drive.

본 발명의 일 실시예에 따르면, 네트워크 기반 드라이브의 제어 데이터 보상방법에 있어서, 모션 제어기에서 네트워크로 연결된 드라이브로 제어 데이터를 전송하는 통신 처리 시점에 외부 노이즈 또는 물리적인 충격으로 통신 오류가 발생하여 제어 데이터가 드라이브로 정상적으로 전송되지 못하는 경우, 드라이브에서 통신 오류 발생 전에 수신된 제어 데이터의 목표값과 명령편차를 이용하여 다음 제어 데이터를 생성함으로써 통신 오류 발생시에도 모터를 안정적으로 제어할 수 있다.According to an embodiment of the present invention, in a method of compensating for control data of a network-based drive, a communication error occurs due to external noise or physical impact at the time of communication processing when control data is transmitted from a motion controller to a drive connected to a network, If data cannot be transmitted normally to the drive, the motor can be stably controlled even in the event of a communication error by generating the next control data using the target value and command deviation of the control data received before the communication error occurs from the drive.

또한, 드라이브에 전달하는 제어 데이터 중 구간수와 명령 편차를 현재 구간수와 다음 구간구로 구분하여 제공함으로써 네트워크 오류가 가속/등속/감속의 어느 구간에서 발생하더라도 드라이브에서 정상적인 목표값을 보상할 수 있다.In addition, by providing the number of sections and command deviation among the control data transmitted to the drive into the current section number and the next section section, the drive can compensate for the normal target value even if a network error occurs in any section of acceleration/constant speed/deceleration. .

또한, 통신 타임아웃 횟수로부터 현재 구간수와 다음 구간수를 생성하여 드라이브에 전달하는 것을 통해 모션 제어기에서 통신 타임아웃 횟수 이상으로 오류를 검출하여 통신 타임아웃 에러를 발생시키는 시점에 동일하게 드라이브에서도 현재 구간수와 다음 구간수 만큼 제어 데이터 보상을 실행한 후 통신 타임아웃 에러를 발생시킬 수 있다.In addition, by generating the current number of sections and the next number of sections from the number of communication timeouts and transmitting them to the drive, the motion controller detects an error more than the number of communication timeouts and generates the communication timeout error. Communication timeout error can occur after performing control data compensation for the number of sections and the number of next sections.

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

도 1은 모션 제어기와 드라이브 사이가 네트워크로 연결된 구성도.
도 2는 모션 제어기와 드라이브 사이가 펄스 출력 신호선들로 연결된 구성도.
도 3은 일반적인 모션 제어기의 블록 구성도.
도 4는 모션 제어기에서 드라이브를 제어하기 위한 통신 처리 실행 타이밍도.
도 5는 본 발명의 일 실시예에 따른 모션 제어기의 내부 구성 요소 중 모션 제어부의 상세 블록 구성도.
도 6은 본 발명의 일 실시예에 따른 모션 제어기에서 드라이브를 제어하기 위한 통신 처리 실행 타이밍도.
도 7은 본 발명의 일 실시예에 따라 모션 제어부에서 모션 제어를 수행하는 동작 제어 흐름도.
도 8은 본 발명의 일 실시예에 따라 통신 처리부에서 통신 처리를 수행하는 동작 제어 흐름도.
도 9는 본 발명의 다른 일 실시예에 따른 모션 제어기에서 드라이브를 제어하기 위한 통신 처리 실행 타이밍도.
도 10은 본 발명의 일 실시예에 따른 드라이브의 상세 기능 블록 구성도.
도 11은 본 발명의 일 실시예에 따라 모션 제어기에서 드라이브에 전달하는 제어 데이터 예시도.
도 12는 본 발명의 일 실시예에 따른 모션제어기에서 현재 구간수와 다음 구간수를 계산하는 처리 흐름도.
도 13은 본 발명의 일 실시예에 따라 프로파일 생성기에서 생성된 모터 제어를 위한 속도 프로파일 그래프 예시도.
도 14는 본 발명의 일 실시예에 따른 드라이브에서 제어 데이터를 처리 하는 동작 제어 흐름도.
도 15는 본 발명의 일 실시예에 따른 드라이브에서 제어 데이터에 따라 모터를 제어하는 동작 제어 흐름도.
1 is a block diagram of a network connection between a motion controller and a drive.
2 is a block diagram of a motion controller and a drive connected by pulse output signal lines.
3 is a block diagram of a general motion controller.
4 is a timing diagram of execution of communication processing for controlling a drive in a motion controller.
5 is a detailed block diagram of a motion controller among internal components of a motion controller according to an embodiment of the present invention.
6 is a timing diagram of execution of communication processing for controlling a drive in a motion controller according to an embodiment of the present invention.
7 is a flowchart illustrating an operation of performing motion control by a motion controller according to an embodiment of the present invention.
8 is a flowchart illustrating an operation of performing communication processing in a communication processing unit according to an embodiment of the present invention.
9 is a timing diagram of execution of communication processing for controlling a drive in a motion controller according to another embodiment of the present invention.
10 is a detailed functional block diagram of a drive according to an embodiment of the present invention.
11 is an exemplary view of control data transmitted from a motion controller to a drive according to an embodiment of the present invention.
12 is a flowchart illustrating a process of calculating the number of current sections and the number of next sections in the motion controller according to an embodiment of the present invention.
13 is an exemplary diagram of a speed profile graph for controlling a motor generated by a profile generator according to an embodiment of the present invention.
14 is a flowchart illustrating an operation of processing control data in a drive according to an embodiment of the present invention.
15 is a flowchart illustrating an operation of controlling a motor according to control data in a drive 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.

도 5는 본 발명의 일 실시예에 따른 모션 제어기의 내부 구성 요소 중 모션 제어부(12)의 상세 블록 구성을 도시한 것이다.5 shows a detailed block configuration of the motion controller 12 among internal components of the motion controller according to an embodiment of the present invention.

도 5를 참조하면, 모션 제어부는 명령 해석부(110), 명령 실행부(120), 상태 설정부(130) 등을 포함할 수 있다. 이하에서는 도 5를 참조하면 모션 제어부(12) 각 구성요소의 동작을 보다 상세히 설명하기로 한다.Referring to FIG. 5, the motion control unit may include a command analysis unit 110, a command execution unit 120, a state setting unit 130, and the like. Hereinafter, the operation of each component of the motion control unit 12 will be described in more detail with reference to FIG. 5.

먼저, 모션제어기(10)의 구성 요소 중 사용자 프로그램(11) 에서 모션 제어 명령이 실행된 경우, 명령 해석부(110)에서는 어떤 명령이 실행되었는지 확인한다. First, when a motion control command is executed in the user program 11 among the components of the motion controller 10, the command analysis unit 110 checks which command has been executed.

명령 해석부(110)에서 해석된 명령은 명령 실행부(120)에서 실행된 명령에 따라서 해당 서비스를 수행하게 된다. 명령 실행부(12)에서 모션 제어 서비스 수행 후 상태 설정부(130)에서 모션 제어 동작에 대한 모션 상태 값들을 설정한다. 이러한 동작이 매 제어 주기(14) 마다 모션 제어부(12) 안에서 반복적으로 수행된다. The command interpreted by the command interpretation unit 110 performs a corresponding service according to the command executed by the command execution unit 120. After the command execution unit 12 performs the motion control service, the state setting unit 130 sets motion state values for the motion control operation. This operation is repeatedly performed in the motion control unit 12 every control period 14.

명령 실행부(120)는 명령 해석부(110)에서 실행된 명령이 단축 명령(121), 축그룹 명령(122) 등인지를 판별한 후 해당하는 명령에 따라서 프로파일 생성기(123)를 제어하여 명령에 맞는 가감속 프로파일을 생성하게 된다. 이러한 가감속 프로파일은 모터의 속도를 가속/등속/감속 제어하기 위한 속도 제어 그래프일 수 있다. The command execution unit 120 determines whether the command executed by the command analysis unit 110 is a shortcut command 121, an axis group command 122, etc., and then controls the profile generator 123 according to the corresponding command to respond to the command. It creates a suitable acceleration/deceleration profile. This acceleration/deceleration profile may be a speed control graph for controlling acceleration/constant speed/deceleration of the motor.

프로파일 생성기(123)가 실행된 후 가/감속 처리기(124)에서는 명령이 실행된 후 매 제어 주기(14) 마다 가감속 프로파일에 대응하여 가/감속을 반영한 명령 데이터를 생성하게 된다. After the profile generator 123 is executed, the acceleration/deceleration processor 124 generates command data reflecting the acceleration/deceleration in response to the acceleration/deceleration profile in every control period 14 after the command is executed.

가/감속 처리기(124)에서 생성된 명령 데이터는 제어 데이터 생성부(125)에서 실제 드라이브(20)에 전송될 제어 데이터로 저장된다. 일반적으로 드라이브(20)에 전송되는 제어 데이터로는 위치/속도/토크 등이 해당될 수 있으나, 이에 한정되는 것은 아니다. The command data generated by the acceleration/deceleration processor 124 is stored as control data to be transmitted to the actual drive 20 by the control data generator 125. In general, the control data transmitted to the drive 20 may include a position/speed/torque, but is not limited thereto.

또한, 프로파일 생성기(123)는 명령이 실행되는 시점에 한번만 실행되고, 이후에는 그 결과 값을 가지고 프로파일 생성기(123)에서 생성한 가속/등속/감속 특성에 따라 프로파일이 종료되는 시간까지 가/감속 처리기(124)만 매 제어 주기(14) 마다 실행된다. 프로파일 생성기(123)에서는 가/감속 실행 시의 가속, 감속 연산을 위한 증분 값인 명령 편차가 계산되고, 가/감속 처리기(124)에서는 목표값 및 현재 운전되고 있는 가속/등속/감속 구간에서의 남아있는 구간 수가 계산된다. In addition, the profile generator 123 is executed only once at the time the command is executed, and after that, acceleration/deceleration until the time when the profile ends according to the acceleration/constant speed/deceleration characteristics generated by the profile generator 123 with the result value. Only the processor 124 is executed every control period 14. The profile generator 123 calculates the command deviation, which is an incremental value for acceleration and deceleration calculations during acceleration/deceleration execution, and the acceleration/deceleration processor 124 calculates the target value and the remaining acceleration/constant speed/deceleration section The number of segments is calculated.

도 6은 본 발명의 일 실시예에 따른 모션 제어기(10)에서 드라이브(20)를 제어하기 위한 통신 처리 실행 타이밍도를 도시한 것이다. 6 is a diagram illustrating a timing diagram of executing communication processing for controlling the drive 20 in the motion controller 10 according to an embodiment of the present invention.

이하, 도 6을 참조하여 프로파일 생성기(123)와 가/감속 처리기(124)의 상세 동작을 포함한 모션 제어기의 동작을 보다 상세히 설명하기로 한다.Hereinafter, operations of the motion controller including detailed operations of the profile generator 123 and the acceleration/deceleration processor 124 will be described in more detail with reference to FIG. 6.

사용자 프로그램(11)에서 모션 제어 명령이 실행되면 명령 실행부(120)의 프로파일 생성기(123)가 명령이 실행된 시점(T0)에 한번 실행된다. 이에 따라, 프로파일 생성기(123)는 모션 명령의 실행 조건에 따라서 가/감속을 반영하여 프로파일을 생성한다(50). When the motion control command is executed in the user program 11, the profile generator 123 of the command execution unit 120 is executed once at the time point T 0 where the command is executed. Accordingly, the profile generator 123 generates a profile by reflecting acceleration/deceleration according to the execution condition of the motion command (50).

위와 같이 프로파일이 생성(50)되면 명령 실행부(120)는 가/감속 처리기(124)를 실행하여 명령이 실행된 시점(T0)에서의 명령 데이터를 생성하고(56), 가/감속 처리기(124)를 한번 더 실행하여 다음 제어 주기(T1)에서의 명령 데이터를 생성한다(57). When the profile is created (50) as above, the command execution unit 120 executes the acceleration/deceleration processor 124 to generate command data at the time when the command is executed (T 0 ) (56), and the acceleration/deceleration processor By executing (124) once more, command data in the next control period (T 1 ) is generated (57).

여기에서 생성한 2개의 명령 데이터는 각각 명령버퍼1(52)과 명령버퍼2(53)에 저장된다. 즉, 명령 실행부(120)는 모션 명령이 실행된 시점(T0)에서는 가/감속 처리기(124)를 2번 실행하여 각각의 명령 데이터를 명령버퍼1(52)과 명령버퍼2(53)에 저장한다. The two command data generated here are stored in command buffer 1 (52) and command buffer 2 (53), respectively. That is, the instruction execution unit 120 executes the acceleration/deceleration processor 124 twice at the time when the motion instruction is executed (T 0 ), and transfers each instruction data to the instruction buffer 1 (52) and the instruction buffer 2 (53). Save it to.

도 6에서 보여지는 바와 같이 프로파일 생성(50)에 따른 명령 위치 그래프(51)에서 보면 명령 실행 시점(T0)에서는 명령버퍼1(52)에 P1 위치 값이 저장되고, 명령버퍼2(53)에 P2 위치 값이 저장된다. As shown in Fig. 6, from the command position graph 51 according to the profile creation 50, the P1 position value is stored in the command buffer 1 52 at the command execution time (T 0 ), and the command buffer 2 53 The position value of P2 is stored in.

이어, 모션 제어부(12)에서의 동작이 완료되면 명령 실행부(120)는 모션제어 종료 플래그(54) 상태를 ON으로 설정한다(62). 이 상태 플래그(54)는 통신 처리(31)에서 실제 실행 시간(16)이 제어 주기(14)를 오버했는지 비교하는 용도로 사용된다.Subsequently, when the operation in the motion control unit 12 is completed, the command execution unit 120 sets the state of the motion control end flag 54 to ON (62). This status flag 54 is used for comparing whether the actual execution time 16 has exceeded the control period 14 in the communication process 31.

다음으로 명령 실행 시점(T0)에서의 프로그램 & 모션제어(30) 동작이 완료된 후 모션 제어부(12)는 다음 제어 주기 시점(T1)에서의 통신 처리(31) 시 명령버퍼1(52)에 있는 제어 데이터(P1 위치 값)를 드라이브(20)에 전송한다(60). 그 다음 명령버퍼2(53)에 있는 제어 데이터(P2 위치 값)를 명령버퍼1(52)에 저장한다(61). Next, after the operation of the program & motion control 30 at the command execution time point (T 0 ) is completed, the motion control unit 12 is the command buffer 1 (52) at the communication processing 31 at the next control cycle time point (T 1 ). The control data (P1 position value) in is transmitted to the drive 20 (60). Then, the control data (P2 position value) in the command buffer 2 (53) is stored in the command buffer 1 (52) (61).

이 값은 현재 제어 주기 시점(T1)에서의 명령 데이터로서 다음 제어 주기 시점(T2)의 통신 처리(31)에서 드라이브(20)에 전송되는 제어 데이터 값이 된다. T1 제어 주기 시점에서 통신 처리가 완료되면 모션 제어부(12)의 가/감속 처리기(124)에서는 다음 제어주기 시점(T2)에서 제어 데이터로 사용될 명령 데이터(P3 위치 값)를 계산하여 명령버퍼2(53)에 저장한다. This value is command data at the current control cycle time T 1 and becomes a control data value transmitted to the drive 20 in the communication process 31 at the next control cycle time T 2 . When communication processing is completed at the time of the T 1 control cycle, the acceleration/deceleration processor 124 of the motion control unit 12 calculates the command data (P3 position value) to be used as control data at the next control cycle time (T 2 ) Save to 2(53).

즉, 명령 실행 시점(T0) 이 지난 후에 실행되는 가/감속 처리기(124)에서는 항상 그 다음 제어 주기 시점에서의 명령 데이터를 미리 계산하여 명령버퍼2(53)에 저장하게 된다. 따라서, 프로그램 & 모션제어(30)의 실행 시간(16)이 제어 주기(14)보다 작은 정상적인 조건에서 통신 처리(31) 시점의 명령버퍼1(52)에는 현재 제어 주기 시점에서의 제어 데이터가 저장되어 있고, 명령버퍼2(53)에는 다음 제어 주기 시점에서의 제어 데이터가 저장되어 있게 된다.That is, in the acceleration/deceleration processor 124 executed after the instruction execution time point T 0 has elapsed, the instruction data at the next control cycle time is always calculated in advance and stored in the instruction buffer 2 53. Therefore, under normal conditions where the execution time 16 of the program & motion control 30 is less than the control period 14, the control data at the current control period is stored in the command buffer 1 52 at the time of communication processing 31. And control data at the time of the next control cycle is stored in the command buffer 2 (53).

한편, 프로그램 & 모션제어(30)의 실행 시간(16)이 제어 주기(14)보다 큰 비정상적인 조건(17)에서의 동작은 다음과 같다. T3 제어 주기 시점에서 프로그램(PG)의 처리 시간이 길어져서 모션 제어(MC)의 실행이 아직 완료되지 않았으므로 모션제어 종료 플래그(54) 값도 ON이 되지 못하고 OFF 상태이다. T4 제어 주기 시점의 통신 처리(31) 시 명령버퍼1(52)에 있는 제어 데이터(P4 위치 값)를 드라이브(20)에 전송한다(66). Meanwhile, the operation under the abnormal condition 17 where the execution time 16 of the program & motion control 30 is greater than the control period 14 is as follows. At the time of the T 3 control period, the processing time of the program (PG) is prolonged, and the execution of the motion control (MC) has not yet been completed, so the value of the motion control end flag 54 is not turned ON and is in an OFF state. In the communication processing 31 at the time of the T 4 control cycle, control data (P4 position value) in the command buffer 1 52 is transmitted to the drive 20 (66).

하지만, 이때, 모션 제어부(12)에서의 모션 제어(MC)의 실행이 아직 완료되지 않아서 모션제어 종료 플래그(54) 값이 OFF 이므로 명령버퍼2(53)에 있는 제어 데이터(P4 위치 값)는 명령버퍼1(52)에 복사되지 않는다. 즉, 명령버퍼1(52)에는 다음 제어 주기 시점에서의 제어 데이터가 저장되어 있지 않은 상태가 된다. However, at this time, since the execution of the motion control (MC) in the motion control unit 12 has not yet been completed, the value of the motion control end flag 54 is OFF, so the control data (P4 position value) in the command buffer 2 53 is It is not copied to the command buffer 1 (52). That is, the command buffer 1 52 is in a state in which the control data at the time of the next control cycle is not stored.

이와 같이 모션제어 종료 플래그(54) 값이 OFF 인 경우 제어주기 오버 플래그(55)가 ON으로 설정되도록 하여(64), 모션 제어부(12)에서 가/감속 처리기(124)의 동작이 2회 수행되게 한다. 또한, T3 제어 주기 시점에서 프로그램의 처리(PG)가 끝나고 모션 제어부(12)가 동작되어 모션 제어(MC)가 실행될 때 제어주기 오버(55) 플래그가 ON인지 확인한다. 이때, 제어주기 오버(55)가 발생된 경우(17), 명령 실행 시점(T0) 에서와 마찬가지로 가/감속 처리기(124)를 2번 실행(58, 59)하여 각각의 명령 데이터를 명령버퍼1(52, P5 위치 값)과 명령버퍼2(53, P6 위치 값)에 저장한다. In this way, when the value of the motion control end flag 54 is OFF, the control period over flag 55 is set to ON (64), so that the motion control unit 12 performs the operation of the acceleration/deceleration processor 124 twice. Let it be. In addition, it is checked whether the control period over 55 flag is ON when the program processing (PG) ends at the time of the T 3 control period and the motion control unit 12 is operated to execute the motion control (MC). At this time, when the control period over (55) occurs (17), the acceleration/deceleration processor 124 is executed twice (58, 59) as in the command execution time point (T 0 ) to save each command data to the command buffer. It is stored in 1(52, P5 position value) and command buffer 2(53, P6 position value).

즉, 이 시점의 명령버퍼1(52)에는 현재 제어 주기 시점(T4)에서의 제어 데이터가 저장되어 있고, 명령버퍼2(53)에는 다음 제어 주기 시점(T5)에서의 제어 데이터가 저장되어 있게 된다. 이어, T5 제어 주기 시점에서는 프로그램 & 모션제어(30)의 실행 시간(16)이 제어 주기(14)보다 작은 정상적인 조건이므로 모션 제어부(12)에서는 다음 제어 주기 시점에서의 명령 데이터를 생성하여 명령버퍼2(53)에 저장하고, 통신 처리(31)에서 명령버퍼1(52)을 드라이브(20)에 전송하는 동작을 반복한다.That is, the control data at the current control cycle time (T 4 ) is stored in the command buffer 1 (52) at this point, and the control data at the next control cycle time (T 5 ) is stored in the command buffer 2 (53). It will become. Then, at the time of the T 5 control cycle, the execution time 16 of the program & motion control 30 is a normal condition that is smaller than the control cycle 14, so the motion control unit 12 generates command data at the time of the next control cycle The operation of storing in the buffer 2 (53) and transmitting the command buffer 1 (52) to the drive 20 in the communication process (31) is repeated.

도 7은 본 발명의 일 실시예에 따라 모션 제어부에서 모션 제어를 수행하는 동작 제어 흐름을 도시한 것이다.7 is a flowchart illustrating an operation control flow for performing motion control in a motion controller according to an embodiment of the present invention.

도 8은 본 발명의 일 실시예에 따라 통신 처리부에서 통신 처리를 수행하는 동작 제어 흐름을 도시한 것이다.8 is a flowchart illustrating an operation control flow for performing communication processing in a communication processing unit according to an embodiment of the present invention.

먼저, 도 7을 참조하여 모션 제어 동작을 보다 상세히 설명하기로 한다. First, a motion control operation will be described in more detail with reference to FIG. 7.

모션 제어부(12)에서 모션 제어가 시작 되면 명령 실행 시점인지 확인하여(S71) 명령 실행 시점인 경우 프로파일 생성기(123)를 통해 프로파일을 생성한다(S72).When the motion control starts in the motion control unit 12, it checks whether it is a command execution time (S71), and when the command execution time is the time, the profile generator 123 generates a profile (S72).

이어, 모션 제어부(12)는 가/감속 처리기(124)를 통해 제1 가/감속 처리를 수행하고(S73), 제1 가/감속 처리를 통해 생성된 제어 데이터를 명령버퍼1(52)에 설정(S74)하는 것을 통해 현재 제어 주기 시점의 명령 데이터를 생성한다. Subsequently, the motion controller 12 performs a first acceleration/deceleration process through the acceleration/deceleration processor 124 (S73), and transfers the control data generated through the first acceleration/deceleration process to the command buffer 1 52. By setting (S74), command data at the time of the current control cycle is generated.

그러나, 명령 실행 시점이 아닌 경우, 모션 제어부(12)는 제어주기 오버 플래그(55)를 확인(S75)하여 제어주기가 오버된 경우 가/감속 처리기(124)를 통해 제1 가/감속 처리를 수행하고(S73), 제1 가/감속 처리를 통해 생성된 제어 데이터를 명령버퍼1(52)에 저장(S74)하는 것을 통해 현재 제어 주기 시점의 명령 데이터를 생성한다. However, if it is not the time of command execution, the motion controller 12 checks the control period over flag 55 (S75), and when the control period is over, performs the first acceleration/deceleration processing through the acceleration/deceleration processor 124. In step S73, the control data generated through the first acceleration/deceleration process is stored in the command buffer 1 52 (S74) to generate command data at the time of the current control cycle.

반대로, 제어주기가 오버되지 않은 경우 모션 제어부(12)는 가/감속 처리기(124)를 통해 제2 가/감속 처리를 수행하고(S76), 제2 가/감속 처리를 통해 생성된 제어 데이터를 명령버퍼2(53)에 저장(S77)하는 것을 통해 다음 제어 주기 시점의 명령 데이터를 생성한다. Conversely, when the control period is not over, the motion controller 12 performs the second acceleration/deceleration processing through the acceleration/deceleration processor 124 (S76), and the control data generated through the second acceleration/deceleration processing is stored. By storing (S77) in the command buffer 2 (53), command data at the time of the next control cycle is generated.

이어, 모션 제어부(12)는 명령버퍼2(53)에 제어 데이터를 저장(S77)하는 동작이 완료되면 다시 한번 제어주기 오버 플래그(55)를 확인(S78)한다. 프로그램 실행(PG)이 완료된 후 모션 제어(MC) 처리 중에 아직 모션제어 종료 플래그(54)가 ON 되지 않은 상태에서 통신 처리(31)가 실행되어 제어주기 오버 플래그(55)가 ON 될 수 있으므로 다시 한번 제어주기 오버 플래그(55)를 확인(S78)하는 것이다.Subsequently, when the operation of storing the control data in the command buffer 2 53 (S77) is completed, the motion control unit 12 checks the control period over flag 55 again (S78). After the program execution (PG) is completed, communication processing (31) is executed while the motion control end flag (54) is not turned on yet during motion control (MC) processing, and the control cycle over flag (55) may be turned on again. Once the control period over flag 55 is checked (S78).

이때, 제어주기가 오버된 경우 모션 제어부(12)는 다음 제어주기 시점의 제어 데이터로 저장된 명령버퍼2(53)의 데이터를 현재 제어주기 시점의 제어 데이터가 저장된 명령버퍼1(52)에 저장한다. 그리고 제어주기 오버 플래그(55)를 OFF로 설정(81)한 후 제2 가/감속 처리(S76)를 통해 생성된 제어 데이터를 명령버퍼2(53)에 저장(S77)하는 것을 통해 다음 제어 주기 시점의 명령 데이터를 재생성 한다. 이때, 앞에서 제어주기 오버 플래그(55)를 OFF로 설정(S81)하였기 때문에 제어주기 오버 확인(S78) 시 제어주기 오버되지 않는 조건이 실행된다. At this time, when the control period is over, the motion controller 12 stores the data of the command buffer 2 (53) stored as control data at the time of the next control period in the command buffer 1 (52) in which the control data at the time of the current control period is stored. . Then, after setting the control period over flag 55 to OFF (81), the control data generated through the second acceleration/deceleration processing (S76) is stored in the command buffer 2 (53) (S77). Regenerate the command data at the time point. At this time, since the control period over flag 55 was previously set to OFF (S81), a condition in which the control period is not over is executed when the control period over is confirmed (S78).

그러면 모션 제어부(12)는 모션제어 종료 플래그(54)를 ON으로 설정(S79)한 후 모션제어 처리를 종료한다.Then, the motion control unit 12 sets the motion control end flag 54 to ON (S79) and ends the motion control processing.

다음으로 도 8을 참조하여 통신 처리 동작을 보다 상세히 설명하기로 한다. Next, a communication processing operation will be described in more detail with reference to FIG. 8.

먼저, 통신 처리부(13)는 통신 처리(31)가 시작되면 이전 제어 주기의 모션 제어(MC)에서 생성된 명령버퍼1(52)에 저장된 제어 데이터를 드라이브(21)에 전송한다(S91). First, when the communication processing 31 starts, the communication processing unit 13 transmits the control data stored in the command buffer 1 52 generated in the motion control MC of the previous control period to the drive 21 (S91).

이때 통신 처리부(13)는 모션제어 종료 플래그(54)를 확인하여 모션 제어(MC)의 동작이 정상적으로 종료 되었는지 확인한다(S92). At this time, the communication processing unit 13 checks the motion control end flag 54 and checks whether the motion control (MC) operation is normally terminated (S92).

확인 결과, 모션 제어 종료 플래그(54)가 ON 상태로 되어 있어 모션 제어(MC)의 동작이 정상적으로 종료된 것을 의미하는 경우 제어주기 오버 플래그(55)를 OFF하여 제어주기가 오버되지 않고 정상적으로 실행되었음을 설정한다(S93). 이어, 통신 처리부(13)는 명령버퍼2(53)에 저장된 제어 데이터를 명령버퍼1(52)에 저장하여 다음 제어 주기에서의 명령 데이터로 사용될 수 있도록 설정한다(S95). As a result of the confirmation, if the motion control end flag 54 is turned ON, which means that the motion control (MC) operation has been normally ended, turn off the control cycle over flag 55 to confirm that the control cycle is not over and has been normally executed. Set (S93). Subsequently, the communication processing unit 13 stores the control data stored in the command buffer 2 53 in the command buffer 1 52 and sets it to be used as command data in the next control cycle (S95).

그러나, 확인 결과 모션제어 종료 플래그(54)가 OFF 상태로 되어 있어 모션 제어(MC)의 동작이 정상적으로 종료되지 못한 것을 의미하는 경우 제어주기 오버 플래그(55)를 ON으로 설정하여 제어주기가 오버되어 모션 제어(MC)가 정상적으로 실행되지 못했음을 설정한다(S94).However, if the check result indicates that the motion control end flag 54 has not been normally terminated because the motion control end flag 54 is turned off, the control cycle is over by setting the control cycle over flag 55 to ON. It is set that the motion control (MC) has not been normally executed (S94).

이에 따라, 모션 제어부(12)에서 제1, 제2 가/감속 처리(S73, S76)가 두번 실행되도록 하여 명령버퍼1(52)과 명령버퍼(53)가 모두 설정(S74, S77)될 수 있도록 한다.Accordingly, the motion controller 12 executes the first and second acceleration/deceleration processing (S73, S76) twice, so that both the command buffer 1 52 and the command buffer 53 can be set (S74, S77). To be.

명령버퍼1(52)과 명령버퍼(53)가 모두 설정(S74, S77)되는 경우 통신 처리부(13)는 모션제어 종료 플래그(54)를 OFF로 설정하여 모션 제어부(12)에서 모션 제어 동작 종료 후 다시 모션제어 종료 플래그(54)를 ON으로 설정할 수 있도록 플래그를 초기화 한다(S96).When both the command buffer 1 52 and the command buffer 53 are set (S74, S77), the communication processing unit 13 sets the motion control end flag 54 to OFF, and the motion control operation is terminated by the motion control unit 12. After that, the flag is initialized so that the motion control end flag 54 can be set to ON again (S96).

상술한 바와 같이 위 도 4 내지 도 8을 참조한 설명에서는 드라이브(20)로 전달되는 제어 데이터를 현재 제어 주기의 제어 데이터인 명령버퍼1(52)과 다음 제어 주기의 제어 데이터인 명령버퍼2(53)의 두 개로 구성하여 제어주기(14)가 오버되는 것과 같은 비정상적인 경우에도 드라이브(20)로 정상적인 제어 데이터가 전송되는 것을 설명하였다.As described above, in the description with reference to FIGS. 4 to 8 above, the control data transmitted to the drive 20 is the command buffer 1 52 which is the control data of the current control period and the command buffer 2 53 which is the control data of the next control period. ), it has been described that normal control data is transmitted to the drive 20 even in an abnormal case such as the control period 14 being over.

이하에서는 도 9 내지 도 13을 참조하여 일시적인 네트워크 오류가 발생하였을 때 드라이브(20)에서 제어 데이터를 보상하는 방법에 대하여 설명하기로 한다. Hereinafter, a method of compensating for control data in the drive 20 when a temporary network error occurs will be described with reference to FIGS. 9 to 13.

도 9는 본 발명의 다른 일 실시예에 따른 모션 제어기(10)에서 드라이브(20)를 제어하기 위한 통신 처리 실행 타이밍도를 도시한 것이다.9 is a timing diagram illustrating a communication process execution timing diagram for controlling the drive 20 in the motion controller 10 according to another embodiment of the present invention.

도 10은 본 발명의 일 실시예에 따른 드라이브(20)의 상세 기능 블록 구성을 도시한 것이다.10 illustrates a detailed functional block configuration of the drive 20 according to an embodiment of the present invention.

도 9를 참조하면, 참조번호 (900)은 모션 제어기(10)에서 명령에 해당하는 위치 값을 생성하고, 통신 처리(31)를 한 후 드라이브(20)에 제어 데이터를 전달하는 전체 동작 타이밍도를 도시한 것으로, 도 6에서 설명한 것과 동일하다. Referring to FIG. 9, reference numeral 900 is an overall operation timing diagram of generating a position value corresponding to a command in the motion controller 10, performing communication processing 31, and transmitting control data to the drive 20. As illustrated, the same as described in FIG.

참조번호 (910)은 드라이브(20)에서 제어 데이터를 수신하는 동작 타이밍도를 도시한 것이다. 본 발명의 일 실시예에서는 네트워크 오류시 드라이브(20)에서 제어 데이터를 보상할 수 있도록 하기 위해 참조번호 (950)에서 보여지는 바와 같이 모션 제어기(10)로부터 드라이브(20)로 전송하는 제어 데이터를 목표값, 구간수, 명령편차로 구성하여 전송한다.Reference numeral 910 shows an operation timing diagram for receiving control data from the drive 20. In an embodiment of the present invention, control data transmitted from the motion controller 10 to the drive 20 is transmitted from the motion controller 10 to the drive 20 as shown by reference numeral 950 in order to compensate the control data in the drive 20 in case of a network error. It consists of target value, number of sections, and command deviation and transmits.

도 11은 본 발명의 일 실시예에 따라 모션 제어기(10)에서 드라이브(20)에 전달하는 제어 데이터를 구성을 나타낸다.11 shows the configuration of control data transmitted from the motion controller 10 to the drive 20 according to an embodiment of the present invention.

도 11에서 각 정보의 옆에 괄호로 표시된 것은 각 정보의 크기를 나타낸 것이며, B는 Byte의 약자이다. In FIG. 11, brackets next to each piece of information indicate the size of each piece of information, and B is an abbreviation of Byte.

일반적으로 모션 제어기(10)에서 드라이브(20)를 제어하기 위해서는 제어 워드(211)와 현재 드라이브 동작 모드에서의 목표값(212)이 필요하다. 제어 워드(211)는 드라이브(20)의 파워 스테이지를 제어하여 모터의 토크를 인가하고 해제하는 동작이 실행되도록 하기 위한 명령값을 의미한다. 목표값(212)은 현재 드라이브(20)의 동작 모드에서 모터를 특정 목표 속도로 구동시키기 위해 가속 또는 감속시켜야 하는 명령값을 의미하는 것으로 명령버퍼1(52)과 명령버퍼2(53)에 저장된 제어 데이터를 의미할 수 있다. In general, in order for the motion controller 10 to control the drive 20, the control word 211 and the target value 212 in the current drive operation mode are required. The control word 211 denotes a command value for controlling the power stage of the drive 20 to apply and release the torque of the motor. The target value 212 is a command value that must be accelerated or decelerated in order to drive the motor at a specific target speed in the current operation mode of the drive 20 and is stored in the command buffer 1 (52) and command buffer 2 (53). It can mean control data.

이때, 모션 제어기(10)에서 생성된 제어 데이터를 드라이브(20)에 전달하여 모터를 제어하는 중 일시적인 네트워크 오류가 발생하였을 때 드라이브(20)는 모터를 제어하는데 필요한 제어 데이터인 새로운 목표값(212)을 모션 제어기(10)로부터 받지 못하므로 안정적인 제어를 할 수 없다. At this time, when a temporary network error occurs while controlling the motor by transmitting the control data generated by the motion controller 10 to the drive 20, the drive 20 is assigned a new target value 212, which is the control data required to control the motor. ) Is not received from the motion controller 10, so stable control is not possible.

본 발명에서는 이를 해결하기 위하여 도 11에서 보여지는 바와 같이 모션 제어기(10)에서 드라이브(20)로 전달되는 위와 같은 제어 데이터에 목표값과 함께 구간수, 명령편차 정보를 추가로 구성하여 드라이브(20)에 제공한다. In the present invention, in order to solve this problem, as shown in FIG. 11, the drive 20 additionally configures the number of sections and command deviation information along with a target value in the above control data transmitted from the motion controller 10 to the drive 20. ).

위와 같은 구간수는 현재 구간수(213)와 다음 구간수(215)를 포함할 수 있고, 명령 편차는 현재 구간 명령 편차(214)와 다음 구간 명령 편차(216)를 포함할 수 있다.The number of sections as described above may include the number of current sections 213 and the number of next sections 215, and the command deviation may include the current section command deviation 214 and the next section command deviation 216.

여기서 '구간'이 의미하는 것은 프로파일 생성기(123)에서 명령에 맞는 가/감속 프로파일을 생성할 때 계산하는 가속, 등속, 감속 구간을 말한다. 구간수가 의미하는 것은 가감속 처리기(124)에서 현재 구간(가속, 등속, 감속)에서의 목표값(212)을 생성한 후 해당 구간에서 가감속 처리기(124)를 수행해야 하는 남은 반복 회수를 의미한다.Here, the meaning of “section” refers to an acceleration, constant velocity, and deceleration section calculated when the profile generator 123 generates an acceleration/deceleration profile suitable for a command. The number of sections means the number of repetitions remaining after the acceleration/deceleration processor 124 generates the target value 212 in the current section (acceleration, constant speed, deceleration) and then the acceleration/deceleration processor 124 must be performed in the corresponding section. do.

명령 편차(214, 216)가 의미하는 것은 명령버퍼1(52) 값과 명령버퍼2(53) 값을 계산한 후의 명령 차이 값을 의미한다. 현재 구간이 가속 구간이면 명령 편차 값은 (+) 값이 되고, 등속 구간이면 0, 감속 구간이면 (-) 값이 된다. The command deviations 214 and 216 mean the command difference value after calculating the command buffer 1 (52) and command buffer 2 (53) values. If the current section is an acceleration section, the command deviation value becomes a (+) value, if it is a constant speed section, it becomes 0, and if it is a deceleration section, it becomes a (-) value.

예들들어, 프로파일 생성기(123)에서 명령이 실행된 후 가속과 감속만으로 구성된 가감속 프로파일을 생성하였고, 현재 가속 구간을 실행 중이면 현재 구간수(213)의 값은 현재 실행하고 있는 가속 구간에서의 남은 가/감속 처리기(124)를 수행해야 하는 회수로부터 계산되어 저장되고, 현재 구간 명령 편차(214)에는 가속 증분량이 저장된다. 또한, 다음 구간 수(216)는 감속 구간에서의 가감속 처리기 수행 회수로부터 계산되어 저장되고, 다음 구간 명령 편차(216)에는 감속 증분량이 저장된다. 각 구간에서의 명령 편차(214, 216) 값은 프로파일 생성기(123)가 가감속 프로파일을 생성할 때 계산되므로 가감속 처리기(124)에서 매번 계산할 필요는 없다.For example, after the command is executed in the profile generator 123, an acceleration/deceleration profile consisting only of acceleration and deceleration is generated, and if the current acceleration section is being executed, the value of the current section 213 is in the currently executed acceleration section. It is calculated and stored from the number of times the remaining acceleration/deceleration processor 124 has to be performed, and the acceleration increment amount is stored in the current section command deviation 214. In addition, the next section number 216 is calculated and stored from the number of times the acceleration/deceleration processor is performed in the deceleration section, and the deceleration increment amount is stored in the next section command deviation 216. The values of the command deviations 214 and 216 in each section are calculated when the profile generator 123 generates the acceleration/deceleration profile, so it is not necessary to calculate the values of the acceleration/deceleration processor 124 every time.

도 12는 모션제어기(10)에서 현재 구간수(213)와 다음 구간수(215)를 계산하는 방법을 도시한 것이다.12 shows a method of calculating the number of current sections 213 and the number of next sections 215 in the motion controller 10.

현재 구간수(213)와 다음 구간수(215)가 의미하는 것은 네트워크 오류가 발생했을 때 드라이브(20)에서 제어 데이터 보상을 실시할 수 있는 횟수를 의미할 수 있다. The current section number 213 and the next section number 215 may mean the number of times the drive 20 can perform control data compensation when a network error occurs.

일반적으로 모션 제어기(10)는 네트워크 오류가 발생하였을 때 연속적으로 발생한 네트워크 오류를 계수하여 특정한 타임아웃 횟수 이상이 되면 더 이상 통신을 수행할 수 없는 상태로 판단하고 사용자에게 에러로 정보를 알려준다. 따라서, 네트워크 오류가 발생하였을 때 드라이브(20)에서 제어 데이터를 보상할 수 있는 횟수의 최대 값은 통신 타임아웃 횟수가 된다.In general, when a network error occurs, the motion controller 10 counts a network error that occurs continuously, determines that communication cannot be performed any more than a certain number of timeouts, and informs the user of information as an error. Accordingly, when a network error occurs, the maximum value of the number of times that the drive 20 can compensate for the control data is the number of communication timeouts.

도 12에서 구간수 계산이 시작(220)되면 모션제어부(12)는 먼저 현재 동작 구간(가속, 등속, 감속) 에서의 남은 구간 수가 통신 타임 아웃 횟수 이상인지 비교(S221)한다. 12, when the number of sections starts 220, the motion control unit 12 first compares whether the number of remaining sections in the current operation section (acceleration, constant velocity, deceleration) is equal to or greater than the number of communication timeouts (S221).

만약, 남은 구간 수가 통신 타임 아웃 횟수 이상이면 현재 구간수(213)에는 통신 타임아웃 횟수를 저장하고(S222), 다음 구간수(214)에는 0을 저장한다(S223). If the number of remaining sections is greater than or equal to the number of communication timeouts, the number of communication timeouts is stored in the current number of sections 213 (S222), and 0 is stored in the number of next sections 214 (S223).

이 경우 네트워크 오류가 발생했을 때 드라이브(20)에서는 먼저 현재 구간수(213) 값을 가지고 제어 데이터 보상을 실행하는데 현재 구간수(213) 만큼 보상을 실행한 후에도 네트워크 오류가 복구되지 않으면 모션 제어기(10)에서 통신 타임아웃 에러를 발생시키고, 드라이브(20)에서는 다음 구간수(215)는 보상이 실행되지 않아야 하므로 0을 저장한다. In this case, when a network error occurs, the drive 20 first performs control data compensation with the current number of sections 213. If the network error is not recovered even after the current number of sections 213 is compensated, the motion controller ( In 10), a communication timeout error is generated, and in the drive 20, the next number of sections 215 should not be compensated, so 0 is stored.

만약, 남은 구간 수가 통신 타임아웃 횟수보다 작으면 현재 구간수(213)에는 남은 구간수를 저장하고(S224), 다음 구간수(215)에는 통신 타임아웃 횟수에서 현재 구간수(213)를 뺀값을 저장한다(S225). 이 경우 네트워크 오류가 발생했을 때 드라이브(20)에서는 먼저 현재 구간수(213) 값을 가지고 제어 데이터 보상을 실행하는데 현재 구간수(213) 만큼 보상을 실행한 후에는 다음 구간수(215) 값을 가지고 제어 데이터 보상을 실행한다. If the number of remaining sections is less than the number of communication timeouts, the number of remaining sections is stored in the current section 213 (S224), and the next section number 215 is a value obtained by subtracting the current section number 213 from the number of communication timeouts. Save (S225). In this case, when a network error occurs, the drive 20 first performs control data compensation with the current number of sections 213. After performing the compensation as much as the current number of sections 213, the next number of sections 215 is calculated. And perform control data compensation.

도 13은 본 발명의 일 실시예에 따른 프로파일 생성기에서 생성된 모터 제어를 위한 속도 프로파일 그래프를 예시한 것이다.13 is a diagram illustrating a speed profile graph for controlling a motor generated by a profile generator according to an embodiment of the present invention.

이하, 도 12 및 도 13을 참조하여 현재 구간수와 다음 구간수를 계산하는 간단한 예를 설명하고자 한다. 도 13에서는 설명의 편의를 위해 통신 타임 아웃 회수를 3회로 설정하여 현재 구간수(213)와 다음 구간수(215)를 계산하는 것을 예시하였으나, 이에 한정되는 것은 아니다. 즉, 통신 타임 아웃 회수는 사용자에 의해 서로 다른 회수로 변경 설정될 수 있다.Hereinafter, a simple example of calculating the current number of sections and the number of next sections will be described with reference to FIGS. 12 and 13. In FIG. 13, for convenience of explanation, the number of communication timeouts is set to three to calculate the current number of sections 213 and the number of next sections 215, but the present invention is not limited thereto. That is, the number of communication timeouts may be changed and set to different times by the user.

먼저, 남은 구간수가 통신 타임 아웃 회수보다 큰 경우를 설명하면, 예를 들어, 현재 통신 타임 아웃 회수가 3회로 설정되고, 현재 구간이 가속 동작 모드인 상태에서 도 13에서 보여지는 바와 같이 가속 모드에서 등속 모드로 변경되기 4구간 전 시점(1300)에서 네트워크 오류가 발생하였다고 가정한다.First, a case where the number of remaining sections is greater than the number of communication timeouts will be described, for example, in the acceleration mode as shown in FIG. It is assumed that a network error occurs at a time point 1300 before the 4th section to change to the constant velocity mode.

그러면, 현재 남은 구간수는 4가 되어 남은 구간수의 크기가 통신 타임 아웃 회수인 3보다 크게 된다. 이러한 경우 현재 구간수(213)는 통신 타임 아웃 회수로 설정되어 3으로 설정되고, 다음 구간수(215)는 0이 되는 것이다. Then, the number of remaining sections is 4, and the size of the remaining section is larger than 3, which is the number of communication timeouts. In this case, the current number of sections 213 is set as the number of communication timeouts and is set to 3, and the next number of sections 215 is set to 0.

다음으로, 남은 구간수가 통신 타임 아웃 회수보다 작은 경우를 설명하면, 예를 들어, 현재 통신 타임 아웃 회수가 3회로 설정되고, 현재 구간이 가속 동작 모드인 상태에서 도 13에서 보여지는 바와 같이 가속 모드에서 등속 모드로 변경되기 2구간 전 시점(1310)에서 네트워크 오류가 발생하였다고 가정한다.Next, the case where the number of remaining sections is smaller than the number of communication timeouts will be described, for example, when the number of times of the current communication timeout is set to 3, and the current section is in the acceleration operation mode, as shown in FIG. It is assumed that a network error occurs at a time point 1310 before the second section in which the mode is changed to the constant velocity mode.

그러면, 현재 남은 구간수는 2가 되어 남은 구간수의 크기가 통신 타임 아웃 회수인 3보다 작게 된다. 이러한 경우 현재 구간수(213)는 남은 구간수인 2가 되고, 다음 구간수(215)는 통신 타임 회수 3에서 현재 구간수 2를 뺀 값인 1이 되는 것이다.Then, the number of remaining sections is 2, and the size of the remaining section is smaller than 3, which is the number of communication timeouts. In this case, the current number of sections 213 becomes 2, which is the number of remaining sections, and the next number of sections 215 becomes 1, which is a value obtained by subtracting the current number of sections 2 from the number of communication times 3.

한편, 위와 같은 구간수(213, 215) 값은 1Byte 크기로 되어 있고, 명령 편차(214, 216) 값은 3Byte로 구성되어 있다. 하지만, 구간수(213, 215)의 설정 최대 값이 통신 타임아웃 횟수이므로 통신 타임아웃 횟수 설정에 따라서 크기를 몇 비트로 줄일 수도 있다.On the other hand, the values of the number of sections 213 and 215 are 1 byte, and the command deviations 214 and 216 are 3 bytes. However, since the maximum set value of the number of sections 213 and 215 is the number of communication timeouts, the size may be reduced to several bits according to the number of communication timeouts.

또한, 명령 편차(214, 216) 값은 실제 목표 값이 아닌 목표 값에 대한 증분 값을 의미하므로 드라이브(20)의 성능에 따라서 크기를 줄일 수 있다. 예를 들어, 통신 타임아웃 횟수가 8인 경우 구간수(213, 215)는 4Bit로 설정하고, 드라이브의 제어 성능이 낮아서 명령 편차(214, 216) 값을 12Bit로 설정한다면 구간 수와 명령 편차를 2Btye 안에서 설정할 수 있으므로, 드라이브(20)로 전달하는 제어 데이터의 크기를 줄일 수 있다.In addition, since the values of the command deviations 214 and 216 are incremental values for the target values, not the actual target values, the size can be reduced according to the performance of the drive 20. For example, if the number of communication timeouts is 8, the number of sections (213, 215) is set to 4Bit, and the command deviation (214, 216) value is set to 12Bit because the control performance of the drive is low. Since it can be set in 2Btye, the size of control data transmitted to the drive 20 can be reduced.

다시, 도 10에 도시된 동작 타이밍도에 대한 설명으로 돌아가면, Again, returning to the description of the operation timing diagram shown in FIG. 10,

드라이브(20)에서는 통신부(900)를 통해 모션 제어기(10)에서 전달된 제어 데이터(목표값, 구간수, 명령편차)를 수신한다. 그러면, 제어 명령 생성부(902)를 통해 제어 명령 생성(205)을 한 후 P/V/T 제어(206) 부(904)에서 실제 모터(21)를 회전시킨다. 또한, P/V/T 제어부(206)에서는 모터(21)의 엔코더 위치 값을 읽어서 피드백 제어를 실행한다. The drive 20 receives control data (target value, number of sections, command deviation) transmitted from the motion controller 10 through the communication unit 900. Then, after the control command generation 205 is generated through the control command generation unit 902, the P/V/T control unit 206, the actual motor 21 is rotated. Further, the P/V/T control unit 206 reads the encoder position value of the motor 21 and performs feedback control.

이때 만일, 일시적인 네트워크 오류(41)가 발생하여 드라이브 제어 정보 읽기가 실패된 경우 제어 명령 생성부(205)에서 이전에 정상적으로 수신하였던 제어 데이터를 가지고 제어 데이터 보상을 실행한다. At this time, if a temporary network error 41 occurs and the reading of the drive control information fails, the control command generator 205 performs control data compensation with the control data previously normally received.

도 14는 본 발명의 일 실시예에 따른 드라이브(20)에서 제어 데이터를 처리 하는 동작 제어 흐름을 도시한 것이다. 14 is a flowchart illustrating an operation control flow for processing control data in the drive 20 according to an embodiment of the present invention.

모션 네트워크(22)를 통하여 제어 데이터가 드라이브(20)에 수신되는 경우 드라이브(20)에서는 제어 데이터에 대한 처리 동작이 시작된다.When control data is received by the drive 20 through the motion network 22, the drive 20 starts processing the control data.

먼저, 드라이브(20)는 제어 데이터의 유효성을 확인한다(S231). First, the drive 20 checks the validity of the control data (S231).

이어, 드라이브(20)는 네트워크 오류 여부를 검사한다(S232). 이때, 네트워크 오류라 함은 네트워크를 통하여 입력되는 프레임에 오류가 있어나 특정 시간 내에 프레임 수신을 하지 못하는 등의 오류를 의미할 수 있다. Then, the drive 20 checks for a network error (S232). In this case, the network error may mean an error such as an error in a frame input through a network, but not receiving a frame within a specific time.

이때, 드라이브(20)는 네트워크 오류 여부를 판단하여(S232) 오류가 없으면 네트워크 오류 정보에 OFF를 설정하고(S233), 오류가 있으면 네트워크 오류 정보에 ON을 설정한다(S234). At this time, the drive 20 determines whether there is a network error (S232), if there is no error, sets OFF the network error information (S233), and if there is an error, sets ON the network error information (S234).

네트워크 오류가 없는 경우, 드라이브는 모션 네트워크(22)를 통해 수신한 제어 데이터에서 드라이브(20) 제어에 필요한 제어 정보 읽기를 실행한다(S235). 이때, 위와 같은 제어 데이터는 본 발명의 일 실시예에 따라 도 11에서 보여지는 바와 같이 제어워드(211), 목표값(212), 명령편차(214, 216), 구간수(213, 215) 등의 정보를 포함할 수 있다. 드라이브(20)는 제어 데이터에 포함된 위와 같은 정보를 읽어와서 저장시키고 모션 제어기(10)와의 통신을 종료하게 된다.If there is no network error, the drive reads control information necessary for controlling the drive 20 from the control data received through the motion network 22 (S235). At this time, the control data as above is a control word 211, a target value 212, command deviations 214 and 216, the number of sections 213 and 215, as shown in FIG. 11 according to an embodiment of the present invention. May include information of. The drive 20 reads and stores the above information included in the control data, and terminates communication with the motion controller 10.

도 15는 본 발명의 일 실시예에 따른 드라이브(20)에서 제어 데이터에 따라 모터(21)를 제어하는 동작 제어 흐름을 도시한 것이다.15 is a flowchart illustrating an operation control flow of controlling the motor 21 according to control data in the drive 20 according to an embodiment of the present invention.

드라이브 제어가 시작되면, 드라이브(20)는 네트워크 오류정보를 확인한다(S241). 네트워크 오류 정보는 도 14에서 설명한 드라이브(20)의 제어 데이터 수신 처리 과정에서 확인되는 정보로서 드라이브(20)에 구현된 네트워크 오류 정보를 표시하는 특정 버퍼에 저장되어 있을 수 있으나, 이에 한정되는 것은 아니다. When the drive control starts, the drive 20 checks the network error information (S241). The network error information is information identified in the control data reception process of the drive 20 described in FIG. 14 and may be stored in a specific buffer that displays network error information implemented in the drive 20, but is not limited thereto. .

이때, 네트워크 오류가 없으면 드라이브(20)는 모션 제어기(10)로부터 수신된 제어 데이터 중 목표값(212)을 제어 명령에 저장하는 것을 제어 명령을 생성한다(S246). At this time, if there is no network error, the drive 20 generates a control command to store the target value 212 in the control command among the control data received from the motion controller 10 (S246).

이어, 드라이브(20)는 위와 같이 생성된 제어 명령을 P/V/T 제어부(904)로 인가하여 모터(21) 등에 대한 P/V/T 제어가 수행되도록 한다(S249).Subsequently, the drive 20 applies the control command generated as above to the P/V/T control unit 904 to perform P/V/T control for the motor 21 and the like (S249).

그러나, 네트워크 오류 정보를 확인한 결과(S241), 네트워크 오류가 있는 경우, 드라이브(20)는 제어 데이터에 포함된 현재 구간수(213)의 값을 읽어와서, 현재 구간수(213)의 값이 0보다 큰지 확인한다(S242). However, as a result of checking the network error information (S241), if there is a network error, the drive 20 reads the value of the current number of sections 213 included in the control data, and the value of the current number of sections 213 is 0. It is checked whether it is greater than (S242).

이때, 현재 구간수(213)의 값이 0보다 크면 드라이브(20)는 네트워크 오류가 없을 때의 정상적인 목표값을 복원한다(S243). At this time, if the value of the current number of sections 213 is greater than 0, the drive 20 restores the normal target value when there is no network error (S243).

여기서 현재 구간에서 목표값을 복원함에 있어서, 드라이브(20)는 현재 구간 명령 편차(214) 값을 이용하는데, 이전 목표값에 현재 구간 명령 편차(214) 값을 더해서 새로운 목표 값을 설정할 수 있다. Here, in restoring the target value in the current section, the drive 20 uses the current section command deviation 214 value, and a new target value may be set by adding the current section command deviation 214 value to the previous target value.

이어, 드라이브(20)는 새로운 목표 값 설정 후 현재 구간수(213) 값을 1감소 시킨다. 이때 만일, 다음 드라이브 제어 주기에서 네트워크 오류를 확인하여(S241) 연속적으로 네트워크 오류가 발생한 경우, 드라이브(20)는 현재 구간수(213) 값이 0이 될 때까지 (S242)~(S243)단계의 동작을 반복한다. Subsequently, after setting a new target value, the drive 20 decreases the current number of sections 213 by one. At this time, if the network error is checked in the next drive control cycle (S241) and a network error occurs continuously, the drive 20 steps (S242) to (S243) until the value of the current number of sections 213 becomes 0. Repeat the operation.

그리고, 드라이브(20)는 현재 구간수(213) 값이 0이 된 후에는 다음 구간수(215) 값이 0보다 큰지 확인한다(S244). Then, the drive 20 checks whether the value of the next number of sections 215 is greater than 0 after the value of the current number of sections 213 becomes 0 (S244).

이때, 다음 구간 수(215) 값이 0보다 크면 드라이브(20)는 네트워크 오류가 없을 때의 정상적인 목표 값을 복원한다(S245). At this time, if the value of the next section number 215 is greater than 0, the drive 20 restores the normal target value when there is no network error (S245).

여기서 다음 구간에서 목표값을 복원함에 있어서, 드라이브(20)는 다음 구간 명령 편차(216) 값을 이용하는데, 이전 목표값에 다음 구간 명령 편차(214) 값을 더해서 새로운 목표 값을 설정할 수 있다. 이어, 드라이브(20)는 새로운 목표 값 설정 후 다음 구간수(214) 값을 1감소 시킨다.Here, in restoring the target value in the next section, the drive 20 uses the value of the next section command deviation 216, and a new target value may be set by adding the value of the next section command deviation 214 to the previous target value. Then, the drive 20 decreases the value of the next section number 214 by one after setting a new target value.

이때 만일, 다음 드라이브 제어 주기에서 네트워크 오류를 확인하여(S241) 연속적으로 네트워크 오류가 발생한 경우, 드라이브(20)는 다음 구간수(215) 값이 0이 될 때까지 (S244)~(S245)단계의 동작을 반복한다. At this time, if the network error is checked in the next drive control cycle (S241) and a network error occurs continuously, the drive 20 steps (S244) to (S245) until the value of the next number of sections 215 becomes 0. Repeat the operation.

그리고, 드라이브(20)는 다음 구간수(21) 값이 0이 된 이후에도 네트워크 오류가 발생된 경우는 통신 타임아웃 횟수를 초과한 조건이므로 통신 타임아웃 에러를 발생시킨다(S247). In addition, if a network error occurs even after the value of the next section number 21 becomes 0, the drive 20 generates a communication timeout error because it is a condition that exceeds the number of communication timeouts (S247).

이어, 드라이브(20)는 제어 명령을 초기화하여(S248) P/V/T 제어(S249)에서 더 이상 모터(21)를 제어하지 않도록 한다. Then, the drive 20 initializes the control command (S248) so that the motor 21 is no longer controlled in the P/V/T control (S249).

이러한 과정을 통하여 본 발명의 일 실시예에서는 일시적인 네트워크 오류 발생시에도 드라이브에서 이전에 정상적으로 수신된 제어 데이터를 가지고 해당 시점에서의 목표값을 복원하여 모터를 안정적으로 제어할 수 있다.Through this process, in an embodiment of the present invention, even when a temporary network error occurs, the motor can be stably controlled by restoring a target value at a corresponding time point with control data previously normally received from the drive.

상술한 바와 같이, 본 발명의 일 실시예에 따르면, 모션 제어기에서 드라이브로 제어 데이터와 함께 구간수, 명령편차 등의 정보를 제공하고, 드라이브에서는 네트워크 오류에 의하여 일시적으로 다음 주기의 제어 데이터가 수신되지 않는 경우 이전에 정상적으로 수신한 제어 데이터에 포함된 목표값, 구간수, 명령 편차 등의 정보를 이용하여 정상적인 목표값을 보상할 수 있도록 한다.As described above, according to an embodiment of the present invention, information such as the number of sections and command deviations is provided from the motion controller to the drive along with control data, and the drive temporarily receives control data for the next cycle due to a network error. If not, the normal target value can be compensated using information such as the target value, the number of sections, and command deviation included in the previously normally received control data.

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

10 : 모션제어기 11 : 사용자 프로그램
12 : 모션제어부 13 : 통신처리부
20 : 드라이브 21 : 모터
110 : 명령해석부 120 : 명령실행부
123 : 프로파일 생성기 124 : 가/감속 처리부
125 : 제어데이터 생성부 130 : 상태설정부
900 : 통신부 902 : 제어 명령 생성부
904 : P/V/T 제어부
10: motion controller 11: user program
12: motion control unit 13: communication processing unit
20: drive 21: motor
110: command analysis unit 120: command execution unit
123: profile generator 124: acceleration/deceleration processing unit
125: control data generation unit 130: state setting unit
900: communication unit 902: control command generation unit
904: P/V/T control unit

Claims (7)

모션제어기와 네트워크로 연결되는 네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법으로서,
상기 드라이브에서 상기 네트워크상 오류가 발생하는지 검사하는 단계와,
상기 네트워크 오류 발생 시, 상기 모션제어기로부터 수신한 이전 제어 주기의 제어 데이터로부터 상기 드라이브의 현재 동작 모드에서의 제1 목표값과 명령편차를 읽어오는 단계와,
상기 네트워크 오류 발생한 시점에서, 상기 네트워크 오류가 복구되는 시점까지 상기 모션제어기로부터 제어 데이터가 발생하는 구간수를 카운트하는 단계와,
상기 명령편차를 각 구간 별로 해당 구간수에 대응하게 가산 또는 감산시킨 후, 상기 명령편차를 상기 이전 제어 주기의 제1 목표값에서 가산 또는 감산하여 다음 제어 주기의 제2 목표값으로 순차적으로 생성하는 단계
를 포함하는 네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법.
As a method of compensating for control data in case of network error in a network-based drive connected to a motion controller and a network,
Inspecting whether an error occurs on the network in the drive,
When the network error occurs, reading a first target value and a command deviation in the current operation mode of the drive from control data of a previous control period received from the motion controller; and
Counting the number of sections in which control data is generated from the motion controller from the time when the network error occurs to the time when the network error is recovered,
After adding or subtracting the command deviation for each section corresponding to the number of sections, the command deviation is added or subtracted from the first target value of the previous control period to sequentially generate the second target value of the next control period. step
Control data compensation method in case of a network error in a network-based drive comprising a.
제 1 항에 있어서,
상기 다음 제어 주기의 상기 제2 목표값을 생성한 후에도 상기 네트워크 오류가 복구되지 않는 경우, 상기 구간수를 1씩 감소시키면서 상기 구간수가 0이 될 때까지 상기 다음 제어 주기의 상기 제2 목표값을 반복적으로 생성하는 네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법.
The method of claim 1,
If the network error is not recovered even after generating the second target value of the next control period, the second target value of the next control period is adjusted until the number of sections becomes 0 while decreasing the number of sections by one. Control data compensation method in case of network error in network-based drives that are repeatedly generated.
제 1 항에 있어서,
상기 구간수가 통신 타임 아웃 구간 수보다 큰 경우, 상기 통신 타임 아웃 구간 수를 초과하는 구간에 대해서는 상기 제2 목표값을 생성하지 않는 단계를 더 포함하는 네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법.
The method of claim 1,
When the number of sections is greater than the number of communication time-out sections, the method of compensating for control data in case of a network error in a network-based drive, further comprising: not generating the second target value for a section exceeding the number of communication time-out sections.
제 1 항에 있어서,
상기 드라이브의 동작 모드는,
상기 드라이브에 의해 제어되는 대상 기기에 대하 가속 모드, 등속 모드 또는 감속 모드를 포함하며,
각 동작 모드별 명령편차는 상기 모션제어기에서 각 동작 모드의 특성에 따라 서로 다르게 산출된 후, 상기 제어 데이터에 포함되어 상기 드라이브로 전송되는 네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법.
The method of claim 1,
The operation mode of the drive,
It includes an acceleration mode, a constant velocity mode, or a deceleration mode for the target device controlled by the drive,
The command deviation for each operation mode is calculated differently according to the characteristics of each operation mode in the motion controller, and then included in the control data and transmitted to the drive.
제 4 항에 있어서,
상기 구간수 내에서 상기 드라이브의 동작 모드가 변경되는 경우,
상기 동작 모드가 변경된 구간에 대해서는 상기 변경된 구간에 대응하는 새로운 명령편차를 읽어온 후,
상기 동작 모드가 변경되기 전 최종 구간에서 계산된 제2 목표값에서 상기 새로운 명령편차를 가산 또는 감산하여 상기 다음 제어 주기의 제2 목표값으로 생성하는 단계
를 더 포함하는 네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법.
The method of claim 4,
When the operation mode of the drive is changed within the number of sections,
For a section in which the operation mode is changed, after reading a new command deviation corresponding to the changed section,
Adding or subtracting the new command deviation from the second target value calculated in the final section before the operation mode is changed, and generating a second target value for the next control period
Control data compensation method in case of a network error in a network-based drive further comprising a.
제 4 항에 있어서,
상기 목표값은,
상기 드라이브에 의해 제어되는 대상 기기를 가속, 등속 또는 감속시키기 위한 제어값이며,
상기 명령편차는,
각 동작 모드별 이전 제어 주기의 목표값과 다음 제어 주기의 목표값간 차이값이며,
상기 구간수는 현재 구간에서의 목표값을 생성한 후 해당 구간에서 가속 또는 감속을 수행해야하는 남은 반복 회수인
네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법.
The method of claim 4,
The target value is,
It is a control value for accelerating, constant speed, or decelerating the target device controlled by the drive,
The command deviation is,
It is the difference between the target value of the previous control period and the target value of the next control period for each operation mode,
The number of sections is the number of repetitions remaining to perform acceleration or deceleration in the section after generating the target value in the current section.
Control data compensation method in case of network error in network-based drive.
제 1 항에 있어서,
상기 네트워크 오류는,
상기 모션제어기와 상기 드라이브간 연결된 네트워크상 물리적인 원인으로 인해 상기 제어 데이터가 상기 드라이브로 정상적으로 전송되는 않는 상태를 의미하는 네트워크 기반 드라이브에서 네트워크 오류시 제어 데이터 보상 방법.

The method of claim 1,
The network error,
Control data compensation method in case of a network error in a network-based drive, which means a state in which the control data is not normally transmitted to the drive due to a physical cause on a network connected between the motion controller and the drive.

KR1020190038006A 2019-04-01 2019-04-01 Method for compensating control data in a network based drive KR20200116340A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020190038006A KR20200116340A (en) 2019-04-01 2019-04-01 Method for compensating control data in a network based drive

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020190038006A KR20200116340A (en) 2019-04-01 2019-04-01 Method for compensating control data in a network based drive

Publications (1)

Publication Number Publication Date
KR20200116340A true KR20200116340A (en) 2020-10-12

Family

ID=72886575

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190038006A KR20200116340A (en) 2019-04-01 2019-04-01 Method for compensating control data in a network based drive

Country Status (1)

Country Link
KR (1) KR20200116340A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102655448B1 (en) * 2023-04-24 2024-04-09 유미희 The Method and System that Control A Smart Farm capable of Manual Control, Remote Control and Automatic Control

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102655448B1 (en) * 2023-04-24 2024-04-09 유미희 The Method and System that Control A Smart Farm capable of Manual Control, Remote Control and Automatic Control

Similar Documents

Publication Publication Date Title
US6472838B1 (en) Robot controller and control method
US8965574B2 (en) Method for controlling an automated work cell
US8295949B2 (en) Control system, control method, master device, and control device
US8901870B2 (en) Synchronous control apparatus
CN109129475B (en) Gravity compensation method, device and system for mechanical arm and storage medium
US10291233B2 (en) Control system and pulse output device
KR20200116340A (en) Method for compensating control data in a network based drive
WO2021181799A1 (en) Robot control system and control method
EP4169672A1 (en) Multi-axis servo control system
US9905264B2 (en) Servo control system having function of switching learning memory
Satler et al. Bilateral teleoperation under time-varying delay using wave variables
CN108170102B (en) Motion control system
JPH07271441A (en) Motor controller
JP6629817B2 (en) Control system and motor control method
CN114179085B (en) Robot control, track connection and smoothing method and system
US12045030B2 (en) Controller and extrapolation method of command value
WO2023281805A1 (en) Communication system, control system, and communication method
RU2610851C1 (en) System for adaptive control of controlled electrohydraulic servo drive
KR20190101541A (en) Motion control apparatus
US11509430B2 (en) Method for operating an automation network having packet-based communication between a host and client
WO2021181798A1 (en) Robot control system and control method
US20230401090A1 (en) Control device, control method, and non-transitory computer readable medium
WO2021145124A1 (en) Control device
TWI834071B (en) Multi-axis servo control system
WO2021181800A1 (en) Robot control system and control method