Motor drive device and servo drive system
By using network communication to periodically synchronize user program processing and servo control, the synchronization problem of user program processing in motor drive devices is solved, enabling user customization and efficient system software changes.
Patent Information
- Application Number
- CN202280086067.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-08
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2042-04-08
AI Technical Summary
The existing motor drive device cannot execute the user program's processing synchronously with the control commands sent from the upper-level controller, which prevents the user from independently changing the system software functions.
The motor drive unit, which includes a network frame receiving unit, a user program processing unit, a servo control unit, and a drive control unit, sends control commands through network communication cycles. It realizes user program processing synchronized with the network communication cycle and outputs servo control commands.
It enables synchronous execution of user program processing with control commands sent from the upper-level controller, supports user-customized system software, and improves the flexibility and response speed of the motor drive device.
Smart Images

Figure CN118451649B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a motor drive device that drives a motor and a servo drive system. BACKGROUND
[0002] An industrial motor drive device controls a servo motor based on a feedback value (a position feedback value, a speed feedback value, a torque feedback value, and the like) of the servo motor (an operation detection value) by a servo control section so as to follow a control command (a position command, a speed command, a torque command, and the like) input from a higher-level controller. The control by the motor drive device as described above is executed based on system software loaded in an execution memory section in the motor drive device.
[0003] In the motor drive device, for example, in a case where a sequential position command sent from the higher-level controller is not converted into a position command of a user's own, such as an electronic cam, and output, it is necessary to change the position command output by the servo control section. Therefore, in a case where it is desired to add a user's own processing so as to change the servo control command output by the servo control section, it cannot be achieved by the usual system software. In a case where it is desired to make the motor drive device execute a user's own processing, the user must entrust a change of the system software to the manufacturer of the motor drive device each time. In addition, in an industrial motor drive device where the restrictions are strict, in a case where a part of the functions of the system software has been changed, the user cannot change it by himself or herself.
[0004] Therefore, a customization method is proposed in which the user can change a part of the system software as described above by himself or herself. The motor drive device described in Patent Document 1 has a user function selection parameter that sets a user function created by the user to be valid, instead of the processing of the system software in the function unit of the functions of the functions achieved by the system software. Moreover, the motor drive device described in Patent Document 1 executes the user function instead of the processing of the system software based on the discrimination of whether the user function is valid or not, if the user function is valid.
[0005] Patent Document 1: Japanese Patent Application Laid-Open No. 2005-234639 SUMMARY
[0006] However, in the technology of the above-described Patent Document 1, there is a problem that the program processing of the user program cannot be executed in synchronization with the control command sent from the higher-level controller.
[0007] The present application has been made in view of the above-described circumstances, and aims to obtain a motor drive device that can execute the program processing of the user program in synchronization with the control command sent from the higher-level controller.
[0008] To solve the above problems and achieve the object, the motor drive device of the present application supplies power to a motor based on a control command transmitted from a network-connected upper-level controller at a network communication cycle, and has a network frame reception section that receives the control command, and a user program processing section that performs program processing of a user program created by a user. In addition, the motor drive device of the present application has a servo control section that outputs a servo control command based on the control command, and a drive control section that supplies power based on the servo control command to the motor. In the case where the program processing is performed by the user program processing section, the user program processing section starts the user program in accordance with a start signal generated each time the control command is received, thereby causing the user program to perform program processing on the control command in synchronization with the timing at which the network frame reception section receives the control command, and the servo control section outputs a servo control command based on the control command after the program processing.
[0009] Effects of the Invention
[0010] The motor drive device of the present application has the effect that program processing of a user program can be performed in synchronization with a control command transmitted from an upper-level controller. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 is a diagram showing the structure of a servo drive system having the motor drive device according to the embodiment.
[0012] Figure 2 is a diagram for explaining the processing in which the motor drive device according to the embodiment passes a start signal through function call.
[0013] Figure 3 is a timing chart showing the processing timing of each processing performed by the motor drive device according to the embodiment.
[0014] Figure 4 is a diagram for explaining a user program used by the motor drive device according to the embodiment.
[0015] Figure 5 is a diagram for explaining the functional structure of a user program processing section and a servo control section possessed by the motor drive device according to the embodiment.
[0016] Figure 6 is a diagram for explaining the structure of an electronic cam used by the motor drive device according to the embodiment.
[0017] Figure 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. DETAILED DESCRIPTION
[0018] Next, the motor drive device and the servo drive system according to the embodiment of the present application will be described in detail with reference to the drawings.
[0019] Embodiment
[0020] Figure 1 is a diagram showing the configuration of a servo drive system having the motor drive device according to the embodiment. The servo drive system 1 has a motor drive device 10 and a superior controller (motion controller) 20.
[0021] The superior controller 20 is connected to the motor drive device 10 through a communication line, and can perform network communication between the superior controller 20 and the motor drive device 10. In addition, the motor drive device 10 is connected to a motor 30 and a detector 40. The motor 30 is connected to a load 50. Further, the superior controller 20 can be connected to the motor drive device 10 through wireless communication without using the communication line.
[0022] The motor drive device 10 drives the motor 30 based on a control command C2 transmitted from the superior controller 20. The motor drive device 10 can load a user program shown by a function or the like, and can drive the motor 30 based on the user program. The motor drive device 10 according to the embodiment starts the user program based on a start signal M2 generated each time the control command C2 from the superior controller 20 is received, and thereby executes the user program process in synchronization with a network communication cycle MC-Ti with the superior controller 20. The motor drive device 10 executes the user program process in synchronization with the network communication cycle MC-Ti, and thus can execute the user program process at high speed.
[0023] The motor drive device 10 customizes the control command C2 transmitted from the superior controller 20 by the user program by synchronizing the control command C2 transmitted from the superior controller 20 and the program process of the user program.
[0024] The motor drive device 10 controls the motor 30 from the superior controller 20 so as to follow the control command (position command, speed command, torque command, or the like) C2 periodically input in accordance with the network communication cycle MC-Ti.
[0025] The motor drive device 10, in synchronization with the timing at which the control command C2 is received from the upper controller 20, causes the user program to perform processing that customizes the control command C2 from the upper controller 20. Thus, the motor drive device 10 generates an output control command M5 corresponding to the control command C2 through the user program. The program processing by the user program is processing of the order of tens to hundreds of msec in the related art, but in the present embodiment, it is high-speed processing of the order of 1 msec or less, for example. The user program is a program created in C language, for example.
[0026] The motor drive device 10 has a processor 91, a drive control section 16, and a memory 92. The processor 91 has a network frame receiving section 12, a timer 15, a user program processing section 13, and a servo control section 14. The memory 92 has a memory section 17 and an execution memory section 18.
[0027] 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. In addition, 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.
[0028] The upper controller 20 transmits the control command C2 to the motor drive device 10 for each network communication period MC-Ti. Thus, the network frame receiving section 12 receives the control command C2 at a timing (a network frame receiving execution period NT-Ti described later) that is synchronized with the network communication period MC-Ti. The control command C2 is a signal for controlling the motor 30 by the motor drive device 10. In the motor drive device 10, the processor 91 executes processing at a constant multiple of the network communication period MC-Ti. For example, in the case where the network communication period MC-Ti is 200 μsec, the processor 91 executes processing at a period of 100 μsec, 200 μsec, or 400 μsec. Furthermore, the processing period of the network frame receiving section 12, the processing period of the user program processing section 13, and the processing period of the servo control section 14 can be different processing periods respectively, or can be the same processing period. In addition, the processing period of the processor 91 can be a period faster than the network communication period MC-Ti.
[0029] In addition, the upper controller 20 transmits the start signal C1 to the motor drive device 10 for each start period MCN-Ti. Thus, the timer 15 receives the start signal C1 for each start period MCN-Ti. The start period MCN-Ti is a period that is a constant multiple of the network communication period MC-Ti, for example. The start signal C1 is a signal for executing communication (transmission and reception of the control command C2) between the upper controller 20 and the motor drive device 10 at a specific timing.
[0030] In the servo drive system 1, the upper-level controller 20 and the motor drive device 10 are synchronized based on the start signal Cl at a predetermined cycle to transmit and receive the control command C2.
[0031] The timer 15 generates a start signal M0 output to the network frame receiving section 12 and a start signal Ml output to the servo control section 14 based on the start signal Cl. Specifically, the timer 15 generates a counter value for each cycle Ti based on the start signal Cl transmitted at the start cycle MCN-Ti. That is, the timer 15 accumulates the counter value for each cycle Ti based on the reception cycle of the start signal Cl transmitted from the upper-level controller 20, that is, the start cycle MCN-Ti. The cycle Ti is a constant multiple of the start cycle MCN-Ti.
[0032] The timer 15 outputs the counter value generated for each cycle Ti as the start signal M0 to the network frame receiving section 12 and outputs the counter value generated for each cycle Ti as the start signal Ml to the servo control section 14. Thus, the upper-level controller 20 and the motor drive device 10 are synchronized based on the counter value (1, 2, 3, ···) generated for each cycle Ti by the timer 15.
[0033] As described above, the timer 15 synchronizes the counter value generated for each cycle Ti by the timer 15 with the control command C2 at the timing of receiving the start signal Cl at the start cycle MCN-Ti. Thus, the upper-level controller 20 and the motor drive device 10 can be synchronized through network communication. In the servo drive system 1, the upper-level controller 20 and the motor drive device 10 can be synchronized through network communication, and the method of synchronization is arbitrary.
[0034] Further, the timer 15 can output the start signals M0 and Ml to the network frame receiving section 12 and the servo control section 14, respectively, for each cycle Ti based on the network communication cycle MC-Ti. That is, the timer 15 can synchronize the counter value generated for each cycle Ti with the control command C2 for each network communication cycle MC-Ti. The cycle Ti in this case can be the same cycle as the network communication cycle MC-Ti or a constant multiple of the network communication cycle MC-Ti.
[0035] The network frame receiving section 12 is started for each network frame receiving execution cycle NT-Ti in synchronization with the counter value (the start signal M0) output from the timer 15 for each cycle Ti. The network frame receiving execution cycle NT-Ti is, for example, a constant multiple of the cycle Ti.
[0036] The network frame receiving section 12 receives the control command C2 including the successive position command, the successive speed command, or the successive torque command, or the like transmitted from the upper-level controller 20, for each network frame reception execution period NT-Ti.
[0037] Here, the successive position command, the successive speed command, and the successive torque command are commands transmitted from the upper-level controller 20 to the motor drive device 10. The successive position command, the successive speed command, and the successive torque command are updated for each network communication period MC-Ti.
[0038] The successive position command is a command indicating to which position the motor 30 is to be moved for each network communication period MC-Ti. The difference between the previous 1 received value of the successive position command and the present received value is a speed command indicating at what speed the motor 30 is to be driven.
[0039] The successive speed command is a command indicating at what speed the motor 30 is to be operated for each network communication period MC-Ti. The successive torque command is a command indicating at what torque the motor 30 is to be operated for each network communication period MC-Ti.
[0040] The network frame receiving section 12 generates the start signal M2 for each user program processing execution interval time, i.e., the user program processing period ADD-Ti, set by the user, and transmits the start signal M2 to the user program processing section 13. Thus, the network frame receiving section 12 causes the user program processing section 13 to operate at the period of the user program processing period ADD-Ti. The user program processing period ADD-Ti is, for example, a constant multiple of the network communication period MC-Ti.
[0041] Further, the start signal M2 is not limited to the case where the network frame receiving section 12 generates the start signal M2 based on the start signal M0. The processor 91 can generate the start signal M2 corresponding to the reception timing of the control command C2 by any method. For example, the timer 15 can generate the start signal M2 corresponding to the reception timing of the control command C2, or the start signal M2 corresponding to the reception timing of the control command C2 can be generated at a site other than the timer 15. As described above, the start signal M2 can be any signal if it is a signal synchronized with the data reception from the upper-level controller 20, and the generation source is not limited.
[0042] The network frame receiving section 12 transmits the control command corresponding to the received control command C2 to the user program processing section 13 and the servo control section 14. Specifically, the network frame receiving section 12 transmits the control command M3 corresponding to the control command C2 to the servo control section 14, and transmits the input control command M4 corresponding to the control command C2 to the user program processing section 13.
[0043] The control command M3 and the input control command M4 are commands for the inside of 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 contents of the commands included in the control command M3 are the same as the contents of the commands included in the input control command M4. The control command M3 is a control command in a case where the user program is not used, and the input control command M4 is a control command in a case where the user program is used.
[0044] The user program processing section 13 performs program processing of the user program in synchronization with the start signal M2 transmitted by the network frame receiving section 12 for each user program processing cycle ADD-Ti. The user program processing section 13 performs processing using the user program with respect to the input control command M4 received from the network frame receiving section 12, thereby customizing the input control command M4 (control command C2).
[0045] The user program processing section 13 customizes the input control command M4, for example, by converting the input control command M4 into a command specified by the user. The user program processing section 13 outputs the customized input control command M4 as an output control command M5 to the servo control section 14.
[0046] The detector 40 detects the position (rotational position, moving position, etc.) of the motor 30, the speed (rotational speed, moving speed, etc.) of the motor 30, the torque of the motor 30, and the like, and transmits the detected values, i.e., the action detection values Dl, to the servo control section 14.
[0047] The motor drive device 10 and the detector 40 exchange data on the basis of the action cycle of the motor drive device 10. That is, the motor drive device 10 and the detector 40 exchange data on the basis of the action of the timer 15 that defines the action cycle of the motor drive device 10. Specifically, the motor drive device 10 and the detector 40 exchange data in synchronization with the period in which the motor 30 is controlled by the motor drive device 10. For example, the servo control section 14 receives the start signal Ml from the timer 15 for each cycle Ti, and transmits request data for requesting the action detection values Dl at a timing (servo control cycle SV-Ti described later) in synchronization with the cycle Ti to the detector 40. Also, the detector 40 transmits the action detection values Dl, i.e., feedback values, requested by the request data received from the servo control section 14. The servo control section 14 receives the action detection values Dl, i.e., feedback values, transmitted from the detector 40. As described above, the motor drive device 10 and the detector 40 exchange data in synchronization with the period in which the motor 30 is controlled by the motor drive device 10.
[0048] The feedback value received by the servo control section 14 from the detector 40 is a position feedback value, a speed feedback value, a torque feedback value, or the like of the motor 30.
[0049] The servo control section 14 is activated for each servo control period SV-Ti in synchronization with the counter value (activation signal Ml) output from the timer 15 for each period Ti. The servo control period SV-Ti is a constant multiple of 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 section 14 performs processing at the highest speed among the motor drive device 10.
[0050] The servo control section 14 has at least one of a position control section that controls the position of the motor 30, a speed control section that controls the speed of the motor 30, and a current control section that controls the current (torque) to the motor 30.
[0051] The servo control section 14 performs feedback control of the motor 30 based on the control command M3 corresponding to the control command C2 transmitted from the upper-level controller 20 and the operation detection value Dl from the detector 40 without using the user program. The control command M3 is a command after conversion of the control command C2 for the motor drive device 10.
[0052] The servo control section 14 performs feedback control of the motor 30 based on the output control command M5 corresponding to the control command C2 transmitted from the upper-level controller 20 and the operation detection value Dl from the detector 40 with use of the user program. As described above, in the case where the input control command M4 is customized by the user program processing section 13, the servo control section 14 performs feedback control of the motor 30 using the customized output control command M5.
[0053] As described above, the servo control section 14 has the position control section, the speed control section, or the current control section, and acquires the operation detection value Dl of the position feedback value, the speed feedback value, the torque feedback value, or the like of the motor 30. The servo control section 14 imports the control command M3 or the output control command M5 corresponding to the control command C2 of the position command, the speed command, the torque command, or the like input from the upper-level controller 20 for each servo control period SV-Ti. Further, the servo control section 14 performs feedback control of the motor 30 based on the operation detection value Dl so as to follow the control command M3 or the output control command M5.
[0054] The servo control section 14 transmits the servo control command including the position command, the speed command, or the current command to the drive control section 16. The drive control section 16 supplies electric power to the motor 30 based on the servo control command. The motor 30 drives the load 50.
[0055] Further, the servo control section 14 can have a monitoring function for monitoring information of the detector 40 including the motion detection value Dl, the control command C2 received from the upper-level controller 20, the control command M3 inside the motor drive device 10, the input control command M4, the output control command M5, and the like. In this case, the servo control section 14 can also have an alarm output function for outputting an alarm in a case where an abnormality inside the motor drive device 10 is detected based on the monitored information.
[0056] Here, the hardware structure of the motor drive device 10 is described. 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 an FA (Factory Automation) device.
[0057] The motor drive device 10 has the processor 91 that executes various processes and the 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 can be a central processing device, a processing device, an arithmetic device, a microprocessor, a microcomputer, or a DSP (Digital Signal Processor).
[0058] The memory 92 is a nonvolatile or volatile semiconductor memory. The memory 92 is, for example, a RAM (Random Access Memory), a ROM (Read Only Memory), a flash memory, an EPROM (Erasable Programmable Read Only Memory), or an EEPROM (registered trademark) (Electrically Erasable Programmable Read Only Memory). An execution memory section 18 of the memory 92 is used as a temporary memory when various processes are executed by the processor 91.
[0059] Each function of the motor drive device 10 is realized by the processor 91 and software, firmware, or a combination of software and firmware. The software or firmware is described as a program, and stored in an external storage device (not shown). The processor 91 reads out the software or firmware stored in the external storage device to the memory 92 and executes. That is, the motor drive device 10 is realized by the processor 91 reading out and executing the motor drive program and the user program stored in the memory 92, which are computer executable programs for executing the operation of the motor drive device 10. The motor drive program and the user program for executing the operation of the motor drive device 10 can be said to cause the computer or the FA device to execute the sequence or the method of the motor drive device 10.
[0060] The motor drive program executed by the motor drive device 10 is a module structure including the network frame receiving section 12, the timer 15, the user program processing section 13, and the servo control section 14, which are downloaded to the main storage device, and which are generated on the main storage device.
[0061] The motor drive program and the user program can be stored in a storage medium readable by a computer as a computer program product in a form that can be installed or in a form that can be executed. In addition, the motor drive program and the user program can also be provided to the motor drive device 10 via a network such as the Internet. Furthermore, as for the functions of the motor drive device 10, a part thereof can be realized by a dedicated hardware such as a dedicated circuit, and a part thereof can be realized by software or firmware. The drive control section 16 is realized by, for example, a dedicated circuit.
[0062] Here, the transfer of the start signals M0, M1, M2 in the motor drive device 10 is described. For example, in the case where the start signals M0, M1, M2 are transferred by electric signals, the output of the start signals M0, M1, M2 can be realized by a function call by software or the like, or can be realized by the output of a pulse signal by a dedicated circuit. Furthermore, the transfer of the start signals M0, M1, M2 can be transferred by any method.
[0063] For example, the start signal M0 is a signal that calls a function of the processing executed by the network frame receiving section 12, and the start signal M1 is a signal that calls a function of the processing executed by the servo control section 14. The start signal M2 is a signal that calls a function of the processing executed by the user program processing section 13.
[0064] Figure 2 is a diagram for explaining the processing in which the motor drive device according to the embodiment transfers the start signals by a function call. First, the timer 15 calls the network frame receiving section 12 by a function call of the start signal M0. Thereby, the network frame receiving section 12 executes the processing.
[0065] Then, the network frame receiving section 12 calls the user program processing section 13 by a function call of the start signal M2. Thereby, the user program processing section 13 executes the user program.
[0066] Further, the timer 15 calls the servo control section 14 by a function call of the start signal Ml. Thereby, the servo control section 14 executes the processing.
[0067] Figure 3 is a timing chart showing the processing timings of each processing executed by the motor drive device according to the embodiment. Figure 3 The network frame receiving processing shown in Figure 1 corresponds to the reception processing of the control command C2 by the network frame receiving section 12. Figure 3 The user program processing shown in Figure 1 corresponds to the execution processing of the user program by the user program processing section 13. Figure 3 The system software processing shown in
[0068] The network frame receiving section 12 executes the network frame receiving processing (the reception processing of the control command C2) for each network frame receiving execution cycle NT-Ti. Then, the user program processing section 13 executes the user program processing. In Figure 3 , a case where the time required for the user program processing is the processing time Tl is shown. The user program processing section 13 executes the user program processing for each user program processing cycle ADD-Ti. After the user program processing is executed, the servo control section 14 executes the servo control processing.
[0069] The user program processing section 13 executes the user program processing and the system software processing in a manner that the Nth (N is a natural number) system software processing corresponding to the Nth network frame receiving processing does not conflict with the (N+l)th network frame receiving processing.
[0070] The user program processing section 13 judges that an abnormal state occurs in a case where the user program processing cannot be executed for each user program processing cycle ADD-Ti when executing the user program processing for each user program processing cycle ADD-Ti. In this case, the user program processing section 13 stops the user program processing and outputs an alarm indicating a system abnormality. Thereby, the user program processing section 13 sets the user program processing to be invalid after detecting an abnormality in the processing time of the user program processing, so that the user program does not act in the cycle processing of executing the next user program.
[0071] As the monitoring method of the abnormal state of the user program by the user program processing section 13, for example, the following methods exist. The first monitoring method is a monitoring method of the entire servo drive system 1 based on the user program processing period ADD-Ti. The second monitoring method is a monitoring method of only the user program processing based on the internal time of the motor drive device 10.
[0072] For example, in the first monitoring method, the user program processing section 13 starts the user program processing by the user program processing section 13 at time tl, and starts the user program processing by the user program processing section 13 at time t2 after the user program processing period ADD-Ti elapses from time tl. Time t2 is the time at which the first start signal among the start signals M2 is received, and time tl is the time at which the second start signal among the start signals M2 is received. The second start signal is the first start signal before the first start signal.
[0073] The user program processing section 13 determines whether or not the user program processing started at time tl is completed at time t2. That is, the user program processing section 13 determines whether or not the user program processing corresponding to the first start signal M2 is completed at the time at which the start signal M2 is received. Specifically, the user program processing section 13 can determine that an abnormality exists in a case where the first user program processing is not completed at the timing at which the user program processing section 13 receives the start signal M2.
[0074] The user program processing section 13 stops the user program processing as an abnormal state if it detects that the user program processing started at time tl is not completed at time t2, outputs an alarm indicating a system abnormality, and stops the drive of the motor 30. Further, the user program processing section 13 can stop the start of the program processing of the user program based on the first start signal when it stops the user program processing as an abnormal state, and can stop the program processing of the user program based on the first start signal. That is, the user program processing section 13 stops the execution of the program processing based on the first start signal when it stops the user program processing as an abnormal state. In addition, the user program processing section 13 can stop the execution of the program processing of the user programs based on the first start signal and the second start signal, respectively, when it stops the user program processing as an abnormal state.
[0075] Further, in the second monitoring method, the user program processing section 13 acquires the internal timer value at the start (the start-up) and the completion of the user program processing when the user program processing section 13 executes the user program processing for one time. The user program processing section 13 calculates the processing time for one time of the user program based on the difference between the internal timer value at the start and the internal timer value at the completion, and determines that the abnormal state exists in the case where the processing time for one time of the user program is greater than or equal to the set time. That is, the user program processing section 13 determines that the abnormality exists in the case where the user program processing started based on the start-up signal M2 does not end within the set time. The user program processing section 13 stops the user program processing, outputs an alarm indicating the system abnormality, and stops the driving of the motor 30 in the case where it is determined that the abnormal state exists.
[0076] Figure 4 is a diagram for explaining the user program used in the motor drive device according to the embodiment. In Figure 4 the internal structure example of the execution memory section 18 in which the user program M11 is stored is shown. Further, in Figure 4 in which the processor 91, the memory section 17, and the execution memory section 18 are illustrated as the structural elements of the motor drive device 10.
[0077] The user program processing section 13 included in the processor 91 executes the user program M11 corresponding to the user program binary file BF created by the user.
[0078] The user program binary file BF is stored in the memory section 17 of the motor drive device 10. The user program binary file BF is written to the motor drive device 10, for example, by the engineering design tool 60, and thereby stored in the memory section 17.
[0079] Further, the user program binary file BF can be stored in the memory section 17 via the network, and can be stored in the memory section 17 via the upper-level controller 20. That is, the method of storing the user program binary file BF is arbitrary.
[0080] The processor 91 reads the user program binary file BF written to the memory section 17 at the start-up of the motor drive device 10, and expands it to the user program regions Al to Ax (x is a natural number) of the execution memory section 18 in which the system software of the motor drive device 10 is stored, as the user program M11. Thereby, the correspondence relation between the addresses and the data of the user program M11 is stored in the execution memory section 18. The data is stored in the system software regions and the user program regions Al to Ax in association with the addresses in the execution memory section 18.
[0081] The processor 91 stores addresses of the user program areas Al to Ax, i.e., user program area addresses M12, at the time of startup of the motor drive device 10. Thus, the processor 91 can call and execute programs in the user program areas Al to Ax corresponding to the stored user program area addresses M12 in the execution of the system software of the motor drive device 10.
[0082] Figure 5 is a diagram for explaining functional structures of a user program processing section and a servo control section possessed by the motor drive device according to the embodiment. The user program processing section 13 receives user programs Pl to Py (y is a natural number) and has a user program API (Application Programming Interface) 51 and an accessory API 52. The user program API 51 is an interface for connecting with internal processing of the motor drive device 10 on the user programs Pl to Py. The user programs Pl to Py are programs included in the aforementioned user program Ml 1.
[0083] The user creates the user program binary files BF using a program creation device not shown. At this time, the user creates the user program binary files BF using the user program API 51.
[0084] The user sets user program processing periods ADD-Ti based on network communication periods MC-Ti for each of the user programs Pl to Py using the user program API 51 and creates the user program binary files BF of the user programs Pl to Py.
[0085] The user program API 51 is an interface capable of performing registration of the user programs Pl to Py, processing interruption prohibition, permission, acquisition of a control command C2 transmitted from the upper controller 20, and the like.
[0086] The user program API 51 can perform new creation of data of a digital IO (Input Output) control unique to the user, an object for data exchange with the upper controller 20, a parameter set at the time of servo control, an alarm, a monitor, and the like.
[0087] The user can create the above-mentioned data of the digital IO control, the object, the parameter, the alarm, the monitor, and the like by the user programs Pl to Py using the user program API 51, and thus can customize the control command C2 and the like.
[0088] The user program P1 to Py including data of digital IO control, object, parameter, alarm, monitor, etc. is sent to the accessory API 52 via the user program API 51 of the user program processing section 13, and is sent to the servo control section 14 via the accessory API 52. The accessory API 52 is an interface for sending a customized instruction value set by the user program P1 to Py to the servo control section 14. The customized instruction value is applied to data of digital IO control, object, parameter, alarm, monitor, etc., whereby the data of digital IO control, object, parameter, alarm, monitor, etc. is customized. In addition, the accessory API 52 also functions as an interface for receiving, from the servo control section 14, data obtained by executing processing related to control of the motor 30 realized by the servo control section 14 using digital IO control, object, parameter, alarm, monitor, etc. based on the customized instruction value (output control instruction M5) and a set value in the case where the instruction value is customized, and receiving, from the servo control section 14, data obtained by executing processing related to control of the motor 30 realized by the servo control section 14 using digital IO control, object, parameter, alarm, monitor, etc. based on the instruction value (control instruction M3) and a set value in the case where the instruction value is not customized. Further, the accessory API 52 sends the data and set value received from the servo control section 14 to the user program API 51.
[0089] The user program API 51 is able to confirm the data obtained by executing processing in the servo control section 14 related to control of the motor 30 using digital IO control, object, parameter, alarm, monitor, etc. and the value set in the servo control section 14 by receiving the data and set value from the accessory API 52, and creates the user program binary file BF.
[0090] The processor 91 is able to call the user program P1 to Py at the user program processing cycle ADD-Ti by reading the user program P1 to Py at the start of the motor drive device 10, whereby the system software is able to call the user program P1 to Py at the user program processing cycle ADD-Ti.
[0091] The servo control section 14 has a motor control function of controlling the motor 30, an encoder function of executing feedback control using the operation detection value Dl from the detector 40. In addition, the servo control section 14 has a network function of executing communication with the upper-level controller 20 via the network frame reception section 12, an alarm output function of outputting an alarm, a monitoring function of monitoring the control command M3, the input control command M4, the output control command M5, and the like. The servo control section 14 executes processing related to control of the motor 30 using these functions and the digital IO control, the object, the parameter, the alarm, and the monitor set by the user program Pl to Py. The servo control section 14 transmits data obtained by executing processing related to control of the motor 30 using the digital IO control, the object, the parameter, the alarm, and the monitor, and the set values to the accessory API 52. That is, the servo control section 14 transmits values indicating on / off states of devices subjected to digital IO control, set values of parameters, values of objects (for example, control commands, operation detection values, and the like) obtained by the servo control section 14, values indicating presence / absence of occurrence of an alarm, and values monitored by the monitoring function (for example, control commands, information from detectors, and the like) to the accessory API 52.
[0092] Here, an example of operation of the user program Ml l executed by the user program processing section 13 will be described. Here, the user program processing section 13 executes the user program Ml l, whereby a sequential position command transmitted from the upper-level controller 20 is converted into a position command via an electronic cam, and output to the servo control section 14. That is, here, the input control command M4 corresponds to the sequential position command transmitted from the upper-level controller 20, and the output control command M5 corresponds to the position command via the electronic cam.
[0093] The electronic cam is a cam after replacement of a mechanism that mechanically performs synchronous control using an actual cam with software. The user program processing section 13 calculates a movement amount generated by the cam in a case where the cam is controlled by the sequential position command in a case where the electronic cam is used. Thus, the user program processing section 13 can perform the same control as the actual cam.
[0094] Further, in the present embodiment, a case where the user program processing section 13 executes cam operation by the user program Ml l is described as an example, but the user program processing section 13 can execute arbitrary processing by the user program Ml l.
[0095] Figure 6 is a diagram for explaining a structure of an electronic cam used by a motor drive device according to the embodiment. The electronic cam 70 has an input shaft 71, an output shaft 72, and a plate cam 73 of, for example, an elliptical shape.
[0096] The successive position command transmitted from the upper-level controller 20 is a command to rotate the input shaft 71. If the user program processing section 13 receives a successive position command (input control command M4) to rotate the input shaft 71, it calculates the movement of the output shaft 72 in the case where the plate cam 73 performs an action corresponding to the successive position command. The user program processing section 13 calculates the movement of the output shaft 72 by the user program Ml l.
[0097] In the case where the successive position command to rotate the input shaft 71 is a command to rotate the input shaft 71 at equal angles (30 degrees in this example) in the clockwise direction, the plate cam 73 rotates at equal angles in the clockwise direction. As a result, the output shaft 72, which is in contact with the outer peripheral portion of the plate cam 73, moves to a position corresponding to the shape and rotational action of the plate cam 73. Here, the output shaft 72, which is in contact with the outer peripheral portion of the plate cam 73, moves in the order of the outer peripheral position R2, the outer peripheral position R3, the outer peripheral position R4,..., and the outer peripheral position Rl 2 of the plate cam 73 as the plate cam 73 rotates. As a result, the output shaft 72 reciprocates in the up-and-down direction. Figure 6
[0098] Next, the output position command calculated by the user program processing section 13 will be described. Figure 7 is a diagram for explaining the output position command calculated by the user program processing section of the motor drive device according to the embodiment. In this example, an example of a time chart of the input position command to the user program processing section 13 and the output position command calculated by the user program processing section 13 is shown. Figure 7
[0099] The network frame receiving section 12 receives the input position command shown in FIG. 8 as the control command C2 for each network frame reception at the reception period NT-Ti. Figure 7 The input position command shown in FIG. 8 is a successive position command that accumulates the command position up to the target position. Figure 7
[0100] Here, the processing of the network frame receiving section 12 in the case where the user program processing period ADD-Ti is set to the same period as the network communication period MC-Ti, for example, will be described. In this case, the network frame receiving section 12 performs user program processing at the same period as the timing at which the successive position command is received from the upper-level controller 20. Further, in the case where the network communication period MC-Ti is Z times the user program processing period ADD-Ti, the network frame receiving section 12 performs user program processing in such a manner that the period of the network communication period MC-Ti and Z times the user program processing period ADD-Ti becomes the same period.
[0101] The network frame receiving section 12 starts the user program processing section 13 by starting the signal M2 if the control command C2 is received from the upper controller 20. In addition, the network frame receiving section 12 sends the input control command M4 corresponding to the input position command shown in FIG. 7 to the user program processing section 13. Figure 7
[0102] The cam pattern conversion processing created by the user is installed in the user program M11. The user program processing section 13 generates the output position command (the output control command M5) of the output shaft 72 in the manner in which the action of the output shaft 72 is performed in accordance with the input position command (the input control command M4) of the input shaft 71 at the time of the cam pattern conversion processing. Figure 6 Figure 7 Figure 7 The cycle of the outer peripheral position Rl to the next outer peripheral position Rl among the output position commands is one cycle of the output shaft 72.
[0103] The user program processing section 13 outputs the generated output position command as the output control command M5 to the servo control section 14. Thereby, the servo control section 14 controls the motor 30 based on the received output control command M5.
[0104] As described above, the motor drive device 10 can perform the processing of the control command C2 from the upper controller 20 at high speed without changing the processing of the system software. In addition, the user program M11 used by the motor drive device 10 can be described by the user, and thus the user can flexibly change the action of the servo drive system 1.
[0105] In addition, the motor drive device 10 generates the starting signal M2 corresponding to the reception timing of the control command C2, and performs the user program processing based on the starting signal M2. Therefore, the upper controller 20 does not need to generate a signal dedicated to synchronization for synchronizing the control command C2 and the user program M11.
[0106] In addition, the motor drive device 10 performs the user program processing synchronized with the network communication cycle MC-Ti between the upper controller 20, and thus can perform the processing of the control command C2 from the upper controller 20 such as the successive position command at high speed. Thereby, the motor drive device 10 can perform the customization of the position control command, the speed control command, and the torque control command sent from the upper controller 20 at high speed, and can perform the control of the position, the speed, and the torque with high precision.
[0107] As described above, in the embodiment, in a case where the motor drive device 10 executes the program processing of the user program Ml l, the user program processing section 13 starts the user program Ml l in accordance with the start signal M2 generated each time the control command C2 is received. Thereby, the user program processing section 13 synchronizes with the timing at which the network frame reception execution cycle NT-Ti receives the control command C2, and causes the user program Ml l to perform the program processing on the input control command M4 corresponding to the control command C2. Further, the servo control section 14 outputs the servo control command based on the output control command M5 after the program processing.
[0108] Thereby, the motor drive device 10 can perform the program processing of the user program Ml l in synchronization with the control command C2 transmitted from the superior controller 20. Therefore, the motor drive device 10 can control the motor 30 by customizing the control command C2 transmitted from the superior controller 20 at high speed.
[0109] The structure shown in the above embodiment represents one example, and can be combined with other known techniques, and a part of the structure can be omitted or changed without departing from the gist.
[0110] Explanation of Reference Numerals
[0111] 1 servo drive system, 10 motor drive device, 12 network frame reception section, 13 user program processing section, 14 servo control section, 15 timer, 16 drive control section, 17 memory section, 18 execution memory section, 20 superior controller, 30 motor, 40 detector, 50 load, 51 user program API, 52 accessory API, 60 engineering design tool, 70 electronic cam, 71 input shaft, 72 output shaft, 73 plate cam, 91 processor, 92 memory, Al-Ax user program area, ADD-Ti user program processing cycle, BF user program binary file, Cl, M0, Ml, M2 start signal, C2, M3 control command, M4 input control command, M5 output control command, Ml l user program, Ml 2 user program area address, MC-Ti network communication cycle, MCN-Ti start cycle, NT-Ti network frame reception execution cycle, SV-Ti servo control cycle, Pl-Py user program, Rl-Rl 2 outer peripheral position, Tl processing time, Ti cycle.
Claims
1. A motor drive device that supplies electric power to a motor based on a control command transmitted from a superior controller connected to a network at a network communication cycle, The motor drive device is characterized by comprising: a network frame receiving section that receives the control command; a user program processing section that executes program processing of a user program created by a user; a servo control section that outputs a servo control command based on the control command; and a drive control section that supplies electric power based on the servo control command to the motor, in a case where the program processing is executed by the user program processing section, the user program processing section starts up the user program in accordance with a start signal generated at each time the control command is received, thereby causing the user program to perform program processing on the control command in synchronization with timing at which the network frame receiving section receives the control command, thereby converting the control command into a command corresponding to the user program, and the servo control section outputs a servo control command based on the control command after the program processing.
2. The motor drive device according to claim 1, characterized in that the control command contains a sequential position command, a sequential speed command, or a sequential torque command to the motor.
3. The motor drive device according to claim 1, characterized in that the user program processing section determines that an abnormality has occurred in a case where program processing started up based on a first start signal among the start signals has not completed based on a second start signal that is the first start signal before the first start signal, and stops execution of the program processing started up based on the first start signal.
4. The motor drive device according to claim 1, characterized in that the user program processing section determines that an abnormality has occurred in a case where the program processing started up based on the start signal has not ended within a set time, and stops the program processing corresponding to the start signal.
5. A servo drive system characterized by, comprising: the motor drive device according to any one of claims 1 to 4; and the superior controller.
Citation Information
Patent Citations
Numerical control device customization method and numerical control device
JP2005234639A
Servo driving system
CN103019169A
Drive control device
CN113632017A