KR950002405B1 - Position controlling method and apparatus of servomotor - Google Patents

Position controlling method and apparatus of servomotor Download PDF

Info

Publication number
KR950002405B1
KR950002405B1 KR1019920021853A KR920021853A KR950002405B1 KR 950002405 B1 KR950002405 B1 KR 950002405B1 KR 1019920021853 A KR1019920021853 A KR 1019920021853A KR 920021853 A KR920021853 A KR 920021853A KR 950002405 B1 KR950002405 B1 KR 950002405B1
Authority
KR
South Korea
Prior art keywords
counting
counter
pulse signal
reference pulse
signal
Prior art date
Application number
KR1019920021853A
Other languages
Korean (ko)
Other versions
KR940012788A (en
Inventor
안도윤
김용희
Original Assignee
주식회사삼성중공업
최관식
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사삼성중공업, 최관식 filed Critical 주식회사삼성중공업
Priority to KR1019920021853A priority Critical patent/KR950002405B1/en
Publication of KR940012788A publication Critical patent/KR940012788A/en
Application granted granted Critical
Publication of KR950002405B1 publication Critical patent/KR950002405B1/en

Links

Classifications

    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P5/00Arrangements specially adapted for regulating or controlling the speed or torque of two or more electric motors

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Control Of Position Or Direction (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The device provides the hardware which enhances the utilization efficiency of the microprocessor as well as controls the servo motor location. The device includes: (a) a microprocessor which generates the location and speed data of the servo motor; (b) a reference pulse generator which generates the reference pulse signal according to the location and speed data of the servo motor; (c) a programmable counter which counts the reference pulse signal and location data; (d) an interrupt generator which generates interrupt signal when the counting is completed; (e) a transfer pulse generator which ceases the reference pulse signal generation when the interrupt signal is generated.

Description

서보모터의 위치제어 방법 및 장치Position Control Method and Device of Servo Motor

제 1 도는 본 발명에 의한 서보모터의 위치제어장치의 일실시예를 나타내는 블럭도.1 is a block diagram showing an embodiment of a position control apparatus for a servomotor according to the present invention.

제 2 도는 제 1 도의 장치의 일부에 대한 동작파형도.2 is an operating waveform diagram of a portion of the apparatus of FIG.

제 3 도는 제 1 도의 마이크로프로세서의 동작을 나타내는 순서도.3 is a flow chart illustrating operation of the microprocessor of FIG.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

11 : 마이크로프로세서 12 : 기준펄스발생기11 microprocessor 12 reference pulse generator

13 : 프로그래머블카운터 14 : NAND게이트13: Programmable Counter 14: NAND Gate

15 : 인버터 16 : OR게이트15: inverter 16: OR gate

17 : 단안정발진기 CNT1, CNT2, CNT3 : 카운터17: monostable oscillator CNT1, CNT2, CNT3: counter

본 발명은 서보모터에 의한 대상물의 이송위치를 제어하기 위한 시스템에 관한 것으로, 특히 소정 비트수의 프로그래머블카운터를 이용하여 이보다 더 큰 비트수만큼의 이송위치를 제어할 뿐만 아니라 이송위치의 제어에 마이크로프로세서의 개입을 최소화함으로써 마이크로프로세서의 이용효율을 증가시키기 위한 서보모터의 위치제어방법 및 장치에 관한 것이다.The present invention relates to a system for controlling a transfer position of an object by a servo motor, and in particular, a programmable counter of a predetermined number of bits can be used to control the transfer position by a larger number of bits as well as to control the transfer position. The present invention relates to a servo motor position control method and apparatus for minimizing processor intervention to increase the utilization efficiency of a microprocessor.

일반적으로 디지탈 서보메카니즘에서 서보모터는 엔코더로 부터 공급되는 궤환펄스신호의 펄스갯수를 소정 범위까지 카운팅하여 대상물의 위치를 제어하게 된다. 현재, 서보모터제어에 사용되는 기준펄스지령방식에서, 기준펄스의 펄스수는 모터의 이송량을 나타내며, 기준펄스의 주파수는 서보모터의 이송속도를 나타낸다. 따라서, 기준펄스의 펄스수를 조절함으로써 서보모터의 이송위치를 제어할 수 있다.In general, in a digital servo mechanism, the servo motor controls the position of an object by counting the number of pulses of the feedback pulse signal supplied from the encoder to a predetermined range. Currently, in the reference pulse command method used for servo motor control, the number of pulses of the reference pulse indicates the amount of feed of the motor, and the frequency of the reference pulse indicates the feed rate of the servomotor. Therefore, the feed position of the servomotor can be controlled by adjusting the number of pulses of the reference pulse.

이와 같은 서보모터의 위치제어시스템에서 기준펄스의 펄스수를 카운팅하기 위하여 16비트 프로그래머블카운터가 주로 사용되고 있다. 그러나, 16비트 프로그래머블카운터를 사용하는 경우, 1회에 카운팅할 수 있는 최대 펄스수를 "215"(65,536)"개 이므로 이 이상의 펄스수에 해당하는 이송거리를 위치제어할 수 없게 된다. 즉, 서보모터의 위치제어의 최대값이 "216"개의 펄스수에 해당하는 이송량으로 한정되는 문제점이 있다. 또한, 서보모터의 제어를 위한 마이크로프로세서는 소정 시간마다 주기적으로 카운팅되는 펄스수의 카운팅값을 확인해야 하므로, 카운팅하는 도중에는 마이크로프로세서가 다른 일을 처리하지 못하므로서 마이크로프로세서의 효율이 감소되는 문제점이 있다.In the servo motor position control system, a 16-bit programmable counter is mainly used to count the number of pulses of a reference pulse. However, when using the 16-bit programmable counter, the maximum number of pulses that can be counted at one time is "2 15 " (65,536), which makes it impossible to position control the feed distance corresponding to the number of pulses. In addition, there is a problem in that the maximum value of the position control of the servomotor is limited to a feed amount corresponding to the number of pulses of “2 16. ” In addition, the microprocessor for controlling the servomotor counts the number of pulses that are periodically counted every predetermined time. Since the value needs to be checked, the microprocessor cannot perform other tasks while counting, thereby reducing the efficiency of the microprocessor.

따라서, 본 발명의 목적은 소정 비트수의 프로그래머블카운터를 사용하여 이 프로그래머블카운터의 최대 카운팅값보다 더 큰 카운팅값에 해당하는 서보모터의 이송위치를 제어할 수 있을 뿐만 아니라 이송량에 해당하는 펄스수를 카운팅하는 동안 마이크로프로세서를 이용하지 않으므로써 마이크로프로세서의 이용효율을 보다 향상시키기 위한 서보모터의 위치제어방법을 제공함에 있다.Accordingly, an object of the present invention is to control the transfer position of the servomotor corresponding to a counting value larger than the maximum count value of the programmable counter using a programmable counter of a predetermined number of bits, as well as to control the number of pulses corresponding to the feed amount. The present invention provides a method for controlling the position of a servomotor to further improve the utilization efficiency of the microprocessor by not using the microprocessor during counting.

본 발명의 다른 목적은 전술한 바와 같은 서보모터의 위치제어방법을 실행하기 위해 하드웨어적으로 구현된 서보모터의 위치제어장치를 제공함에 있다.Another object of the present invention is to provide a position control apparatus for a servo motor implemented in hardware to execute the position control method of the servo motor as described above.

이와 같은 본 발명의 목적은 n-비트의 프로그래머블카운터와 기준펄스발생부를 구비하여 펄스수가 이송량에 해당하는 이송펄스신호를 서보모터로 공급함으로써, 서보모터의 위치제어를 수행하기 위한 위치제어방법에 있어서, 원하는 위치데이타를 입력하는 단계와, 상기 위치데이타가 "2n"보다 큰가를 판단하는 단계와, 상기 위치데이타가 "2n"보다 크지않은 경우 상기 n-비트 프로그래머블카운터가 위치데이타를 카운팅하는 동안 상기 기준펄스발생부의 기준펄스신호를 이송펄스로서 출력하는 제 1 출력단계와, 상기 위치데이타가 "2n"보다 큰 경우 하기 식과 같은 기준펄스신호(REF)를 이송펄스로서 출력하는 제 2 출력단계를 포함하는 서보모터의 위치제어방법에 의하여 달성된다.The object of the present invention is to provide an n-bit programmable counter and a reference pulse generator to supply a feed pulse signal whose pulse number corresponds to a feed amount to the servo motor, thereby performing position control of the servo motor. Inputting a desired location data, determining whether the location data is greater than "2 n ", and if the location data is not greater than "2 n ", the n-bit programmable counter counts location data. A first output step of outputting a reference pulse signal of the reference pulse generator as a transfer pulse, and a second output of outputting a reference pulse signal REF as a transfer pulse when the position data is larger than " 2n " It is achieved by the position control method of the servo motor comprising a step.

본 발명의 다른 목적으로 펄스수가 이송량에 해당하는 이송펄스신호를 서보모터로 공급하여 서보모터의 위치제어를 수행하기 위한 위치제어장치에 있어서, 서보모터의 위치 및 속도를 제어하기 위한 위치데이타 및 속도데이타를 발생하는 마이크로 프로세서와, 상기 마이크로프로세서로 부터 속도데이타를 공급받아 이에 상응하는 기준 펄스신호를 발생하는 기준펄스발생부와, 상기 기준펄스발생부로 부터 기준펄스신호를 공급받고 상기 마이크로프로세서로 부터 위치데이타를 공급받아, 상기 기준펄스신호를 클럭으로 사용하여 상기 위치데이타를 카운팅하는 프로그래머블카운터와, 상기 프로그래머블카운터의 카운팅출력신호를 공급받아, 카운팅이 완료되는 시점에서 소정의 인터럽트신호를 발생하여 상기 마이크로프로세서로 공급하는 인터럽트방생수단과, 상기 기준펄스발생부에서 출력되는 기준펄스신호를 공급받아 상기 이송펄스신호로서 출력하고, 상기 인터럽트발생수단으로 부터 인터럽트신호가 인가될 때 상기 기준펄스신호의 출력을 중단하는 이송펄스출력부를 포함하는 서보모터의 위치제어 장치에 의하여 달성된다.According to another aspect of the present invention, a position control apparatus for performing position control of a servo motor by supplying a feed pulse signal corresponding to a feed amount to a servo motor, the position data and speed for controlling the position and speed of the servo motor A microprocessor for generating data, a reference pulse generator for receiving speed data from the microprocessor and generating a corresponding reference pulse signal, and a reference pulse signal from the reference pulse generator for receiving a reference pulse signal from the microprocessor. A programmable counter that receives the position data, counts the position data using the reference pulse signal as a clock, and receives a counting output signal of the programmable counter, generates a predetermined interrupt signal when the counting is completed. Interrupt to Microprocessor A transfer pulse for receiving a pulse generating means and a reference pulse signal output from the reference pulse generating unit and outputting the reference pulse signal as the transfer pulse signal, and stopping the output of the reference pulse signal when an interrupt signal is applied from the interrupt generating means. It is achieved by the position control device of the servomotor including an output.

이하, 첨부한 도면을 참조하여 본 발명의 바람직한 실시예를 상술하기로 한다. 제 1 도는 본 발명에 의한 서보모터의 위치제어장치의 일 실시예를 나타내는 블럭도로서 16비트 프로그래머블카운터를 이용하여 32비트 범위의 카운팅이 가능하며, 원하는 카운팅값이 완료될 때, 즉 이송위치의 제어가 완료될 때 소정의 인터럽트신호가 발생하도록 구성되어 있다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. 1 is a block diagram showing an embodiment of a position control apparatus for a servomotor according to the present invention. A 16-bit programmable counter enables counting in a 32-bit range, and when a desired counting value is completed, that is, a transfer position The predetermined interrupt signal is generated when the control is completed.

제 1 도의 장치는 마이크로프로세서(11)와, 마이크로프로세서(11)에서 공급되는 소정의 속도데이타(Dv)에 따라 가변되는 주파수를 갖는 기준펄스신호(REF)를 발생하는 기준펄스발생기(12)와, 기준펄스발생기(12)에서 출력되는 기준펄스신호(REF)와 마이크로프로세서(11)에서 출력되는 위치데이타(Dp)를 공급받아 소정의 카운팅값을 카운팅하는 프로그래머블카운터(13)와, 프로그래머블카운터(13)의 출력신호를 공급받아 소정의 인터럽트논리신호(INTL)를 발생하는 NAND게이트(14)와, 기준펄스발생기(12)에서 출력되는 기준펄스신호(REF)와 NAND게이트(14)에서 출력되는 인터럽트논리신호(INTL)를 공급받아 이송펄스신호(FP)를 출력하는 OR게이트(16)와, NAND게이트(14)에서 출력되는 인터럽트논리신호(INTL)를 공급받아 소정의 인터럽트펄스신호(INTP)를 발생하여 마이크로프로세서(11)로 인가하는 단안정발진기(17)로 이루어진다.The apparatus of FIG. 1 includes a microprocessor 11 and a reference pulse generator 12 for generating a reference pulse signal REF having a frequency varying in accordance with a predetermined speed data D v supplied from the microprocessor 11. And a programmable counter 13 for receiving a reference pulse signal REF output from the reference pulse generator 12 and a position data D p output from the microprocessor 11 and counting a predetermined counting value. In the NAND gate 14 receiving the output signal of the counter 13 and generating a predetermined interrupt logic signal INTL, the reference pulse signal REF and the NAND gate 14 output from the reference pulse generator 12 The OR gate 16 receives the output interrupt logic signal INTL and outputs the transfer pulse signal FP, and the interrupt logic signal INTL output from the NAND gate 14 receives a predetermined interrupt pulse signal ( Microinput by generating It comprises a monostable oscillator (17) to be applied to the processor 11.

마이크로프로세서(11)는 서보모터의 이송속도를 결정하는 8비트 속도데이타(Dv)를 기준펄스발생기(12)로 공급하고, 서보모터의 이송위치를 결정하는 8비트 위치데이타(Dp)를 프로그래머블카운터(13)로 공급한다. 기준펄스발생기(12)는 8비트 속도데이타(Vv)에 해당하는 주파수를 갖는 기준펄스신호(REF)를 발생하여 프로그래머블카운터(13)의 제 1 카운터(CNT1) 및 제 3 카운터(CNT3)의 클럭단자(CLK1,CLK3)로 각각 인가한다. 프로그래머블카운터(13)는 3개의 16카운터(CNT1, CNT2, CNT3)를 포함하는데, 제 1 카운터(CNT1) 및 제 2 카운터(CNT2)의 게이트단자(GATE1,GATE2)로는 전원전압(Vcc)이 인가되어 제 1 카운터(CNT1) 및 제 2 카운터(CNT2)는 항상 카운팅인에이블상태이며, 제 3 카운터(CNT3)는 게이트단자(GATE3)러 제 2 카운터(CNT2)의 출력(OUT2)이 인가되므로 제 2 카운터(CNT2)의 출력에 따라 제 3 카운터(CNT3)는 인에이블 또는 디스에이블된다. 또한, 제 2 카운터(CNT2)는 제 1 카운터(CNT1)의 출력(OUT1)을 클럭단자(CLK2)로 인가받아 카운팅을 행한다. 프로그래머블가운터(13)는 버퍼(BUF)를 구비하고 있는데, 마이크로프로세서(11)에서 출력되는 위치데이타(Dp)는 이 버퍼(BUF)에 저장되며, 이에 따라 카운팅값이 세팅된다.The microprocessor 11 supplies the 8-bit speed data D v for determining the feed speed of the servo motor to the reference pulse generator 12, and the 8-bit position data D p for determining the feed position of the servo motor. It is supplied to the programmable counter 13. The reference pulse generator 12 generates a reference pulse signal REF having a frequency corresponding to 8-bit velocity data V v to generate the first counter CNT1 and the third counter CNT3 of the programmable counter 13. The clock terminals CLK1 and CLK3 are applied respectively. The programmable counter 13 includes three 16 counters CNT1, CNT2 and CNT3. The power supply voltage Vcc is applied to the gate terminals GATE1 and GATE2 of the first counter CNT1 and the second counter CNT2. The first counter CNT1 and the second counter CNT2 are always counting enabled, and the third counter CNT3 is the gate terminal GATE3 and the output OUT2 of the second counter CNT2 is applied. According to the output of the second counter CNT2, the third counter CNT3 is enabled or disabled. In addition, the second counter CNT2 receives the output OUT1 of the first counter CNT1 through the clock terminal CLK2 to perform counting. The programmable counter 13 has a buffer BUF. The position data D p output from the microprocessor 11 is stored in this buffer BUF, and a counting value is set accordingly.

지금, 이송량에 해당하는 이송펄스수가 "216"개 이하인 경우, 즉 마이크로프로세서(11)에서 프로그래머블카운터(13)의 버퍼(BUF)공급되는 위치데이타(Dp)가 "216" 이하인 경우, 제 1 카운터(CNT1)는 사용되지 않으며 기준펄스발생기(12)에서 인가되는 기준펄스신호(REF)가 제 3 카운터(CNT3)의 클럭단자(CLK3)로 입력되기 전에 제 2 카운터(CNT2)의 출력(OUT2)을 하이레벨로 설정하여 제 3 카운터(CNT3)가 인에이블 상태로 되도록 한다. 이에 따라, 제 3 카운터(CNT3)는 클럭단자(CLK3)로 인가되는 기준 펄스신호(REF)에 맞춰 위치데이타(Dp)에 해당하는 카운팅값에서 부터 다운카운팅을 행한다. 제3카운터(CNT3)는 다운카운팅이 완료되면 하이레벨의 출력신호(OUT3)를 유지하게 된다.Now, when the number of transfer pulses corresponding to the feed amount is "2 16 " or less, that is, when the position data D p supplied from the microprocessor 11 to the buffer BUF of the programmable counter 13 is "2 16 " or less, The first counter CNT1 is not used and the output of the second counter CNT2 before the reference pulse signal REF applied from the reference pulse generator 12 is input to the clock terminal CLK3 of the third counter CNT3. Set OUT2 to a high level so that the third counter CNT3 is enabled. Accordingly, the third counter CNT3 performs down counting based on the counting value corresponding to the position data D p in accordance with the reference pulse signal REF applied to the clock terminal CLK3. The third counter CNT3 maintains the high level output signal OUT3 when down counting is completed.

만일, 이송펄스수가 "216"개보다 큰 경우, 즉 위치데이타(Dp)가 "216"을 초과하는 값으로서 최대값이 "232"인 경우, 프로그래머블카운터(13)에서 제 1 카운터(CNT1)는 "0"으로 세팅되고, 제 2 카운터(CNT2) 및 제 3 카운터(CNT3)는 위치데이타(Dp)에 해당하는 32비트데이타를 카운팅한다. 이때, 제 2 카운터(CNT2)는 위치데이타의 상위 16비트(N)를 카운팅하고, 제 3 카운터(CNT3)는 하위 16비트(M)을 카운팅한다. 이 경우에 대한 프로그래머블카운터(13)의 동작타이밍도가 제 2 도에 도시되어 있다. 먼저, 프로그래머블카운터(13)의 제 1 카운터(CNT1)는 기준 퍽스신호(REF)의 클릭단자(CLK1)로 공급받아 클럭펄스를 "216"개씩 카운팅한다. 이때, 제 1 카운터(CNT1)는 제 2 도에 도시한 바와 같이 기준펄스를 "216"개 카운팅할 때마다 1클럭주기 동안 로우레벨을 갖는 출력신호(OUT1)를 발생한다. 제 1 카운터(CNT1)의 출력신호(OUT1)는 제 2 카운터(CNT2)의 클럭단자(CLK2)로 인가되는데, 제 2 카운터(CNT2)에서 카운팅되는 값은 32비트 위치데이타 중 상위 16비트데이타(N)에 해당된다. 상위 16비트데이타를 "N10"이라 하면, 제 2 카운터(CNT2)는 "N10"부터 다운카운팅을 행하여, 카운팅값이 "0"이 될 때 하이레벨의 출력신호(OUT2)를 발생한다. 즉, 제 2 카운터(CNT2)의 출력신호(OUT2)는 다운카운팅이 수행되는 동안 로우레벨을 유지하고, 카운팅이 완료될 때 하이레벨로 변환된다. 제 2 카운터(CNT2)의 출력신호(OUT2)는 제 3 카운터(CNT3)의 게이트단자(GATE3)로 입력된다. 제 3 카운터(CNT3)는 제 2 카운터(CNT2)가 카운팅되는 동안 게이트단자(GATE3)로 로우레벨신호가 인가되므로 디스에이블상태가 되고, 제 2 카운터(CNT2)의 카운팅이 완료될 때 게이트단자(GATE3)로 하이레벨신호가 인가되므로 인에이블상태로 되어 카운팅을 시작한다. 제 3 카운터(CNT3)는 클럭단자(CLK2)로 입력되는 기준펄스신호(REF)의 펄스를 카운팅하게 되는데, 32비트의 위치데이타 중 하위 16비트데이타(M)를 다운카운팅한다. 즉, 하위 16비트데이타가 "M10"이라 하면, 제 3 카운터(CNT3)는 "M10"부터 다운카운팅을 시작하여 카운팅값이 "0"이 되어 카운팅이 완료될 때 하이레벨의 출력신호(OUT3)를 발생한다.If the number of transfer pulses is larger than "2 16 ", that is, the position data D p exceeds "2 16 " and the maximum value is "2 32 ", the first counter in the programmable counter 13 (CNT1) is set to " 0 ", and the second counter CNT2 and the third counter CNT3 count 32 bit data corresponding to the position data D p . At this time, the second counter CNT2 counts the upper 16 bits N of the position data, and the third counter CNT3 counts the lower 16 bits M. The operation timing diagram of the programmable counter 13 for this case is shown in FIG. First, the first counter CNT1 of the programmable counter 13 is supplied to the click terminal CLK1 of the reference Perks signal REF and counts "2 16 " clock pulses. At this time, the first counter (CNT1) generates an output signal (OUT1) has a low level for one clock period each time the reference pulse count "216" one, as shown in FIG. 2. The output signal OUT1 of the first counter CNT1 is applied to the clock terminal CLK2 of the second counter CNT2. The value counted from the second counter CNT2 is the upper 16 bit data of the 32-bit position data ( N). If the upper 16-bit data is "N 10 ", the second counter CNT2 starts counting down from " N 10 " to generate a high level output signal OUT2 when the counting value becomes " 0 ". That is, the output signal OUT2 of the second counter CNT2 is maintained at the low level while the down counting is performed, and is converted to the high level when the counting is completed. The output signal OUT2 of the second counter CNT2 is input to the gate terminal GATE3 of the third counter CNT3. The third counter CNT3 is disabled because the low level signal is applied to the gate terminal GATE3 while the second counter CNT2 is counted, and when the counting of the second counter CNT2 is completed, the gate terminal CNT3 is disabled. As high level signal is applied to GATE3), it is enabled and starts counting. The third counter CNT3 counts pulses of the reference pulse signal REF input to the clock terminal CLK2. The third counter CNT3 down counts the lower 16-bit data M of the 32-bit position data. That is, if the lower 16-bit data is "M 10 ", the third counter CNT3 starts down counting from "M 10 " and the counting value becomes "0", so that when the counting is completed, the high level output signal ( Generates OUT3).

이와 같이, 프로그래머블카운터(13)에서 발생되는 제 2 카운터(CNT2)의 출력신호(OUT2) 및 제 3 카운터(CNT3)의 출력신호(OUT3)는 NAND게이트(14)의 2개 입력단자로 각각 입력된다. 그러면, NAND게이트(14)는 제 2 도에 도시된 바와 같이 32비트 위치데이타에 해당하는 수만큼의 펄스가 카운팅된 시점에서 레벨이 변환되는 인터럽트논리신호(INTL)를 발생한다. 이 인터럽트논리신호(INTL)는 단안정발진기(17)로 공급되는 한편 인버터(15)를 거쳐 OR게이트(16)로 공급된다. OR게이트(16)는 인버터(15)를 거쳐 반전된 인터럽트논리신호(INTL)와 기준펄스발생기(12)에서 출력되는 기준펄스롤신호(REF)를 공급받아 , 이송펄스신호(FP)를 출력하여 서보시스템의 편차카운터(도시되지 않음)로 전송한다. OR게이트(16)에서 출력되는 이송펄스신호(FP)는 제 2 도에 도시한 바와 같이 인터럽트논리신호(INTL)가 하이레벨인 동안, 즉 32비트 위치데이타가 프로그래머블카운터(13)에서 카운팅되는 동안에는 이 32비트의 위치데이타에 해당하는 펄스수만큼의 기준펄스신호(REF) 되며, 인터럽트논리신호(INTL)가 로우레벨로 되면, 즉 32비트 위치데이타 만큼의 펄스수가 출력되면 하이레벨이 된다. 한편, NAND게이트(14)에서 출력되는 인터럽트논리신호(INTL)를 공급받는 단안정발진기(17)는 인터럽트논리신호(INTL)를 소정의 크기 및 형태를 갖는 인터럽트펄스신호(INTP)로 변환하여 출력한다. 단안정발진기(17)에서 출력되는 인터럽트펄스신호(INTP)가 마이크로프로세서(11)로 입력되면, 마이크로프로세서(11)는 속도데이타(Dp) 및 위치데이타(Dp)의 출력을 중지한다.As such, the output signal OUT2 of the second counter CNT2 and the output signal OUT3 of the third counter CNT3 generated by the programmable counter 13 are respectively input to two input terminals of the NAND gate 14. do. Then, as shown in FIG. 2, the NAND gate 14 generates an interrupt logic signal INTL at which the level is converted when the number of pulses corresponding to the 32-bit position data is counted. This interrupt logic signal INTL is supplied to the monostable oscillator 17 and to the OR gate 16 via the inverter 15. The OR gate 16 receives the inverted interrupt logic signal INTL and the reference pulse roll signal REF output from the reference pulse generator 12 through the inverter 15, and outputs a transfer pulse signal FP. Transfer to the deviation counter (not shown) of the servo system. As shown in FIG. 2, the transfer pulse signal FP output from the OR gate 16 is high while the interrupt logic signal INTL is high, that is, while the 32-bit position data is counted by the programmable counter 13. The reference pulse signal REF is equal to the number of pulses corresponding to the 32-bit position data, and when the interrupt logic signal INTL becomes low level, that is, when the number of pulses equal to the 32-bit position data is output, the high level is obtained. On the other hand, the monostable oscillator 17 supplied with the interrupt logic signal INTL output from the NAND gate 14 converts the interrupt logic signal INTL into an interrupt pulse signal INTP having a predetermined size and shape and outputs the interrupt pulse signal INTP. do. When the interrupt pulse signal INTP output from the monostable oscillator 17 is input to the microprocessor 11, the microprocessor 11 stops outputting the speed data D p and the position data D p .

제 3 도는 제 1 도의 마이크로프로세서(11)의 동작을 개략적으로 나타내는 순서도이다. 먼저, 마이크로프로세서(11)는 사용자에 의해 입력되어 수치제어코드로 저장되어 있는 원하는 위치데이타(Dp)를 읽어들인다(단계 310). 그런다음, 이 위치데이타(Dp)가 "216"보다 큰값인가를 판별한다(단계 320). 판별결과 위치데이타(Dp)가 "216"보다 큰 경우, 프로그머블카운터(13)의 제 1 카운터(CNT1)를 "0"으로 세팅하고, 제 2 카운터(CNT2)는 초기 카운팅값을 위치데이타(D*)16비트데이타로 세팅하고, 제 3 카운터(CNT3)는 초기 카운팅값을 위치데이타(Dp)의 하위 16비트데이타로 세팅한다(단계 330). 판별결과 위치데이타(Dp)가 "216"보다 크지 않은 경우, 제 1 카운터(CNT1)를 디스에이블시키고, 제 2 카운터(CNT2)의 출력(OUT2)을 하이레벨 상태로 세팅시키고, 제 3 카운터(CNT3)의 초기 카운팅값을 위치데이타(Dp)로 세팅한다(단계 340). 그런다음, 전술한 바와 같이 프로그래머블카운터(13)에서 카운팅동작을 수행하므로써, 위치데이타(Dp)에 해당하는 펄스수만큼의 기준펄스신호(REF)가 이송펄스신호(FP)로서 출력된다.3 is a flowchart schematically showing the operation of the microprocessor 11 of FIG. First, the microprocessor 11 reads the desired position data D p which is input by the user and stored as the numerical control code (step 310). Then, it is determined whether the position data D p is greater than "2 16 " (step 320). When the determination result position data D p is larger than "2 16 ", the first counter CNT1 of the programmable counter 13 is set to "0", and the second counter CNT2 positions the initial counting value. Data (D * ) The 16-bit data is set, and the third counter CNT3 sets the initial counting value to the lower 16-bit data of the position data D p (step 330). When the determination result position data D p is not larger than "2 16 ", the first counter CNT1 is disabled, the output OUT2 of the second counter CNT2 is set to a high level state, and the third The initial counting value of the counter CNT3 is set to the position data D p (step 340). Then, by performing the counting operation in the programmable counter 13 as described above, the reference pulse signal REF corresponding to the number of pulses corresponding to the position data D p is output as the transfer pulse signal FP.

상술한 바와 같이, 본 발명에 의한 서보모터의 위치제어시스템은 16비트 프로그래머블카운터를 사용하면서 32비트의 위치제어데이타를 이용하여 서보모터의 이송량을 "232" 범위내에서 제어할 수 있다. 또한, 모터의 이송량을 소프트웨어적으로 초기에 프로그래머블카운터에 입력하면 위치결정이 완료될 까지 마이크로프로세서의 개입없이 간단하게 위치제어를 수행할 수 있으므로, 마이크로프로세서의 이용효율을 보다 증가시킬 수 있다.As described above, the position control system of the servomotor according to the present invention can control the feed amount of the servomotor within the range of "2 32 " using 32-bit position control data while using a 16-bit programmable counter. In addition, if the feed amount of the motor is initially input to the programmable counter by software, the position control can be simply performed without the involvement of the microprocessor until the positioning is completed, thereby increasing the utilization efficiency of the microprocessor.

Claims (12)

n-비트의 프로그래머블카운터와 기준펄스발생부를 구비하여, 펄스수가 이송량에 해당하는 이송펄스신호를 서보모터로 공급함으로써, 서보모터의 위치제어를 수행하기 위한 위치제어방법에 있어서, 원하는 위치데이타가 입력하는 단계; 상기 위치데이타가 "2n"보다 큰가를 판단하는 단계; 상기 위치데이타가 "2n"보다 크지않은 경우, 상기 n-비트 프로그래머블카운터가 위치데이타를 카운팅하는 동안 상기 기준펄스발생부의 기준펄스신호를 이송펄스로서 출력하는 제 1 출력 단계; 및 상기 위치데이타가 "2n"보다 큰 경우, 하기 식과 같은 기준펄스신호(REF)를 이송펄스로서 출력하는 제 2 출력단계를 포함하는 것을 특징으로 하는 서보모터의 위치제어방법.In the position control method for performing the position control of the servo motor by supplying a transfer pulse signal of n-bit programmable counter and a reference pulse generator to the servo motor, the number of pulses being supplied to the servo motor, the desired position data is inputted. Doing; Determining whether the location data is greater than "2 n "; A first output step of outputting a reference pulse signal of the reference pulse generator as a transfer pulse while the n-bit programmable counter is counting the position data when the position data is not larger than "2 n "; And a second output step of outputting a reference pulse signal REF as a transfer pulse when the position data is larger than "2 n ". REF= N×2n+MREF = N × 2 n + M 여기서, REF는 기준펄스신호의 펄스수, N은 위치데이타 중 n비트보다 상위에 해당하는 상위비트데이타, M은 위치데이타 중 n비트까지의 하위 비트데이타.Here, REF is the number of pulses of the reference pulse signal, N is upper bit data corresponding to higher than n bits of the position data, and M is lower bit data up to n bits of the position data. 제 1 항에 있어서, 상기 제 2 출력단계는 상기 기준펄스신호를 클럭으로 사용하여 모듈로 - 2n의 카운팅을 수행하며, 2n을 카운팅할 때마다 소정의 펄스신호를 발생하는 제 1 카운팅단계; 상기 제 1 카운팅단계의 펄스신호를 클럭으로 사용하여 상기 상위비트데이타(N)를 카운팅하는 제 2 카운팅단계; 및 상기 제 2 카운팅단계의 카운팅동작이 완료되는 시점에서 부터 상기 하위비트데이타(M)를 카운팅하는 제 3 카운팅단계를 포함하는 것을 특징으로 하는 서보모터의 위치제어방법.The first counting step of claim 1, wherein the second output step performs modulo − 2 n counting using the reference pulse signal as a clock, and generates a predetermined pulse signal each time 2 n is counted. ; A second counting step of counting the higher bit data N using the pulse signal of the first counting step as a clock; And a third counting step of counting the lower bit data (M) from a time point when the counting operation of the second counting step is completed. 제 2 항에 있어서, 상기 제 2 출력단계는 상기 제 2 카운팅단계의 카운팅동작이 완료되고 상기제 3 카운팅단계의 카운팅동작이 완료될 때 상기 기준펄스신호의 출력을 중단하는 단계를 추가로 포함하는 것을 특징으로 하는 서보모터의 위치제어방법.The method of claim 2, wherein the second output step further comprises the step of stopping the output of the reference pulse signal when the counting operation of the second counting step is completed and the counting operation of the third counting step is completed. Position control method of the servo motor, characterized in that. 제 1 항에 있어서, 상기 제 1 출력단계는 상기 n-비트 프로그래머블카운터의 카운팅동작이 완료될 때 소정의 인터럽트펄스신호를 발생하는 단계; 및 상기 인터럽트펄스신호가 발생되면, 상기 기준펄스신호의 출력을 중지하는 단계를 추가로 포함하는 것을 특징으로 하는 서보모터의 위치제어방법.The method of claim 1, wherein the first outputting step comprises: generating a predetermined interrupt pulse signal when a counting operation of the n-bit programmable counter is completed; And when the interrupt pulse signal is generated, stopping the output of the reference pulse signal. 펄스수가 이송량에 해당하는 이송펄스신호를 서보모터로 공급하여, 서보모터의 위치제어를 수행하기 위한 위치제어장치에 있어서, 서보모터의 위치 및 속도를 제어하기 위한 위치데이타 및 속도데이타를 발생하는 마이크로프로세서; 상기 마이크로프로세서로 부터 속도데이타를 공급받아 이에 상응하는 기준펄스신호를 발생하는 기준펄스발생부; 상기 기준펄스발생부로 부터 기준펄스신호를 공급받아 상기 마이크로프로세서로 부터 위치데이타를 공급받아, 상기 기준펄스신호를 클럭으로 사용하여 상기 위치데이타를 카운팅하는 프로그래머블카운터; 상기 프로그래머블카운터의 카운팅출력신호를 공급받아, 카운팅이 완료되는 시점에서 소정의 인터럽트신호를 발생하여 상기 마이크로프로세서로 공급하는 인터럽트발생수단; 상기 기준펄스발생부에서 출력되는 기준펄스신호를 공급받아 상기 이송펄스신호로서 출력하고, 상기 인터럽트발생수단으로 부터 인터럽트신호가 인가될 때 상기 기준펄스신호의 출력을 중단하는 이송펄스출력부를 포함하는 서보모터의 위치제어장치.In the position control device for supplying a feed pulse signal corresponding to the number of pulses to the servo motor to perform the position control of the servo motor, the microcomputer generates position data and speed data for controlling the position and speed of the servo motor. A processor; A reference pulse generator for receiving speed data from the microprocessor and generating a reference pulse signal corresponding thereto; A programmable counter that receives a reference pulse signal from the reference pulse generator and receives position data from the microprocessor, and counts the position data using the reference pulse signal as a clock; Interrupt generating means for receiving a counting output signal of the programmable counter and generating a predetermined interrupt signal at the time point at which counting is completed; A servo including a transfer pulse output unit receiving a reference pulse signal output from the reference pulse generator and outputting the reference pulse signal as the transfer pulse signal, and stopping the output of the reference pulse signal when an interrupt signal is applied from the interrupt generating means; Motor position control device. 제 5 항에 있어서, 상기 프로그래머블카운터는 상기 기준펄스신호를 클럭으로 사용하여 소정의 카운팅 구간을 반복적으로 카운팅하고, 각 카운팅구간에서 소정의 펄스를 출력하는 제 1 카운터; 상기 제 1 카운터의 출력신호를 클럭으로 사용하여 소정의 프로그래밍된 카운팅값을 카운팅하고, 카운팅이 완료되는 시점에서 소정레벨의 인에이블신호를 출력하는 제 2 카운터; 및 상기 제 2 카운터의 출력신호를 공급받아 인에이블 신호가 인가될 때 상기 기준펄스신호를 클럭으로 사용하여 소정의 프로그래밍된 카운팅값을 카운팅하고, 카운팅이 완료되는 시점에서 소정 레벨의 신호를 출력하는 제 3 카운터를 포함하는 것을 특징으로 하는 서보모터의 위치제어장치.The apparatus of claim 5, wherein the programmable counter comprises: a first counter that repeatedly counts a predetermined counting period by using the reference pulse signal as a clock, and outputs a predetermined pulse in each counting period; A second counter that counts a predetermined counting value using the output signal of the first counter as a clock, and outputs an enable signal having a predetermined level when the counting is completed; And counting a predetermined programmed counting value using the reference pulse signal as a clock when an enable signal is applied when the output signal of the second counter is applied, and outputs a signal having a predetermined level when the counting is completed. Position control apparatus for a servo motor comprising a third counter. 제 6 항에 있어서, 상기 위치데이타가 상기 프로그래머블카운터의 최대카운팅데이타보다 크지 않을 경우, 상기 제 1 카운터는 디스에이블상태로 되고, 상기 제 2 카운터는 상기 인에이블신호를 지속적으로 출력하고, 상기 제 3 카운터는 상기 위치데이타를 카운팅하도록 프로그래밍되는 것을 특징으로 하는 서보모터의 위치제어방법.7. The method of claim 6, wherein when the position data is not greater than the maximum counting data of the programmable counter, the first counter is in a disabled state, and the second counter continuously outputs the enable signal. And a third counter is programmed to count the position data. 제 6 항에 있어서, 상기 위치데이타가 상기 프로그래머블카운터의 최대 카운팅데이타보다 큰 경우, 상기 제 1 카운터는 "0"으로 초기화되고, 상기 제 2 카운터는 상기 위치데이타중 프로그래머블카운터의 카운팅 데이타보다 상위 비트에 해당하는 데이타가 카운팅값으로 세팅되고, 상기 제 3 카운터는 상기 위치데이타중 상기 상위비트데이타를 제외한 하위 비트데이타가 카운팅값으로 세팅되도록 프로그래밍되는 것을 특징으로 하는 서보모터의 위치제어방법.7. The method of claim 6, wherein when the position data is larger than the maximum counting data of the programmable counter, the first counter is initialized to "0", and the second counter is higher than the counting data of the programmable counter among the position data. And the third counter is programmed to set the lower bit data except the upper bit data among the position data as the counting value. 제 5 항 또는 제 6 항에 있어서, 상기 인터럽트발생수단은 상기 제 2 카운터의 출력신호를 제 1 입력단자로 공급받고 상기 제 3 카운터의 출력신호를 제 2 입력단자로 공급받아, 이들 2개 입력신호에 대해 소정의 논리연산을 행하여 상기 인터럽트신호를 출력하는 논리회로인 것을 특징으로 하는 서보모터의 위치제어방법.The method of claim 5 or 6, wherein the interrupt generating means is supplied with the output signal of the second counter to the first input terminal and the output signal of the third counter to the second input terminal, the two inputs And a logic circuit for outputting the interrupt signal by performing a predetermined logic operation on a signal. 제 6 항, 제 7 항 또는 제 8 항 중 어느 한 항에 있어서, 상기 제 2 카운터 및 제 3 카운터는 다운타운터인 것을 특징으로 하는 서보모터의 위치제어방법.9. The position control method of a servomotor according to any one of claims 6, 7, or 8, wherein the second counter and the third counter are downtown. 제 5 항에 있어서, 상기 인터럽트발생수단과 상기 마이크로프로세서 사이에 결합되어, 상기 언터럽트 발생수단으로 부터 인터럽트논리신호를 공급받아 소정의 크기 및 주기를 갖는 인터럽트펄스신호를 출력하여 상기 마이크로프로세서로 공급하는 단안정발진기를 추가로 포함하는 것을 특징으로 하는 서보모터의 위치제어장치.The microprocessor of claim 5, wherein the interrupt logic signal is coupled between the interrupt generating means and the microprocessor, receives an interrupt logic signal from the interrupt generating means, and outputs an interrupt pulse signal having a predetermined magnitude and period to the microprocessor. Position control apparatus for a servo motor further comprising a monostable oscillator. 제 5 항 또는 제 6 항에 있어서, 상기 프로그래머블카운터는 카운팅데이타로서 16비트데이타를 처리하는 16비트 카운터인 것을 특징으로 하는 서보모터의 위치제어방법.7. The position control method of a servomotor according to claim 5 or 6, wherein the programmable counter is a 16-bit counter that processes 16-bit data as counting data.
KR1019920021853A 1992-11-20 1992-11-20 Position controlling method and apparatus of servomotor KR950002405B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019920021853A KR950002405B1 (en) 1992-11-20 1992-11-20 Position controlling method and apparatus of servomotor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019920021853A KR950002405B1 (en) 1992-11-20 1992-11-20 Position controlling method and apparatus of servomotor

Publications (2)

Publication Number Publication Date
KR940012788A KR940012788A (en) 1994-06-24
KR950002405B1 true KR950002405B1 (en) 1995-03-17

Family

ID=19343504

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019920021853A KR950002405B1 (en) 1992-11-20 1992-11-20 Position controlling method and apparatus of servomotor

Country Status (1)

Country Link
KR (1) KR950002405B1 (en)

Also Published As

Publication number Publication date
KR940012788A (en) 1994-06-24

Similar Documents

Publication Publication Date Title
US5511207A (en) Program control circuit determining the designated number of times a sequence of instructions is repetitively executed to prevent further execution of a jump instruction
US3611097A (en) Digital control system for ac to dc power conversion apparatus
KR950002405B1 (en) Position controlling method and apparatus of servomotor
US4383245A (en) Digital servomotor drive apparatus
US3576978A (en) System for accomodating various machine tool resolutions from a standard program
US3794900A (en) Pulse interpolation systems
US3825735A (en) Command pulse generator for computer-controlled machining
Koren et al. Numerical control of a lathe
EP0152094A2 (en) Multiple clock pulse generator
KR100209595B1 (en) Device and method of interrupt generation
KR960016798B1 (en) Apparatus and method of position control for servo motor
KR100200206B1 (en) Servo-driver circuit
JPH0434179B2 (en)
JPH02235105A (en) Backlash correcting system for servo motor
JP2623783B2 (en) Speed control device
KR100246628B1 (en) Clock less counter
KR100214691B1 (en) Up-down high speed counter and control method
JP2001092533A (en) Method for dynamically optimizing speed data
JPH022398B2 (en)
KR0181970B1 (en) Timer command handler
JPH0666647B2 (en) Pulse generator
RU1798881C (en) Direct current electric drive
KR100262537B1 (en) Apparatus and method for controlling of stepping motor using phase table
Lewin The Digital Age
SU1288684A1 (en) Device for control of data input

Legal Events

Date Code Title Description
A201 Request for examination
G160 Decision to publish patent application
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee