TWI567514B - Programmable controller, control method and control program - Google Patents

Programmable controller, control method and control program Download PDF

Info

Publication number
TWI567514B
TWI567514B TW104102028A TW104102028A TWI567514B TW I567514 B TWI567514 B TW I567514B TW 104102028 A TW104102028 A TW 104102028A TW 104102028 A TW104102028 A TW 104102028A TW I567514 B TWI567514 B TW I567514B
Authority
TW
Taiwan
Prior art keywords
processing
output
motors
motor
control unit
Prior art date
Application number
TW104102028A
Other languages
Chinese (zh)
Other versions
TW201541208A (en
Inventor
大野弘之
吉田卓弘
Original Assignee
松下神視股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 松下神視股份有限公司 filed Critical 松下神視股份有限公司
Publication of TW201541208A publication Critical patent/TW201541208A/en
Application granted granted Critical
Publication of TWI567514B publication Critical patent/TWI567514B/en

Links

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/058Safety, monitoring
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/16Plc to applications
    • G05B2219/163Domotique, domestic, home control, automation, smart, intelligent house

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Multiple Motors (AREA)
  • Programmable Controllers (AREA)
  • Control Of Stepping Motors (AREA)
  • Control Of Position Or Direction (AREA)

Description

可程式化控制器、控制方法及控制程式 Programmable controller, control method and control program

本發明係關於一種可程式化控制器、控制方法及控制程式。 The invention relates to a programmable controller, a control method and a control program.

以往使用用於對馬達等外部機器進行順序控制的可程式化控制器。可程式化控制器基於控制程式,藉由將特定的脈衝輸出至馬達而進行馬達的定位控制(例如,專利文獻1)。 Conventionally, a programmable controller for sequentially controlling an external device such as a motor has been used. The programmable controller performs positioning control of the motor by outputting a specific pulse to the motor based on the control program (for example, Patent Document 1).

《先前技術文獻》 Prior Technical Literature 專利文獻 Patent literature

專利文獻1:日本特開平11-65620號公報 Patent Document 1: Japanese Laid-Open Patent Publication No. 11-65620

然而,在習用的可程式化控制器中,在對複數個馬達進行定位控制時,係基於命令參數,藉由運算來製作對於各個馬達,脈衝的輸出模式製作而成者(脈衝串的頻率切換表)。之後,基於該輸出模式而輸出脈衝。因此,只有在與命令參數的檢查或運算等有關的時段,對各馬達的脈衝輸出開始時間會被延遲。因此,即使同時使複數個馬達起動,在起動時間也會產生偏差。 However, in the conventional programmable controller, when positioning control is performed on a plurality of motors, the output mode of the pulse is generated for each motor based on the command parameters (pulse switching frequency switching) table). Thereafter, a pulse is output based on the output mode. Therefore, the pulse output start time for each motor is delayed only during the period related to the check or calculation of the command parameters and the like. Therefore, even if a plurality of motors are started at the same time, a deviation occurs in the starting time.

本發明是著眼於這種習用技術中所存在的問題而完成者,其目的在於提供一種減少馬達起動偏差的可程式化控制器、控制方法、及控制程式。 The present invention has been made in view of the problems in the conventional art, and an object thereof is to provide a programmable controller, a control method, and a control program for reducing motor starting deviation.

用以解決上述問題點之可程式化控制器之要旨為一種被構成為能夠連接於複數個馬達之可程式化控制器,其中具備有:用以進行驅動各馬達的控制之控制部、輸出訊號之輸出部;前述控制部為藉由CPU來進行;前述控制部之構成為:在執行使馬達驅動用之預先準備的準備處理之後,再執行輸出處理;該輸出處理為基於該預先準備,使前述輸出部將使馬達驅動用的訊號輸出;前述控制部在進行控制複數個馬達的驅動時,在將複數個馬達有關的準備處理之至少一部分的處理統合執行之後,再對每一個馬達執行剩餘的準備處理和輸出處理。 The purpose of the programmable controller for solving the above problem is a programmable controller configured to be connectable to a plurality of motors, including: a control unit for controlling the driving of each motor, and an output signal The output unit is configured by the CPU, and the control unit is configured to execute an output process after the preparation process for preparing the motor for driving, and the output process is based on the preparation in advance. The output unit outputs a signal for driving the motor. When the control unit controls the driving of the plurality of motors, the control unit integrates the processing of at least a part of the preparation processing related to the plurality of motors, and then executes the remaining for each of the motors. Preparation for processing and output processing.

相較於對各個馬達執行全部關於馬達的準備處理和輸出處理的情況,基於前述構成,能夠使輸出處理時所執行的準備處理所需時間變短,因此能夠減少對各馬達的訊號輸出開始的間隔(起動偏差)。 Compared with the case where all of the motor preparation processing and the output processing are performed on the respective motors, the time required for the preparation processing executed at the time of the output processing can be shortened by the above configuration, so that the start of the signal output for each motor can be reduced. Interval (starting deviation).

在前述可程式化控制器中,在對複數個馬達的驅動進行控制時,前述控制部所統合執行的準備處理中的一部分,也可以是使馬達驅動時的參數檢查處理。 In the programmable controller, when the driving of the plurality of motors is controlled, part of the preparation processing executed by the control unit may be parameter inspection processing when the motor is driven.

基於此構成,藉由預先統合執行檢查處理和輸出處理無關的參數,使得在進行關於各馬達的輸出處理期間,可以不必再進行前述檢查處理,因此可以減少此部分輸出開始的間隔。 With this configuration, by performing the check processing and the output processing-independent parameters in advance, it is not necessary to perform the above-described inspection processing during the output processing for each motor, so that the interval at which the partial output starts can be reduced.

前述可程式化控制器中,在對複數個馬達的驅動進行控制時,前述控制部所統合執行的準備處理中的一部分,也可以是基於前述參數而決定使馬達驅動用的訊號的輸出模式的決定處理。 In the programmable controller, when a plurality of motors are controlled to be driven, a part of the preparation processing executed by the control unit may determine an output mode of the signal for driving the motor based on the parameter. Decided to deal with.

基於此構成,藉由預先統合執行與輸出處理無關的決定處理,進行關於各馬達的輸出處理期間,可以不必再進行前述決定處理,因此可以減少此部分輸出開始的間隔。 With this configuration, by performing the determination processing irrespective of the output processing in advance and performing the output processing period for each motor, it is not necessary to perform the above-described determination processing. Therefore, the interval at which the partial output starts can be reduced.

在前述可程式化控制器中,前述控制部用以控制複數個馬達的驅動時,也可在統合執行全部關於複數個馬達的準備處理之後,對各個馬達執行輸出處理。 In the above-described programmable controller, when the control unit is configured to control the driving of a plurality of motors, the output processing may be performed on each of the motors after all the preparation processes for the plurality of motors are collectively performed.

基於前述構成,藉由預先統合執行與輸出處理無關的、全部的關於複數個馬達的準備處理,使得在關於各馬達的輸出處理期間,不必再進行準備處理,因此可以減少此部分輸出開始的間隔。 According to the above configuration, all the preparation processes for the plurality of motors irrespective of the output processing are performed in advance, so that it is not necessary to perform the preparation processing during the output processing for each motor, so that the interval at which the output starts can be reduced. .

前述可程式化控制器中,前述控制部亦可構成為:用以控制複數個馬達的驅動時,在統合執行關於複數個馬達的準備處理之後,連續執行關於複數個馬達的輸出處理;在連續執行輸出處理時,禁止中途***其他的處理。 In the above programmable controller, the control unit may be configured to continuously perform output processing on a plurality of motors after performing a process of preparing a plurality of motors in an integrated manner to control driving of the plurality of motors; When performing output processing, it is prohibited to insert another processing in the middle.

基於前述構成,就能夠避免因***處理致使對各馬達的信號輸出開始期間被***處理用的時間所分割佔用的狀況。 According to the above configuration, it is possible to avoid a situation in which the insertion processing delays the time during which the signal output start period for each motor is inserted into the processing.

前述可程式化控制器中,前述控制部也可以構成為:在控制複數個馬達的驅動時,利用輸入執行準備處理的準備命令的時機,預先執行全部的準備處理;利用輸入執行輸出處理的輸出命令的時機,對各個馬達執行輸出處理。 In the above-described programmable controller, the control unit may be configured to execute all the preparation processes in advance and to output the output process by input when controlling the driving of the plurality of motors by the timing of inputting the preparation command for the preparation process. At the timing of the command, output processing is performed for each motor.

基於前述構成,預先執行準備處理,利用輸入輸出命令的時機,在不***準備處理的情況下,連續執行各馬達的輸出處理,因此可以縮短從輸出命令的輸入到馬達起動的時間。 According to the above configuration, the preparation processing is executed in advance, and when the preparation processing is not performed by the timing of the input/output command, the output processing of each motor is continuously performed, so that the time from the input of the output command to the start of the motor can be shortened.

用以解決前述問題點的控制方法之要旨為一種用來控制可程式化控制器之方法,該控制器被構成為能夠連接於複數個馬達,該控制器具備有:用以驅動各馬達的控制之控制部及輸出訊號之輸出部。以前述可程式化控制器執行的控制方法當中,前述控制部為藉由CPU來進行,使前述控制部執行用以實施使馬達驅動之預先準備的準備處理後,基於前述預先準備,執行使輸出部將使馬達驅動用的訊號輸出的輸出處理;在控制複數個馬達的驅動時,使前述控制部中統合執行與複數個馬達有關的準備 處理中的至少一部分處理之後,對各個馬達執行剩餘的準備處理和輸出處理。 The gist of the control method for solving the above problem is a method for controlling a programmable controller, the controller being configured to be connectable to a plurality of motors, the controller having: control for driving each motor The control unit and the output unit of the output signal. In the control method executed by the programmable controller, the control unit is executed by the CPU, and the control unit executes preparation processing for performing preparation for driving the motor, and then performs output based on the preparation in advance. The part will process the output of the signal output for driving the motor; when controlling the driving of the plurality of motors, the preparation of the plurality of motors in the control unit is integrated After at least a part of the processing, the remaining preparation processing and output processing are performed on the respective motors.

相較於對各個馬達執行全部關於前述馬達的準備處理和輸出處理的情況,基於此構成,輸出處理期間所執行的準備處理所需時間變少,因此可以減少對各馬達的訊號輸出開始的間隔(起動偏差)。 According to this configuration, the time required for the preparation processing performed during the output processing is reduced as compared with the case where all the preparation processing and the output processing of the motor are performed on the respective motors, so that the interval at which the signal output starts for each motor can be reduced. (starting deviation).

在前述控制方法中,在控制複數個馬達的驅動時,使前述控制部統合執行的準備處理的一部分,也可以是使馬達驅動時的參數檢查處理。 In the above control method, when controlling the driving of the plurality of motors, part of the preparation processing for collectively executing the control unit may be parameter inspection processing when the motor is driven.

基於此構成,藉由預先統合執行檢查處理和輸出處理無關的參數,在進行關於各馬達的輸出處理期間,不必再進行前述檢查處理,因此可以減少此部分輸出開始的間隔。 With this configuration, by performing the check processing and the output processing-independent parameters in advance, it is not necessary to perform the above-described inspection processing during the output processing for each motor, so that the interval at which the partial output starts can be reduced.

前述控制方法中,在控制複數個馬達的驅動時,在前述控制部中統合執行的準備處理中的一部分,也可以是基於前述參數來決定使馬達驅動用的訊號的輸出模式的決定處理。 In the control method, when controlling the driving of the plurality of motors, a part of the preparation processing that is integrated by the control unit may determine the output mode of the signal for driving the motor based on the parameters.

基於此構成,藉由預先統合執行與輸出處理無關的決定處理,使得在與各馬達有關的輸出處理期間,不必再進行前述決定處理,因此可以減少此部分輸出開始的間隔。 With this configuration, by performing the determination processing irrespective of the output processing in advance, it is not necessary to perform the above-described determination processing during the output processing process for each motor, so that the interval at which the partial output starts can be reduced.

前述控制方法中,使前述控制部控制複數個馬達的驅動時,也可以在統合執行全部的關於複數個馬達的準備處理之後,對各個馬達執行輸出處理。 In the above control method, when the control unit controls the driving of the plurality of motors, the output processing may be performed on each of the motors after all the preparation processes for the plurality of motors are collectively executed.

基於此構成,藉由預先統合執行和與輸出處理無關的、關於複數個馬達的全部的準備處理,使得在關於各馬達的輸出處理期間,不必再進行準備處理,因此可以減少此部分輸出開始間隔。 With this configuration, it is possible to reduce the portion of the output start interval during the output processing with respect to each motor by performing the preparatory processing for all of the plurality of motors independently of the execution and the output processing. .

在前述控制方法中,也可以在前述控制部中控制複數個馬達的驅動時,在統合執行與複數個馬達有關的準備處理之後,連續執行與複 數個馬達有關的輸出處理,並在連續執行輸出處理時,禁止中途***其他的處理。 In the above control method, when the control unit controls the driving of the plurality of motors, the execution and processing relating to the plurality of motors may be integrated and executed continuously. Several motor-related output processing, and when the output processing is continuously performed, it is prohibited to insert other processing in the middle.

基於此構成,就能夠消除因***處理而致使對各馬達的訊號輸出開始期間被***處理用的時間所分割佔用的狀況。 According to this configuration, it is possible to eliminate the situation in which the time for inserting the signal output start period for each motor is divided by the insertion processing.

在前述控制方法中,也可在使前述控制部對複數個馬達的驅動進行控制時,為使執行準備處理的準備命令的輸入為時機,預先執行全部的準備處理,同時為使執行輸出處理的輸出命令的輸入為時機,對各個馬達執行輸出處理。 In the above-described control method, when the control unit controls the driving of the plurality of motors, in order to input the preparation command for executing the preparation processing, all the preparation processing is performed in advance, and at the same time, the output processing is performed. The input of the output command is the timing, and output processing is performed for each motor.

基於此構成,預先執行準備處理,以輸出命令的輸入為時機,可以在不***準備處理的情況下,連續地執行各馬達的輸出處理,因此可以縮短從輸出命令之輸入到馬達起動的時間。 With this configuration, the preparation processing is performed in advance, and when the input of the output command is the timing, the output processing of each motor can be continuously performed without inserting the preparation processing, so that the time from the input of the output command to the start of the motor can be shortened.

用以解決上述問題的控制程式之要旨為一種在可程式化控制器上執行的控制程式,該可程式化控制器被構成為連接於複數個馬達,且包括控制部及輸出部,前述控制部控制各馬達的驅動,前述輸出部輸出信號;其中,在執行施行用於使馬達驅動的預先準備的準備處理之後,基於前述預先準備,執行使前述輸出部將使馬達驅動用的訊號輸出的輸出處理;使前述控制部控制複數個馬達的驅動時,統合執行關於複數個馬達的準備處理中的至少一部分處理之後,對各個馬達執行剩餘的準備處理和輸出處理。 The main purpose of the control program for solving the above problem is a control program executed on a programmable controller. The programmable controller is configured to be connected to a plurality of motors, and includes a control unit and an output unit, and the control unit The output of the motor is controlled, and the output unit outputs a signal. After performing the preparatory process for preparing the motor for driving, the output of the signal for outputting the motor is output by the output unit based on the preparation in advance. When the control unit controls the driving of the plurality of motors, at least a part of the processing for preparing the plurality of motors is integrated, and the remaining preparation processing and the output processing are executed for the respective motors.

相較於對各個馬達實施全部關於前述馬達的準備處理及輸出處理的情形,基於此構成,減少於輸出處理時所執行的準備處理所需的時間,因而得以減少對各個馬達的訊號輸出開始的間隔(起動偏差)。 Compared with the case where all of the motor preparation processing and the output processing are performed on the respective motors, the configuration is reduced in accordance with the configuration, and the time required for the preparation processing performed at the time of the output processing is reduced, thereby reducing the start of the signal output for each motor. Interval (starting deviation).

在前述控制程式中,在控制複數個馬達的驅動時,使前述控制部統合執行的準備處理的一部分,亦可為使馬達驅動時的參數檢查處理。 In the control program, when controlling the driving of the plurality of motors, a part of the preparation processing for collectively executing the control unit may be a parameter inspection process for driving the motor.

依據此構成,藉由事先統合執行與輸出處理無關的參數檢查處理,使得在關於各個馬達的輸出處理期間,不必再進行前述檢查處理,因而減少此部分輸出開始的間隔。 According to this configuration, the parameter check processing irrelevant to the output processing is performed in advance, so that it is not necessary to perform the above-described inspection processing during the output processing for each motor, thereby reducing the interval at which the partial output starts.

於前述控制程式當中,控制複數個馬達的驅動時,使前述控制部統合實施準備處理的一部分,也可為基於前述參數,決定作為用以使馬達驅動的控制資料之訊號的輸出模式的決定處理。 In the control program, when controlling the driving of the plurality of motors, the control unit may perform a part of the preparation process, or may determine the output mode of the signal as the control data for driving the motor based on the parameters. .

依據此構成,藉由事先統合實施與輸出處理無關的決定處理,使得在關於各個馬達的輸出處理期間,不必進行前述決定處理,因而減少此部分輸出開始的間隔。 According to this configuration, it is not necessary to perform the above-described determination processing during the output processing for each motor by performing the determination processing irrespective of the output processing in advance, thereby reducing the interval at which the partial output starts.

前述控制程式當中,使前述控制部控制複數個馬達的驅動時,也可在統合實施全部關於複數個馬達的準備處理之後,實施各個馬達的輸出處理。 In the control program described above, when the control unit controls the driving of the plurality of motors, the output processing of each of the motors may be performed after all the preparation processes for the plurality of motors are integrated.

依據此構成,藉由事先統合執行全部的關於複數個馬達的、與輸出處理無關的準備處理,使得在關於各個馬達的輸出處理期間,不必再進行準備處理,可減少此部分輸出開始的間隔。 According to this configuration, the preparation processing irrelevant to the output processing for all of the plurality of motors is performed in advance, so that it is not necessary to perform the preparation processing during the output processing for each of the motors, and the interval at which the partial output starts can be reduced.

於前述控制程式當中,使前述控制部進行對複數個馬達的驅動的控制時,在統合實施關於複數個馬達的準備處理後,連續實施關於複數個馬達的輸出處理,且在連續實施輸出處理的時候,禁止中途***其他的處理。 In the control program, when the control unit performs the control of driving the plurality of motors, after the preparation processing for the plurality of motors is integrated, the output processing for the plurality of motors is continuously performed, and the output processing is continuously performed. At the time, it is forbidden to insert other processing in the middle.

依據此構成,就能夠避免因***處理致使對各個馬達的輸出訊號開始的期間,時間被分到用於***處理的狀況。 According to this configuration, it is possible to avoid a period in which the output signal to each motor is started by the insertion processing, and the time is divided into a state for the insertion processing.

在前述控制程式中,也可以在使前述控制部進行對複數個馬達的驅動之控制時,能為使執行準備處理的準備命令之輸入為時機,事先地執行全部的準備處理;而同時以執行輸出處理的輸出命令之輸入為時機,對各個馬達執行輸出處理。 In the control program, when the control unit is configured to control the driving of the plurality of motors, it is possible to execute all the preparation processes in advance for inputting the preparation command for executing the preparation process, and to execute at the same time. The input of the output command of the output processing is an opportunity to perform output processing for each motor.

依據此構成,由於事先實施準備處理,以輸出命令的輸入為時機,以不***準備處理情況下連續地實施各個馬達的輸出處理,因而輸出命令之輸入至馬達起動之間的時間得以縮減。 According to this configuration, since the preparation processing is performed in advance, the output of each motor is continuously performed without inserting the preparation processing with the input of the output command as the timing, and thus the time between the input of the output command and the start of the motor is reduced.

基於本發明,可以減少馬達的起動偏差。 Based on the present invention, the starting deviation of the motor can be reduced.

10‧‧‧可程式化控制器(PLC) 10‧‧‧Programmable Controller (PLC)

11‧‧‧控制部 11‧‧‧Control Department

12‧‧‧儲存部 12‧‧‧ Storage Department

13‧‧‧脈衝輸出部 13‧‧‧ Pulse Output Department

14‧‧‧輸出埠 14‧‧‧ Output埠

14a~14c‧‧‧第一輸出埠~第三輸出埠 14a~14c‧‧‧first output埠~third output埠

15‧‧‧馬達 15‧‧‧Motor

15a~15c‧‧‧第一馬達~第三馬達 15a~15c‧‧‧First motor~third motor

CH0~CH2‧‧‧第一通訊通道~第三通訊通道 CH0~CH2‧‧‧First Communication Channel~Third Communication Channel

T21、T22、T23、T31、T32、T33、T34、T41、T42、T43、T44、T51、T52、T53‧‧‧間隔 T21, T22, T23, T31, T32, T33, T34, T41, T42, T43, T44, T51, T52, T53‧‧

圖1為可程式化控制器的方塊圖。 Figure 1 is a block diagram of a programmable controller.

圖2為顯示準備處理和輸出處理的流程的時序圖。 FIG. 2 is a sequence diagram showing the flow of preparation processing and output processing.

圖3為顯示準備處理和輸出處理的流程的時序圖。 FIG. 3 is a sequence diagram showing the flow of preparation processing and output processing.

圖4為顯示準備處理和輸出處理的流程的時序圖。 4 is a sequence diagram showing the flow of preparation processing and output processing.

圖5為顯示準備處理和輸出處理的流程的時序圖。 FIG. 5 is a sequence diagram showing the flow of preparation processing and output processing.

《用以實施發明之形態》 "Forms for Implementing Inventions"

(第一實施形態) (First embodiment)

以下,說明本實施形態的可程式化控制器(PLC)。 Hereinafter, a programmable controller (PLC) of the present embodiment will be described.

如圖1中所示,PLC10包括控制部11與儲存部12,控制部11由基於各種資訊而執行各種處理的CPU等所構成,儲存部12由儲存各種資訊或控制程式的RAM或ROM等所構成。PLC10包括脈衝輸出部13,脈衝輸出部13產生並輸出控制馬達15的脈衝。另外,控制部11也可為不能同時執行複數個處理的裝置,其能夠以廉價的CPU等而實現。具體上例如可為使用1個CPU(中央處理單元)之裝置。 As shown in FIG. 1, the PLC 10 includes a control unit 11 and a storage unit 12, and the control unit 11 is constituted by a CPU or the like that executes various processes based on various kinds of information, and the storage unit 12 is configured by a RAM or a ROM that stores various information or control programs. Composition. The PLC 10 includes a pulse output portion 13, which generates and outputs a pulse for controlling the motor 15. Further, the control unit 11 may be a device that cannot execute a plurality of processes at the same time, and can be realized by an inexpensive CPU or the like. Specifically, for example, it is a device using one CPU (Central Processing Unit).

在脈衝輸出部13中,作為外部裝置,設置有複數個可與馬達15連接的輸出埠14。藉由將馬達15與輸出埠14連接,而在各輸出埠14和馬達15之間 形成通訊通道CH。脈衝輸出部13構成為,經由前述通訊通道CH,能夠向馬達15輸出馬達控制用脈衝(訊號)。所連接的馬達15是步進馬達或伺服馬達等,構成為對於輸入的脈衝以階梯狀依次按固定的角度轉動。 In the pulse output unit 13, as the external device, a plurality of output ports 14 connectable to the motor 15 are provided. By connecting the motor 15 to the output port 14, between each output port 14 and the motor 15 A communication channel CH is formed. The pulse output unit 13 is configured to be able to output a motor control pulse (signal) to the motor 15 via the communication channel CH. The motor 15 to be connected is a stepping motor, a servo motor, or the like, and is configured to sequentially rotate the input pulses in a stepwise manner at a fixed angle.

在以下的說明中,將連接到第一輸出埠14a且接收輸出脈衝的馬達15作為第一馬達15a,將在第一輸出埠14a和第一馬達15a之間的通訊通道CH作為第一通訊通道CH0。同樣地,將連接到第二輸出埠14b且接收輸出脈衝的馬達15作為第二馬達15b,將在第二輸出埠14b和第二馬達15b之間的通訊通道CH作為第二通訊通道CH1。同樣地,將連接到第三輸出埠14c且接收輸出脈衝的馬達15作為第三馬達15c,將在第三輸出埠14c和第三馬達15c之間的通訊通道CH作為第三通訊通道CH2。 In the following description, the motor 15 connected to the first output port 14a and receiving the output pulse is used as the first motor 15a, and the communication channel CH between the first output port 14a and the first motor 15a is used as the first communication channel. CH0. Similarly, the motor 15 connected to the second output port 14b and receiving the output pulse is used as the second motor 15b, and the communication channel CH between the second output port 14b and the second motor 15b is used as the second communication path CH1. Similarly, the motor 15 connected to the third output port 14c and receiving the output pulse is used as the third motor 15c, and the communication channel CH between the third output port 14c and the third motor 15c is used as the third communication path CH2.

接著,對用於使馬達15工作的控制加以說明。最初說明僅連接1個馬達15,對馬達15進行控制的情況(第一馬達15a連接到第一輸出埠14a的情況)。 Next, the control for operating the motor 15 will be described. First, a case where only one motor 15 is connected and the motor 15 is controlled (when the first motor 15a is connected to the first output port 14a) will be described.

首先,控制部11基於儲存在儲存部12中的控制程式而讀入用於控制第一馬達15a的命令或者其執行條件等,並進行確認(命令執行條件確認)。 First, the control unit 11 reads in a command for controlling the first motor 15a, its execution condition, and the like based on the control program stored in the storage unit 12, and confirms it (command execution condition confirmation).

然後,控制部11進行檢查命令參數。在檢查命令參數中,基於控制程式來檢查應執行的命令(轉動命令等)、在執行前述命令時作為用於進行更細微設定的資訊的參數(初速、最高速、加減速時間、移動量等)是否正常。例如,在對第一馬達15a進行控制時,檢查是否存在不合理的操作或者不合理的命令。 Then, the control unit 11 performs an inspection command parameter. In the check command parameter, a command to be executed (rotation command, etc.) is checked based on the control program, and parameters for performing finer setting information (initial speed, maximum speed, acceleration/deceleration time, movement amount, etc.) are executed when the above command is executed. Is it normal? For example, when the first motor 15a is controlled, it is checked whether there is an unreasonable operation or an unreasonable command.

接著,控制部11對第一馬達15a的狀態進行檢查(進行通道狀態檢查)。所謂第一馬達15a的狀態的檢查,是指例如對於第一馬達15a是否在工作中進行檢查,或者對於第一馬達15a中是否發生異常進行檢查。各馬達15的狀態被儲存在儲存部12中。 Next, the control unit 11 checks the state of the first motor 15a (performs a channel state check). The inspection of the state of the first motor 15a means, for example, whether the first motor 15a is inspected during operation or whether an abnormality has occurred in the first motor 15a. The state of each motor 15 is stored in the storage unit 12.

然後,控制部11製作第一馬達15a的定位表(進行通道定位表製作)。第一馬達15a的定位表是指用於決定脈衝波形(訊號的輸出模式)的表(脈衝串的頻率切換表),可以基於前述定位表而產生脈衝。換句話說,第一馬達15a的定位表是用於決定脈衝的輸出模式的表。 Then, the control unit 11 creates a positioning table of the first motor 15a (by making a channel positioning table). The positioning table of the first motor 15a refers to a table (frequency switching table of a pulse train) for determining a pulse waveform (output mode of a signal), and a pulse can be generated based on the above-described positioning table. In other words, the positioning table of the first motor 15a is a table for determining the output mode of the pulse.

即,控制部11基於用於執行命令的參數(初速、最高速、加減速時間、移動量等)而運算並製作出用於以適合前述參數的方式使第一馬達15a轉動的定位表(脈衝串的頻率切換表)。控制部11可以基於前述定位表,對第一馬達15a進行控制。另外,為了不損壞馬達15,在馬達15的起動時和停止時,必須以低速運行。也就是說,通常係進行下述控制:在使馬達15起動後,緩慢地加速,之後以固定的速度運行。之後使其緩慢地減速、停止的梯形速度控制。定位表是考量了此種狀況並透過運算而製作。 In other words, the control unit 11 calculates and generates a positioning table (pulse train) for rotating the first motor 15a in a manner suitable for the above-described parameters based on parameters (initial speed, maximum speed, acceleration/deceleration time, movement amount, and the like) for executing the command. Frequency switching table). The control unit 11 can control the first motor 15a based on the aforementioned positioning table. In addition, in order not to damage the motor 15, it is necessary to operate at a low speed at the time of starting and stopping of the motor 15. That is to say, it is usually controlled to slowly accelerate after starting the motor 15, and then operate at a fixed speed. Then, the trapezoidal speed control is made to slow down and stop slowly. The positioning table takes this situation into consideration and makes it through calculation.

之後,控制部11是以基於所製作的定位表使脈衝輸出部13將前述脈衝輸出的方式進行控制(進行脈衝輸出許可)。 Thereafter, the control unit 11 controls the pulse output unit 13 to output the pulse based on the created positioning table (performs pulse output permission).

由此,脈衝輸出部13基於定位表而產生脈衝,經由第一輸出埠14a將所製作的脈衝依次輸出至第一馬達15a。因此,第一馬達15a基於脈衝而開始起動。 Thereby, the pulse output unit 13 generates a pulse based on the positioning table, and sequentially outputs the generated pulse to the first motor 15a via the first output port 14a. Therefore, the first motor 15a starts starting based on the pulse.

另外,確認命令執行條件、檢查命令參數、通道狀態檢查、通道定位表製作,是不必進行與馬達15之間的訊號輸出的處理,而是執行用於使馬達驅動的預先準備的準備處理。輸出處理是基於預先準備(馬達15的檢查狀態或檢查參數、及定位表的製作)而使脈衝輸出部13將使馬達驅動用的訊號輸出的處理。檢查命令參數是準備處理的一部分,是使馬達驅動時的參數的檢查處理。通道定位表製作是準備處理的一部分,是決定使馬達驅動用的訊號的輸出模式的決定處理。 In addition, it is necessary to confirm the command execution condition, the inspection command parameter, the channel state check, and the channel positioning table creation, and it is not necessary to perform the signal output processing with the motor 15, but to perform preparatory processing for preparing the motor for advance preparation. The output processing is processing for causing the pulse output unit 13 to output a signal for driving the motor based on the preparation in advance (the inspection state of the motor 15 or the inspection parameter and the creation of the positioning table). The inspection command parameter is a part of the preparation process and is a check process for the parameter when the motor is driven. The channel positioning table creation is a part of the preparation process, and is a process of determining the output mode of the signal for driving the motor.

接著,基於圖2說明連接3個馬達15而對前述3個馬達15進行控制的情況。也就是說明將第一馬達15a連接到第一輸出埠14a、第二馬達15b連接到第二輸出埠14b、第三馬達15c連接到第三輸出埠14c的情況。 Next, a case where the three motors 15 are connected and three motors 15 are controlled will be described based on FIG. 2 . That is, the case where the first motor 15a is connected to the first output port 14a, the second motor 15b is connected to the second output port 14b, and the third motor 15c is connected to the third output port 14c.

首先,控制部11基於儲存在儲存部12中的控制程式,確認用於對各馬達15進行控制的命令或執行條件(命令執行條件確認)。此時,統合確認與所連接的3個馬達15有關的命令或執行條件。 First, the control unit 11 confirms a command or an execution condition (command execution condition confirmation) for controlling each motor 15 based on the control program stored in the storage unit 12. At this time, the command or execution condition relating to the three motors 15 connected is confirmed in an integrated manner.

然後,控制部11進行檢查命令參數。此時,統合進行檢查關於所連接的3個馬達15的命令參數。即,統合進行檢查用於控制3個馬達15的命令參數。 Then, the control unit 11 performs an inspection command parameter. At this time, the command parameters regarding the connected three motors 15 are checked collectively. That is, the integration is checked to control the command parameters of the three motors 15.

接著,控制部11按照預先決定的順序個別地進行對每個所連接的馬達15的控制。在本實施形態中,最初執行關於連接到第一通訊通道CH0的第一馬達15a的控制(通道CH0運算、起動)。接著,執行關於連接到第二通訊通道CH1的第二馬達15b的控制(通道CH1運算、起動)。最後,執行關於連接到第三通訊通道CH2的第三馬達15c的控制(通道CH2運算、起動)。 Next, the control unit 11 individually controls the motor 15 to be connected in a predetermined order. In the present embodiment, the control (channel CH0 calculation, start) of the first motor 15a connected to the first communication channel CH0 is first performed. Next, control regarding the second motor 15b connected to the second communication channel CH1 (channel CH1 calculation, start) is performed. Finally, control (channel CH2 calculation, start) regarding the third motor 15c connected to the third communication channel CH2 is performed.

若更詳細說明,控制部11在進行關於第一通訊通道CH0的第一馬達15a的控制時,首先對連接到第一通訊通道CH0的第一馬達15a的狀態進行檢查(通道CH0狀態檢查)。然後,控制部11基於第一馬達15a用的參數,藉由運算而製作出連接到第一通訊通道CH0的第一馬達15a用的定位表(通道CH0定位表製作)。之後,控制部11以基於所製作的第一馬達15a的定位表,使脈衝輸出部13將第一馬達15a用的脈衝輸出的方式進行控制(通道CH0脈衝輸出許可)。 More specifically, when the control unit 11 performs control of the first motor 15a of the first communication channel CH0, it first checks the state of the first motor 15a connected to the first communication channel CH0 (channel CH0 state check). Then, the control unit 11 creates a positioning table (channel CH0 positioning table creation) for the first motor 15a connected to the first communication channel CH0 by calculation based on the parameters for the first motor 15a. Thereafter, the control unit 11 causes the pulse output unit 13 to output the pulse for the first motor 15a based on the positioning table of the first motor 15a to be created (channel CH0 pulse output permission).

由此,脈衝輸出部13基於所製作的第一馬達15a用的定位表而產生脈衝,並經由第一輸出埠14a將所製作的脈衝依次輸出至連接到第一通訊通道CH0的第一馬達15a。然後,連接到第一通訊通道CH0的第一馬達15a基於前述脈衝而開始起動。 Thereby, the pulse output unit 13 generates a pulse based on the created positioning table for the first motor 15a, and sequentially outputs the generated pulse to the first motor 15a connected to the first communication channel CH0 via the first output port 14a. . Then, the first motor 15a connected to the first communication channel CH0 starts starting based on the aforementioned pulse.

接著,控制部11按照順序進行關於連接到第二通訊通道CH1的第二馬達15b的控制。此時,首先對第二馬達15b的狀態進行檢查(通道CH1狀態檢查)。然後,控制部11基於第二馬達15b用的參數而製作出第二馬達15b用的定位表(通道CH1定位表製作)。之後,控制部11以基於所製作的第二馬達15b用 的定位表,使脈衝輸出部13將第二馬達15b用的脈衝輸出的方式進行控制(通道CH1脈衝輸出許可)。 Next, the control unit 11 performs control regarding the second motor 15b connected to the second communication channel CH1 in order. At this time, the state of the second motor 15b is first checked (channel CH1 state check). Then, the control unit 11 creates a positioning table for the second motor 15b based on the parameters for the second motor 15b (channel CH1 positioning table creation). Thereafter, the control unit 11 uses the second motor 15b based on the second motor 15b. The positioning table causes the pulse output unit 13 to control the pulse output of the second motor 15b (channel CH1 pulse output permission).

由此,脈衝輸出部13基於所製作的第二馬達15b用的定位表而產生脈衝,並經由第二輸出埠14b,將所製作的脈衝依次輸出至連接到第二通訊通道CH1的第二馬達15b。由此,連接到第二通訊通道CH1的第二馬達15b基於前述脈衝而開始起動。 Thereby, the pulse output unit 13 generates a pulse based on the created positioning table for the second motor 15b, and sequentially outputs the generated pulse to the second motor connected to the second communication path CH1 via the second output port 14b. 15b. Thereby, the second motor 15b connected to the second communication channel CH1 starts starting based on the aforementioned pulse.

接著,控制部11按照順序,進行關於第三通訊通道CH2的第三馬達15c的控制。此時,首先對第三通訊通道CH2的第三馬達15c的狀態進行檢查(通道CH2狀態檢查)。然後,控制部11基於第三馬達15c用的參數,而製作出第三通訊通道CH2的第三馬達15c用的定位表(通道CH2定位表製作)。之後,控制部11以基於所製作的定位表,使脈衝輸出部13將第三通訊通道CH2的第三馬達15c用的脈衝輸出的方式進行控制(通道CH2脈衝輸出許可)。 Next, the control unit 11 performs control of the third motor 15c regarding the third communication channel CH2 in order. At this time, first, the state of the third motor 15c of the third communication channel CH2 is checked (channel CH2 state check). Then, based on the parameters for the third motor 15c, the control unit 11 creates a positioning table for the third motor 15c of the third communication path CH2 (channel CH2 positioning table creation). Thereafter, the control unit 11 causes the pulse output unit 13 to output a pulse for the third motor 15c of the third communication channel CH2 based on the created positioning table (channel CH2 pulse output permission).

由此,脈衝輸出部13基於所製作的第三馬達15c用的定位表而產生脈衝,並經由第三輸出埠14c,將所製作的脈衝依次輸出至連接到第三通訊通道CH2的第三馬達15c。然後,連接到第三通訊通道CH2的第三馬達15c基於前述脈衝而開始起動。 Thereby, the pulse output unit 13 generates a pulse based on the created positioning table for the third motor 15c, and sequentially outputs the generated pulse to the third motor connected to the third communication path CH2 via the third output port 14c. 15c. Then, the third motor 15c connected to the third communication channel CH2 starts starting based on the aforementioned pulse.

如此般,在各馬達15的輸出處理之前,統合進行不必進行與外部的通訊(訊號的輸入和輸出)的準備處理中的至少一部分,具體地為用於對全部馬達15進行控制的命令執行條件確認、或檢查與全部馬達15有關的命令參數。 In this manner, at least a part of the preparation processing for not requiring communication with the outside (input and output of signals), specifically, the command execution condition for controlling all the motors 15 is integrated before the output processing of the motors 15 is performed. Confirm or check the command parameters associated with all motors 15.

因此,如圖2和圖5中所示,相較於對各個馬達15全部地執行關於前述馬達15的準備處理和輸出處理的情況(圖5),統合進行關於複數個馬達的準備處理中的一部分(圖2)的做法,可以縮短各馬達15中的脈衝輸出開始的間隔(起動偏差)。 Therefore, as shown in FIGS. 2 and 5, in the case where the preparation processing and the output processing with respect to the aforementioned motor 15 are all performed on the respective motors 15 (FIG. 5), integration is performed in the preparation processing for the plurality of motors. In part (Fig. 2), the interval (starting deviation) at which the pulse output starts in each motor 15 can be shortened.

若更詳細地說明,圖2中從通道CH0脈衝輸出許可到通道CH1脈衝輸出許可的間隔T21,與圖5中從通道CH0脈衝輸出許可到通道CH1脈衝輸出許可的間隔T51相比較下,因不進行檢查命令參數,故縮短相應的時間。 If it is explained in more detail, the interval T21 from the channel CH0 pulse output permission to the channel CH1 pulse output permission in Fig. 2 is compared with the interval T51 from the channel CH0 pulse output permission to the channel CH1 pulse output permission in Fig. 5, because Check the command parameters, so shorten the corresponding time.

圖2中從通道CH1脈衝輸出許可到通道CH2脈衝輸出許可的間隔T22,與圖5中從通道CH1脈衝輸出許可到通道CH2脈衝輸出許可的間隔T52相比較下,因不進行檢查命令參數,故縮短相應的時間。 In Fig. 2, the interval T22 from the channel CH1 pulse output permission to the channel CH2 pulse output permission is compared with the interval T52 from the channel CH1 pulse output permission to the channel CH2 pulse output permission in Fig. 5, since the check command parameter is not performed, Shorten the corresponding time.

同樣地,圖2中從通道CH0脈衝輸出許可到通道CH2脈衝輸出許可的間隔T23,與圖5中的從通道CH0脈衝輸出許可到通道CH2脈衝輸出許可的間隔T53相比較下,因不進行檢查2次的命令參數,故縮短相應的時間。 Similarly, the interval T23 from the channel CH0 pulse output permission to the channel CH2 pulse output permission in FIG. 2 is compared with the interval T53 from the channel CH0 pulse output permission to the channel CH2 pulse output permission in FIG. The command parameters are 2 times, so the corresponding time is shortened.

如以上的詳細描述,本實施形態具有以下的效果。 As described in detail above, this embodiment has the following effects.

(1)控制部11在對複數個馬達15的驅動進行控制時,統合執行關於複數個馬達15的準備處理中的至少一部分的處理,然後對各個馬達15執行剩餘的準備處理和輸出處理。更具體地,控制部11在對複數個馬達15的驅動進行控制時,為了使在輸出處理期間所執行的準備處理所需時間變短,在任何輸出處理之前統合執行關於複數個馬達15的準備處理中的至少一部分處理,然後對各個馬達15執行剩餘的準備處理和輸出處理。因此,相較於對各個馬達15執行全部的關於前述馬達15的準備處理和輸出處理的情況(圖5),統合進行關於複數個馬達的準備處理中的一部分(確認命令執行條件和檢查命令參數)(圖2)可以縮短各馬達15中的脈衝輸出開始的間隔(起動偏差)。 (1) When the control of the driving of the plurality of motors 15 is performed, the control unit 11 collectively executes processing for at least a part of the preparation processing of the plurality of motors 15, and then performs remaining preparation processing and output processing for each of the motors 15. More specifically, when the control unit 11 controls the driving of the plurality of motors 15, in order to shorten the time required for the preparation processing executed during the output processing, the preparation for the plurality of motors 15 is collectively performed before any output processing. At least a part of the processing is processed, and then the remaining preparation processing and output processing are performed on the respective motors 15. Therefore, a part of the preparation processing for the plurality of motors (confirmation command execution condition and inspection command parameter) is collectively performed as compared with the case where all the preparation processing and the output processing of the aforementioned motor 15 are performed on the respective motors 15 (FIG. 5). (Fig. 2) The interval (starting deviation) at which the pulse output starts in each of the motors 15 can be shortened.

(2)在對複數個馬達15的驅動進行控制時,控制部11所統合執行的準備處理中的一部分是檢查處理使馬達15驅動時的參數(檢查命令參數)。如此般,藉由預先統合執行與輸出處理無關的檢查處理,使得在關於各馬達15的輸出處理期間,不必再進行前述檢查處理,因此可以減少此部分的輸出開始的間隔。 (2) When the driving of the plurality of motors 15 is controlled, part of the preparation processing executed by the control unit 11 is a parameter (inspection command parameter) when the inspection process is performed to drive the motor 15. In this manner, the inspection processing irrespective of the output processing is performed in advance, so that it is not necessary to perform the above-described inspection processing during the output processing for each motor 15, so that the interval at which the output starts can be reduced.

(3)因僅為改變處理的順序而統合執行準備處理,因此即使是不能同時進行複數個處理的廉價CPU也能夠實現控制部11。即,可以利用1個通用的CPU而實現,從而可以降低成本。 (3) Since the execution preparation processing is integrated only for the order of changing the processing, the control unit 11 can be realized even in an inexpensive CPU that cannot perform a plurality of processing at the same time. That is, it can be realized by one general-purpose CPU, and the cost can be reduced.

(第二實施形態) (Second embodiment)

接著,對將本發明具體化的第二實施形態加以說明。另外,對於與第一實施形態相同的構成,附上與第一實施形態相同的符號,省略或簡略其詳細的說明和圖示。 Next, a second embodiment of the present invention will be described. The same components as those of the first embodiment are denoted by the same reference numerals as in the first embodiment, and the detailed description and illustration thereof are omitted or simplified.

在本實施形態中,連接3個馬達15。就對前述3個馬達15進行控制的情況加以說明。 In the present embodiment, three motors 15 are connected. The case where the above three motors 15 are controlled will be described.

如圖3中所示,首先控制部11基於儲存在儲存部12中的控制程式,確認用於對各馬達15進行控制的命令或執行條件(命令執行條件確認)。此時,統合確認關於所連接的3個馬達15的命令或執行條件。 As shown in FIG. 3, first, the control unit 11 confirms a command or an execution condition (command execution condition confirmation) for controlling each motor 15 based on the control program stored in the storage unit 12. At this time, the command or execution condition regarding the three motors 15 connected is confirmed by integration.

然後,控制部11進行命令參數檢查。此時,統合進行檢查關於所連接的3個馬達15的命令參數。即,統合進行用於對3個馬達15進行控制的命令和參數的檢查。 Then, the control unit 11 performs a command parameter check. At this time, the command parameters regarding the connected three motors 15 are checked collectively. That is, the inspection of the commands and parameters for controlling the three motors 15 is performed collectively.

接著,控制部11按照預先決定的順序個別地進行除用於輸出脈衝的輸出處理以外的處理(即剩餘的準備處理)。在本實施形態中,最初執行關於連接到第一通訊通道CH0的第一馬達15a的剩餘的準備處理(通道CH0運算)接著,執行關於連接到第二通訊通道CH1的第二馬達15b的剩餘的準備處理(通道CH1運算)。最後,執行關於連接到第三通訊通道CH2的第三馬達15c的控制(通道CH2運算)。 Next, the control unit 11 individually performs processing other than the output processing for the output pulse (that is, the remaining preparation processing) in a predetermined order. In the present embodiment, the remaining preparation processing (channel CH0 operation) with respect to the first motor 15a connected to the first communication channel CH0 is first performed. Next, the remaining of the second motor 15b connected to the second communication channel CH1 is performed. Ready to process (channel CH1 operation). Finally, control (channel CH2 operation) regarding the third motor 15c connected to the third communication channel CH2 is performed.

若更詳細地說明,控制部11在進行關於第一馬達15a的剩餘的準備處理時,首先對連接到第一通訊通道CH0的第一馬達15a的狀態進行檢查(通道CH0狀態檢查)。然後,控制部11基於第一馬達15a用的參數,並藉由運算而 製作出連接到第一通訊通道CH0的第一馬達15a的定位表(通道CH0定位表製作)。 As will be described in more detail, when the control unit 11 performs the remaining preparation processing for the first motor 15a, it first checks the state of the first motor 15a connected to the first communication channel CH0 (channel CH0 state check). Then, the control unit 11 is based on the parameters used by the first motor 15a and is operated by A positioning table (channel CH0 positioning table creation) of the first motor 15a connected to the first communication channel CH0 is created.

接著,控制部11在按照順序進行關於第二馬達15b的剩餘的準備處理時,首先對連接到第二通訊通道CH1的第二馬達15b的狀態進行檢查(通道CH1狀態檢查)。然後,控制部11基於第二馬達15b用的參數,並藉由運算而製作出連接到第二通訊通道CH1的第二馬達15b的定位表(通道CH1定位表製作)。 Next, when the control unit 11 performs the remaining preparation processing for the second motor 15b in order, the control unit 11 first checks the state of the second motor 15b connected to the second communication channel CH1 (channel CH1 state check). Then, based on the parameters for the second motor 15b, the control unit 11 creates a positioning table (channel CH1 positioning table creation) of the second motor 15b connected to the second communication channel CH1 by calculation.

接著,控制部11在按照順序進行關於第三馬達15c的剩餘準備處理時,首先對連接到第三通訊通道CH2的第三馬達15c的狀態進行檢查(通道CH2狀態檢查)。然後,控制部11基於第三馬達15c用的參數,並藉由運算而製作出連接到第三通訊通道CH2的第三馬達15c的定位表(通道CH2定位表製作)。 Next, when the control unit 11 performs the remaining preparation processing for the third motor 15c in order, the control unit 11 first checks the state of the third motor 15c connected to the third communication channel CH2 (channel CH2 state check). Then, based on the parameters for the third motor 15c, the control unit 11 creates a positioning table (channel CH2 positioning table creation) of the third motor 15c connected to the third communication channel CH2 by calculation.

在對各馬達15分別執行剩餘的準備處理之後,控制部11按照預先決定的順序個別地進行用於輸出脈衝的輸出處理(通道CH0~CH2起動)。在本實施形態中,最初執行關於連接到第一通訊通道CH0的第一馬達15a的輸出處理。接著執行關於連接到第二通訊通道CH1的第二馬達15b的輸出處理,最後執行關於連接到第三通訊通道CH2的第三馬達15c的輸出處理。 After the remaining preparation processing is performed on each of the motors 15, the control unit 11 individually performs the output processing for the output pulses (the channels CH0 to CH2 are activated) in a predetermined order. In the present embodiment, the output processing regarding the first motor 15a connected to the first communication channel CH0 is first performed. Next, the output processing regarding the second motor 15b connected to the second communication channel CH1 is performed, and finally the output processing regarding the third motor 15c connected to the third communication channel CH2 is performed.

即,控制部11以基於所製作的第一馬達15a的定位表,使脈衝輸出部13將第一馬達15a用的脈衝輸出的方式進行控制(通道CH0脈衝輸出許可)。如此一來,脈衝輸出部13基於所製作的第一馬達15a用的定位表而產生脈衝,並經由第一輸出埠14a,將所製作的脈衝依次輸出至連接到第一通訊通道CH0的第一馬達15a。然後,連接到第一通訊通道CH0的第一馬達15a基於前述脈衝而開始起動。 In other words, the control unit 11 controls the pulse output unit 13 to output the pulse for the first motor 15a based on the position table of the first motor 15a to be created (channel CH0 pulse output permission). In this manner, the pulse output unit 13 generates a pulse based on the created positioning table for the first motor 15a, and sequentially outputs the generated pulse to the first line connected to the first communication channel CH0 via the first output port 14a. Motor 15a. Then, the first motor 15a connected to the first communication channel CH0 starts starting based on the aforementioned pulse.

接著,控制部11以基於所製作的第二馬達15b的定位表,使脈衝輸出部13將第二馬達15b用的脈衝輸出的方式進行控制(通道CH1脈衝輸出許可)。由此,脈衝輸出部13基於所製作的第二馬達15b用的定位表產生脈衝,並經由第二輸出埠14b,將所製作的脈衝依次輸出至連接到第二通訊通道CH1的第 二馬達15b。然後,連接到第二通訊通道CH1的第二馬達15b基於前述脈衝而開始起動。 Next, the control unit 11 causes the pulse output unit 13 to output the pulse for the second motor 15b based on the positioning table of the second motor 15b to be produced (channel CH1 pulse output permission). Thereby, the pulse output unit 13 generates a pulse based on the created positioning table for the second motor 15b, and sequentially outputs the generated pulse to the second communication channel CH1 via the second output port 14b. Two motors 15b. Then, the second motor 15b connected to the second communication channel CH1 starts starting based on the aforementioned pulse.

最後,控制部11以依據所製作的第三馬達15c的定位表,使脈衝輸出部13將第三馬達15c用的脈衝輸出的方式進行控制(通道CH2脈衝輸出許可)。如此一來,脈衝輸出部13依據所製作的第三馬達15c用的定位表而產生脈衝,並經由第三輸出埠14c將所製作的脈衝,依次輸出到連接於第三通訊通道CH2的第三馬達15c。然後,連接到第三通訊通道CH2的第三馬達15c基於前述脈衝而開始起動。 Finally, the control unit 11 causes the pulse output unit 13 to output the pulse for the third motor 15c in accordance with the positioning table of the third motor 15c to be produced (channel CH2 pulse output permission). In this manner, the pulse output unit 13 generates a pulse in accordance with the positioning table for the third motor 15c to be produced, and sequentially outputs the generated pulse to the third line connected to the third communication channel CH2 via the third output port 14c. Motor 15c. Then, the third motor 15c connected to the third communication channel CH2 starts starting based on the aforementioned pulse.

另外,本實施形態構成為:在連續地進行與各馬達15有關的輸出處理期間,禁止中途***處理。如此般,在各馬達15的輸出處理之前統合進行不必進行與外部的通訊(訊號的輸入和輸出)的定位表的準備處理中的至少一部分,具體地可為全部的馬達15的命令執行條件確認、關於全部的馬達15的命令參數檢查。此外,在各馬達15的輸出處理之前,統合進行複數個馬達15的狀態檢查、或者複數個馬達15的定位表的製作。即,以儘量不在輸出處理期間***不必進行與外部的通訊(訊號的輸入和輸出)的準備處理的方式,預先統合執行。 Further, in the present embodiment, the midway insertion processing is prohibited while the output processing relating to each of the motors 15 is continuously performed. In this way, at least a part of the preparation process of the positioning table that does not require communication with the outside (input and output of signals) is integrated before the output processing of each motor 15, and specifically, the command execution condition confirmation of all the motors 15 can be confirmed. The command parameter check of all the motors 15 is performed. Further, before the output processing of each of the motors 15, the state inspection of the plurality of motors 15 or the creation of the positioning tables of the plurality of motors 15 is integrated. In other words, the method of preparing for the communication (input and output of signals) without external communication is not performed as much as possible in the output processing period.

因此,如圖3和圖5中所示,相較於對各個馬達15執行全部關於前述馬達15的準備處理和輸出處理的情況(圖5),統合進行與複數個馬達有關的準備處理(圖3)可以縮短各馬達15中的脈衝輸出開始的間隔(起動偏差)。 Therefore, as shown in FIG. 3 and FIG. 5, preparation processing relating to a plurality of motors is performed in an integrated manner as compared with the case where all the preparations and output processing of the aforementioned motor 15 are performed on the respective motors 15 (FIG. 5). 3) The interval (starting deviation) at which the pulse output starts in each of the motors 15 can be shortened.

若更詳細地說明,圖3中從通道CH0脈衝輸出許可到通道CH1脈衝輸出許可的間隔T31,與圖5中從通道CH0脈衝輸出許可到通道CH1脈衝輸出許可的間隔T51相比較,因不進行準備處理,故縮短相應的時間。 If it is explained in more detail, the interval T31 from the channel CH0 pulse output permission to the channel CH1 pulse output permission in FIG. 3 is compared with the interval T51 from the channel CH0 pulse output permission to the channel CH1 pulse output permission in FIG. Prepare for processing, so shorten the corresponding time.

