WO2023195178A1 - モータ駆動装置およびサーボドライブシステム - Google Patents

モータ駆動装置およびサーボドライブシステム Download PDF

Info

Publication number
WO2023195178A1
WO2023195178A1 PCT/JP2022/017426 JP2022017426W WO2023195178A1 WO 2023195178 A1 WO2023195178 A1 WO 2023195178A1 JP 2022017426 W JP2022017426 W JP 2022017426W WO 2023195178 A1 WO2023195178 A1 WO 2023195178A1
Authority
WO
WIPO (PCT)
Prior art keywords
user program
control command
program processing
drive device
motor drive
Prior art date
Application number
PCT/JP2022/017426
Other languages
English (en)
French (fr)
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 JP2022561007A priority Critical patent/JP7229438B1/ja
Priority to PCT/JP2022/017426 priority patent/WO2023195178A1/ja
Publication of WO2023195178A1 publication Critical patent/WO2023195178A1/ja

Links

Images

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
    • H02P29/00Arrangements for regulating or controlling electric motors, appropriate for both AC and DC motors
    • H02P29/40Regulating or controlling the amount of current drawn or delivered by the motor for controlling the mechanical load

Definitions

  • the present disclosure relates to a motor drive device and a servo drive system that drive a motor.
  • Industrial motor drive devices receive control commands (position commands, speed commands, A servo control unit controls the servo motor so as to follow a torque command, etc.). Such control by the motor drive device is executed based on system software built into an execution memory section within the motor drive device.
  • the motor drive device described in Patent Document 1 includes a user function selection parameter that enables a user function created by a user in place of system software processing in function units of functions realized by system software. .
  • the motor drive device described in Patent Document 1 executes the user function in place of system software processing if the user function is valid based on a determination as to whether the user function is valid.
  • Patent Document 1 has a problem in that the program processing of the user program cannot be executed in synchronization with the control commands sent from the higher-level controller.
  • the present disclosure has been made in view of the above, and an object thereof is to obtain a motor drive device that can execute program processing of a user program in synchronization with control commands sent from a host controller. .
  • a motor drive device of the present disclosure provides a motor drive device that supplies power to a motor based on a control command sent from a network-connected host controller in a network communication cycle.
  • the apparatus includes a network frame receiving section that receives control commands, and a user program processing section that executes program processing of a user program created by a user.
  • the motor drive device of the present disclosure includes a servo control section that outputs a servo control command based on the control command, and a drive control section that supplies electric power to the motor based on the servo control command.
  • the user program processing unit executes program processing
  • the user program processing unit starts the user program according to a start signal generated each time a control command is received, so that the network frame reception unit receives the control command.
  • the control command is programmed by a user program, and the servo control unit outputs a servo control command based on the program-processed control command.
  • the motor drive device has the advantage that program processing of a user program can be executed in synchronization with control commands sent from a higher-level controller.
  • Timing chart showing processing timing of each process executed by the motor drive device according to the embodiment
  • Diagram for explaining a user program used by the motor drive device according to the embodiment A diagram for explaining the functional configuration of a user program processing unit and a servo control unit included in the motor drive device according to the embodiment.
  • FIG. 1 is a diagram showing the configuration of a servo drive system including a motor drive device according to an embodiment.
  • the servo drive system 1 includes a motor drive device 10 and a higher-level controller (motion controller) 20.
  • the host controller 20 is network-connected to the motor drive device 10 via a communication line, and is capable of network communication with the motor drive device 10. Further, the motor drive device 10 is connected to a motor 30 and a detector 40. Motor 30 is connected to load 50. Note that the host controller 20 may be network-connected to the motor drive device 10 by wireless communication without using a communication line.
  • the motor drive device 10 drives the motor 30 based on the control command C2 sent from the host controller 20.
  • the motor drive device 10 can incorporate a user program represented by a function or the like, and can drive the motor 30 based on the user program.
  • the motor drive device 10 of this embodiment starts the user program based on the activation signal M2 generated each time a control command C2 is received from the host controller 20, thereby maintaining the network communication cycle with the host controller 20.
  • Execute user program processing synchronized with MC-Ti Since the motor drive device 10 executes user program processing in synchronization with the network communication cycle MC-Ti, it is possible to execute user program processing at high speed.
  • the motor drive device 10 synchronizes the control command C2 sent from the host controller 20 with the program processing of the user program, thereby customizing the control command C2 sent from the host controller 20 by the user program.
  • the motor drive device 10 controls the motor 30 to follow control commands (position commands, speed commands, torque commands, etc.) C2 that are periodically input from the host controller 20 according to the network communication cycle MC-Ti.
  • the motor drive device 10 causes the user program to execute a process for user customizing the control command C2 from the host controller 20 in synchronization with the timing of receiving the control command C2 from the host controller 20. Thereby, the motor drive device 10 generates an output control command M5 corresponding to the control command C2 using the user program.
  • Program processing by a user program is a process with a cycle of several tens to hundreds of msec in the conventional technology, but in this embodiment, it is a high-speed process with a cycle of 1 msec or less, for example.
  • the user program is, for example, a program written in C language.
  • the motor drive device 10 includes a processor 91, a drive control section 16, and a memory 92.
  • the processor 91 includes a network frame receiving section 12 , a timer 15 , a user program processing section 13 , and a servo control section 14 .
  • the memory 92 includes a memory section 17 and an execution memory section 18.
  • the network frame receiving section 12 and the timer 15 are connected to the upper controller 20, and the servo control section 14 is connected to the drive control section 16 and the detector 40. Further, the drive control section 16 is connected to the motor 30.
  • the memory section 17 and the execution memory section 18 are connected to the processor 91.
  • the upper controller 20 transmits the control command C2 to the motor drive device 10 every network communication cycle MC-Ti.
  • the network frame receiving unit 12 receives the control command C2 at a timing synchronized with the network communication cycle MC-Ti (network frame reception execution cycle NT-Ti, which will be described later).
  • Control command C2 is a signal for controlling motor 30 by motor drive device 10.
  • the processor 91 executes processing at a speed that is a constant times the network communication cycle MC-Ti. For example, when the network communication cycle MC-Ti is 200 ⁇ sec, the processor 91 executes processing at a 100 ⁇ sec cycle, a 200 ⁇ sec cycle, or a 400 ⁇ sec cycle.
  • processing cycle of the network frame receiving section 12, the processing cycle of the user program processing section 13, and the processing cycle of the servo control section 14 may be different processing cycles, or may be the same processing cycle. Further, the processing cycle of the processor 91 may be faster than the network communication cycle MC-Ti.
  • the host controller 20 transmits the activation signal C1 to the motor drive device 10 every activation cycle MCN-Ti.
  • the timer 15 receives the activation signal C1 every activation period MCN-Ti.
  • the activation cycle MCN-Ti is, for example, a cycle that is a constant multiple of the network communication cycle MC-Ti.
  • the activation signal C1 is a signal for executing communication (transmission and reception of the control command C2) between the host controller 20 and the motor drive device 10 at a specific timing.
  • the host controller 20 and the motor drive device 10 transmit and receive control commands C2 at predetermined intervals based on the activation signal C1.
  • the timer 15 generates a starting signal M0 to be output to the network frame receiving section 12 and a starting signal M1 to be output to the servo control section 14 based on the starting signal C1. Specifically, the timer 15 generates a counter value every cycle Ti based on the activation signal C1 sent at the activation cycle MCN-Ti. That is, the timer 15 counts up the counter value every cycle Ti based on the activation cycle MCN-Ti, which is the reception cycle of the activation signal C1 transmitted from the host controller 20.
  • the period Ti is a constant multiple of the activation period MCN-Ti.
  • the timer 15 outputs the counter value generated every period Ti to the network frame receiving section 12 as the activation signal M0, and outputs the counter value generated every period Ti to the servo control section 14 as the activation signal M1. Thereby, the host controller 20 and the motor drive device 10 are synchronized based on the counter value (1, 2, 3, . . . ) generated by the timer 15 every period Ti.
  • the timer 15 synchronizes the counter value generated by the timer 15 every cycle Ti with the control command C2 at the timing of receiving the activation signal C1 in the activation cycle MCN-Ti.
  • the host controller 20 and the motor drive device 10 can be synchronized through network communication.
  • the host controller 20 and the motor drive device 10 can be synchronized through network communication, and any synchronization method may be used.
  • the timer 15 may output the activation signals M0 and M1 to the network frame receiving unit 12 every cycle Ti based on the network communication cycle MC-Ti. That is, the timer 15 may synchronize the counter value generated every cycle Ti with the control command C2 every network communication cycle MC-Ti.
  • the period Ti in this case may be the same period as the network communication period MC-Ti, or may be a constant multiple of the network communication period MC-Ti.
  • the network frame receiving unit 12 is activated every network frame reception execution period NT-Ti in synchronization with the counter value (activation signal M0) output from the timer 15 every period Ti.
  • the network frame reception execution cycle NT-Ti is, for example, a constant multiple of the cycle Ti.
  • the network frame receiving unit 12 receives a control command C2 including a sequential command such as a sequential position command, a sequential speed command, or a sequential torque command transmitted from the host controller 20 every network frame reception execution period NT-Ti.
  • sequential position command, sequential speed command, and sequential torque command are commands transmitted from the host controller 20 to the motor drive device 10.
  • the sequential position command, sequential speed command, and sequential torque command are updated every network communication cycle MC-Ti.
  • the sequential position command is a command that instructs to which position the motor 30 is to be moved every network communication cycle MC-Ti.
  • the difference between the previous received value and the current received value of the sequential position command is a speed command that instructs at what speed the motor 30 is to be driven.
  • the sequential speed command is a command that instructs at what speed the motor 30 should be operated at each network communication cycle MC-Ti.
  • the sequential torque command is a command that instructs the motor 30 at which torque to operate at each network communication cycle MC-Ti.
  • the network frame receiving unit 12 generates an activation signal M2 every user program processing cycle ADD-Ti, which is a user program processing execution interval time set by the user, and transmits the activation signal M2 to the user program processing unit 13. . Thereby, the network frame receiving unit 12 causes the user program processing unit 13 to operate at the user program processing cycle ADD-Ti.
  • the user program processing cycle ADD-Ti is, for example, a constant multiple of the network communication cycle MC-Ti.
  • the activation signal M2 is not limited to the case where the network frame receiving unit 12 generates the activation signal M0 based on the activation signal M0.
  • the processor 91 may generate the activation signal M2 corresponding to the reception timing of the control command C2 using any method.
  • the timer 15 may generate the activation signal M2 corresponding to the reception timing of the control command C2, or the activation signal M2 corresponding to the reception timing of the control command C2 may be generated at a location other than the timer 15. .
  • the activation signal M2 may be any signal as long as it is synchronized with data reception from the host controller 20, and the generation source is not limited.
  • the network frame receiving unit 12 transmits a control command corresponding to the received control command C2 to the user program processing unit 13 and the servo control unit 14. Specifically, the network frame receiving section 12 transmits a control command M3 corresponding to the control command C2 to the servo control section 14, and transmits an input control command M4 corresponding to the control command C2 to the user program processing section 13.
  • the control command M3 and the input control command M4 are commands obtained by converting the control command C2 for internal use in the motor drive device 10.
  • the input control command M4 is a control command input to the user program processing section 13, and the control command M3 is a control command input to the servo control section 14.
  • the content of the command included in the control command M3 and the content of the command included in the input control command M4 are the same.
  • the control command M3 is a control command when a user program is not used, and the input control command M4 is a control command when a user program is used.
  • the user program processing section 13 executes the program processing of the user program in synchronization with the activation signal M2 transmitted from the network frame receiving section 12 every user program processing cycle ADD-Ti.
  • the user program processing unit 13 customizes the input control command M4 (control command C2) by executing processing using a user program on the input control command M4 received from the network frame receiving unit 12.
  • the user program processing unit 13 customizes the input control command M4 by converting the input control command M4 into a command specified by the user, for example.
  • the user program processing unit 13 outputs the customized input control command M4 to the servo control unit 14 as an output control command M5.
  • the detector 40 detects the position of the motor 30 (rotational position, moving position, etc.), the speed of the motor 30 (rotating speed, moving speed, etc.), the torque of the motor 30, etc., and outputs an operation detection value D1 which is the detected value. It is sent to the servo control section 14.
  • the motor drive device 10 and the detector 40 exchange data based on the operating cycle of the motor drive device 10. That is, the motor drive device 10 and the detector 40 exchange data based on the operation of the timer 15 that defines the operation cycle of the motor drive device 10. Specifically, the motor drive device 10 and the detector 40 exchange data in synchronization with the cycle in which the motor drive device 10 controls the motor 30.
  • the servo control unit 14 receives a period Ti from the timer 15, and sends request data to the detector 40 for requesting an operation detection value D1 at a timing synchronized with the period Ti (servo control period SV-Ti to be described later). Send. Then, the detector 40 transmits a feedback value that is the motion detection value D1 requested by the request data received from the servo control unit 14.
  • the servo control unit 14 receives the feedback value, which is the motion detection value D1, transmitted from the detector 40. In this way, the motor drive device 10 and the detector 40 exchange data in synchronization with the cycle in which the motor drive device 10 controls the motor 30.
  • the feedback values that the servo control unit 14 receives from the detector 40 include a position feedback value, a speed feedback value, a torque feedback value, etc. of the motor 30.
  • the servo control unit 14 is activated every servo control period SV-Ti in synchronization with the counter value (activation signal M1) output from the timer 15 every period Ti.
  • the servo control period SV-Ti is a period that is a constant times the period Ti.
  • the servo control period SV-Ti is the shortest period among the operation periods used by the motor drive device 10. In other words, the servo control unit 14 executes processing at the highest speed among the motor drive devices 10.
  • the servo control unit 14 includes at least one of a position control unit that controls the position of the motor 30, a speed control unit that controls the speed of the motor 30, and a current control unit that controls the current (torque) to the motor 30. ing.
  • the servo control unit 14 controls the motor 30 based on the control command M3 corresponding to the control command C2 sent from the host controller 20 and the operation detection value D1 from the detector 40. Performs feedback control.
  • the control command M3 is a command obtained by converting the control command C2 for the motor drive device 10.
  • the servo control unit 14 controls the motor 30 based on the output control command M5 corresponding to the control command C2 sent from the host controller 20 and the detected operation value D1 from the detector 40. Performs feedback control. In this way, when the input control command M4 is customized by the user program processing unit 13, the servo control unit 14 performs feedback control of the motor 30 using the customized output control command M5.
  • the servo control unit 14 includes a position control unit, a speed control unit, or a current control unit, and acquires the motion detection value D1 such as the position feedback value, speed feedback value, torque feedback value, etc. of the motor 30. .
  • the servo control unit 14 takes in a control command M3 or an output control command M5 corresponding to a control command C2 such as a position command, speed command, or torque command input from the host controller 20 every servo control period SV-Ti. Then, the servo control unit 14 performs feedback control on the motor 30 to follow the control command M3 or the output control command M5 based on the motion detection value D1.
  • the servo control unit 14 sends a servo control command including a position command, speed command, or current command to the drive control unit 16.
  • the drive control unit 16 supplies electric power to the motor 30 based on the servo control command.
  • Motor 30 drives load 50.
  • the servo control unit 14 receives information from the detector 40 including the detected operation value D1, a control command C2 received from the host controller 20, a control command M3 inside the motor drive device 10, an input control command M4, and an output control command M5. It may also be provided with a monitor function for monitoring etc. In this case, the servo control unit 14 may have an alarm output function that outputs an alarm when an abnormality inside the motor drive device 10 is detected based on the monitored information.
  • the motor drive device 10 can be realized by a processor 91 and a memory 92. Each function of the motor drive device 10 is realized by using a computer system such as a personal computer or a general-purpose computer or FA (Factory Automation) equipment.
  • a computer system such as a personal computer or a general-purpose computer or FA (Factory Automation) equipment.
  • the motor drive device 10 includes a processor 91 that executes various processes, and a memory 92 that is a built-in memory.
  • An example of the processor 91 is a CPU (Central Processing Unit) or a system LSI (Large Scale Integration).
  • the processor 91 may be a central processing unit, a processing unit, an arithmetic unit, a microprocessor, a microcomputer, or a DSP (Digital Signal Processor).
  • the memory 92 is a nonvolatile or volatile semiconductor memory.
  • the memory 92 is, for example, RAM (Random Access Memory), ROM (Read Only Memory), flash memory, EPROM (Erasable Programmable Read Only Memory), or EEPROM (registered trademark) (Electrically Erasable Programmable Read Only Memory). emory).
  • RAM Random Access Memory
  • ROM Read Only Memory
  • flash memory EPROM (Erasable Programmable Read Only Memory), or EEPROM (registered trademark) (Electrically Erasable Programmable Read Only Memory).
  • EEPROM Electrically Erasable Programmable Read Only Memory
  • the execution memory section 18 of the memory 92 is used as a temporary memory when the processor 91 executes various processes.
  • Each function of the motor drive device 10 is realized by the processor 91, software, firmware, or a combination of software and firmware.
  • Software or firmware is written as a program and stored in an external storage device (not shown).
  • Processor 91 reads software or firmware stored in an external storage device into memory 92 and executes it. That is, the motor drive device 10 is operated by the processor 91 reading and executing a computer-executable motor drive program and a user program for executing the operations of the motor drive device 10 stored in the memory 92. Realized.
  • the motor drive program and user program for executing the operations of the motor drive device 10 can also be said to cause a computer or FA equipment to execute the procedures or methods of the motor drive device 10.
  • the motor drive program executed by the motor drive device 10 has a module configuration including a network frame receiving section 12, a timer 15, a user program processing section 13, and a servo control section 14, which are stored in the main memory. These are then created on main memory.
  • the motor drive program and the user program may be provided as a computer program product by being stored in a computer-readable storage medium as a file in an installable or executable format. Further, the motor drive program and the user program may be provided to the motor drive device 10 via a network such as the Internet. Note that some of the functions of the motor drive device 10 may be realized by dedicated hardware such as a dedicated circuit, and some may be realized by software or firmware.
  • the drive control section 16 is realized by, for example, a dedicated circuit.
  • the output of the activation signals M0, M1, and M2 may be realized by calling a function by software, or outputting a pulse signal by a dedicated circuit. It may be realized by Note that the activation signals M0, M1, and M2 may be transmitted by any method.
  • the activation signal M0 is a signal that calls a function of a process executed by the network frame receiving unit 12
  • the activation signal M1 is a signal that calls a function of a process executed by the servo control unit 14.
  • the activation signal M2 is a signal that calls a function of a process executed by the user program processing section 13.
  • FIG. 2 is a diagram for explaining a process in which the motor drive device according to the embodiment transmits a start signal by calling a function.
  • the timer 15 calls the network frame receiving section 12 by calling the function of the activation signal M0.
  • the network frame receiving unit 12 executes the process.
  • the network frame receiving unit 12 calls the user program processing unit 13 by calling the function of the activation signal M2.
  • the user program processing section 13 executes the user program.
  • the timer 15 calls the servo control unit 14 by calling the function of the activation signal M1.
  • the servo control unit 14 executes the process.
  • FIG. 3 is a timing chart showing the processing timing of each process executed by the motor drive device according to the embodiment.
  • the network frame reception process shown in FIG. 3 corresponds to the reception process of the control command C2 by the network frame reception unit 12 of FIG.
  • the user program processing shown in FIG. 3 corresponds to the user program execution processing by the user program processing section 13 of FIG.
  • the system software processing shown in FIG. 3 corresponds to servo control processing by the servo control section 14.
  • the network frame reception unit 12 executes network frame reception processing (control command C2 reception processing) every network frame reception execution cycle NT-Ti. After this, the user program processing unit 13 executes user program processing.
  • FIG. 3 shows a case where the time required for user program processing is processing time T1.
  • the user program processing unit 13 executes user program processing every user program processing cycle ADD-Ti.
  • the servo control unit 14 executes servo control processing.
  • the user program processing unit 13 performs network frame reception processing so that the Nth system software processing corresponding to the Nth (N is a natural number) network frame reception processing does not conflict with the (N+1)th network frame reception processing. , user program processing, and system software processing.
  • the user program processing unit 13 executes user program processing every user program processing cycle ADD-Ti, it determines that an abnormal state exists if the user program processing cannot be executed every user program processing cycle ADD-Ti. In this case, the user program processing unit 13 stops the user program processing and outputs an alarm indicating a system abnormality. As a result, after the user program processing unit 13 detects an abnormality in the processing time of user program processing, it disables the user program processing and prevents the user program from running in the next periodic processing when the user program is executed. Make it.
  • the first monitoring method is a method of monitoring the entire servo drive system 1 based on the user program processing cycle ADD-Ti.
  • the second monitoring method is a method of monitoring only user program processing based on the internal time of the motor drive device 10.
  • the user program processing unit 13 starts the user program processing by the user program processing unit 13 at time t1, and at time t2 when the user program processing cycle ADD-Ti has elapsed from time t1.
  • the user program processing by the user program processing unit 13 is started.
  • Time t2 is the time when the first activation signal of the activation signals M2 is received
  • time t1 is the time when the second activation signal of the activation signals M2 is received.
  • the second activation signal is the activation signal immediately before the first activation signal.
  • the user program processing unit 13 determines whether the user program processing started at time t1 is completed at time t2. That is, when the user program processing unit 13 receives the activation signal M2, it determines whether the user program processing corresponding to the previous activation signal M2 has been completed. Specifically, the user program processing section 13 can determine that there is an abnormality if the previous user program processing has not been completed at the timing when the user program processing section 13 receives the activation signal M2.
  • the user program processing unit 13 When the user program processing unit 13 detects that the user program processing started at time t1 is not completed at time t2, it stops the user program processing as an abnormal state, outputs an alarm indicating system abnormality, and stops the motor 30. Stop the drive. Note that when the user program processing unit 13 stops the user program processing as an abnormal state, the user program processing unit 13 may stop the start of the program processing of the user program started based on the first start signal, or may stop the start of the program processing of the user program started based on the first start signal. Program processing of the user program started based on the start signal may be stopped. That is, when the user program processing unit 13 stops the user program processing as an abnormal state, it stops the execution of the program processing started based on the first start signal. Furthermore, when stopping the user program processing as an abnormal state, the user program processing unit 13 stops execution of the program processing of the user program started based on each of the first start signal and the second start signal. You can also do this.
  • the user program processing unit 13 performs internal monitoring at the start (startup) and completion of user program processing when the user program processing unit 13 executes one user program process. Get the timer value.
  • the user program processing unit 13 calculates the processing time of one user program based on the difference between the internal timer value at the start and the internal timer value at the time of completion, and calculates the processing time of one user program to the set time. If the above occurs, it is determined that the condition is abnormal. That is, the user program processing unit 13 determines that there is an abnormality when the user program processing started based on the start signal M2 does not end within the set time. If the user program processing unit 13 determines that there is an abnormal state, it stops the user program processing, outputs an alarm indicating system abnormality, and stops driving the motor 30.
  • FIG. 4 is a diagram for explaining a user program used by the motor drive device according to the embodiment.
  • FIG. 4 shows an example of the internal configuration of the execution memory unit 18 that stores the user program M11. Note that, in FIG. 4, only the processor 91, the memory section 17, and the execution memory section 18 are illustrated as components included in the motor drive device 10.
  • the user program processing unit 13 included in the processor 91 executes the user program M11 corresponding to the user program binary file BF created by the user.
  • the user program binary file BF is stored in the memory unit 17 of the motor drive device 10.
  • the user program binary file BF is stored in the memory unit 17 by, for example, being written into the motor drive device 10 by the engineering tool 60.
  • the user program binary file BF may be stored in the memory unit 17 via the network, or may be stored in the memory unit 17 via the upper controller 20. That is, the method of storing the user program binary file BF is arbitrary.
  • the processor 91 reads the user program binary file BF written in the memory unit 17 when the motor drive device 10 is started, and writes the user program area A1 to Ax of the execution memory unit 18 in which the system software of the motor drive device 10 is stored. (x is a natural number) is developed as a user program M11. As a result, the correspondence between the address and data of the user program M11 is stored in the execution memory unit 18. The data stored in the execution memory unit 18 in association with addresses are the system software area and the user program areas A1 to Ax.
  • the processor 91 stores the user program area address M12, which is the address of the user program areas A1 to Ax. This allows the processor 91 to call and execute programs in the user program areas A1 to Ax corresponding to the stored user program area address M12 while the motor drive device 10 is running the system.
  • FIG. 5 is a diagram for explaining the functional configuration of a user program processing section and a servo control section included in the motor drive device according to the embodiment.
  • the user program processing unit 13 receives user programs P1 to Py (y is a natural number), and has a user program API (Application Programming Interface) 51 and an add-on API 52.
  • the user program API 51 is an interface for connecting to the internal processing of the motor drive device 10 on the user programs P1 to Py.
  • User programs P1 to Py are programs included in the aforementioned user program M11.
  • the user creates a user program binary file BF using a program creation device (not shown). At this time, the user uses the user program API 51 to create the user program binary file BF.
  • the user uses the user program API 51 to set the user program processing cycle ADD-Ti based on the network communication cycle MC-Ti for each of the user programs P1 to Py, and creates the user program binary file BF for the user programs P1 to Py. do.
  • the user program API 51 is an interface that enables registration of the user programs P1 to Py, prohibition and permission of processing interrupts, and acquisition and overwriting of the control command C2 transmitted from the host controller 20.
  • the user program API 51 enables user-specific digital IO (Input/Output) control, objects for exchanging data with the host controller 20, new creation of parameters, alarms, monitors, etc. set during servo control.
  • user-specific digital IO Input/Output
  • the user can independently create data such as the above-mentioned digital IO control, objects, parameters, alarms, monitors, etc. in the user programs P1 to Py, so the control command C2 etc. can be customized. It becomes possible.
  • User programs P1 to Py containing data such as digital IO control, objects, parameters, alarms, monitors, etc. are sent to the add-on API 52 via the user program API 51 of the user program processing unit 13, and are used for servo control via the add-on API 52. It is sent to Department 14.
  • the add-on API 52 is an interface that sends customized command values set in the user programs P1 to Py to the servo control unit 14. The customized command value is applied to data such as digital IO control, object, parameter, alarm, monitor, etc., thereby customizing data such as digital IO control, object, parameter, alarm, monitor, etc.
  • the add-on API 52 performs digital IO control based on the customized command value (output control command M5), and controls the servo control unit 14 using objects, parameters, alarms, monitors, etc. Data obtained by executing processing related to control of the motor 30 and set values are received from the servo control unit 14, and if the command value is not customized, digital IO control is performed based on the command value (control command M3). , objects, parameters, alarms, monitors, etc., for receiving data and set values from the servo control unit 14 obtained by executing processes related to the control of the motor 30 by the servo control unit 14. Function. Further, the add-on API 52 sends the data and setting values received from the servo control unit 14 to the user program API 51.
  • the user program API 51 receives data and setting values from the add-on API 52 to perform processing in the servo control unit 14 related to the control of the motor 30 using digital IO control, objects, parameters, alarms, monitors, etc. It becomes possible to create the user program binary file BF by checking the data obtained by executing and the values set in the servo control unit 14.
  • the processor 91 By reading the user programs P1 to Py when the motor drive device 10 is started, the processor 91 enables the system software to call the user programs P1 to Py at the user program processing cycle ADD-Ti.
  • the servo control unit 14 has a motor control function for controlling the motor 30 and an encoder function for performing feedback control using the motion detection value D1 from the detector 40.
  • the servo control unit 14 also has a network function for performing communication with the host controller 20 via the network frame receiving unit 12, an alarm output function for outputting an alarm, a control command M3, an input control command M4, and an output control command. It is equipped with a monitor function to monitor M5, etc.
  • the servo control unit 14 executes processing related to the control of the motor 30 using these functions and digital IO control, objects, parameters, alarms, monitors, etc. set in the user programs P1 to Py. do.
  • the servo control unit 14 sends data and set values obtained by executing processing related to control of the motor 30 using digital IO control, objects, parameters, alarms, monitors, etc. to the add-on API 52. send.
  • the servo control unit 14 can control values indicating the on/off state of devices that perform digital IO control, parameter settings, object values that are data acquired by the servo control unit 14 (for example, control commands, motion detection values, etc.). , etc.), a value indicating whether an alarm has occurred, and a value monitored by the monitor function (for example, a control command, information from a detector, etc.) is sent to the add-on API 52.
  • the user program processing unit 13 converts the sequential position commands transmitted from the host controller 20 into position commands via the electronic cam, and outputs the position commands to the servo control unit 14.
  • the input control command M4 corresponds to the sequential position command transmitted from the host controller 20
  • the output control command M5 corresponds to the position command via the electronic cam.
  • An electronic cam is a cam that replaces the mechanical synchronous control mechanism using an actual cam with software.
  • the user program processing unit 13 calculates the amount of movement via the cam when the cam is controlled by sequential position commands. This allows the user program processing section 13 to perform control similar to that of an actual cam.
  • FIG. 6 is a diagram for explaining the configuration of an electronic cam used by the motor drive device according to the embodiment.
  • the electronic cam 70 includes an input shaft 71, an output shaft 72, and a plate cam 73 having an oval shape, for example.
  • the sequential position command transmitted from the host controller 20 is a command to rotate the input shaft 71.
  • the user program processing unit 13 receives a sequential position command (input control command M4) for rotating the input shaft 71, it determines the operation of the output shaft 72 when the plate cam 73 executes the operation corresponding to this sequential position command. calculate.
  • the user program processing unit 13 calculates the operation of the output shaft 72 using the user program M11.
  • the sequential position command to rotate the input shaft 71 is a command to rotate the input shaft 71 clockwise by equal angles (30 degrees in FIG. 6)
  • plate cam 73 rotates clockwise by equal angles.
  • the output shaft 72 that is in contact with the outer peripheral portion of the plate cam 73 moves to a position corresponding to the shape and rotational movement of the plate cam 73.
  • the output shaft 72 here starts from the outer circumferential position R1 of the plate cam 73, and as the plate cam 73 rotates, the outer circumferential position R2, outer circumferential position R3, outer circumferential position R4, . . . , outer circumferential position R12 of the plate cam 73. In this order, they come into contact with the outer periphery of the plate cam 73. Thereby, the output shaft 72 reciprocates in the vertical direction.
  • FIG. 7 is a diagram for explaining an output position command calculated by the user program processing section of the motor drive device according to the embodiment.
  • FIG. 7 shows an example of a timing chart of an input position command to the user program processing unit 13 and an output position command calculated by the user program processing unit 13.
  • the network frame receiving unit 12 receives the input position command shown in FIG. 7 as the control command C2 from the host controller 20 every network frame reception execution cycle NT-Ti.
  • the input position command shown in FIG. 7 is a sequential position command in which the command positions are accumulated up to the target position.
  • the network frame receiving unit 12 executes the user program process at the same cycle that is synchronized with the timing of successively receiving position commands from the host controller 20.
  • the network frame receiving unit 12 sets the network communication cycle MC-Ti to be Z times the user program processing cycle ADD-Ti. The user program processing is executed so that the period and are the same period.
  • the network frame receiving unit 12 When the network frame receiving unit 12 receives the control command C2 from the host controller 20, it starts the user program processing unit 13 using the starting signal M2. Further, the network frame receiving section 12 sends an input control command M4 corresponding to the input position command shown in FIG. 7 to the user program processing section 13.
  • a cam pattern conversion process created by the user is implemented in the user program M11.
  • the user program processing unit 13 uses the output position command shown in FIG. 7 to operate the output shaft 72 based on the input position command (input control command M4) to the input shaft 71 shown in FIG. (output control command M5) is generated.
  • the cycle from the outer circumferential position R1 to the outer circumferential position R12 is one cycle of the output shaft 72.
  • the user program processing unit 13 outputs the generated output position command to the servo control unit 14 as an output control command M5. Thereby, the servo control unit 14 controls the motor 30 based on the received output control command M5.
  • the motor drive device 10 can process the control command C2 from the host controller 20 at high speed without changing the processing of the system software. Further, since the user program M11 used by the motor drive device 10 allows the user to describe the operation, the user can flexibly change the operation of the servo drive system 1.
  • the motor drive device 10 generates a start signal M2 corresponding to the reception timing of the control command C2, and executes user program processing based on the start signal M2. Therefore, the host controller 20 does not need to generate a signal dedicated to synchronization to synchronize the control command C2 and the user program M11.
  • the motor drive device 10 executes user program processing in synchronization with the network communication cycle MC-Ti with the host controller 20, it is possible to process control commands C2 from the host controller 20, such as sequential position commands, at high speed. becomes possible. As a result, the motor drive device 10 can quickly customize the position control command, speed control command, and torque control command sent from the host controller 20, and can also control the position, speed, and torque with high precision. becomes possible.
  • the user program processing unit 13 executes the user program according to the activation signal M2 generated every time the control command C2 is received. M11 is running. Thereby, the user program processing unit 13 causes the user program M11 to process the input control command M4 corresponding to the control command C2 in synchronization with the timing of receiving the control command C2 in the network frame reception execution cycle NT-Ti. There is.
  • the servo control unit 14 outputs a servo control command based on the output control command M5 that has been programmed.
  • the motor drive device 10 can execute the program processing of the user program M11 in synchronization with the control command C2 sent from the host controller 20. Therefore, the motor drive device 10 can control the motor 30 by customizing the control command C2 sent from the host controller 20 at high speed.
  • the configuration shown in the above embodiments is an example, and it is possible to combine it with another known technology, and a part of the configuration can be omitted or changed without departing from the gist. It is possible.
  • 1 Servo drive system 10 Motor drive device, 12 Network frame reception unit, 13 User program processing unit, 14 Servo control unit, 15 Timer, 16 Drive control unit, 17 Memory unit, 18 Execution memory unit, 20 Upper controller, 30 Motor , 40 Detector, 50 Load, 51 User program API, 52 Add-on API, 60 Engineering tool, 70 Electronic cam, 71 Input axis, 72 Output axis, 73 Plate cam, 91 Processor, 92 Memory, A1 to Ax user program area, ADD-Ti User program processing cycle, BF User program binary file, C1, M0, M1, M2 Start signal, C2, M3 Control command, M4 Input control command, M5 Output control command, M11 User program, M12 User program area address, MC-Ti network communication cycle, MCN-Ti startup cycle, NT-Ti network frame reception execution cycle, SV-Ti servo control cycle, P1 to Py user program, R1 to R12 outer circumferential position, T1 processing time, Ti cycle.

Landscapes

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

Abstract

上位コントローラ(20)からネットワーク通信周期で送られてくる制御指令(C2)に基づいてモータ(30)に電力を供給するモータ駆動装置(10)が、制御指令を受信するネットワークフレーム受信部(12)と、ユーザが作成したユーザプログラムのプログラム処理を実行するユーザプログラム処理部(13)と、制御指令に基づくサーボ制御指令を出力するサーボ制御部(14)と、サーボ制御指令に基づく電力をモータに供給する駆動制御部(16)と、を備え、ユーザプログラム処理部がプログラム処理を実行する場合には、ユーザプログラム処理部は、制御指令の受信毎に生成される起動信号(M2)に従ってユーザプログラムを起動することで、制御指令をネットワークフレーム受信部が受信するタイミングと同期して、制御指令をユーザプログラムにプログラム処理させ、サーボ制御部は、プログラム処理された制御指令に基づくサーボ制御指令を出力する。

Description

モータ駆動装置およびサーボドライブシステム
 本開示は、モータを駆動するモータ駆動装置およびサーボドライブシステムに関する。
 産業用のモータ駆動装置は、サーボモータのフィードバック値(位置フィードバック値、速度フィードバック値、トルクフィードバック値等の動作検出値)に基づいて、上位コントローラから入力される制御指令(位置指令、速度指令、トルク指令等)に追従するように、サーボ制御部がサーボモータを制御している。このような、モータ駆動装置による制御は、モータ駆動装置内の実行メモリ部に組み込まれたシステムソフトウェアに基づいて実行される。
 このモータ駆動装置において、例えば、上位コントローラから送られてくる逐次位置指令を、ユーザ独自の電子カムのような位置指令に変換して出力したい場合、サーボ制御部が出力する位置指令を変更する必要がある。このため、ユーザ独自の処理を入れることでサーボ制御部が出力するサーボ制御指令を変更したい場合、通常のシステムソフトウェアでは実現ができない。モータ駆動装置にユーザ独自の処理を実行させたい場合、ユーザは、その都度モータ駆動装置の製造メーカに対してシステムソフトウェアの変更を依頼しなければならない。また、制約が厳しい産業用のモータ駆動装置においては、システムソフトウェアの機能の一部に変更が生じた場合、ユーザが独自に変更できない。
 そこで、このようなシステムソフトウェアの一部をユーザが独自に変更することができるカスタマイズ方法が提案されている。特許文献1に記載のモータ駆動装置は、システムソフトウェアで実現されている機能の関数単位で、システムソフトウェアの処理に代えて、ユーザが作成したユーザ関数を有効とするユーザ関数選択パラメータを備えている。そして、特許文献1に記載のモータ駆動装置は、ユーザ関数が有効か否かの判別に基づいて、ユーザ関数が有効であれば、システムソフトウェアの処理に代えてユーザ関数を実行している。
特開2005-234639号公報
 しかしながら、上記特許文献1の技術では、ユーザプログラムのプログラム処理を、上位コントローラから送られてくる制御指令に同期させて実行することができないという問題があった。
 本開示は、上記に鑑みてなされたものであって、ユーザプログラムのプログラム処理を、上位コントローラから送られてくる制御指令に同期させて実行することができるモータ駆動装置を得ることを目的とする。
 上述した課題を解決し、目的を達成するために、本開示のモータ駆動装置は、ネットワーク接続された上位コントローラからネットワーク通信周期で送られてくる制御指令に基づいてモータに電力を供給するモータ駆動装置であって、制御指令を受信するネットワークフレーム受信部と、ユーザによって作成されたユーザプログラムのプログラム処理を実行するユーザプログラム処理部とを備える。また、本開示のモータ駆動装置は、制御指令に基づくサーボ制御指令を出力するサーボ制御部と、サーボ制御指令に基づく電力をモータに供給する駆動制御部とを備える。ユーザプログラム処理部がプログラム処理を実行する場合には、ユーザプログラム処理部は、制御指令の受信毎に生成される起動信号に従ってユーザプログラムを起動することで、制御指令をネットワークフレーム受信部が受信するタイミングと同期して、制御指令をユーザプログラムにプログラム処理させ、サーボ制御部は、プログラム処理された制御指令に基づくサーボ制御指令を出力する。
 本開示にかかるモータ駆動装置は、ユーザプログラムのプログラム処理を、上位コントローラから送られてくる制御指令に同期させて実行することができるという効果を奏する。
実施の形態にかかるモータ駆動装置を備えたサーボドライブシステムの構成を示す図 実施の形態にかかるモータ駆動装置が、関数呼び出しによって起動信号を伝達する処理を説明するための図 実施の形態にかかるモータ駆動装置が実行する各処理の処理タイミングを示すタイミングチャート 実施の形態にかかるモータ駆動装置が用いるユーザプログラムを説明するための図 実施の形態にかかるモータ駆動装置が備えるユーザプログラム処理部およびサーボ制御部の機能構成を説明するための図 実施の形態にかかるモータ駆動装置が用いる電子カムの構成を説明するための図 実施の形態にかかるモータ駆動装置のユーザプログラム処理部が算出する出力位置指令を説明するための図
 以下に、本開示の実施の形態にかかるモータ駆動装置およびサーボドライブシステムを図面に基づいて詳細に説明する。
実施の形態.
 図1は、実施の形態にかかるモータ駆動装置を備えたサーボドライブシステムの構成を示す図である。サーボドライブシステム1は、モータ駆動装置10と、上位コントローラ(モーションコントローラ)20とを備えている。
 上位コントローラ20は、通信線によってモータ駆動装置10にネットワーク接続されており、モータ駆動装置10との間でネットワーク通信が可能である。また、モータ駆動装置10は、モータ30および検出器40に接続されている。モータ30は、負荷50に接続されている。なお、上位コントローラ20は、通信線を用いずに、無線通信によってモータ駆動装置10にネットワーク接続されていてもよい。
 モータ駆動装置10は、上位コントローラ20から送られてくる制御指令C2に基づいてモータ30を駆動する。モータ駆動装置10は、関数などで示されるユーザプログラムを組み込むことが可能となっており、ユーザプログラムに基づいてモータ30を駆動することができる。本実施の形態のモータ駆動装置10は、上位コントローラ20からの制御指令C2の受信毎に生成される起動信号M2に基づいてユーザプログラムを起動することで、上位コントローラ20との間のネットワーク通信周期MC-Tiに同期したユーザプログラム処理を実行する。モータ駆動装置10は、ネットワーク通信周期MC-Tiに同期したユーザプログラム処理を実行するので、高速にユーザプログラム処理を実行することが可能となる。
 モータ駆動装置10は、上位コントローラ20から送られてくる制御指令C2と、ユーザプログラムのプログラム処理とを同期させることで、上位コントローラ20から送られてくる制御指令C2をユーザプログラムによってユーザカスタマイズする。
 モータ駆動装置10は、上位コントローラ20から、ネットワーク通信周期MC-Tiに従って周期的に入力される制御指令(位置指令、速度指令、トルク指令など)C2に追従するように、モータ30を制御する。
 モータ駆動装置10は、上位コントローラ20から制御指令C2を受信するタイミングと同期して、上位コントローラ20からの制御指令C2をユーザカスタマイズする処理をユーザプログラムに実行させる。これにより、モータ駆動装置10は、ユーザプログラムによって制御指令C2に対応する出力制御指令M5を生成する。ユーザプログラムによるプログラム処理は、従来技術では数十msec~数百msec周期の処理であるが、本実施の形態では、例えば、1msec周期以下の高速な処理である。ユーザプログラムは、例えば、C言語で作成されたプログラムである。
 モータ駆動装置10は、プロセッサ91と、駆動制御部16と、メモリ92とを有している。プロセッサ91は、ネットワークフレーム受信部12と、タイマ15と、ユーザプログラム処理部13と、サーボ制御部14とを有している。メモリ92は、メモリ部17と、実行メモリ部18とを有している。
 ネットワークフレーム受信部12およびタイマ15は、上位コントローラ20に接続されており、サーボ制御部14は、駆動制御部16および検出器40に接続されている。また、駆動制御部16は、モータ30に接続されている。メモリ部17および実行メモリ部18は、プロセッサ91に接続されている。
 上位コントローラ20は、ネットワーク通信周期MC-Ti毎に制御指令C2をモータ駆動装置10に送信する。これにより、ネットワークフレーム受信部12は、ネットワーク通信周期MC-Tiに同期したタイミング(後述するネットワークフレーム受信実行周期NT-Ti)で制御指令C2を受信する。制御指令C2は、モータ駆動装置10によりモータ30を制御するための信号である。モータ駆動装置10では、プロセッサ91がネットワーク通信周期MC-Tiの定数倍の速度で処理を実行する。例えば、ネットワーク通信周期MC-Tiが200μsecである場合、プロセッサ91は、100μsec周期、200μsec周期、または400μsec周期で処理を実行する。なお、ネットワークフレーム受信部12の処理周期、ユーザプログラム処理部13の処理周期、およびサーボ制御部14の処理周期は、それぞれ異なる処理周期であってもよいし、同じ処理周期であってもよい。また、プロセッサ91の処理周期がネットワーク通信周期MC-Tiよりも早い周期であってもよい。
 また、上位コントローラ20は、起動周期MCN-Ti毎に起動信号C1をモータ駆動装置10に送信する。これにより、タイマ15は、起動周期MCN-Ti毎に起動信号C1を受信する。起動周期MCN-Tiは、例えば、ネットワーク通信周期MC-Tiの定数倍の周期である。起動信号C1は、上位コントローラ20とモータ駆動装置10との間の通信(制御指令C2の送受信)を特定のタイミングで実行するための信号である。
 サーボドライブシステム1では、上位コントローラ20とモータ駆動装置10とが、起動信号C1に基づいて、制御指令C2を予め決められた周期で送受信する。
 タイマ15は、起動信号C1に基づいて、ネットワークフレーム受信部12に出力する起動信号M0と、サーボ制御部14に出力する起動信号M1とを生成する。具体的には、タイマ15は、起動周期MCN-Tiで送られてくる起動信号C1に基づいて、周期Ti毎にカウンタ値を生成する。すなわち、タイマ15は、上位コントローラ20から送信される起動信号C1の受信周期である起動周期MCN-Tiに基づいて、周期Ti毎にカウンタ値をカウントアップする。周期Tiは、起動周期MCN-Tiの定数倍である。
 タイマ15は、周期Ti毎に生成したカウンタ値を起動信号M0としてネットワークフレーム受信部12に出力し、周期Ti毎に生成したカウンタ値を起動信号M1としてサーボ制御部14に出力する。これにより、上位コントローラ20とモータ駆動装置10とは、タイマ15が周期Ti毎に生成するカウンタ値(1,2,3,・・・)に基づいて同期する。
 このように、タイマ15は、起動周期MCN-Tiで起動信号C1を受信するタイミングで、タイマ15が周期Ti毎に生成するカウンタ値を制御指令C2に同期させる。これにより、上位コントローラ20とモータ駆動装置10とがネットワーク通信にて同期可能となる。サーボドライブシステム1では、上位コントローラ20とモータ駆動装置10とがネットワーク通信にて同期可能であればよく、同期する方法は任意である。
 なお、タイマ15は、ネットワーク通信周期MC-Tiに基づいて、周期Ti毎に起動信号M0,M1をネットワークフレーム受信部12に出力してもよい。すなわち、タイマ15は、周期Ti毎に生成するカウンタ値を、ネットワーク通信周期MC-Ti毎に制御指令C2に同期させてもよい。この場合の周期Tiは、ネットワーク通信周期MC-Tiと同じ周期であってもよいし、ネットワーク通信周期MC-Tiの定数倍であってもよい。
 ネットワークフレーム受信部12は、タイマ15から周期Ti毎に出力されるカウンタ値(起動信号M0)に同期して、ネットワークフレーム受信実行周期NT-Ti毎に起動する。ネットワークフレーム受信実行周期NT-Tiは、例えば、周期Tiの定数倍である。
 ネットワークフレーム受信部12は、上位コントローラ20から送信される逐次位置指令、逐次速度指令、または逐次トルク指令等の逐次指令を含む制御指令C2をネットワークフレーム受信実行周期NT-Ti毎に受信する。
 ここで、逐次位置指令、逐次速度指令、および逐次トルク指令は、上位コントローラ20からモータ駆動装置10に伝達される指令である。逐次位置指令、逐次速度指令、および逐次トルク指令は、ネットワーク通信周期MC-Ti毎に更新される。
 逐次位置指令は、ネットワーク通信周期MC-Ti毎にモータ30をどの位置に移動させるかを指示する指令である。逐次位置指令の1つ前の受信値と今回の受信値との差分は、モータ30をどの速度で駆動させるかを指示する速度指令である。
 逐次速度指令は、ネットワーク通信周期MC-Ti毎にモータ30をどの速度で動作させるかを指示する指令である。逐次トルク指令は、ネットワーク通信周期MC-Ti毎にモータ30にどのトルクで動作させるかを指示する指令である。
 ネットワークフレーム受信部12は、ユーザによって設定された、ユーザプログラムの処理実行間隔時間であるユーザプログラム処理周期ADD-Ti毎に起動信号M2を生成し、ユーザプログラム処理部13に起動信号M2を送信する。これにより、ネットワークフレーム受信部12は、ユーザプログラム処理部13をユーザプログラム処理周期ADD-Tiの周期で動作させる。ユーザプログラム処理周期ADD-Tiは、例えば、ネットワーク通信周期MC-Tiの定数倍である。
 なお、起動信号M2は、ネットワークフレーム受信部12が起動信号M0に基づいて生成する場合に限らない。プロセッサ91は、何れの方法によって、制御指令C2の受信タイミングに対応する起動信号M2を生成してもよい。例えば、タイマ15が、制御指令C2の受信タイミングに対応する起動信号M2を生成してもよいし、タイマ15以外の箇所で制御指令C2の受信タイミングに対応する起動信号M2が生成されてもよい。このように、起動信号M2は、上位コントローラ20からのデータ受信と同期している信号であれば何れの信号であってもよく、生成元は限定されない。
 ネットワークフレーム受信部12は、受信した制御指令C2に対応する制御指令をユーザプログラム処理部13およびサーボ制御部14に送信する。具体的には、ネットワークフレーム受信部12は、制御指令C2に対応する制御指令M3をサーボ制御部14に送信し、制御指令C2に対応する入力制御指令M4をユーザプログラム処理部13に送信する。
 制御指令M3および入力制御指令M4は、制御指令C2がモータ駆動装置10の内部用に変換された指令である。入力制御指令M4は、ユーザプログラム処理部13へ入力される制御指令であり、制御指令M3は、サーボ制御部14に入力される制御指令である。制御指令M3に含まれる指令の内容と入力制御指令M4に含まれる指令の内容とは同じである。制御指令M3は、ユーザプログラムが用いられない場合の制御指令であり、入力制御指令M4は、ユーザプログラムが用いられる場合の制御指令である。
 ユーザプログラム処理部13は、ネットワークフレーム受信部12からユーザプログラム処理周期ADD-Ti毎に送信される起動信号M2に同期してユーザプログラムのプログラム処理を実行する。ユーザプログラム処理部13は、ネットワークフレーム受信部12から受け取った入力制御指令M4に対して、ユーザプログラムを用いた処理を実行することで、入力制御指令M4(制御指令C2)をカスタマイズする。
 ユーザプログラム処理部13は、例えば、入力制御指令M4を、ユーザによって指定された指令に変換することで入力制御指令M4をカスタマイズする。ユーザプログラム処理部13は、カスタマイズした後の入力制御指令M4を、出力制御指令M5としてサーボ制御部14に出力する。
 検出器40は、モータ30の位置(回転位置、移動位置など)、モータ30の速度(回転速度、移動速度など)、モータ30のトルクなどを検出し、検出した値である動作検出値D1をサーボ制御部14に送る。
 モータ駆動装置10と検出器40とは、モータ駆動装置10の動作周期を基準としてデータの交換を行う。すなわち、モータ駆動装置10と検出器40とは、モータ駆動装置10の動作周期を規定するタイマ15の動作に基づいて、データの交換を行う。具体的には、モータ駆動装置10と検出器40とは、モータ駆動装置10がモータ30の制御を行う周期に同期してデータの交換を行う。例えば、サーボ制御部14は、タイマ15から周期Tiを受信し、周期Tiに同期したタイミング(後述するサーボ制御周期SV-Ti)で動作検出値D1を要求するためのリクエストデータを検出器40へ送信する。そして、検出器40は、サーボ制御部14から受信したリクエストデータにより要求されている動作検出値D1であるフィードバック値を送信する。サーボ制御部14は、検出器40から送信された動作検出値D1であるフィードバック値を受信する。このように、モータ駆動装置10と検出器40とは、モータ駆動装置10がモータ30の制御を行う周期に同期してデータの交換を行う。
 サーボ制御部14が検出器40から受信するフィードバック値は、モータ30の位置フィードバック値、速度フィードバック値、トルクフィードバック値等である。
 サーボ制御部14は、タイマ15から周期Ti毎に出力されるカウンタ値(起動信号M1)に同期してサーボ制御周期SV-Ti毎に起動する。サーボ制御周期SV-Tiは、周期Tiの定数倍の周期である。サーボ制御周期SV-Tiは、モータ駆動装置10が用いる動作周期の中で最も短い周期である。換言すると、サーボ制御部14は、モータ駆動装置10の中で最も高速に処理を実行する。
 サーボ制御部14は、モータ30の位置を制御する位置制御部、モータ30の速度を制御する速度制御部、およびモータ30への電流(トルク)を制御する電流制御部の少なくとも1つを有している。
 サーボ制御部14は、ユーザプログラムを用いない場合は、上位コントローラ20から送られてくる制御指令C2に対応する制御指令M3と、検出器40からの動作検出値D1とに基づいて、モータ30のフィードバック制御を行う。制御指令M3は、制御指令C2がモータ駆動装置10用に変換された指令である。
 サーボ制御部14は、ユーザプログラムを用いる場合は、上位コントローラ20から送られてくる制御指令C2に対応する出力制御指令M5と、検出器40からの動作検出値D1とに基づいて、モータ30のフィードバック制御を行う。このように、ユーザプログラム処理部13によって入力制御指令M4がカスタマイズされる場合は、サーボ制御部14は、カスタマイズされた出力制御指令M5を用いてモータ30をフィードバック制御する。
 上述したように、サーボ制御部14は、位置制御部、速度制御部、または電流制御部を備えるとともに、モータ30の位置フィードバック値、速度フィードバック値、トルクフィードバック値等の動作検出値D1を取得する。サーボ制御部14は、上位コントローラ20から入力される位置指令、速度指令、トルク指令等の制御指令C2に対応する制御指令M3または出力制御指令M5をサーボ制御周期SV-Ti毎に取り込む。そして、サーボ制御部14は、動作検出値D1に基づいて、制御指令M3または出力制御指令M5に追従するように、モータ30をフィードバック制御する。
 サーボ制御部14は、位置指令、速度指令、または電流指令を含むサーボ制御指令を駆動制御部16に送る。駆動制御部16は、サーボ制御指令に基づいて電力をモータ30に供給する。モータ30は、負荷50を駆動する。
 なお、サーボ制御部14は、動作検出値D1を含む検出器40の情報、上位コントローラ20から受信する制御指令C2、モータ駆動装置10の内部の制御指令M3、入力制御指令M4、出力制御指令M5などをモニタするためのモニタ機能を備えていてもよい。この場合、サーボ制御部14は、モニタしている情報に基づいて、モータ駆動装置10の内部での異常を検知した場合、アラームを出力するアラーム出力機能を備えていてもよい。
 ここで、モータ駆動装置10のハードウェア構成について説明する。モータ駆動装置10は、プロセッサ91およびメモリ92により実現することができる。モータ駆動装置10の各機能は、パーソナルコンピュータまたは汎用コンピュータといったコンピュータシステムまたはFA(Factory Automation)機器を用いることによって実現される。
 モータ駆動装置10は、各種処理を実行するプロセッサ91と、内蔵メモリであるメモリ92とを有する。プロセッサ91の例は、CPU(Central Processing Unit)またはシステムLSI(Large Scale Integration)である。プロセッサ91は、中央処理装置、処理装置、演算装置、マイクロプロセッサ、マイクロコンピュータ、またはDSP(Digital Signal Processor)であってもよい。
 メモリ92は、不揮発性もしくは揮発性の半導体メモリである。メモリ92は、例えば、RAM(Random Access Memory)、ROM(Read Only Memory)、フラッシュメモリ、EPROM(Erasable Programmable Read Only Memory)またはEEPROM(登録商標)(Electrically Erasable Programmable Read Only Memory)である。メモリ92の実行メモリ部18は、プロセッサ91が各種処理を実行する際の一時メモリに使用される。
 モータ駆動装置10の各機能は、プロセッサ91と、ソフトウェア、ファームウェア、またはソフトウェアとファームウェアとの組み合わせによって実現される。ソフトウェアまたはファームウェアは、プログラムとして記述され、外部記憶装置(図示せず)に格納される。プロセッサ91は、外部記憶装置に記憶されているソフトウェアまたはファームウェアをメモリ92に読み出して実行する。すなわち、モータ駆動装置10は、プロセッサ91が、メモリ92で記憶されているモータ駆動装置10の動作を実行するための、コンピュータで実行可能な、モータ駆動プログラムおよびユーザプログラムを読み出して実行することにより実現される。モータ駆動装置10の動作を実行するためのモータ駆動プログラムおよびユーザプログラムは、モータ駆動装置10の手順または方法をコンピュータまたはFA機器に実行させるものであるともいえる。
 モータ駆動装置10で実行されるモータ駆動プログラムは、ネットワークフレーム受信部12と、タイマ15と、ユーザプログラム処理部13と、サーボ制御部14とを含むモジュール構成となっており、これらが主記憶装置上にロードされ、これらが主記憶装置上に生成される。
 モータ駆動プログラムおよびユーザプログラムは、インストール可能な形式または実行可能な形式のファイルで、コンピュータが読み取り可能な記憶媒体に記憶されてコンピュータプログラムプロダクトとして提供されてもよい。また、モータ駆動プログラムおよびユーザプログラムは、インターネットなどのネットワーク経由でモータ駆動装置10に提供されてもよい。なお、モータ駆動装置10の機能について、一部を専用回路などの専用のハードウェアで実現し、一部をソフトウェアまたはファームウェアで実現するようにしてもよい。駆動制御部16は、例えば、専用回路で実現される。
 ここで、モータ駆動装置10内の起動信号M0,M1,M2の伝達について説明する。例えば、起動信号M0,M1,M2が、電気信号によって伝達される場合、起動信号M0,M1,M2の出力は、ソフトウェアによる関数呼び出しなどで実現されてもよいし、専用回路によるパルス信号の出力によって実現されてもよい。なお、起動信号M0,M1,M2の伝達は、何れの方法によって伝達されてもよい。
 例えば、起動信号M0は、ネットワークフレーム受信部12で実行される処理の関数を呼び出す信号であり、起動信号M1は、サーボ制御部14で実行される処理の関数を呼び出す信号である。起動信号M2は、ユーザプログラム処理部13で実行される処理の関数を呼び出す信号である。
 図2は、実施の形態にかかるモータ駆動装置が、関数呼び出しによって起動信号を伝達する処理を説明するための図である。まず、タイマ15が、起動信号M0の関数呼び出しによってネットワークフレーム受信部12を呼び出す。これにより、ネットワークフレーム受信部12が処理を実行する。
 この後、ネットワークフレーム受信部12が、起動信号M2の関数呼び出しによってユーザプログラム処理部13を呼び出す。これにより、ユーザプログラム処理部13がユーザプログラムを実行する。
 そして、タイマ15が、起動信号M1の関数呼び出しによってサーボ制御部14を呼び出す。これにより、サーボ制御部14が処理を実行する。
 図3は、実施の形態にかかるモータ駆動装置が実行する各処理の処理タイミングを示すタイミングチャートである。図3に示すネットワークフレーム受信処理は、図1のネットワークフレーム受信部12による制御指令C2の受信処理に対応している。図3に示すユーザプログラム処理は、図1のユーザプログラム処理部13によるユーザプログラムの実行処理に対応している。図3に示すシステムソフトウェア処理は、サーボ制御部14によるサーボ制御処理に対応している。
 ネットワークフレーム受信部12は、ネットワークフレーム受信実行周期NT-Ti毎にネットワークフレーム受信処理(制御指令C2の受信処理)を実行する。この後、ユーザプログラム処理部13は、ユーザプログラム処理を実行する。図3では、ユーザプログラム処理に要する時間が、処理時間T1である場合を示している。ユーザプログラム処理部13は、ユーザプログラム処理周期ADD-Ti毎にユーザプログラム処理を実行する。ユーザプログラム処理が実行された後、サーボ制御部14は、サーボ制御処理を実行する。
 ユーザプログラム処理部13は、N(Nは自然数)番目のネットワークフレーム受信処理に対応するN番目のシステムソフトウェア処理と、(N+1)番目のネットワークフレーム受信処理とがぶつからないように、ネットワークフレーム受信処理、ユーザプログラム処理、およびシステムソフトウェア処理を実行する。
 ユーザプログラム処理部13は、ユーザプログラム処理周期ADD-Ti毎にユーザプログラム処理を実行する際に、ユーザプログラム処理周期ADD-Ti毎にユーザプログラム処理を実行できない場合に、異常状態と判断する。この場合、ユーザプログラム処理部13は、ユーザプログラム処理を停止させるとともに、システム異常を示すアラームを出力する。これにより、ユーザプログラム処理部13は、ユーザプログラム処理の処理時間異常を検知した後は、ユーザプログラム処理を無効に設定し、次回のユーザプログラムが実行される周期処理にてユーザプログラムが動作しないようにする。
 ユーザプログラム処理部13によるユーザプログラムの異常状態の監視方法として、例えば、以下の方法がある。第1の監視方法は、ユーザプログラム処理周期ADD-Tiを基準としたサーボドライブシステム1全体の監視方法である。第2の監視方法は、モータ駆動装置10の内部タイムを基準にしたユーザプログラム処理だけの監視方法である。
 例えば、第1の監視方法では、ユーザプログラム処理部13は、時刻t1にてユーザプログラム処理部13によるユーザプログラム処理を起動し、時刻t1からユーザプログラム処理周期ADD-Tiが経過した時刻t2にてユーザプログラム処理部13によるユーザプログラム処理を起動する。時刻t2は、起動信号M2のうちの第1の起動信号を受信した時刻であり、時刻t1は、起動信号M2のうちの第2の起動信号を受信した時刻である。第2の起動信号は、第1の起動信号の1つ前の起動信号である。
 ユーザプログラム処理部13は、時刻t1で起動したユーザプログラム処理が時刻t2において完了しているか否かを判定する。すなわち、ユーザプログラム処理部13は、起動信号M2を受信した際に、1つ前の起動信号M2に対応するユーザプログラム処理が完了しているか否かを判定する。具体的には、ユーザプログラム処理部13は、起動信号M2をユーザプログラム処理部13が受信したタイミングで、1つ前のユーザプログラム処理が完了していない場合に、異常と判定することができる。
 ユーザプログラム処理部13は、時刻t1で起動したユーザプログラム処理が時刻t2において完了していないことを検知すると、異常状態としてユーザプログラム処理を停止させ、システム異常を示すアラームを出力し、モータ30の駆動を停止させる。なお、ユーザプログラム処理部13は、異常状態としてユーザプログラム処理を停止させる際、第1の起動信号に基づいて起動されたユーザプログラムのプログラム処理の起動を停止することとしてもよいし、第1の起動信号に基づいて起動されたユーザプログラムのプログラム処理を停止することとしてもよい。つまり、ユーザプログラム処理部13は、異常状態としてユーザプログラム処理を停止させる際、第1の起動信号に基づいて起動されたプログラム処理の実行を停止させる。また、ユーザプログラム処理部13は、異常状態としてユーザプログラム処理を停止させる際、第1の起動信号および第2の起動信号のそれぞれに基づいて起動されたユーザプログラムのプロクラム処理の実行を停止させるようにしてもよい。
 また、第2の監視方法では、ユーザプログラム処理部13は、ユーザプログラム処理部13が1回分のユーザプログラム処理を実行する際の、ユーザプログラム処理の開始時(起動時)と完了時とに内部タイマ値を取得する。ユーザプログラム処理部13は、開始時の内部タイマ値と完了時の内部タイマ値との差分に基づいて、1回分のユーザプログラムの処理時間を算出し、1回分のユーザプログラムの処理時間が設定時間以上となった場合に、異常状態と判定する。すなわち、ユーザプログラム処理部13は、設定時間内に起動信号M2に基づいて起動されたユーザプログラム処理が終了しなかった場合に、異常と判定する。ユーザプログラム処理部13は、異常状態と判定した場合、ユーザプログラム処理を停止させ、システム異常を示すアラームを出力し、モータ30の駆動を停止させる。
 図4は、実施の形態にかかるモータ駆動装置が用いるユーザプログラムを説明するための図である。図4では、ユーザプログラムM11を格納する実行メモリ部18の内部構成例を示している。なお、図4では、モータ駆動装置10が備える構成要素として、プロセッサ91、メモリ部17、および実行メモリ部18のみを図示している。
 プロセッサ91に含まれるユーザプログラム処理部13は、ユーザにて作成されたユーザプログラムバイナリファイルBFに対応するユーザプログラムM11を実行する。
 ユーザプログラムバイナリファイルBFは、モータ駆動装置10のメモリ部17に格納される。ユーザプログラムバイナリファイルBFは、例えば、エンジニアリングツール60が、モータ駆動装置10に書き込むことで、メモリ部17に格納される。
 なお、ユーザプログラムバイナリファイルBFは、ネットワーク経由でメモリ部17に格納されてもよいし、上位コントローラ20経由でメモリ部17に格納されてもよい。すなわち、ユーザプログラムバイナリファイルBFの格納方法は、任意である。
 プロセッサ91は、メモリ部17に書き込まれたユーザプログラムバイナリファイルBFを、モータ駆動装置10の起動時に読み込み、モータ駆動装置10のシステムソフトウェアが格納されている実行メモリ部18のユーザプログラム領域A1~Ax(xは自然数)へ、ユーザプログラムM11として展開する。これにより、実行メモリ部18へは、ユーザプログラムM11のアドレスとデータとの対応関係が格納される。実行メモリ部18においてアドレスに対応付けされて格納されるデータは、システムソフトウェア領域およびユーザプログラム領域A1~Axである。
 プロセッサ91は、モータ駆動装置10の起動時に、ユーザプログラム領域A1~Axのアドレスであるユーザプログラム領域アドレスM12を記憶しておく。これにより、プロセッサ91は、モータ駆動装置10のシステム実行中に、記憶しておいたユーザプログラム領域アドレスM12に対応するユーザプログラム領域A1~Ax内のプログラムを呼び出して実行することが可能となる。
 図5は、実施の形態にかかるモータ駆動装置が備えるユーザプログラム処理部およびサーボ制御部の機能構成を説明するための図である。ユーザプログラム処理部13は、ユーザプログラムP1~Py(yは自然数)を受け付けるとともに、ユーザプログラムAPI(Application Programming Interface、アプリケーションプログラミングインターフェース)51と、アドオンAPI52とを有している。ユーザプログラムAPI51は、ユーザプログラムP1~Py上でモータ駆動装置10の内部処理と接続するためのインターフェースである。ユーザプログラムP1~Pyは、前述のユーザプログラムM11に含まれるプログラムである。
 ユーザは、図示しないプログラム作成装置を用いてユーザプログラムバイナリファイルBFを作成する。この時、ユーザは、ユーザプログラムAPI51を用いて、ユーザプログラムバイナリファイルBFを作成しておく。
 ユーザは、ユーザプログラムAPI51を用いてユーザプログラムP1~Py毎にネットワーク通信周期MC-Tiを基準にしたユーザプログラム処理周期ADD-Tiを設定してユーザプログラムP1~PyのユーザプログラムバイナリファイルBFを作成する。
 ユーザプログラムAPI51は、ユーザプログラムP1~Pyの登録、処理割り込み禁止、許可、上位コントローラ20から送信される制御指令C2の取得、上書きなどを可能とするインターフェースである。
 ユーザプログラムAPI51は、ユーザ独自のデジタルIO(Input Output)制御、上位コントローラ20とデータ交換するためのオブジェクト、サーボ制御の際に設定されるパラメータ、アラーム、モニタ等の新規作成を可能とする。
 ユーザは、ユーザプログラムAPI51を用いて、上述したデジタルIO制御、オブジェクト、パラメータ、アラーム、モニタ等のデータを、ユーザプログラムP1~Pyにて独自に作成することができるので、制御指令C2等をカスタマイズ可能となる。
 デジタルIO制御、オブジェクト、パラメータ、アラーム、モニタ等のデータを含んだユーザプログラムP1~Pyは、ユーザプログラム処理部13のユーザプログラムAPI51を介してアドオンAPI52に送られ、アドオンAPI52を介して、サーボ制御部14に送られる。アドオンAPI52は、ユーザプログラムP1~Pyで設定された、カスタマイズされた指令値をサーボ制御部14に送るインターフェースである。カスタマイズされた指令値は、デジタルIO制御、オブジェクト、パラメータ、アラーム、モニタ等のデータに適用されることで、デジタルIO制御、オブジェクト、パラメータ、アラーム、モニタ等のデータがカスタマイズされる。また、アドオンAPI52は、指令値がカスタマイズされている場合、カスタマイズされた指令値(出力制御指令M5)に基づくデジタルIO制御、オブジェクト、パラメータ、アラーム、およびモニタ等、を用いたサーボ制御部14によるモータ30の制御に関連する処理を実行して得られたデータおよび設定された値をサーボ制御部14から受け取り、指令値がカスタマイズされていない場合、指令値(制御指令M3)に基づくデジタルIO制御、オブジェクト、パラメータ、アラーム、およびモニタ等、を用いたサーボ制御部14によるモータ30の制御に関連する処理を実行して得られたデータおよび設定された値をサーボ制御部14から受け取るインターフェースとしても機能する。さらに、アドオンAPI52は、サーボ制御部14から受け取ったデータおよび設定値をユーザプログラムAPI51に送る。
 ユーザプログラムAPI51は、アドオンAPI52からデータおよび設定値を受け取ることで、デジタルIO制御、オブジェクト、パラメータ、アラーム、およびモニタ等と、を用いた、モータ30の制御に関連するサーボ制御部14での処理を実行して得られたデータおよびサーボ制御部14に設定された値を確認してユーザプログラムバイナリファイルBFを作成することが可能となる。
 プロセッサ91は、モータ駆動装置10の起動時にユーザプログラムP1~Pyを読むことで、システムソフトウェアが、ユーザプログラムP1~Pyをユーザプログラム処理周期ADD-Ti周期で呼び出し可能となる。
 サーボ制御部14は、モータ30を制御するモータ制御機能、検出器40からの動作検出値D1を用いたフィードバック制御を実行するエンコーダ機能を備えている。また、サーボ制御部14は、ネットワークフレーム受信部12を介した上位コントローラ20との間の通信を実行するネットワーク機能、アラームを出力するアラーム出力機能、制御指令M3、入力制御指令M4、出力制御指令M5などをモニタするモニタ機能などを備えている。サーボ制御部14は、これらの機能と、ユーザプログラムP1~Pyで設定された、デジタルIO制御、オブジェクト、パラメータ、アラーム、およびモニタ等と、を用いて、モータ30の制御に関連する処理を実行する。サーボ制御部14は、デジタルIO制御、オブジェクト、パラメータ、アラーム、およびモニタ等と、を用いた、モータ30の制御に関連する処理を実行して得られたデータおよび設定された値をアドオンAPI52へ送る。つまり、サーボ制御部14は、デジタルIO制御を行うデバイスのオン/オフ状態を示す値、パラメータの設定値、サーボ制御部14が取得するデータであるオブジェクトの値(例えば、制御指令、動作検出値、等)、アラーム発生有無の値、モニタ機能によりモニタされている値(例えば、制御指令、検出器からの情報、等)をアドオンAPI52に送る。
 ここで、ユーザプログラム処理部13が実行するユーザプログラムM11の動作例について説明する。ここでは、ユーザプログラム処理部13が、ユーザプログラムM11を実行することによって、上位コントローラ20から送信される逐次位置指令を、電子カムを介した位置指令に変換して、サーボ制御部14へ出力する場合について説明する。すなわち、ここでは、入力制御指令M4が上位コントローラ20から送信される逐次位置指令に対応し、出力制御指令M5が電子カムを介した位置指令に対応している。
 電子カムは、実際にカムを使用して機械的に同期制御を行う仕組みをソフトウェアに置き換えたカムである。ユーザプログラム処理部13は、電子カムを用いる場合、逐次位置指令によってカムを制御した場合のカムを介した移動量を算出する。これにより、ユーザプログラム処理部13は、実際のカムと同様の制御を行うことが可能となる。
 なお、本実施の形態では、ユーザプログラム処理部13が、ユーザプログラムM11によってカム動作を実行する場合を例にして説明をするが、ユーザプログラム処理部13は、ユーザプログラムM11によって何れの処理を実行してもよい。
 図6は、実施の形態にかかるモータ駆動装置が用いる電子カムの構成を説明するための図である。電子カム70は、入力軸71と、出力軸72と、例えば楕円形の板カム73とを備えている。
 上位コントローラ20から送信される逐次位置指令は、入力軸71を回転させる指令である。ユーザプログラム処理部13は、入力軸71を回転させる逐次位置指令(入力制御指令M4)を受け付けると、板カム73が、この逐次位置指令に対応する動作を実行した場合の出力軸72の動作を算出する。ユーザプログラム処理部13は、ユーザプログラムM11によって、出力軸72の動作を算出する。
 入力軸71を回転させる逐次位置指令が、時計回りに等角度(図6では30度)ずつ入力軸71を回転させる指令であった場合、板カム73は、時計回りに等角度ずつ回転する。これにより、板カム73の外周部と接触している出力軸72は、板カム73の形状および回転動作に対応する位置に移動する。ここでの出力軸72は、板カム73の外周位置R1を始点とし、板カム73の回転に従って、板カム73の外周位置R2、外周位置R3、外周位置R4、・・・、外周位置R12の順番で、板カム73の外周と接触する。これにより、出力軸72は、上下方向に往復運動する。
 つぎに、ユーザプログラム処理部13が算出する出力位置指令について説明する。図7は、実施の形態にかかるモータ駆動装置のユーザプログラム処理部が算出する出力位置指令を説明するための図である。図7では、ユーザプログラム処理部13への入力位置指令およびユーザプログラム処理部13が算出する出力位置指令のタイミングチャートの一例を示している。
 ネットワークフレーム受信部12は、上位コントローラ20から、制御指令C2として、図7に示す入力位置指令を、ネットワークフレーム受信実行周期NT-Ti毎に受信する。図7に示す入力位置指令は、目標位置まで指令位置が累積される逐次位置指令である。
 ここで、例えば、ユーザプログラム処理周期ADD-Tiが、ネットワーク通信周期MC-Tiと同じ周期に設定されている場合のネットワークフレーム受信部12の処理について説明する。この場合、ネットワークフレーム受信部12は、上位コントローラ20から逐次位置指令を受信するタイミングと同期した同じ周期でユーザプログラム処理を実行する。なお、ネットワーク通信周期MC-Tiが、ユーザプログラム処理周期ADD-TiのZ倍である場合、ネットワークフレーム受信部12は、ネットワーク通信周期MC-Tiと、ユーザプログラム処理周期ADD-TiのZ倍の周期と、が同じ周期となるようにユーザプログラム処理を実行する。
 ネットワークフレーム受信部12は、上位コントローラ20から制御指令C2を受信すると、起動信号M2によってユーザプログラム処理部13を起動する。また、ネットワークフレーム受信部12は、ユーザプログラム処理部13に図7に示した入力位置指令に対応する入力制御指令M4を送る。
 ユーザプログラムM11内には、ユーザが作成したカムパターン変換処理が実装されている。ユーザプログラム処理部13は、カムパターン変換処理の際には、図6の入力軸71への入力位置指令(入力制御指令M4)から出力軸72の動作を行うように、図7の出力位置指令(出力制御指令M5)を生成する。図7の出力位置指令のうち、外周位置R1~外周位置R12までのサイクルが、出力軸72の1サイクルである。
 ユーザプログラム処理部13は、生成した出力位置指令を、出力制御指令M5としてサーボ制御部14に出力する。これにより、サーボ制御部14は、受信した出力制御指令M5に基づいて、モータ30を制御する。
 このように、モータ駆動装置10は、システムソフトウェアの処理を変更することなく、上位コントローラ20からの制御指令C2を高速に処理することが可能となる。また、モータ駆動装置10が用いるユーザプログラムM11は、動作をユーザが記述できるので、ユーザは、柔軟にサーボドライブシステム1の動作を変更できる。
 また、モータ駆動装置10は、制御指令C2の受信タイミングに対応する起動信号M2を生成し、起動信号M2に基づいてユーザプログラム処理を実行している。このため、上位コントローラ20は、制御指令C2と、ユーザプログラムM11とを同期させるための、同期専用の信号を生成する必要がない。
 また、モータ駆動装置10は、上位コントローラ20との間のネットワーク通信周期MC-Tiに同期したユーザプログラム処理を実行するので、逐次位置指令といった上位コントローラ20からの制御指令C2を高速に処理することが可能となる。これにより、モータ駆動装置10は、上位コントローラ20から送信される位置制御指令、速度制御指令、およびトルク制御指令のカスタマイズを高速で実行できるとともに位置、速度、およびトルクの制御を高精度で実行することが可能となる。
 このように実施の形態では、モータ駆動装置10が、ユーザプログラムM11のプログラム処理を実行する場合には、ユーザプログラム処理部13が、制御指令C2の受信毎に生成される起動信号M2に従ってユーザプログラムM11を起動している。これにより、ユーザプログラム処理部13は、ネットワークフレーム受信実行周期NT-Tiで制御指令C2を受信するタイミングと同期して、制御指令C2に対応する入力制御指令M4をユーザプログラムM11にプログラム処理させている。そして、サーボ制御部14は、プログラム処理された出力制御指令M5に基づいてサーボ制御指令を出力している。
 これにより、モータ駆動装置10は、ユーザプログラムM11のプログラム処理を、上位コントローラ20から送られてくる制御指令C2に同期させて実行することが可能となる。したがって、モータ駆動装置10は、上位コントローラ20から送られてくる制御指令C2を、高速でカスタマイズしてモータ30を制御することが可能となる。
 以上の実施の形態に示した構成は、一例を示すものであり、別の公知の技術と組み合わせることも可能であるし、要旨を逸脱しない範囲で、構成の一部を省略、変更することも可能である。
 1 サーボドライブシステム、10 モータ駆動装置、12 ネットワークフレーム受信部、13 ユーザプログラム処理部、14 サーボ制御部、15 タイマ、16 駆動制御部、17 メモリ部、18 実行メモリ部、20 上位コントローラ、30 モータ、40 検出器、50 負荷、51 ユーザプログラムAPI、52 アドオンAPI、60 エンジニアリングツール、70 電子カム、71 入力軸、72 出力軸、73 板カム、91 プロセッサ、92 メモリ、A1~Ax ユーザプログラム領域、ADD-Ti ユーザプログラム処理周期、BF ユーザプログラムバイナリファイル、C1,M0,M1,M2 起動信号、C2,M3 制御指令、M4 入力制御指令、M5 出力制御指令、M11 ユーザプログラム、M12 ユーザプログラム領域アドレス、MC-Ti ネットワーク通信周期、MCN-Ti 起動周期、NT-Ti ネットワークフレーム受信実行周期、SV-Ti サーボ制御周期、P1~Py ユーザプログラム、R1~R12 外周位置、T1 処理時間、Ti 周期。

Claims (5)

  1.  ネットワーク接続された上位コントローラからネットワーク通信周期で送られてくる制御指令に基づいてモータに電力を供給するモータ駆動装置であって、
     前記制御指令を受信するネットワークフレーム受信部と、
     ユーザによって作成されたユーザプログラムのプログラム処理を実行するユーザプログラム処理部と、
     前記制御指令に基づくサーボ制御指令を出力するサーボ制御部と、
     前記サーボ制御指令に基づく電力を前記モータに供給する駆動制御部と、
     を備え、
     前記ユーザプログラム処理部が前記プログラム処理を実行する場合には、前記ユーザプログラム処理部は、前記制御指令の受信毎に生成される起動信号に従って前記ユーザプログラムを起動することで、前記制御指令を前記ネットワークフレーム受信部が受信するタイミングと同期して、前記制御指令を前記ユーザプログラムにプログラム処理させ、前記サーボ制御部は、前記プログラム処理された前記制御指令に基づくサーボ制御指令を出力する、
     ことを特徴とするモータ駆動装置。
  2.  前記制御指令は、前記モータへの、逐次位置指令、逐次速度指令、または逐次トルク指令を含んでいる、
     ことを特徴とする請求項1に記載のモータ駆動装置。
  3.  前記ユーザプログラム処理部は、前記起動信号のうちの第1の起動信号を受信した際に前記第1の起動信号の1つ前の起動信号である第2の起動信号に基づいて起動された前記プログラム処理が完了していない場合に異常と判定し、前記第1の起動信号に基づいて起動された前記プログラム処理の実行を停止させる、
     ことを特徴とする請求項1または2に記載のモータ駆動装置。
  4.  前記ユーザプログラム処理部は、設定時間内に前記起動信号に基づいて起動された前記プログラム処理が終了しなかった場合に、異常と判定し、前記起動信号に対応する前記プログラム処理を停止させる、
     ことを特徴とする請求項1または2に記載のモータ駆動装置。
  5.  請求項1から4の何れか1つに記載のモータ駆動装置と、
     前記上位コントローラと、
     を備える、
     ことを特徴とするサーボドライブシステム。