圖3中從通道CH1脈衝輸出許可到通道CH2脈衝輸出許可的間隔T32,與圖5中從通道CH1脈衝輸出許可到通道CH2脈衝輸出許可的間隔T52相比較,因不進行準備處理,故縮短相應的時間。 In Fig. 3, the interval T32 from the channel CH1 pulse output permission to the channel CH2 pulse output permission is compared with the interval T52 from the channel CH1 pulse output permission to the channel CH2 pulse output permission in Fig. 5, because the preparation process is not performed, so the corresponding shortening is performed. time.

同樣地,圖3中從通道CH0脈衝輸出許可到通道CH2脈衝輸出許可的間隔T33,與圖5中的從通道CH0脈衝輸出許可到通道CH2脈衝輸出許可的間隔T53相比較,因不進行2個準備處理,故縮短相應的時間。 Similarly, the interval T33 from the channel CH0 pulse output permission to the channel CH2 pulse output permission in FIG. 3 is compared with the interval T53 from the channel CH0 pulse output permission to the channel CH2 pulse output permission in FIG. 5, since two are not performed. Prepare for processing, so shorten the corresponding time.

如以上的詳細描述,本實施形態具有與第一實施形態中的(1)~(3)同樣的效果,同時也具有以下的效果。 As described in detail above, this embodiment has the same effects as (1) to (3) in the first embodiment, and also has the following effects.

(4)在對複數個馬達15的驅動進行控制時,在控制部11中統合執行的準備處理的一部分為,基於參數來決定用於使馬達15驅動的訊號的輸出模式(定位表)的決定處理。如此般地,藉由預先統合執行與輸出處理無關的決定處理,使得在關於各馬達15的輸出處理期間,不必再進行前述決定處理,因此可以減少輸出開始的間隔。因此,可以減少對各馬達15的脈衝輸出開始的間隔,從而可以減少各馬達15的起動偏差。 (4) When controlling the driving of the plurality of motors 15, a part of the preparation processing that is integrated and executed by the control unit 11 determines the output mode (positioning table) of the signal for driving the motor 15 based on the parameters. deal with. In this way, by performing the determination processing irrespective of the output processing in advance, it is not necessary to perform the above-described determination processing during the output processing for each motor 15, so that the interval at which the output starts can be reduced. Therefore, the interval at which the pulse output of each motor 15 starts can be reduced, so that the starting deviation of each motor 15 can be reduced.

(5)在連續地執行與各馬達15有關的輸出處理期間,禁止中途***處理。因此,就能夠避免因中途***處理致使對各馬達15的脈衝輸出開始期間被***處理所分割佔用的情況。 (5) During the execution of the output processing relating to each of the motors 15, the midway insertion processing is prohibited. Therefore, it is possible to avoid the case where the pulse output start period for each motor 15 is divided by the insertion processing due to the midway insertion processing.

(第三實施形態) (Third embodiment)

接著對將本發明具體化的第三實施形態加以說明。另外,對於與第一實施形態同樣的構成,附上與第一實施形態相同的符號,省略或簡略其詳細說明和圖示。 Next, a third embodiment of the present invention will be described. The same components as those in the first embodiment are denoted by the same reference numerals as in the first embodiment, and the detailed description and illustration thereof are omitted or simplified.

在此說明本實施形態中,連接3個馬達15並對前述3個馬達15進行控制的情況。在本實施形態中,分為用於製作馬達15的定位表的準備處理、和用於輸出脈衝的輸出處理;並構成為基於個別的命令而執行。即,構成為:執行時機設定為不同,即使接收到用於執行準備處理的準備命令,也不執行輸出處理。及構成為即使接收到用於執行輸出處理的輸出命令,也不執行準備處理。下面加以詳細說明。 Here, in the present embodiment, the case where three motors 15 are connected and the three motors 15 are controlled will be described. In the present embodiment, it is divided into a preparation process for creating a positioning table of the motor 15 and an output process for outputting a pulse, and is configured to be executed based on an individual command. That is, it is configured such that the execution timing is set to be different, and the output processing is not executed even if the preparation command for executing the preparation processing is received. And configured to perform the preparation processing even if an output command for executing the output processing is received. The details will be described below.

如圖4中所示,首先,控制部11基於儲存在儲存部12中的控制程式,確認用於對各馬達15進行控制的命令或執行條件(確認命令執行條件)。統合確認關於所連接的3個馬達15的命令或執行條件。 As shown in FIG. 4, first, the control unit 11 confirms a command or an execution condition (confirmation command execution condition) for controlling each motor 15 based on the control program stored in the storage unit 12. The command or execution condition regarding the three motors 15 connected is confirmed by integration.

此時,控制部11以確認表示準備處理執行的準備命令的輸入為時機,進行命令參數檢查。此時,統合進行關於所連接的3個馬達15的命令參數檢查。即,統合進行用於對3個馬達15進行控制的命令和參數的檢查。 At this time, the control unit 11 performs command parameter check by confirming the input of the preparation command indicating the execution of the preparation process. At this time, the command parameter check on the connected three motors 15 is integrated. That is, the inspection of the commands and parameters for controlling the three motors 15 is performed collectively.

接著,控制部11按照預先決定的順序個別地進行除用於輸出脈衝的輸出處理以外的處理(即剩餘的準備處理)。在本實施形態中,最初執行關於連接到第一通訊通道CH0的第一馬達15a的剩餘的準備處理(通道CH0運算)。接著,執行關於連接到第二通訊通道CH1的第二馬達15b的剩餘的準備處理(通道CH1運算)。最後,執行關於連接到第三通訊通道CH2的第三馬達15c的控制(通道CH2運算)。如果全部結束這些控制,則結束基於準備命令的處理。另外,這些控制與第二實施形態相同,因此省略詳細說明。 Next, the control unit 11 individually performs processing other than the output processing for the output pulse (that is, the remaining preparation processing) in a predetermined order. In the present embodiment, the remaining preparation processing (channel CH0 operation) with respect to the first motor 15a connected to the first communication channel CH0 is first performed. Next, the remaining preparation processing (channel CH1 operation) with respect to the second motor 15b connected to the second communication channel CH1 is performed. Finally, control (channel CH2 operation) regarding the third motor 15c connected to the third communication channel CH2 is performed. If these controls are all ended, the processing based on the preparation command ends. Since these controls are the same as those of the second embodiment, detailed descriptions thereof will be omitted.

然後,控制部11在基於儲存在儲存部12中的控制程式,來確認用於對各馬達15進行控制的命令或執行條件時,以確認指示執行輸出處理之輸出命令的輸入為時機,按照預先決定的順序個別地進行用於輸出脈衝的輸出處理(通道CH0~CH2起動)。在本實施形態中,最初執行關於連接到第一通訊通道CH0的第一馬達15a的輸出處理。接著,執行與連接到第二通訊通道CH1的第二馬達15b有關的輸出處理。最後,執行關於連接到第三通訊通道CH2的第三馬達15c的輸出處理。另外,這些輸出處理與第二實施形態相同,因此省略詳細說明。 When the control unit 11 confirms the command or the execution condition for controlling each of the motors 15 based on the control program stored in the storage unit 12, the control unit 11 confirms the input of the output command for instructing the execution of the output processing as the timing. The output processing for the output pulse (channel CH0 to CH2 activation) is individually performed in the order of determination. In the present embodiment, the output processing regarding the first motor 15a connected to the first communication channel CH0 is first performed. Next, output processing related to the second motor 15b connected to the second communication channel CH1 is performed. Finally, the output processing regarding the third motor 15c connected to the third communication channel CH2 is performed. Since these output processing is the same as that of the second embodiment, detailed description thereof will be omitted.

如此般,在各馬達15的輸出處理之前,統合進行不用與外部通訊(訊號的輸入和輸出)的定位表的準備處理中的至少一部分,具體地可為用於對全部馬達15進行控制的命令或執行條件的確認、或者關於全部馬達15的命令參數檢查。在各馬達15的輸出處理之前,統合進行複數個馬達15的狀態檢查、或者複數個馬達15的定位表的製作。即,以儘量在輸出處理期間不***不用與 外部通訊(訊號的輸入和輸出)的準備處理的方式,而預先統合執行。因此,如圖4和圖5中所示,與對各個馬達15執行全部關於前述馬達15的準備處理和輸出處理的情況(圖5)相比較下,統合進行與複數個馬達有關的準備處理(圖4)可以縮短各馬達15中的脈衝輸出開始的間隔(起動偏差)。 In this manner, at least a part of the preparation process of the positioning table that is not used for external communication (input and output of signals) is integrated before the output processing of each motor 15, specifically, a command for controlling all the motors 15 Or confirmation of execution conditions or inspection of command parameters for all motors 15. Before the output processing of each motor 15, the state inspection of a plurality of motors 15 or the creation of a plurality of positioning tables of the plurality of motors 15 is integrated. That is, as far as possible during the output processing, no insertion and no use The way in which the external communication (input and output of the signal) is prepared and processed is performed in advance. Therefore, as shown in FIGS. 4 and 5, in comparison with the case where the respective motors 15 perform all of the preparation processing and the output processing of the aforementioned motor 15 (FIG. 5), preparation processing relating to a plurality of motors is integrated ( 4) The interval (starting deviation) at which the pulse output starts in each of the motors 15 can be shortened.

若更詳細地說明,圖4中從通道CH0脈衝輸出許可到通道CH1脈衝輸出許可的間隔T41,與圖5中的從通道CH0脈衝輸出許可到通道CH1脈衝輸出許可的間隔T51相比較,因不進行準備處理,故縮短相應的時間。 If it is explained in more detail, the interval T41 from the channel CH0 pulse output permission to the channel CH1 pulse output permission in FIG. 4 is compared with the interval T51 from the channel CH0 pulse output permission to the channel CH1 pulse output permission in FIG. 5, because The preparation process is performed, so the corresponding time is shortened.

此外,圖4中從通道CH1脈衝輸出許可到通道CH2脈衝輸出許可的間隔T42,與圖5中從通道CH1脈衝輸出許可到通道CH2脈衝輸出許可的間隔T52相比較,因不進行準備處理,故縮短相應的時間。 In addition, the interval T42 from the channel CH1 pulse output permission to the channel CH2 pulse output permission in FIG. 4 is compared with the interval T52 from the channel CH1 pulse output permission to the channel CH2 pulse output permission in FIG. 5, since no preparation processing is performed, Shorten the corresponding time.

同樣地,圖4中的從通道CH0脈衝輸出許可到通道CH2脈衝輸出許可的間隔T43,與圖5中的從通道CH0脈衝輸出許可到通道CH2脈衝輸出許可的間隔T53相比較下,因不進行2個準備處理,故縮短相應的時間。 Similarly, the interval T43 from the channel CH0 pulse output permission to the channel CH2 pulse output permission in FIG. 4 is compared with the interval T53 from the channel CH0 pulse output permission to the channel CH2 pulse output permission in FIG. Two preparations are processed, so the corresponding time is shortened.

以準備命令的輸入為時機,預先執行準備處理,以輸出命令的輸入為時機,在不***準備處理的情況下連續地執行各馬達15的輸出處理。如此一來,可以縮短到馬達15起動為止的時間。 When the input of the preparation command is the timing, the preparation processing is performed in advance, and the input of the output command is used as the timing, and the output processing of each motor 15 is continuously performed without inserting the preparation processing. In this way, the time until the start of the motor 15 can be shortened.

即,在圖4中,從命令執行條件確認到通道CH0脈衝輸出許可的間隔T44,與圖3中從命令執行條件確認到通道CH0脈衝輸出許可的間隔T34相比較,因不進行準備處理,故縮短相應的時間。 That is, in FIG. 4, the interval T44 from the command execution condition confirmation to the channel CH0 pulse output permission is compared with the interval T34 from the command execution condition confirmation to the channel CH0 pulse output permission in FIG. 3, since the preparation processing is not performed, Shorten the corresponding time.

如以上的詳細描述,本實施形態具有第一實施形態的(1)~(3)、第二實施形態的(3)的效果,同時具有以下的效果。 As described in detail above, the present embodiment has the effects of (1) to (3) of the first embodiment and (3) of the second embodiment, and has the following effects.

(6)控制部11,在對複數個馬達15的驅動進行控制時,為使執行準備處理的準備命令的輸入為時機,對於被決定統合執行的準備處理進行統合執行。然後,控制部11為使執行輸出處理的輸出命令的輸入為時機,對各個馬達15執行輸出處理。如此般地預先執行準備處理,以輸出命令的輸入為時機,在不*** 準備處理的情況下,連續地執行各馬達15的輸出處理。由此,可以縮短從輸出命令之輸入到馬達15起動為止的時間。 (6) When the drive of the plurality of motors 15 is controlled, the control unit 11 performs the integration of the preparation processing for determining the integration execution in order to input the preparation command for executing the preparation processing. Then, the control unit 11 performs output processing on each of the motors 15 in order to input the output command for executing the output processing. The preparation process is performed in advance in such a manner that the input of the output command is the timing, and the insertion is not performed. In the case of preparation processing, the output processing of each motor 15 is continuously performed. Thereby, the time from the input of the output command to the start of the motor 15 can be shortened.

另外,上述實施形態可以具體化為如下面的其他實施形態(其他例)。 Further, the above embodiment can be embodied as other embodiments (other examples) as follows.

在上述實施形態中,輸出埠14的數量、通訊通道CH的數量、馬達15的數量也可以任意地變化。 In the above embodiment, the number of output ports 14, the number of communication channels CH, and the number of motors 15 may be arbitrarily changed.

在上述實施形態中,馬達的狀態檢查包含在準備處理之中,但也可以包含在輸出處理之中。 In the above embodiment, the state check of the motor is included in the preparation process, but may be included in the output process.

在上述第二實施形態和第三實施形態中,在對各個馬達進行馬達狀態檢查之後進行定位表的製作,但也可以在與統合執行馬達狀態檢查的同時,統合進行定位表的製作。 In the second embodiment and the third embodiment described above, the positioning table is created after the motor state inspection is performed on each of the motors. However, the positioning of the positioning table may be integrated while the motor state inspection is performed integrally.

在上述實施形態中,準備處理的內容,如果不是輸出用於使馬達15驅動的脈衝的內容,也可以任意地變化、追加。 In the above-described embodiment, the content of the preparation process may be arbitrarily changed or added unless the content of the pulse for driving the motor 15 is output.

在上述實施形態中,用於使馬達15驅動的訊號也可以不是脈衝訊號。 In the above embodiment, the signal for driving the motor 15 may not be a pulse signal.

在上述實施形態中,預先統合執行的準備處理中的一部分也可以任意地變更。 In the above embodiment, a part of the preparation processing that is performed in advance is also arbitrarily changed.

在上述第三實施形態中,以輸出命令的輸入為時機,僅連續地執行輸出處理,但也可以執行準備處理中的一部分。 In the third embodiment described above, the output processing is continuously performed only with the input of the output command as the timing, but some of the preparation processing may be executed.

T21、T22、T23‧‧‧間隔 T21, T22, T23‧‧‧ interval

CH0~CH2‧‧‧第一通訊通道~第三通訊通道 CH0~CH2‧‧‧First Communication Channel~Third Communication Channel

Claims (19)

一種可程式化控制器,其特徵在於其被構成為能夠連接於複數個馬達,並將這些馬達進行順序控制之控制器,其中具備有:控制部,其用以控制各馬達的驅動;輸出部,其用以輸出訊號;前述控制部為藉由CPU來進行;前述控制部之構成為:在執行使馬達驅動用之預先準備的準備處理之後,再執行輸出處理;該輸出處理為基於該預先準備,使前述輸出部將使馬達驅動用的訊號輸出;前述控制部在進行控制複數個馬達的驅動時,在將複數個馬達有關的準備處理之至少一部分的處理統合執行之後,再對每一個馬達依照預先決定的順序個別地執行剩餘的準備處理和輸出處理。 A programmable controller, characterized in that it is configured as a controller that can be connected to a plurality of motors and sequentially controls the motors, and is provided with: a control unit for controlling driving of each motor; and an output unit The control unit is configured to be executed by the CPU, and the control unit is configured to execute an output process after performing preparatory processing for preparing the motor for advance preparation; the output process is based on the advance It is prepared that the output unit outputs a signal for driving the motor; and when the control unit controls the driving of the plurality of motors, the control unit integrates the processing of at least a part of the preparation processing related to the plurality of motors, and then performs each The motor individually performs the remaining preparation processing and output processing in a predetermined order. 如請求項1所記載之可程式化控制器,其中在對複數個馬達之驅動進行控制時,前述控制部所統合執行的準備處理中的一部分為使馬達驅動時的參數檢查處理。 The programmable controller according to claim 1, wherein, when controlling the driving of the plurality of motors, a part of the preparation processing executed by the control unit is a parameter checking process when the motor is driven. 如請求項2所記載之可程式化控制器,其中在對複數個馬達之驅動進行控制時,前述控制部所統合執行的準備處理中的一部分為:基於前述參數來決定使馬達驅動用的訊號之輸出模式的決定處理。 The programmable controller according to claim 2, wherein when the driving of the plurality of motors is controlled, part of the preparation processing executed by the control unit is to determine a signal for driving the motor based on the parameter. The decision processing of the output mode. 如請求項1至3項中任一項所記載之可程式化控制器,其中前述控制部在對複數個馬達的驅動進行控制時,在統合執行關於複數個馬達的全部準備處理之後,再對每一個馬達執行輸出處理。 The programmable controller according to any one of claims 1 to 3, wherein, when the control unit controls the driving of the plurality of motors, after performing all the preparation processes for the plurality of motors in an integrated manner, Each motor performs output processing. 如請求項1至3項中任一項所記載之可程式化控制器,其中前述控制部構成為:在對複數個馬達的驅動進行控制時,統合執行與複數個馬達有關的準備處理之後,連續執行與複數個馬達有關的輸出處理;在連續執行輸出處理時,禁止中途***其他的處理。 The programmable controller according to any one of claims 1 to 3, wherein the control unit is configured to perform a preparation process related to a plurality of motors in combination when controlling driving of the plurality of motors The output processing related to a plurality of motors is continuously performed; when the output processing is continuously performed, it is prohibited to insert another processing in the middle. 如請求項1至3項中任一項所記載之可程式化控制器,其中前述控制部構成為:在對複數個馬達的驅動進行控制時,利用輸入執行準備處理的準備命令的時機,預先執行全部的準備處理;利用輸入執行輸出處理的輸出命令的時機,對各個馬達執行輸出處理。 The programmable controller according to any one of the preceding claims, wherein the control unit is configured to: when controlling the driving of the plurality of motors, use a timing of inputting a preparation command to perform preparation processing, in advance All preparation processing is executed; output processing is performed on each motor by the timing of inputting an output command for executing the output processing. 一種控制方法,其特徵為用來控制可程式化控制器之方法,該控制器被構成為能夠連接於複數個馬達,並具備有:用以進行驅動各馬達的順序控制之控制部、輸出訊號之輸出部;前述控制部為藉由CPU來進行;前述控制部之構成為:在執行使馬達驅動用之預先準備的準備處理之後,執行輸出處理;該輸出處理為基於該預先準備,使前述輸出部將使馬達驅動用的訊號輸出;前述控制部在進行控制複數個馬達的驅動時,在將複數個馬達有關的準備處理之至少一部分的處理統合執行之後,再對每一個馬達依照預先決定的順序個別地執行剩餘的準備處理和輸出處理。 A control method characterized by a method for controlling a programmable controller, the controller being configured to be connectable to a plurality of motors, and having: a control unit for driving sequential control of each motor, and an output signal The output unit is configured by the CPU, and the control unit is configured to execute an output process after performing preparation processing for preparing the motor for advance preparation, and the output processing is based on the preparation in advance The output unit outputs a signal for driving the motor. When the control unit controls the driving of the plurality of motors, the control unit integrates the processing of at least a part of the preparation processing related to the plurality of motors, and then determines each motor in advance. The order of execution is performed separately for the remaining preparation processing and output processing. 如請求項7所記載之控制方法,其中對複數個馬達的驅動進行控制時,在前述控制部中統合執行的準備處理中的一部分為使馬達驅動時之參數檢查處理。 In the control method according to claim 7, in the case where the driving of the plurality of motors is controlled, part of the preparation processing that is integrated in the control unit is a parameter inspection process when the motor is driven. 如請求項8所記載之控制方法,其中對複數個馬達的驅動進行控制時,在前述控制部中統合執行的準備處理中的一部分是:基於前述參數來決定使馬達驅動用的訊號的輸出模式的決定處理。 The control method according to claim 8, wherein when the driving of the plurality of motors is controlled, part of the preparation processing that is integrated by the control unit is to determine an output mode of the signal for driving the motor based on the parameter. The decision to deal with. 如請求項7至9項中任一項所記載之控制方法,其中使控制部對複數個馬達的驅動進行控制時,在統合執行與複數個馬達有關的全部的準備處理之後,對各個馬達執行輸出處理。 The control method according to any one of claims 7 to 9, wherein when the control unit controls the driving of the plurality of motors, the execution of all the preparation processes relating to the plurality of motors is performed, and then the respective motors are executed. Output processing. 如請求項7至9項中任一項所記載之控制方法,其中前述控制部對複數個馬達的驅動進行控制時,在統合執行與複數個馬達有關的準備處理之後,連續執行關於複數個馬達的輸出處理;在連續執行輸出處理時,禁止中途***其他的處理。 The control method according to any one of claims 7 to 9, wherein, when the control unit controls the driving of the plurality of motors, the plurality of motors are continuously executed after the preparatory processing relating to the plurality of motors is collectively performed. Output processing; when performing output processing continuously, it is prohibited to insert other processing in the middle. 如請求項7至9項中任一項所記載之控制方法,其中前述控制部對複數個馬達的驅動進行控制時,利用輸入執行準備處理的準備命令的時機,預先執行全部的準備處理,利用輸入執行輸出處理的輸出命令的時機,對各個馬達執行輸出處理。 The control method according to any one of the preceding claims, wherein, when the control unit controls the driving of the plurality of motors, the control unit inputs all the preparation processes in advance by using the timing of inputting the preparation command for the preparation process. The timing of executing the output command of the output processing is input, and output processing is performed for each motor. 一種控制程式,其特徵為執行控制可程式化控制器,該控制器被構成為能夠連接於複數個馬達,並具備有:控制部,其用以順序控制各馬達的驅動;輸出部,其用以輸出訊號;前述控制部為藉由CPU來進行;前述控制部之構成為:在執行使馬達驅動用之預先準備的準備處理之後,再執行輸出處理;該輸出處理為基於該預先準備,使前述輸出部將使馬達驅動用的訊號輸出;前述控制部在進行控制複數個馬達的驅動時,在將複數個馬達有關的準備處理之至少一部分的處理統合執行之後,再對每一個馬達依照預先決定的順序個別地執行剩餘的準備處理和輸出處理。 A control program characterized by executing a control programmable controller, the controller being configured to be connectable to a plurality of motors, and comprising: a control unit for sequentially controlling driving of each motor; and an output unit for using The control unit is configured by the CPU, and the control unit is configured to perform an output process after performing preparation processing for preparing the motor for advance preparation, and the output processing is based on the preparation in advance. The output unit outputs a signal for driving the motor. When the control unit controls the driving of the plurality of motors, the control unit integrates the processing of at least a part of the preparation processing related to the plurality of motors, and then pre-processes each of the motors. The remaining preparation processing and output processing are individually performed in the order of decision. 如請求項13所記載之控制程式,其中在對複數個馬達的驅動進行控制時,使前述控制部統合執行之準備處理的一部分為使馬達驅動時的參數檢查處理。 The control program according to claim 13, wherein when the driving of the plurality of motors is controlled, a part of the preparation process for collectively executing the control unit is a parameter check process for driving the motor. 如請求項14所記載之控制程式,其中在對複數個馬達的驅動進行控制時,使前述控制部統合執行之準備處理的一部分為:基於前述參數來決定使馬達驅動的控制資訊之訊號的輸出模式的決定處理。 The control program according to claim 14, wherein when the driving of the plurality of motors is controlled, a part of the preparation process for collectively executing the control unit is: determining the output of the signal for controlling the motor drive based on the parameter. The decision of the mode is handled. 如請求項13至15項中任一項所記載之控制程式,其中在使前述控制部進行對複數個馬達的驅動之控制時,在統合執行關於複數個馬達的全部的準備處理後,再執行各個馬達的輸出處理。 The control program according to any one of claims 13 to 15, wherein when the control unit controls the driving of the plurality of motors, the execution of all the preparation processes for the plurality of motors is performed in an integrated manner, and then executed. Output processing of each motor. 如請求項13至15項中任一項所記載之控制程式,其中在使前述控制部進行對複數個馬達的驅動之控制時,在統合執行關於複數個馬達的準備處理後,再連續執行關於複數個馬達的輸出處理,連續執行前述輸出處理時,禁止中途***其他的處理。 The control program according to any one of claims 13 to 15, wherein when the control unit controls the driving of the plurality of motors, the preparation process for the plurality of motors is collectively executed, and then the continuous execution is performed. When the output processing of a plurality of motors is performed continuously, when the above-described output processing is continuously performed, it is prohibited to insert another processing in the middle. 如請求項13至15項中任一項所記載之控制程式,其中在使前述控制部進行複數個馬達的驅動之控制時,利用輸入執行準備處理的準備命令用的時機,預先執行全部的準備處理;利用輸入執行輸出處理的輸出命令的時機,執行各個馬達的輸出處理。 The control program according to any one of claims 13 to 15, wherein when the control unit is configured to control the driving of the plurality of motors, all the preparations are performed in advance by the timing of inputting the preparation command for executing the preparation processing. Processing; output processing of each motor is performed by the timing of inputting an output command for performing output processing. 一種可程式化控制器,其特徵在於其被構成為能夠連接於複數個馬達,並將這些馬達進行順序控制之可程式化控制器,其中具備有:控制部,其用以控制各馬達的驅動;輸出部,其用以輸出訊號;前述控制部之構成為:在執行使馬達驅動用之預先準備的準備處理之後,再依照預先決定的順序個別地執行輸出處理;該輸出處理為基於該預先準備,使前述輸出部將使馬達驅動用的訊號輸出;前述控制部為在進行對複數個馬達的驅動的控制時,不在中途***輸出處理而統合執行:關於複數個馬達的準備處理的至少一部分的處理後,在尚有剩餘的準備處理的情況,執行各個馬達的剩餘準備處理及輸出處理;在無剩餘的準備處理的情況,連續執行各個馬達的輸出處理。 A programmable controller characterized in that it is configured as a programmable controller that can be connected to a plurality of motors and sequentially controls the motors, and has a control unit for controlling the driving of each motor. An output unit configured to output a signal; the control unit configured to perform output processing in advance in accordance with a predetermined sequence after performing preparation processing for preparing the motor for driving; the output processing is based on the advance It is prepared that the output unit outputs a signal for driving the motor, and the control unit inserts the output processing in the middle of the control of the driving of the plurality of motors, and performs the integration: at least a part of the preparation processing of the plurality of motors After the processing, the remaining preparation processing and the output processing of each motor are executed in the case where there is still remaining preparation processing, and the output processing of each motor is continuously executed in the case where there is no remaining preparation processing.
TW104102028A 2014-04-30 2015-01-22 Programmable controller, control method and control program TWI567514B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014093418A JP2015210751A (en) 2014-04-30 2014-04-30 Programmable controller, control method and control program