PCT/JP2022/017426 2022-04-08 2022-04-08 モータ駆動装置およびサーボドライブシステム WO2023195178A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2022561007A JP7229438B1 (ja) 2022-04-08 2022-04-08 モータ駆動装置およびサーボドライブシステム
PCT/JP2022/017426 WO2023195178A1 (ja) 2022-04-08 2022-04-08 モータ駆動装置およびサーボドライブシステム

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2022/017426 WO2023195178A1 (ja) 2022-04-08 2022-04-08 モータ駆動装置およびサーボドライブシステム

Publications (1)

Publication Number Publication Date
WO2023195178A1 true WO2023195178A1 (ja) 2023-10-12

Family

ID=85320380

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2022/017426 WO2023195178A1 (ja) 2022-04-08 2022-04-08 モータ駆動装置およびサーボドライブシステム

Country Status (2)

Country Link
JP (1) JP7229438B1 (ja)
WO (1) WO2023195178A1 (ja)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073351A (ja) * 2011-09-27 2013-04-22 Fuji Mach Mfg Co Ltd サーボドライブシステム
JP2017094472A (ja) * 2015-11-26 2017-06-01 株式会社デンソーウェーブ ロボット制御装置
JP2019106225A (ja) * 2019-04-08 2019-06-27 オムロン株式会社 制御装置
JP2021114806A (ja) * 2020-01-16 2021-08-05 株式会社ジェイテクト モータ制御装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013073351A (ja) * 2011-09-27 2013-04-22 Fuji Mach Mfg Co Ltd サーボドライブシステム
JP2017094472A (ja) * 2015-11-26 2017-06-01 株式会社デンソーウェーブ ロボット制御装置
JP2019106225A (ja) * 2019-04-08 2019-06-27 オムロン株式会社 制御装置
JP2021114806A (ja) * 2020-01-16 2021-08-05 株式会社ジェイテクト モータ制御装置