Publications (2)

Publication Number Publication Date
TW201541208A TW201541208A (en) 2015-11-01
TWI567514B true TWI567514B (en) 2017-01-21

Family

ID=54451811

Family Applications (1)

Application Number Title Priority Date Filing Date
TW104102028A TWI567514B (en) 2014-04-30 2015-01-22 Programmable controller, control method and control program

Country Status (3)

Country Link
JP (1) JP2015210751A (en)
CN (1) CN105045197B (en)
TW (1) TWI567514B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7130405B2 (en) * 2018-03-30 2022-09-05 パナソニック デバイスSunx株式会社 Programmable controller and programmable controller system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128007A1 (en) * 2001-12-20 2003-07-10 Yoshihiro Fujisaki Motor controlling serial communication device and motor driver
US20040122557A1 (en) * 2002-12-19 2004-06-24 National Instruments Corporation Parallel trajectory generation, interpolation, and control in a motion control application
US7194321B2 (en) * 2004-10-29 2007-03-20 Dynacity Technology (Hk) Limited Modular multi-axis motion control and driving system and method thereof
CN201689325U (en) * 2009-12-24 2010-12-29 广州市诺信数字测控设备有限公司 Enlargeable and reducible multi-axis motion control system
CN102339035A (en) * 2011-07-29 2012-02-01 上海先德机械工程有限公司 Control device and method of multiaxial numerical control milling machine
CN103552711A (en) * 2013-10-31 2014-02-05 中达光电工业(吴江)有限公司 Multi-axis control device, circle following method and packer

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2848075B2 (en) * 1992-01-10 1999-01-20 三菱電機株式会社 Sequence controller and its sequence control method
JPH0695727A (en) * 1992-09-11 1994-04-08 Fanuc Ltd Feed speed clamping system
JP3346847B2 (en) * 1993-08-31 2002-11-18 株式会社日立製作所 Slave station simultaneous activation method
JP3579220B2 (en) * 1997-07-28 2004-10-20 富士電機ホールディングス株式会社 Programming device, interrupt processing description method, programmable controller, and recording medium
JP3695078B2 (en) * 1997-08-26 2005-09-14 松下電工株式会社 Programmable controller with pulse output instructions
JP2001138136A (en) * 1999-11-10 2001-05-22 Toyoda Mach Works Ltd Thread cutting work control device
JP2004318762A (en) * 2003-04-21 2004-11-11 Fanuc Ltd Numerical control device
CN101169638A (en) * 2006-10-27 2008-04-30 发那科株式会社 Digital controller
JP4900607B2 (en) * 2007-12-12 2012-03-21 オムロン株式会社 Safety control system
WO2012090291A1 (en) * 2010-12-28 2012-07-05 株式会社日立製作所 Motion controller
JP4877423B1 (en) * 2011-03-15 2012-02-15 オムロン株式会社 PLC CPU unit, PLC system program, and recording medium storing PLC system program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030128007A1 (en) * 2001-12-20 2003-07-10 Yoshihiro Fujisaki Motor controlling serial communication device and motor driver
US20040122557A1 (en) * 2002-12-19 2004-06-24 National Instruments Corporation Parallel trajectory generation, interpolation, and control in a motion control application
US7194321B2 (en) * 2004-10-29 2007-03-20 Dynacity Technology (Hk) Limited Modular multi-axis motion control and driving system and method thereof
CN201689325U (en) * 2009-12-24 2010-12-29 广州市诺信数字测控设备有限公司 Enlargeable and reducible multi-axis motion control system
CN102339035A (en) * 2011-07-29 2012-02-01 上海先德机械工程有限公司 Control device and method of multiaxial numerical control milling machine
CN103552711A (en) * 2013-10-31 2014-02-05 中达光电工业(吴江)有限公司 Multi-axis control device, circle following method and packer

Also Published As

Publication number Publication date
CN105045197A (en) 2015-11-11
JP2015210751A (en) 2015-11-24
CN105045197B (en) 2018-08-28
TW201541208A (en) 2015-11-01

Similar Documents

Publication Publication Date Title
TWI493304B (en) Synchronization control device
JP2019150223A5 (en)
US8666522B2 (en) Controller for machine tool
US10338570B2 (en) Numerical controller
CN107850874B (en) Control device
JP5784263B1 (en) Simulation system, programmable controller, simulation device, engineering tool
EP3076293A2 (en) Control apparatus
US20140306643A1 (en) Motion controller and motor control system
TWI567514B (en) Programmable controller, control method and control program
US10710242B2 (en) Controller, control system, and control method
JP2013514497A (en) Monitoring concept in control equipment
CN110100210A (en) Control device and motor control system
JP2019180725A5 (en)
JP2019150221A5 (en)
JP2007245247A (en) Machine having program validation function
JP2017033345A (en) Synchronization control device having function to resolve shock of synchronous start blocks
JP2007172068A (en) Numerical control device
US9891613B2 (en) Numerical controller having function of superimposing superposition cycle synchronized with periodic operation cycle
JP6276234B2 (en) Numerical control device with program check function by override switch
JP2019150224A5 (en)
CN104570921B (en) The numerical control device temporarily ceased in routine call
CN106325221A (en) Numerical controller for notifying execution of auxiliary function in advance
JP5158368B2 (en) Pulse output device
US10073433B2 (en) Numerical controller operating based on tabular data
JP7130405B2 (en) Programmable controller and programmable controller system