Also Published As

Publication number Publication date
JPWO2023195178A1 (ja) 2023-10-12
JP7229438B1 (ja) 2023-02-27

Similar Documents

Publication Publication Date Title
US10274936B2 (en) Control apparatus
EP3236580B1 (en) Method for customizing motor control device, and motor control device
JP3718125B2 (ja) 技術的プロセスを制御するための方法
EP2511779B1 (en) Output module for an industrial controller
JP5849345B2 (ja) 関節肢を使用する移動ロボットの制御コマンドアーキテクチャ
CN110456707B (zh) 控制装置
US20130002185A1 (en) Synchronous control apparatus, synchronous control method, synchronous control program, and computer-readable recording medium recording synchronous control program
JP6626240B2 (ja) コントローラ
EP2555068B1 (en) Synchronization control apparatus
JP6729746B2 (ja) 制御装置
US10877803B2 (en) Control apparatus, control method and non-transitory storage medium
US7146470B2 (en) Real-time motor controller with additional down-up-loadable controller functionality
US11379391B2 (en) Real-time automation device having a real-time data bus
WO2023195178A1 (ja) モータ駆動装置およびサーボドライブシステム
CN111095138B (zh) 控制装置、控制装置的控制方法、信息处理程序及记录介质
WO2021181799A1 (ja) ロボット制御システムおよび制御方法
JP2018147258A (ja) 制御装置および制御方法
EP3657278B1 (en) Method for proxy execution and computation with an industrial controller
WO2020067286A1 (ja) 制御システム、サポート装置、サポートプログラム
WO2015159457A1 (ja) モータ駆動装置の制御方法、モータ制御システムおよびプログラム
KR20190029977A (ko) 기기의 제어 시스템 및 그 구동 방법
JPWO2020202568A1 (ja) 多軸制御システム、多軸制御方法および多軸制御プログラム
JP2004280305A (ja) プログラマブルコントローラ用機器及びプログラマブルコントローラ並びにデータの受渡方法
CN110908339B (zh) 数值控制装置
CN114362879B (zh) 编码器及编码器的通信控制方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2022561007

Country of ref document: JP

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22936575

Country of ref document: EP

Kind code of ref document: A1