WO2020004301A1 - Tuning system - Google Patents

Tuning system Download PDF

Info

Publication number
WO2020004301A1
WO2020004301A1 PCT/JP2019/024889 JP2019024889W WO2020004301A1 WO 2020004301 A1 WO2020004301 A1 WO 2020004301A1 JP 2019024889 W JP2019024889 W JP 2019024889W WO 2020004301 A1 WO2020004301 A1 WO 2020004301A1
Authority
WO
WIPO (PCT)
Prior art keywords
motor
information
data
communication
serial data
Prior art date
Application number
PCT/JP2019/024889
Other languages
French (fr)
Japanese (ja)
Inventor
汐里 羽曽部
藤田 淳
翔太 石上
周平 村瀬
Original Assignee
日本電産株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日本電産株式会社 filed Critical 日本電産株式会社
Publication of WO2020004301A1 publication Critical patent/WO2020004301A1/en

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

Definitions

  • the present invention relates to a tuning system for tuning a servomotor.
  • Patent Literature 1 discloses, as a system configuration for tuning control parameters, a configuration including a motor, a servo amplifier (motor control device), and a personal computer equipped with an automatic adjustment function and an adjustment result management device. ing. In addition, this system transmits a cable that transmits the position detection signal of the motor to the servo amplifier, a cable that supplies drive power from the servo amplifier to the motor, and transmission of adjustment conditions from the personal computer and operating data during motor operation to the servo amplifier. A communication cable for performing the operation.
  • an object of the present invention is to provide a tuning system whose configuration is simplified and whose cost is reduced.
  • a tuning system includes a motor, an arithmetic device, and a communication module that communicably connects the motor and the arithmetic device.
  • the motor includes a rotor having a shaft, a stator radially opposed to the rotor, a housing surrounding the rotor and the stator, and a motor control circuit, and a circuit board disposed near the housing. And a communication connector mounted on the circuit board.
  • the communication module has one serial communication cable connected to the communication connector.
  • the arithmetic unit receives an input unit for inputting data, a display unit for displaying data, serial data from the motor via the communication module, and controls the motor control circuit based on the serial data.
  • a parameter selection unit that selects an optimum value of the parameter; and a command transmission unit that transmits a command to change the control parameter to the optimum value to the motor.
  • the configuration is simplified because the electromechanical integrated motor and the arithmetic unit for tuning the motor are communicably connected by a communication module having one serial communication cable.
  • the tuning system can be reduced in cost.
  • FIG. 1 is a configuration example of a tuning system according to the first embodiment.
  • FIG. 2 is an example of the configuration of a motor integrated with electromechanical system.
  • FIG. 3 is a diagram illustrating a relationship between the MCU and the motor.
  • FIG. 4 is a diagram showing a USB-UART conversion cable.
  • FIG. 5 is a diagram showing a frame structure of a conventional packet.
  • FIG. 6 is a diagram illustrating a frame configuration of a packet according to the present embodiment.
  • FIG. 7 is a flowchart illustrating a serial data acquisition procedure.
  • FIG. 8 is a flowchart illustrating a procedure for acquiring serial data and drawing a graph.
  • FIG. 9 is an example of graph drawing.
  • FIG. 10 is a configuration example of a tuning system according to the second embodiment.
  • FIG. 10 is a configuration example of a tuning system according to the second embodiment.
  • FIG. 11 is a flowchart illustrating a serial data acquisition procedure.
  • FIG. 12 is a flowchart illustrating a procedure for acquiring serial data and drawing a graph.
  • FIG. 13 is another configuration example of the tuning system.
  • FIG. 14 is another configuration example of the tuning system.
  • FIG. 1 is a configuration example of a tuning system (control parameter adjustment system) 1000A in the present embodiment.
  • Tuning system 1000A includes motor device 100, which is an electromechanical integrated motor, and arithmetic device 200. Further, tuning system 1000A includes a communication module that communicably connects motor device 100 and arithmetic device 200.
  • the tuning system 1000A shown in FIG. 1 is a system that connects the motor device 100 and the arithmetic device 200 so as to be able to communicate with each other in a wired communication system.
  • the communication module directly connects the motor device 100 and the arithmetic device 200.
  • Communication cable 300 In the present embodiment, the communication cable 300 is a single serial communication cable.
  • the serial communication cable is, for example, a USB-UART conversion cable.
  • the motor device 100 includes a rotor having a shaft, a stator radially facing the rotor, and a housing surrounding the rotor and the stator.
  • the motor device 100 has a circuit board arranged near the housing. This circuit board has a motor control circuit that controls driving of the motor.
  • a communication connector is mounted on the circuit board.
  • the communication cable 300 has one end connected to a communication connector mounted on a circuit board of the motor device 100, and the other end connected to the arithmetic device 200. As described above, the communication cable 300 directly connects the communication connector and the arithmetic device 200.
  • the motor device 100 has a magnetic sensor and a current sensor mounted on a circuit board, and the motor device 100 alone can acquire motor information including power information, rotor position information, rotation speed information, and torque information.
  • the current sensor can acquire information on a current value flowing through the coil.
  • the motor device 100 can acquire voltage value information applied by the inverter.
  • the motor device 100 includes the motor control circuit, the sensor capable of detecting the motor information, and the communication function (communication connector). Therefore, the motor device 100 can perform motor control and data transmission / reception by itself.
  • FIG. 2 is a configuration example of the motor device 100.
  • the motor device 100 includes a motor 121, a Hall element 122, a differential amplifier 123, a position detector 124, a memory 125, a position command generator 126, and a controller 127. , A PWM control unit 128, and an inverter 129.
  • the differential amplifier 123, the position detector 124, the memory 125, the position command generator 126, the controller 127, the PWM controller 128, and the inverter 129 are included in the motor control circuit.
  • the motor device 100 has a structure in which the motor 121 and the motor control circuit are integrated.
  • the motor 121 is, for example, a three-phase brushless motor, and is supplied with driving power by a motor control circuit.
  • the output of the Hall element 122 which is a magnetic sensor, is amplified by the differential amplifier 123 and input to the position detection unit 124.
  • the position detector 124 detects rotor position information (position detection value) based on the detection result of the magnetic sensor.
  • the position detection unit 124 can also acquire the learning value from the memory 125 and detect the position information of the rotor.
  • Position command generator 126 outputs a position command value for motor 121.
  • the position command value may be a command value received from the arithmetic device 200 or a command value received from a host device (not shown) different from the arithmetic device 200.
  • the controller 127 has a position controller, a speed controller, and a current controller for controlling the driving of the motor 121. Based on the difference xerr between the position command value output by the position command generator 126 and the position detection value output by the position detector 124, the position controller obtains a position proportional gain or a position feed forward gain which is a parameter of the position controller.
  • the velocity command value is output using (position FF gain).
  • the speed controller outputs a current command value based on a speed command value, a speed detection value, and speed proportional gain, speed integral gain, and speed feedforward gain (speed FF gain) that are parameters of the speed controller.
  • the detected speed value is rotation speed information of the rotor detected based on the detection result of the magnetic sensor.
  • the current controller outputs a voltage command value vref based on the current command value.
  • the PWM control unit 128 generates a PWM signal (UH, VH, WH, UL, VL, WL) based on the voltage command value vref. Then, based on the generated PWM signal, the PWM control unit 128 performs on / off control of a switching element included in the inverter 129, and supplies driving power to the motor 121.
  • the motor device 100 has the communication connector as described above.
  • the communication connector can include an Rx pin, a Tx pin, a 3.3V pin, and an SGND pin. These Rx pin, Tx pin, 3.3V pin, and SGND pin can be connected to a communication cable (USB-UART conversion cable) 300. Further, by inputting an input pulse signal (STMP) or a motor rotation direction (CW_CCW) to the position command generator 126 of the motor control circuit, the motor can be driven by the pulse signal.
  • STMP input pulse signal
  • CW_CCW motor rotation direction
  • FIG. 3 is a diagram showing a relationship between the MCU 130 and the motor 121 included in the motor device 100.
  • the drive of the motor 121 is detected by the Hall element 122, amplified by the differential amplifier 123, and converted into a digital signal by an A / D converter (ADC) in the MCU 130.
  • ADC A / D converter
  • a PWM signal for driving the motor is generated in the MCU 130, and the generated PWM signal is output to the inverter 129 to drive the motor 121.
  • the arithmetic device 200 includes an input unit 201 for inputting data and a display unit 202 for displaying data.
  • the arithmetic device 200 can be, for example, a personal computer (PC).
  • the input unit 201 includes a pointing device such as a keyboard and a mouse, and is operable by a user to operate a GUI (Graphical User Interface).
  • the display unit 202 includes a monitor such as a liquid crystal display, and displays the GUI.
  • the display unit 202 can display the processing result of the arithmetic device 200 as an image, characters, or the like.
  • the arithmetic unit 200 selects, from the motor device 100, a data receiving unit that receives serial data to be described later via a communication module (communication cable 300), and selects an optimum value of a control parameter of the motor control circuit based on the serial data. And a parameter selection unit for performing the parameter selection.
  • the arithmetic device 200 includes a command transmission unit that transmits to the motor device 100 a command to change the control parameter of the motor control circuit to the optimum value. When the command is transmitted to the motor device 100 by the command transmitting unit, the control parameters of the motor control circuit are changed to the optimal values determined in the arithmetic device 200, and the controller 127 in FIG. Operate.
  • FIG. 4 is a diagram showing a USB-UART conversion cable as the communication cable 300.
  • the communication cable 300 has a USB connection terminal 310 at one end and a UART connection terminal 320 at the other end where a USB-UART conversion driver is arranged.
  • the USB connection terminal 310 is connected to a USB terminal of the arithmetic device 200, and the UART connection terminal 320 is connected to a communication connector of a circuit board of the motor device 100.
  • the communication cable 300 may have a buffer capable of storing serial data. In this case, a buffer of, for example, 1 kByte is mounted on the USB connection terminal 310. Since the communication cable 300 has a buffer, a data string of UART communication can be temporarily stored in the communication cable 300, and data can be transmitted and received in packet units.
  • the UART connection terminal 320 is divided into ten cables. Of the ten pins of the UART connection terminal 320, the VCC pin is set to the 3.3V pin of the motor device 100, and the TxD pin is set to the Rx of the motor device 100. The pin, the RxD pin is connected to the Tx pin of the motor device 100, and the GND pin is connected to GND of the motor device 100. This allows transmission and reception of serial data between the motor device 100 and the arithmetic device 200 via the communication cable 300, which is a USB-UART conversion cable.
  • the arithmetic device 200 uses the USB-UART conversion cable.
  • the connection between the arithmetic unit 200 and the communication cable 300 can be performed by using a driver for this.
  • the driver is incorporated in the arithmetic device 200.
  • the arithmetic device 200 Transmits a motor information transmission request command.
  • the arithmetic device 200 includes the command transmission unit that transmits the motor information transmission request command to the motor device 100.
  • the motor device 100 drives the motor in response to the command, detects the motor information, and sends the motor information to the arithmetic device 200 via the communication cable 300. Serial data including motor information can be transmitted.
  • the motor information may include at least one of position information, rotation speed information, and torque information of the rotor. That is, the motor control circuit of the motor device 100 detects the motor information including at least one of the power information, the rotor position information, the rotation speed information, and the torque information based on the detection result of the sensor at the time of driving the motor. It has a part. Further, the motor control circuit includes a motor information transmission unit that transmits serial data including motor information to the arithmetic device 200 via the communication cable 300.
  • the motor control circuit (motor information transmitting unit) of the motor device 100 can continuously transmit serial data in response to one transmission request command.
  • the motor device 100 can continuously transmit serial data without performing communication using the master-slave method. That is, the arithmetic device 200 does not need to transmit an ACK frame every time serial data is acquired. Therefore, high-speed transmission and reception of serial data between the motor device 100 and the arithmetic device 200 is possible.
  • the serial data is generated in the MCU 130 of FIG.
  • the data string of the UART generated in the MCU 130 is output from the GPIO pin and transmitted to the arithmetic device 200 via the communication cable (USB-UART conversion cable) 300.
  • the serial data is data in which a plurality of pieces of motor information acquired in each control cycle (for example, 140 ⁇ s) of the motor control circuit are sequentially connected in the order of acquisition.
  • the arithmetic unit 200 can acquire motor information (position, speed, torque, etc.) for each motor control cycle.
  • the type of the motor information acquired by the arithmetic device 200 can be selected by the user from the GUI.
  • the serial data obtained from the motor device 100 is serial data including motor information necessary for tuning
  • the arithmetic device 200 selects an optimum value of a control parameter of the motor control circuit based on the obtained motor information. Can be.
  • the arithmetic device 200 has a display unit 202. If the serial data acquired from the motor device 100 is serial data including motor information necessary for confirming the operation of the motor, the acquired motor information is graphed. It can be displayed on the display unit 202. Thus, after the tuning of the motor is executed, the user can easily confirm whether the tuning has been correctly performed. Further, the user can instruct fine adjustment of the control parameters from the GUI based on the information displayed on the display unit 202. In this case, the arithmetic device 200 transmits a command to the motor device 100 to change the control parameter adjusted by the user to an optimal value.
  • the motor control cycle is more than ten ⁇ s, and in order to draw a real-time graph of the motor information, it is necessary to acquire the motor information for each of the above-described motor control cycles.
  • serial data cannot be acquired within a latency time (for example, 2 ms or less) due to a communication protocol.
  • RS232C UART communication
  • RS232C UART communication
  • FIGS. 5A and 5B are diagrams showing a frame structure of a packet when serial data is transmitted by one conventional signal line.
  • FIG. 5A shows a case in which one type of motor information is transmitted
  • FIG. 5B shows a case in which a plurality of types (X types) of motor information are transmitted.
  • the conventional serial data 610 includes a header section 611, a data section 612, and a CRC (Cyclic Redundancy Check) section 613.
  • the header stores communication standards, address information, and the like as motor identification information.
  • the data section stores motor information (SERISL DATA1) indicating the state of the motor and information (Time1) on the acquisition time of the motor information.
  • the CRC section 613 stores a checksum value. Note that the checksum value may be arranged in the header section 611 in some cases.
  • the motor control circuit of the motor device 100 converts the plurality of pieces of motor information acquired for each control cycle of the motor control circuit into serial data that is sequentially connected in the order of acquisition.
  • the data is transmitted to the arithmetic device 200.
  • the arithmetic unit 200 can perform real-time graph drawing using the motor information acquired for each motor control cycle based on the received serial data.
  • FIG. 6 is a diagram illustrating a frame configuration of a packet in serial data transmission according to the present embodiment.
  • the serial data 620 in the present embodiment includes a header section 621 and a data section 622.
  • the header 621 stores communication standards, address information, and the like as motor identification information.
  • the data section 622 stores a plurality of types of motor information indicating the state of the motor.
  • the data stored in the data unit 622 is motor information acquired in each motor control cycle in the motor control device (motor control circuit) and sequentially connected in the acquired order.
  • MOTOR DATA (x + n) indicates the x-th type of motor information acquired in the n-th sampling.
  • the data stored in the data section 622 can be represented by the following equation.
  • SamplingAppend (CreateMotorDatas (X), 1, N) ......... (1)
  • CreateMotorDatas (X) is a function for acquiring and returning X types of motor information (MOTOR DATA)
  • SamplingAppend (MotorDatas, i, N) is for acquiring the first argument MotorDatas. This function is repeated from the i-th argument to the N-th argument and connected in order.
  • the serial data 620 does not include information on the acquisition time of the motor information, but includes data in which a plurality of types (X types) of motor information obtained a plurality of times (N times) in each control cycle are sequentially superimposed.
  • the motor device 100 samples a plurality of types of motor information a plurality of times, and collectively transmits the information to the arithmetic device 200 using one signal line. That is, the motor device 100 obtains a plurality of types of motor information indicating the state of the motor for each control cycle of the motor control circuit, and generates serial data in which the obtained plurality of types of motor information are sequentially connected in the order in which they were obtained. It has a data generation unit and a data transmission unit that transmits the generated serial data to the arithmetic device 200 via a communication module.
  • the sampling cycle of the motor information is equal to the control cycle of the motor control circuit and is constant, it is not necessary to include information on the acquisition time of the motor information in the frame. Therefore, the data length can be reduced accordingly. In addition, since the communication capacity can be reduced by that amount, data communication can be performed at higher speed.
  • the number of motor information linked to the data section 622 is limited. This is because the number of data that can be transmitted is limited by the communication speed and the size of the buffer temporarily stored during data transmission and reception.
  • the number of consecutive data is mainly governed by the communication speed, but when the buffer size is 5 kByte or less, the number of consecutive data is governed by the buffer size.
  • the maximum communication speed of the UART communication is 6 Mbps (6 MBaudRate).
  • the number of motor information to be linked is 428 at the maximum.
  • data is transmitted and received when the buffer size reaches 80% of the buffer size.
  • FIG. 7 is a flowchart illustrating a procedure when the arithmetic device 200 acquires serial data necessary for tuning from the motor device 100.
  • the process illustrated in FIG. 7 is started at a timing when a user inputs a command for instructing connection between the motor device 100 and the arithmetic device 200 from the GUI displayed on the display unit 202 of the arithmetic device 200.
  • the arithmetic device 200 sets the communication cable 300, which is a USB-UART conversion cable.
  • the arithmetic device 200 sets the latency time of the UART communication to the shortest time (for example, 2 ms), and connects the communication port of the arithmetic device 200 to the communication cable 300.
  • step S2 the arithmetic device 200 determines whether the connection with the USB-UART conversion cable has been normally performed. When it is determined that the connection has not been made, the process proceeds to step S15, and when it is determined that the connection has been normally made, the process proceeds to step S3.
  • step S3 the arithmetic device 200 determines the data reception time.
  • the reception time can be determined, for example, based on the driving conditions of the motor specified by the user from the GUI.
  • step S4 the arithmetic unit 200 calculates the data length of the serial data to be received (the number of received motor information) based on the reception time determined in step S3.
  • step S5 the arithmetic unit 200 generates an array for storing serial data in an internal memory or the like.
  • the arithmetic unit 200 purges the buffer of the USB-UART conversion cable. By purging the buffer in this way, it is possible to prevent the arithmetic device 200 from receiving past data remaining in the buffer and executing erroneous processing.
  • step S7 the arithmetic device 200 transmits a motor information transmission request command (data output ON command) to the motor device 100 via the USB-UART conversion cable. Then, the motor device 100 receives the data output ON command, and continuously transmits serial data via the USB-UART conversion cable.
  • step S8 the arithmetic unit 200 receives the serial data transmitted from the motor device 100 via the USB-UART conversion cable, and determines in step S9 whether the serial data has been normally received. If the arithmetic unit 200 determines that serial data cannot be received, the process proceeds to step S15, and if it determines that serial data has been successfully received, the process proceeds to step S10. In step S10, the arithmetic unit 200 waits for a predetermined time (for example, 10 ms), and proceeds to step S11. In step S11, the arithmetic device 200 determines whether the data transmission process has been interrupted.
  • a predetermined time for example, 10 ms
  • the arithmetic device 200 determines that the data transmission process has been interrupted.
  • the process proceeds to step S15, and when it determines that the data transmission process has not been interrupted, the process proceeds to step S12.
  • step S12 the arithmetic unit 200 divides and holds the received serial data for each type of motor information and for each control cycle (sampling cycle). Specifically, the arithmetic unit 200 stores the data divided into the array generated in step S5. In step S13, the arithmetic unit 200 adds the received serial data to the serial data received so far. In step S14, the arithmetic unit 200 determines whether the serial data has been received for the reception time determined in step S3. If the arithmetic unit 200 determines that serial data has not been received for the reception time, the process returns to step S8. If it determines that serial data has been received for the reception time, it determines that reception has been completed. To step S15. In step S15, the arithmetic unit 200 closes the communication port and ends the processing in FIG.
  • FIG. 8 is a flowchart illustrating a procedure when the arithmetic device 200 performs the graph drawing based on the serial data acquired from the motor device 100.
  • the process shown in FIG. 8 is started at the timing when the user inputs a command for confirming the operation of the motor from the GUI displayed on the display unit 202 of the arithmetic device 200.
  • steps for performing the same processing as in FIG. 7 are denoted by the same step numbers as in FIG. 7, and the following description will focus on the different parts of the processing.
  • step S21 the arithmetic device 200 displays a screen for drawing a graph on the display unit 202, and proceeds to step S22.
  • step S22 the arithmetic device 200 reproduces an event that interrupts real-time graph drawing. If the connection between the arithmetic unit 200 and the USB-UART conversion cable is normally performed, in step S23, the arithmetic unit 200 generates an array for storing serial data in an internal memory or the like. At this time, the arithmetic unit 200 sets the array for storing the serial data to a sufficient size.
  • step S24 the arithmetic unit 200 displays the state of the motor on the display unit 202 using the stored data.
  • the arithmetic device 200 uses the held data to set the horizontal axis as the acquisition time of the motor information Time and the vertical axis as the motor information (for example, rotation speed information Speed) as shown in FIG.
  • the state of the motor is graphed and displayed on the display unit 202. At this time, as shown in FIG. 8, if the response value is displayed so as to be superimposed on the command value, the user can easily confirm whether or not the tuning has been correctly performed.
  • step S25 the arithmetic unit 200 determines whether or not to end the graph drawing. If it is determined that the graph drawing is not to be ended, the process returns to step S8. If it is determined that the graph drawing has been ended, the processing proceeds to step S15. Move to For example, when a motor stop event process occurs, it is determined that real-time graph drawing is to be ended. In the process shown in FIG. 8, a case has been described in which data is acquired and a graph is updated until an event process of a motor stop occurs. However, a data reception time is determined in advance, and when the reception time elapses. The graph drawing may be ended.
  • the data communication method in the motor device 100 includes the steps of acquiring a plurality of types of motor information indicating the state of the motor for each motor control cycle in the motor control device (motor control circuit); Generating the serial data in which the motor information is sequentially arranged in the order of acquisition, and transmitting the generated serial data.
  • the motor information includes position information and rotation speed information of a rotor included in the motor.
  • the motor device 100 can collectively transmit a plurality of types of motor information sampled a plurality of times for each motor control cycle. Can be observed and analyzed.
  • serial data can be generated by sequentially connecting the motor information obtained a plurality of times in each control cycle without including information on the acquisition time of the motor information.
  • the data communication method in motor device 100 further includes a step of receiving a transmission request command for motor information.
  • serial data is continuously transmitted in response to one transmission request command. can do.
  • the motor device 100 since the motor device 100 does not communicate in the master-slave system and continuously transmits serial data, the arithmetic device 200 as the receiving device can acquire high-speed serial data.
  • the data communication method in the arithmetic device 200 includes a step of receiving serial data in which a plurality of types of motor information indicating a state of the motor acquired for each motor control cycle in the motor control device (motor control circuit) are sequentially connected. And a step of dividing the received serial data for each type of motor information and for each control cycle and holding the divided data, and a step of displaying the state of the motor on the display unit using the held data.
  • the arithmetic unit 200 can observe and analyze the motor status with high resolution based on the received serial data, and can display the state of the motor on the display unit. Therefore, the user can appropriately grasp the state of the motor.
  • the horizontal axis is the acquisition time of the motor information and the vertical axis is the motor information, and the state of the motor is graphed and displayed on the display unit.
  • the serial data does not include information on the acquisition time of the motor information, and may be data in which the motor information acquired a plurality of times in each control cycle is sequentially connected.
  • the arithmetic unit 200 can appropriately grasp the acquisition time of the motor information even if the acquisition time information of the motor information is not included in the serial data. Therefore, the arithmetic unit 200 can appropriately display the state of the motor on the display unit.
  • the data communication method in the arithmetic device 200 further includes a step of transmitting a transmission request command for motor information.
  • the serial data is continuously transmitted in response to one transmission request command. To receive.
  • the arithmetic unit 200 since the arithmetic unit 200 does not communicate in the master-slave system and continuously receives serial data, high-speed acquisition of serial data is possible.
  • the data communication method according to the present embodiment can appropriately observe a plurality of types of motor information indicating the state of the motor in the motor control cycle (on the order of tens of ⁇ s). Therefore, when the data communication system to which the data communication method according to the present embodiment is applied is a tuning system, the control parameter adjustment accuracy can be improved.
  • the data communication system to which the data communication method according to the present embodiment is applied may be a system for monitoring the state of a motor, a system for evaluating the state of a motor, or the like, and is not limited to a tuning system.
  • the tuning system 1000A includes a motor device 100 that is an electromechanical integrated motor, an arithmetic device 200 including an input unit and a display unit, and a communication module that communicably connects the motor device 100 and the arithmetic device 200.
  • the communication module has one serial communication cable (communication cable) 300 connected to a communication connector mounted on a circuit board of the motor device 100.
  • the tuning system 1000A can perform motor tuning with a simple system configuration in which the electromechanical integrated motor 100 and the arithmetic device 200 are communicably connected by the communication module having one serial communication cable 300. it can.
  • the conventional tuning system does not directly connect the input device and the motor, but is a system in which a plurality of devices are combined, so that the setting is expensive and complicated.
  • the motor is directly connected to the arithmetic unit having the input unit and the display unit and the motor, so that the motor can be tuned inexpensively and without complicated settings.
  • the tuning system 1000A communicably connects the electromechanical integrated motor 100 and the arithmetic device 200 with a communication module having one serial communication cable 300.
  • the communication connector and the arithmetic unit 200 are directly connected by one serial communication cable.
  • the serial communication cable may be a USB-UART conversion cable.
  • serial communication can be appropriately performed between the electromechanical integrated motor 100 and the arithmetic device 200.
  • the serial communication cable can include a buffer capable of storing serial data. Therefore, data can be temporarily stored in the cable, and data can be transmitted and received in packet units.
  • the arithmetic device 200 has a driver for using the cable. Thus, data transmission and reception in packet units through the cable can be appropriately performed.
  • the tuning system 1000 according to the present embodiment can acquire a plurality of types of motor information for each motor control cycle and tune the motor with a simple configuration.
  • the tuning system 1000 according to the present embodiment is a system with a simplified configuration, so that cost reduction can be realized.
  • FIG. 10 is a configuration example of a tuning system 1000B in which the motor device 100 and the arithmetic device 200 are communicably connected by a wireless communication method.
  • the communication module that communicably connects the motor device 100 and the arithmetic device 200 includes a communication cable 300 and a wireless module (wireless communication module) 400.
  • the wireless communication standard may be Bluetooth (registered trademark), or a wireless LAN or Wi-Fi compliant with the IEEE 802.11 series standard. Note that the wireless communication standard is not limited to the above.
  • the motor device 100 is the same as the above-described motor device 100 included in the tuning system 1000A.
  • the arithmetic device 200 is different from the arithmetic device 200 included in the tuning system 1000A in that the arithmetic device 200 has a wireless communication function.
  • the communication cable 300 is the same as the communication cable 300 provided in the tuning system 1000A. However, the communication cable 300 differs in that the communication connector of the motor device 100 and the wireless module 400 are directly connected.
  • the wireless module 400 can wirelessly communicate with the arithmetic device 200, and the communication cable 300 connects the communication connector of the motor device 100 to the wireless module 400.
  • the configuration of the communication cable 300 is the same as the above-described communication cable 300 included in the tuning system 1000A.
  • the wireless module 400 has a buffer capable of storing serial data. The function of the buffer is the same as the buffer of the communication cable 300.
  • the frame configuration of the packet in the serial data transmission is the same as the frame configuration shown in FIG. 6 described above.
  • a CRC section storing a checksum value may be arranged after the data section 622.
  • FIG. 11 is a flowchart illustrating a procedure when the arithmetic device 200 acquires serial data necessary for tuning from the motor device 100.
  • the process illustrated in FIG. 11 is started at a timing when a user inputs a command for instructing connection between the motor device 100 and the arithmetic device 200 from the GUI displayed on the display unit 202 of the arithmetic device 200.
  • the process illustrated in FIG. 11 illustrates a process executed by the arithmetic device 200 and a process executed by the wireless module 400.
  • step S31 the arithmetic device 200 sets the wireless module 400.
  • the arithmetic unit 200 sets the latency time of the UART communication to the shortest time (for example, 2 ms), and connects the communication port of the wireless module 400 to the communication cable 300. Connecting.
  • step S32 the arithmetic device 200 determines whether or not the connection with the wireless module 400 has been normally performed. If it is determined that the connection has not been made, the process proceeds to step S51, and if it is determined that the connection has been made normally, the process proceeds to step S33.
  • step S33 the arithmetic device 200 determines the data reception time.
  • the reception time can be determined, for example, based on the driving conditions of the motor specified by the user from the GUI.
  • step S34 the arithmetic unit 200 calculates the data length of the received serial data (the number of received motor information) based on the reception time determined in step S33.
  • step S35 the arithmetic device 200 generates an array for storing serial data in an internal memory or the like.
  • the arithmetic unit 200 purges the buffer of the USB-UART conversion cable. By purging the buffer in this way, it is possible to prevent the arithmetic device 200 from receiving past data remaining in the buffer and executing erroneous processing.
  • step S37 the arithmetic unit 200 transmits a motor information transmission request command (data output ON command) to the wireless module 400 by wireless communication.
  • step S38 the wireless module 400 receives the transmission request command from the arithmetic device 200, and transmits the received transmission request command to the motor device 100 via the USB-UART conversion cable. Then, the motor device 100 receives the data output ON command, and continuously transmits serial data via the USB-UART conversion cable.
  • step S39 the wireless module 400 receives the serial data transmitted from the motor device 100 via the USB-UART conversion cable, and determines in step S40 whether the serial data has been normally received. If the wireless module 400 determines that serial data cannot be received, the process proceeds to step S51, and if it determines that serial data has been successfully received, the process proceeds to step S41. In step S41, the wireless module 400 waits for a predetermined time (for example, 10 ms), and proceeds to step S42. In step S42, the wireless module 400 transmits the serial data received from the motor device 100 to the arithmetic device 200 by wireless communication.
  • a predetermined time for example, 10 ms
  • step S43 the arithmetic device 200 receives the serial data from the wireless module 400, and divides and holds the received serial data for each type of motor information and for each control cycle (sampling cycle). Specifically, the arithmetic device 200 stores the data divided into the array generated in step S35. In step S44, the arithmetic unit 200 adds the received serial data to the serial data received so far. In step S45, the arithmetic device 200 determines whether the serial data has been received for the reception time determined in step S33. If the arithmetic device 200 determines that serial data has not been received for the reception time, the process returns to step S39. If it determines that serial data has been received for the reception time, it determines that reception has been completed. Then, the process proceeds to step S46.
  • step S46 the arithmetic device 200 transmits a motor information transmission stop command (data output OFF command) to the wireless module 400 by wireless communication.
  • step S47 the wireless module 400 receives the transmission stop command from the arithmetic device 200, and transmits the received transmission stop command to the motor device 100 via the USB-UART conversion cable.
  • step S48 the wireless module 400 receives a response signal (ACK / NAK) to the transmission stop command from the motor device 100.
  • step S49 the arithmetic device 200 purges the buffer of the wireless module 400, and determines in step S50 whether the purging of the buffer of the wireless module 400 has been performed normally.
  • step S51 the arithmetic device 200 closes the communication port and ends the processing in FIG.
  • FIG. 12 is a flowchart illustrating a procedure when the arithmetic device 200 performs the graph drawing based on the serial data acquired from the motor device 100.
  • the process illustrated in FIG. 12 is started at a timing when the user inputs a command for instructing the operation check of the motor from the GUI displayed on the display unit 202 of the arithmetic device 200.
  • steps for performing the same processing as in FIG. 11 are denoted by the same step numbers as in FIG. 11, and the following description will focus on the different parts of the processing.
  • step S61 the arithmetic device 200 displays a screen for drawing a graph on the display unit 202, and proceeds to step S62.
  • step S62 the arithmetic device 200 reproduces an event for interrupting real-time graph drawing. If the connection between the arithmetic device 200 and the wireless module 400 is normally performed, in step S63, the arithmetic device 200 generates an array for storing serial data in an internal memory or the like. At this time, the arithmetic unit 200 sets the array for storing the serial data to a sufficient size.
  • the arithmetic unit 200 displays the state of the motor on the display unit 202 using the stored data in step S64. Display. Specifically, as shown in FIG. 8 described above, the arithmetic device 200 uses the stored data to obtain the motor information acquisition time Time on the horizontal axis and the motor information (for example, rotation speed information Speed) on the vertical axis. The state of the motor is graphed and displayed on the display unit 202. At this time, as shown in FIG. 8, if the response value is displayed so as to be superimposed on the command value, the user can easily confirm whether or not the tuning has been correctly performed.
  • step S65 the arithmetic device 200 determines whether or not the graph drawing has been completed. If it is determined that the graph drawing has not been completed, the process returns to step S39. If it is determined that the graph drawing has been completed, Move to step S46.
  • the tuning system 1000B connects the motor device 100, which is an electromechanical integrated motor, the arithmetic device 200 including the input unit and the display unit, and the motor device 100 and the arithmetic device 200 so that they can communicate with each other.
  • a communication module is capable of wireless communication with one serial communication cable (communication cable) 300 connecting the communication connector mounted on the circuit board of the motor device 100 and the wireless communication module 400, and the arithmetic unit 200.
  • a wireless communication module 400 is capable of wireless communication with one serial communication cable (communication cable) 300 connecting the communication connector mounted on the circuit board of the motor device 100 and the wireless communication module 400, and the arithmetic unit 200.
  • the tuning system 1000B can perform data transmission and reception between the electromechanical integrated motor 100 and the arithmetic unit 200 with a simple system configuration, and can tune the motor. Further, the tuning system 1000B can transmit and receive data between the electromechanical integrated motor 100 and the arithmetic device 200 by wireless communication. Therefore, the arithmetic unit 200 can acquire motor information from the motor device 100 by remote control and perform motor tuning. Further, since the state of the motor can be observed by remote control, the convenience can be improved as compared with the wired communication method.
  • the pulse generator 500 is connected to the motor device 100 as in a control parameter adjustment system (tuning system) 1000C shown in FIG. 12 and a control parameter adjustment system (tuning system) 1000D shown in FIG. It may be connected.
  • the input pulse signal (STMP) and the motor rotation direction (CW_CCW) are input from the pulse generator 500 to the MCU 130 shown in FIG. 0 means that the motor can be driven by a pulse signal.
  • the magnetic sensor may be an encoder.
  • the encoder may be a magnetic type or an optical type.

Landscapes

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

Abstract

This tuning system comprises a motor, an arithmetic device, and a communication module. The motor has: a rotor that has a shaft; a stator that faces the rotor in the radial direction; a housing that encloses the rotor and the stator; a circuit board that has a motor control circuit and is disposed near the housing; and a communication connector that is mounted on the circuit board. The communication module has one serial communication cable that is connected to the communication connector. The arithmetic device has: an input unit that inputs data; a display unit that displays data; a parameter selection unit that receives serial data from the motor via the communication module and selects an optimum value for a control parameter of the motor control circuit on the basis of the serial data; and a command transmission unit that transmits, to the motor, a command to change the control parameter to the optimum value.

Description

チューニングシステムTuning system
 本発明は、サーボモータのチューニングを行うチューニングシステムに関する。 The present invention relates to a tuning system for tuning a servomotor.
 サーボモータは、用いられる装置に応じて、異なる負荷に対して異なる速度制御、異なる位置制御が要求されることから、制御パラメータ(ゲイン)を適切に調整することが求められる。
 特許文献1には、制御パラメータのチューニングを行うためのシステム構成として、電動機と、サーボアンプ(電動機制御装置)と、自動調整機能および調整結果管理装置を搭載するパソコンと、を備える構成が開示されている。さらに、このシステムは、電動機の位置検出信号をサーボアンプに伝送するケーブルと、サーボアンプから電動機に駆動電力を供給するケーブルと、パソコンからの調整条件および電動機動作時の運転データをサーボアンプに伝送するための通信ケーブルと、を備える。
Servo motors require different speed control and different position control for different loads depending on the device used, so it is required to appropriately adjust control parameters (gain).
Patent Literature 1 discloses, as a system configuration for tuning control parameters, a configuration including a motor, a servo amplifier (motor control device), and a personal computer equipped with an automatic adjustment function and an adjustment result management device. ing. In addition, this system transmits a cable that transmits the position detection signal of the motor to the servo amplifier, a cable that supplies drive power from the servo amplifier to the motor, and transmission of adjustment conditions from the personal computer and operating data during motor operation to the servo amplifier. A communication cable for performing the operation.
日本国公開公報:特開2016-019304号公報Japanese Unexamined Patent Publication: JP-A-2016-019304
 上記従来のシステム構成では、制御パラメータをチューニングするためにサーボアンプを必要としている。このように、チューニングを行うために複数の機器を組み合わせており、システムの構成部品・構成部材を多く必要とする。そのため、高価かつ設定が複雑なシステムとなっていた。
 そこで、本発明は、構成が簡素化され、低コスト化されたチューニングシステムを提供することを目的とする。
The conventional system configuration requires a servo amplifier to tune the control parameters. As described above, a plurality of devices are combined to perform tuning, and many components and components of the system are required. For this reason, the system is expensive and has complicated settings.
Therefore, an object of the present invention is to provide a tuning system whose configuration is simplified and whose cost is reduced.
 上記課題を解決するために、本発明の一つの態様のチューニングシステムは、モータと、演算装置と、前記モータと前記演算装置とを通信可能に接続する通信モジュールと、を備える。前記モータは、シャフトを有するロータと、前記ロータに対して径方向に対向するステータと、前記ロータおよび前記ステータを囲むハウジングと、モータ制御回路を有し、前記ハウジングの近傍に配置された回路基板と、前記回路基板に実装された通信コネクタと、を有する。前記通信モジュールは、前記通信コネクタに接続された1本のシリアル通信ケーブルを有する。前記演算装置は、データを入力する入力部と、データを表示する表示部と、前記モータから、前記通信モジュールを介してシリアルデータを受信し、当該シリアルデータに基づいて、前記モータ制御回路の制御パラメータの最適値を選出するパラメータ選出部と、前記モータに対して、前記制御パラメータを前記最適値に変更する指令を送信する指令送信部と、を有する。 In order to solve the above problems, a tuning system according to one aspect of the present invention includes a motor, an arithmetic device, and a communication module that communicably connects the motor and the arithmetic device. The motor includes a rotor having a shaft, a stator radially opposed to the rotor, a housing surrounding the rotor and the stator, and a motor control circuit, and a circuit board disposed near the housing. And a communication connector mounted on the circuit board. The communication module has one serial communication cable connected to the communication connector. The arithmetic unit receives an input unit for inputting data, a display unit for displaying data, serial data from the motor via the communication module, and controls the motor control circuit based on the serial data. A parameter selection unit that selects an optimum value of the parameter; and a command transmission unit that transmits a command to change the control parameter to the optimum value to the motor.
 本発明の一つの態様によれば、機電一体モータと、モータのチューニングを行う演算装置とを、1本のシリアル通信ケーブルを有する通信モジュールによって通信可能に接続した構成とするので、構成が簡素化され、低コスト化されたチューニングシステムとすることができる。 According to one embodiment of the present invention, the configuration is simplified because the electromechanical integrated motor and the arithmetic unit for tuning the motor are communicably connected by a communication module having one serial communication cable. Thus, the tuning system can be reduced in cost.
図1は、第一の実施形態のチューニングシステムの構成例である。FIG. 1 is a configuration example of a tuning system according to the first embodiment. 図2は、機電一体モータの構成例である。FIG. 2 is an example of the configuration of a motor integrated with electromechanical system. 図3は、MCUとモータとの間の関係を示す図である。FIG. 3 is a diagram illustrating a relationship between the MCU and the motor. 図4は、USB-UART変換ケーブルを示す図である。FIG. 4 is a diagram showing a USB-UART conversion cable. 図5は、従来のパケットのフレーム構成を示す図である。FIG. 5 is a diagram showing a frame structure of a conventional packet. 図6は、本実施形態のパケットのフレーム構成を示す図である。FIG. 6 is a diagram illustrating a frame configuration of a packet according to the present embodiment. 図7は、シリアルデータ取得手順を説明するフローチャートである。FIG. 7 is a flowchart illustrating a serial data acquisition procedure. 図8は、シリアルデータ取得とグラフ描画手順を説明するフローチャートである。FIG. 8 is a flowchart illustrating a procedure for acquiring serial data and drawing a graph. 図9は、グラフ描画の一例である。FIG. 9 is an example of graph drawing. 図10は、第二の実施形態のチューニングシステムの構成例である。FIG. 10 is a configuration example of a tuning system according to the second embodiment. 図11は、シリアルデータ取得手順を説明するフローチャートである。FIG. 11 is a flowchart illustrating a serial data acquisition procedure. 図12は、シリアルデータ取得とグラフ描画手順を説明するフローチャートである。FIG. 12 is a flowchart illustrating a procedure for acquiring serial data and drawing a graph. 図13は、チューニングシステムの別の構成例である。FIG. 13 is another configuration example of the tuning system. 図14は、チューニングシステムの別の構成例である。FIG. 14 is another configuration example of the tuning system.
  以下、図面を用いて本発明の実施の形態について説明する。
  なお、本発明の範囲は、以下の実施の形態に限定されるものではなく、本発明の技術的思想の範囲内で任意に変更可能である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
Note that the scope of the present invention is not limited to the following embodiments, and can be arbitrarily changed within the technical idea of the present invention.
(第一の実施形態)
 図1は、本実施形態におけるチューニングシステム(制御パラメータ調整システム)1000Aの構成例である。
 チューニングシステム1000Aは、機電一体モータであるモータ装置100と、演算装置200と、を備える。また、チューニングシステム1000Aは、モータ装置100と演算装置200とを通信可能に接続する通信モジュールを備える。図1に示すチューニングシステム1000Aは、モータ装置100と演算装置200とを有線通線方式にて通信可能に接続するシステムであり、上記通信モジュールは、モータ装置100と演算装置200とを直接接続する通信ケーブル300である。本実施形態において、通信ケーブル300は、1本のシリアル通信ケーブルである。シリアル通信ケーブルは、例えばUSB-UART変換ケーブルである。
(First embodiment)
FIG. 1 is a configuration example of a tuning system (control parameter adjustment system) 1000A in the present embodiment.
Tuning system 1000A includes motor device 100, which is an electromechanical integrated motor, and arithmetic device 200. Further, tuning system 1000A includes a communication module that communicably connects motor device 100 and arithmetic device 200. The tuning system 1000A shown in FIG. 1 is a system that connects the motor device 100 and the arithmetic device 200 so as to be able to communicate with each other in a wired communication system. The communication module directly connects the motor device 100 and the arithmetic device 200. Communication cable 300. In the present embodiment, the communication cable 300 is a single serial communication cable. The serial communication cable is, for example, a USB-UART conversion cable.
 モータ装置100は、シャフトを有するロータと、ロータに対して径方向に対向するステータと、ロータおよびステータを囲むハウジングと、を有する。また、モータ装置100は、ハウジングの近傍に配置された回路基板を有する。この回路基板は、モータの駆動制御を行うモータ制御回路を有する。また、この回路基板には通信コネクタが実装されている。通信ケーブル300は、その一端が、モータ装置100の回路基板に実装された通信コネクタに接続され、他端が、演算装置200に接続される。このように、通信ケーブル300は、通信コネクタと演算装置200とを直接接続する。
 さらに、モータ装置100は、回路基板に実装された磁気センサおよび電流センサを有し、モータ装置100単体で電力情報、ロータの位置情報、回転速度情報およびトルク情報を含むモータ情報を取得可能である。例えば、電流センサは、コイルに流れる電流値情報を取得可能である。また、モータ装置100は、インバータが印加する電圧値情報を取得可能である。
 このように、モータ装置100は、モータ制御回路と、モータ情報を検出可能なセンサと、通信機能(通信コネクタ)と、を備える。したがって、モータ装置100は、単体でモータ制御とデータ送受信とが可能である。
The motor device 100 includes a rotor having a shaft, a stator radially facing the rotor, and a housing surrounding the rotor and the stator. In addition, the motor device 100 has a circuit board arranged near the housing. This circuit board has a motor control circuit that controls driving of the motor. A communication connector is mounted on the circuit board. The communication cable 300 has one end connected to a communication connector mounted on a circuit board of the motor device 100, and the other end connected to the arithmetic device 200. As described above, the communication cable 300 directly connects the communication connector and the arithmetic device 200.
Further, the motor device 100 has a magnetic sensor and a current sensor mounted on a circuit board, and the motor device 100 alone can acquire motor information including power information, rotor position information, rotation speed information, and torque information. . For example, the current sensor can acquire information on a current value flowing through the coil. In addition, the motor device 100 can acquire voltage value information applied by the inverter.
As described above, the motor device 100 includes the motor control circuit, the sensor capable of detecting the motor information, and the communication function (communication connector). Therefore, the motor device 100 can perform motor control and data transmission / reception by itself.
 図2は、モータ装置100の構成例である。
 この図2に示すように、モータ装置100は、モータ121と、ホール素子122と、差動増幅器123と、位置検出部124と、メモリ125と、位置指令発生部126と、制御器部127と、PWM制御部128と、インバータ129と、を備える。差動増幅器123、位置検出部124、メモリ125、位置指令発生部126、制御器部127、PWM制御部128およびインバータ129は、モータ制御回路に含まれる。このように、モータ装置100は、モータ121とモータ制御回路とが一体となった構造を有する。
FIG. 2 is a configuration example of the motor device 100.
As shown in FIG. 2, the motor device 100 includes a motor 121, a Hall element 122, a differential amplifier 123, a position detector 124, a memory 125, a position command generator 126, and a controller 127. , A PWM control unit 128, and an inverter 129. The differential amplifier 123, the position detector 124, the memory 125, the position command generator 126, the controller 127, the PWM controller 128, and the inverter 129 are included in the motor control circuit. Thus, the motor device 100 has a structure in which the motor 121 and the motor control circuit are integrated.
 モータ121は、例えば3相ブラシレスモータであり、モータ制御回路により駆動電力が供給される。
 磁気センサであるホール素子122の出力は、差動増幅器123によって増幅され、位置検出部124に入力される。位置検出部124は、磁気センサの検出結果に基づいて、ロータの位置情報(位置検出値)を検出する。この位置検出部124は、メモリ125から学習値を取得してロータの位置情報を検出することもできる。
 位置指令発生部126は、モータ121の位置指令値を出力する。ここで、上記位置指令値は、演算装置200から受信した指令値であってもよいし、演算装置200とは別の不図示の上位装置から受信した指令値であってもよい。
The motor 121 is, for example, a three-phase brushless motor, and is supplied with driving power by a motor control circuit.
The output of the Hall element 122, which is a magnetic sensor, is amplified by the differential amplifier 123 and input to the position detection unit 124. The position detector 124 detects rotor position information (position detection value) based on the detection result of the magnetic sensor. The position detection unit 124 can also acquire the learning value from the memory 125 and detect the position information of the rotor.
Position command generator 126 outputs a position command value for motor 121. Here, the position command value may be a command value received from the arithmetic device 200 or a command value received from a host device (not shown) different from the arithmetic device 200.
 制御器部127は、モータ121の駆動制御を行うための位置制御器、速度制御器および電流制御器を有する。
 位置制御器は、位置指令発生部126が出力する位置指令値と位置検出部124が出力する位置検出値との差分xerrに基づいて、位置制御器のパラメータである位置比例ゲインや位置フィードフォワードゲイン(位置FFゲイン)を用いて、速度指令値を出力する。
 速度制御器は、速度指令値と、速度検出値と、速度制御器のパラメータである速度比例ゲインや速度積分ゲイン、速度フィードフォワードゲイン(速度FFゲイン)とに基づいて、電流指令値を出力する。ここで、速度検出値は、磁気センサの検出結果に基づいて検出されるロータの回転速度情報である。
 電流制御器は、電流指令値に基づいて、電圧指令値vrefを出力する。
 PWM制御部128は、電圧指令値vrefに基づいてPWM信号(UH、VH、WH、UL、VL、WL)を生成する。そして、PWM制御部128は、生成されたPWM信号に基づいて、インバータ129を構成するスイッチング素子をオン/オフ制御し、モータ121に駆動電力を供給する。
The controller 127 has a position controller, a speed controller, and a current controller for controlling the driving of the motor 121.
Based on the difference xerr between the position command value output by the position command generator 126 and the position detection value output by the position detector 124, the position controller obtains a position proportional gain or a position feed forward gain which is a parameter of the position controller. The velocity command value is output using (position FF gain).
The speed controller outputs a current command value based on a speed command value, a speed detection value, and speed proportional gain, speed integral gain, and speed feedforward gain (speed FF gain) that are parameters of the speed controller. . Here, the detected speed value is rotation speed information of the rotor detected based on the detection result of the magnetic sensor.
The current controller outputs a voltage command value vref based on the current command value.
The PWM control unit 128 generates a PWM signal (UH, VH, WH, UL, VL, WL) based on the voltage command value vref. Then, based on the generated PWM signal, the PWM control unit 128 performs on / off control of a switching element included in the inverter 129, and supplies driving power to the motor 121.
 モータ装置100は、上述したように通信コネクタを有する。当該通信コネクタは、Rxピン、Txピン、3.3Vピン、SGNDピンを備えることができる。そして、これらRxピン、Txピン、3.3Vピン、SGNDピンは、通信ケーブル(USB-UART変換ケーブル)300と接続することができる。
 また、モータ制御回路の位置指令発生部126に、入力パルス信号(STMP)やモータ回転方向(CW_CCW)を入力することで、モータをパルス信号で駆動させることもできる。
The motor device 100 has the communication connector as described above. The communication connector can include an Rx pin, a Tx pin, a 3.3V pin, and an SGND pin. These Rx pin, Tx pin, 3.3V pin, and SGND pin can be connected to a communication cable (USB-UART conversion cable) 300.
Further, by inputting an input pulse signal (STMP) or a motor rotation direction (CW_CCW) to the position command generator 126 of the motor control circuit, the motor can be driven by the pulse signal.
 図3は、モータ装置100が備えるMCU130とモータ121との間の関係を示す図である。この図3に示すように、モータ121の駆動はホール素子122によって検知され、差動増幅器123によって増幅された後、MCU130内でA/D変換器(ADC)によりデジタル信号に変換される。そして、このMCU130内において、モータ駆動のためのPWM信号の生成が行われ、生成されたPWM信号がインバータ129へ出力されてモータ121が駆動される。 FIG. 3 is a diagram showing a relationship between the MCU 130 and the motor 121 included in the motor device 100. As shown in FIG. 3, the drive of the motor 121 is detected by the Hall element 122, amplified by the differential amplifier 123, and converted into a digital signal by an A / D converter (ADC) in the MCU 130. Then, a PWM signal for driving the motor is generated in the MCU 130, and the generated PWM signal is output to the inverter 129 to drive the motor 121.
 図1に戻って、演算装置200は、データを入力する入力部201と、データを表示する表示部202と、を備える。演算装置200は、例えばパーソナルコンピュータ(PC)とすることができる。入力部201は、例えばキーボードやマウス等のポインティングデバイスを備え、GUI(Graphical User Interface)を操作するためにユーザが操作可能である。表示部202は、液晶ディスプレイ等のモニタを備えており、上記GUIを表示する。また、表示部202は、演算装置200による処理結果を画像や文字などにより表示することができる。
 演算装置200は、モータ装置100から、通信モジュール(通信ケーブル300)を介して後述するシリアルデータを受信するデータ受信部と、当該シリアルデータに基づいて、モータ制御回路の制御パラメータの最適値を選出するパラメータ選出部を備える。また、演算装置200は、モータ装置100に対して、モータ制御回路の制御パラメータを上記最適値に変更する指令を送信する指令送信部と、を有する。指令送信部により上記指令がモータ装置100に送信されることにより、モータ制御回路の制御パラメータが演算装置200において決定された最適値に変更され、図2の制御器部127は、当該最適値に従って動作する。
Returning to FIG. 1, the arithmetic device 200 includes an input unit 201 for inputting data and a display unit 202 for displaying data. The arithmetic device 200 can be, for example, a personal computer (PC). The input unit 201 includes a pointing device such as a keyboard and a mouse, and is operable by a user to operate a GUI (Graphical User Interface). The display unit 202 includes a monitor such as a liquid crystal display, and displays the GUI. In addition, the display unit 202 can display the processing result of the arithmetic device 200 as an image, characters, or the like.
The arithmetic unit 200 selects, from the motor device 100, a data receiving unit that receives serial data to be described later via a communication module (communication cable 300), and selects an optimum value of a control parameter of the motor control circuit based on the serial data. And a parameter selection unit for performing the parameter selection. In addition, the arithmetic device 200 includes a command transmission unit that transmits to the motor device 100 a command to change the control parameter of the motor control circuit to the optimum value. When the command is transmitted to the motor device 100 by the command transmitting unit, the control parameters of the motor control circuit are changed to the optimal values determined in the arithmetic device 200, and the controller 127 in FIG. Operate.
 図4は、通信ケーブル300としてのUSB-UART変換ケーブルを示す図である。通信ケーブル300は、その一端にUSB接続端子310を有し、他端にUSB-UART変換ドライバが配置されたUART接続端子320を有する。USB接続端子310は、演算装置200が有するUSB端子に接続され、UART接続端子320は、モータ装置100の回路基板が有する通信コネクタに接続される。
 通信ケーブル300は、シリアルデータを蓄積可能なバッファを有していてもよい。この場合、USB接続端子310部分に、例えば1kByteのバッファが搭載される。通信ケーブル300がバッファを有することで、通信ケーブル300内に一時的にUART通信のデータ列を蓄積し、パケット単位でデータを送受信することができる。
FIG. 4 is a diagram showing a USB-UART conversion cable as the communication cable 300. The communication cable 300 has a USB connection terminal 310 at one end and a UART connection terminal 320 at the other end where a USB-UART conversion driver is arranged. The USB connection terminal 310 is connected to a USB terminal of the arithmetic device 200, and the UART connection terminal 320 is connected to a communication connector of a circuit board of the motor device 100.
The communication cable 300 may have a buffer capable of storing serial data. In this case, a buffer of, for example, 1 kByte is mounted on the USB connection terminal 310. Since the communication cable 300 has a buffer, a data string of UART communication can be temporarily stored in the communication cable 300, and data can be transmitted and received in packet units.
 UART接続端子320部分は、10本のケーブルに分けられており、UART接続端子320の10本のピンのうち、VCCピンをモータ装置100の3.3Vピンに、TxDピンをモータ装置100のRxピンに、RxDピンをモータ装置100のTxピンに、GNDピンをモータ装置100のGNDに接続する。これにより、モータ装置100と演算装置200との間で、USB-UART変換ケーブルである通信ケーブル300を介したシリアルデータの送受信が可能となる。
 例えば、ユーザが、演算装置200の表示部202に表示されたGUIから、演算装置200と通信ケーブル300との接続を指示するコマンドを入力すると、演算装置200は、USB-UART変換ケーブルを利用するためのドライバを利用して、演算装置200と通信ケーブル300との接続を行うことができる。ここで、上記ドライバは、演算装置200内に組み込まれているものとする。
The UART connection terminal 320 is divided into ten cables. Of the ten pins of the UART connection terminal 320, the VCC pin is set to the 3.3V pin of the motor device 100, and the TxD pin is set to the Rx of the motor device 100. The pin, the RxD pin is connected to the Tx pin of the motor device 100, and the GND pin is connected to GND of the motor device 100. This allows transmission and reception of serial data between the motor device 100 and the arithmetic device 200 via the communication cable 300, which is a USB-UART conversion cable.
For example, when the user inputs a command for instructing connection between the arithmetic device 200 and the communication cable 300 from the GUI displayed on the display unit 202 of the arithmetic device 200, the arithmetic device 200 uses the USB-UART conversion cable. The connection between the arithmetic unit 200 and the communication cable 300 can be performed by using a driver for this. Here, it is assumed that the driver is incorporated in the arithmetic device 200.
 また、例えば、ユーザが、演算装置200の表示部202に表示されたGUIから、モータの駆動条件等を入力し、モータ情報の送信を指示するコマンドを入力すると、演算装置200は、モータ装置100に対してモータ情報の送信要求コマンドを送信する。このように、演算装置200は、モータ装置100に対して、モータ情報の送信要求コマンドを送信するコマンド送信部を備える。モータ装置100は、演算装置200から送信された送信要求コマンドを受信すると、当該コマンドに応答してモータを駆動し、モータ情報を検出して、演算装置200に対して、通信ケーブル300を介してモータ情報を含むシリアルデータを送信することができる。ここで、モータ情報は、ロータの位置情報、回転速度情報およびトルク情報の少なくとも1つを含むことができる。
 つまり、モータ装置100のモータ制御回路は、モータ駆動時におけるセンサの検出結果に基づいて、電力情報、ロータの位置情報、回転速度情報およびトルク情報の少なくとも一方を含むモータ情報を検出するモータ情報検出部を備える。また、モータ制御回路は、演算装置200に対して、通信ケーブル300を介して、モータ情報を含むシリアルデータを送信するモータ情報送信部を備える。
Further, for example, when the user inputs the driving conditions of the motor and the like from the GUI displayed on the display unit 202 of the arithmetic device 200 and inputs a command to instruct the transmission of the motor information, the arithmetic device 200 Transmits a motor information transmission request command. As described above, the arithmetic device 200 includes the command transmission unit that transmits the motor information transmission request command to the motor device 100. Upon receiving the transmission request command transmitted from the arithmetic device 200, the motor device 100 drives the motor in response to the command, detects the motor information, and sends the motor information to the arithmetic device 200 via the communication cable 300. Serial data including motor information can be transmitted. Here, the motor information may include at least one of position information, rotation speed information, and torque information of the rotor.
That is, the motor control circuit of the motor device 100 detects the motor information including at least one of the power information, the rotor position information, the rotation speed information, and the torque information based on the detection result of the sensor at the time of driving the motor. It has a part. Further, the motor control circuit includes a motor information transmission unit that transmits serial data including motor information to the arithmetic device 200 via the communication cable 300.
 また、モータ装置100のモータ制御回路(モータ情報送信部)は、1回の送信要求コマンドに対して、シリアルデータを連続して送信することができる。このように、モータ装置100は、シリアルデータ送信時には、マスタースレーブ方式で通信せず、シリアルデータを連続的に送信することができる。つまり、演算装置200は、シリアルデータの取得のたびにACKフレームを送信する必要がない。そのため、モータ装置100と演算装置200との間で、高速なシリアルデータの送受信が可能である。
 なお、上記シリアルデータは、図3のMCU130内で生成される。MCU130内で生成されたUARTのデータ列は、GPIOピンから出力され、通信ケーブル(USB-UART変換ケーブル)300を介して演算装置200へ送信される。
Further, the motor control circuit (motor information transmitting unit) of the motor device 100 can continuously transmit serial data in response to one transmission request command. As described above, during serial data transmission, the motor device 100 can continuously transmit serial data without performing communication using the master-slave method. That is, the arithmetic device 200 does not need to transmit an ACK frame every time serial data is acquired. Therefore, high-speed transmission and reception of serial data between the motor device 100 and the arithmetic device 200 is possible.
Note that the serial data is generated in the MCU 130 of FIG. The data string of the UART generated in the MCU 130 is output from the GPIO pin and transmitted to the arithmetic device 200 via the communication cable (USB-UART conversion cable) 300.
 ここで、シリアルデータは、モータ制御回路の制御周期(例えば140μs)ごとに取得した複数のモータ情報を、取得した順番に順次連ねたデータである。これにより、演算装置200は、モータの制御周期ごとにモータ情報(位置、速度、トルクなど)を取得することができる。なお、演算装置200が取得するモータ情報の種類は、ユーザがGUIから選択することができる。
 演算装置200は、モータ装置100から取得したシリアルデータが、チューニングに必要なモータ情報を含むシリアルデータである場合、取得したモータ情報に基づいて、モータ制御回路の制御パラメータの最適値を選出することができる。
Here, the serial data is data in which a plurality of pieces of motor information acquired in each control cycle (for example, 140 μs) of the motor control circuit are sequentially connected in the order of acquisition. Thereby, the arithmetic unit 200 can acquire motor information (position, speed, torque, etc.) for each motor control cycle. The type of the motor information acquired by the arithmetic device 200 can be selected by the user from the GUI.
When the serial data obtained from the motor device 100 is serial data including motor information necessary for tuning, the arithmetic device 200 selects an optimum value of a control parameter of the motor control circuit based on the obtained motor information. Can be.
 また、演算装置200は、表示部202を有しており、モータ装置100から取得したシリアルデータがモータの動作確認に必要なモータ情報を含むシリアルデータである場合、取得したモータ情報をグラフ化して表示部202に表示させることができる。これにより、モータのチューニングが実行された後に、ユーザは、正しくチューニングができたかどうかを容易に確認することができる。
 さらに、ユーザは、表示部202に表示された情報をもとに、GUIから制御パラメータの微調整を指示することもできる。この場合、演算装置200は、モータ装置100に対して、ユーザにより調整された制御パラメータを最適値に変更する指令を送信する。
The arithmetic device 200 has a display unit 202. If the serial data acquired from the motor device 100 is serial data including motor information necessary for confirming the operation of the motor, the acquired motor information is graphed. It can be displayed on the display unit 202. Thus, after the tuning of the motor is executed, the user can easily confirm whether the tuning has been correctly performed.
Further, the user can instruct fine adjustment of the control parameters from the GUI based on the information displayed on the display unit 202. In this case, the arithmetic device 200 transmits a command to the motor device 100 to change the control parameter adjusted by the user to an optimal value.
 以下、モータ装置100と演算装置200との間のデータ通信方法について具体的に説明する。
 モータの制御周期は十数μsであり、モータ情報のリアルタイムなグラフ描画を行うためには、上記のモータの制御周期ごとにモータ情報を取得する必要がある。しかしながら、従来、信号線1本でシリアル通信が行えるアーキテクチャの場合、通信規約により、レイテンシ(Latency)時間以下(例えば2ms以下)でシリアルデータを取得することができなかった。また、信号線1本でシリアル通信が行えるアーキテクチャであるRS232C(UART通信)は、データを正常に受信したことを確認可能なマスタースレーブ方式で行われていた。そのため、シリアルデータの取得に、通信時間分の遅延(タイムラグ)が生じていた。
Hereinafter, a data communication method between the motor device 100 and the arithmetic device 200 will be specifically described.
The motor control cycle is more than ten μs, and in order to draw a real-time graph of the motor information, it is necessary to acquire the motor information for each of the above-described motor control cycles. However, conventionally, in the case of an architecture in which serial communication can be performed with one signal line, serial data cannot be acquired within a latency time (for example, 2 ms or less) due to a communication protocol. In addition, RS232C (UART communication), which is an architecture in which serial communication can be performed with a single signal line, has been performed in a master-slave system that can confirm that data has been normally received. As a result, a delay (time lag) corresponding to the communication time has occurred in acquiring the serial data.
 図5(a)および図5(b)は、従来の1本の信号線でシリアルデータを送信する場合のパケットのフレーム構成を示す図である。ここで、図5(a)は、送信するモータ情報が1種類の場合、図5(b)は、送信するモータ情報が複数種類(X種類)の場合を示している。
 従来のシリアルデータ610は、ヘッダ部611とデータ部612とCRC(巡回冗長検査)部613と、を備える。ヘッダ部にはモータの識別情報として、通信規格やアドレス情報などが格納される。また、データ部には、モータの状態を示すモータ情報(SERISL DATA1)と、当該モータ情報の取得時間に関する情報(Time1)とが格納される。CRC部613にはチェックサム値が格納される。なお、チェックサム値は、ヘッダ部611内に配置される場合もある。
FIGS. 5A and 5B are diagrams showing a frame structure of a packet when serial data is transmitted by one conventional signal line. Here, FIG. 5A shows a case in which one type of motor information is transmitted, and FIG. 5B shows a case in which a plurality of types (X types) of motor information are transmitted.
The conventional serial data 610 includes a header section 611, a data section 612, and a CRC (Cyclic Redundancy Check) section 613. The header stores communication standards, address information, and the like as motor identification information. The data section stores motor information (SERISL DATA1) indicating the state of the motor and information (Time1) on the acquisition time of the motor information. The CRC section 613 stores a checksum value. Note that the checksum value may be arranged in the header section 611 in some cases.
 以上のように、従来は、マスタースレーブ方式によりシリアルデータの取得が行われており、シリアルデータは、1回のサンプリングごとに送信されていた。そのため、モータの制御周期ごとに取得されたモータ情報を用いてリアルタイムなグラフ描画を行うことができなかった。また、通信時にタイムラグがあるため、フレームにはシリアルデータの取得時間に関する情報を含める必要があり、データ長が長かった。
 なお、複数本の信号線で通信が行えるアーキテクチャの場合、例えば100μmの周期ごとのデータ取得が可能である。しかしながら、この場合、信号線を複数本必要とするため、システム構成が複雑になる。
As described above, conventionally, the acquisition of serial data is performed by the master-slave method, and the serial data is transmitted at each sampling. Therefore, real-time graph drawing cannot be performed using the motor information acquired for each motor control cycle. In addition, since there is a time lag during communication, it is necessary to include information about the acquisition time of serial data in the frame, and the data length is long.
In the case of an architecture in which communication can be performed using a plurality of signal lines, for example, data can be acquired at intervals of 100 μm. However, in this case, since a plurality of signal lines are required, the system configuration becomes complicated.
 これに対して、本実施形態では、モータ装置100のモータ制御回路は、上述したように、モータ制御回路の制御周期ごとに取得した複数のモータ情報を、取得した順番に順次連ねたシリアルデータを演算装置200へ送信するようにする。これにより、演算装置200は、受信したシリアルデータをもとに、モータの制御周期ごとに取得されたモータ情報を用いたリアルタイムなグラフ描画が可能となる。 On the other hand, in the present embodiment, as described above, the motor control circuit of the motor device 100 converts the plurality of pieces of motor information acquired for each control cycle of the motor control circuit into serial data that is sequentially connected in the order of acquisition. The data is transmitted to the arithmetic device 200. Accordingly, the arithmetic unit 200 can perform real-time graph drawing using the motor information acquired for each motor control cycle based on the received serial data.
 図6は、本実施形態のシリアルデータ送信におけるパケットのフレーム構成を示す図である。
 この図6に示すように、本実施形態におけるシリアルデータ620は、ヘッダ部621とデータ部622とを備える。ヘッダ部621にはモータの識別情報として、通信規格やアドレス情報などが格納される。また、データ部622にはモータの状態を示す複数種類のモータ情報が格納される。具体的には、データ部622が格納するデータは、モータ制御装置(モータ制御回路)におけるモータの制御周期ごとに取得され、取得された順番に順次連ねられたモータ情報である。ここで、MOTOR DATA(x+n)は、n回目のサンプリングで取得されたx番目の種類のモータ情報を示す。
FIG. 6 is a diagram illustrating a frame configuration of a packet in serial data transmission according to the present embodiment.
As shown in FIG. 6, the serial data 620 in the present embodiment includes a header section 621 and a data section 622. The header 621 stores communication standards, address information, and the like as motor identification information. The data section 622 stores a plurality of types of motor information indicating the state of the motor. Specifically, the data stored in the data unit 622 is motor information acquired in each motor control cycle in the motor control device (motor control circuit) and sequentially connected in the acquired order. Here, MOTOR DATA (x + n) indicates the x-th type of motor information acquired in the n-th sampling.
 データ部622に格納されるデータは、次式により表すことができる。
 SamplingAppend(CreateMotorDatas(X),1,N) ………(1)
 なお、上記(1)式において、CreateMotorDatas(X)は、モータ情報(MOTOR DATA)をX種類取得して返す関数、SamplingAppend(MotorDatas,i,N)は、第一引数MotorDatasの取得を、第二引数i回から第三引数N回まで繰り返し、順に連結する関数である。
 このように、シリアルデータ620は、モータ情報の取得時間に関する情報を含まず、制御周期ごとに複数回(N回)取得された複数種類(X種類)のモータ情報を順次重ねたデータを含む。
The data stored in the data section 622 can be represented by the following equation.
SamplingAppend (CreateMotorDatas (X), 1, N) ……… (1)
In the above equation (1), CreateMotorDatas (X) is a function for acquiring and returning X types of motor information (MOTOR DATA), and SamplingAppend (MotorDatas, i, N) is for acquiring the first argument MotorDatas. This function is repeated from the i-th argument to the N-th argument and connected in order.
As described above, the serial data 620 does not include information on the acquisition time of the motor information, but includes data in which a plurality of types (X types) of motor information obtained a plurality of times (N times) in each control cycle are sequentially superimposed.
 以上のように、本実施形態では、モータ装置100は、複数種類のモータ情報を複数回サンプリングし、1本の信号線を用いてまとめて演算装置200へ送信する。つまり、モータ装置100は、モータ制御回路の制御周期ごとにモータの状態を示す複数種類のモータ情報を取得し、取得した複数種類のモータ情報を、取得した順番に順次連ねたシリアルデータを生成するデータ生成部と、演算装置200に対して、通信モジュールを介して、生成されたシリアルデータを送信するデータ送信部と、有する。
 このとき、モータ情報のサンプリング周期はモータ制御回路の制御周期と等しく、一定であるため、モータ情報の取得時間に関する情報をフレームに含む必要がない。したがって、その分のデータ長を短くすることができる。また、その分の通信容量を少なくすることができるので、より高速にデータ通信を行うことが可能となる。
As described above, in the present embodiment, the motor device 100 samples a plurality of types of motor information a plurality of times, and collectively transmits the information to the arithmetic device 200 using one signal line. That is, the motor device 100 obtains a plurality of types of motor information indicating the state of the motor for each control cycle of the motor control circuit, and generates serial data in which the obtained plurality of types of motor information are sequentially connected in the order in which they were obtained. It has a data generation unit and a data transmission unit that transmits the generated serial data to the arithmetic device 200 via a communication module.
At this time, since the sampling cycle of the motor information is equal to the control cycle of the motor control circuit and is constant, it is not necessary to include information on the acquisition time of the motor information in the frame. Therefore, the data length can be reduced accordingly. In addition, since the communication capacity can be reduced by that amount, data communication can be performed at higher speed.
 ただし、本実施形態において、データ部622に連ねられるモータ情報の数には限りがある。なぜなら、通信速度や、データ送受信時に一時的に蓄積するバッファのサイズによって、送信可能なデータ数が限られるためである。連ねられるデータ数は、主に通信速度に支配されるが、バッファサイズが5kByte以下の場合には、連ねられるデータ数は、バッファサイズに支配される。
 ここで、UART通信の最大通信速度は6Mbps(6MBaudRate)である。
例えば、バッファサイズが1kByte、レイテンシ時間が2msである場合、連ねられるモータ情報の数は、最大で428個となる。なお、本実施形態では、バッファサイズの8割に達した場合、データを送受信する仕組みとする。
However, in the present embodiment, the number of motor information linked to the data section 622 is limited. This is because the number of data that can be transmitted is limited by the communication speed and the size of the buffer temporarily stored during data transmission and reception. The number of consecutive data is mainly governed by the communication speed, but when the buffer size is 5 kByte or less, the number of consecutive data is governed by the buffer size.
Here, the maximum communication speed of the UART communication is 6 Mbps (6 MBaudRate).
For example, when the buffer size is 1 kByte and the latency time is 2 ms, the number of motor information to be linked is 428 at the maximum. In the present embodiment, data is transmitted and received when the buffer size reaches 80% of the buffer size.
 図7は、演算装置200がモータ装置100からチューニングに必要なシリアルデータを取得する場合の手順を説明するフローチャートである。
 この図7に示す処理は、ユーザが演算装置200の表示部202に表示されたGUIから、モータ装置100と演算装置200との接続を指示するコマンドを入力したタイミングで開始される。
 まずステップS1において、演算装置200は、USB-UART変換ケーブルである通信ケーブル300の設定を行う。このケーブルの設定において、演算装置200は、UART通信のレイテンシ時間を最短時間(例えば2ms)に設定し、演算装置200の通信ポートと通信ケーブル300とを接続する。
FIG. 7 is a flowchart illustrating a procedure when the arithmetic device 200 acquires serial data necessary for tuning from the motor device 100.
The process illustrated in FIG. 7 is started at a timing when a user inputs a command for instructing connection between the motor device 100 and the arithmetic device 200 from the GUI displayed on the display unit 202 of the arithmetic device 200.
First, in step S1, the arithmetic device 200 sets the communication cable 300, which is a USB-UART conversion cable. In this cable setting, the arithmetic device 200 sets the latency time of the UART communication to the shortest time (for example, 2 ms), and connects the communication port of the arithmetic device 200 to the communication cable 300.
 次にステップS2において、演算装置200は、USB-UART変換ケーブルとの接続が正常に行えたか否かを判定する。そして、接続が行えなかったと判定した場合には、ステップS15に移行し、接続が正常に行えたと判定した場合にはステップS3に移行する。
 ステップS3では、演算装置200は、データの受信時間を決定する。ここで、受信時間は、例えばユーザがGUIから指定したモータの駆動条件をもとに決定することができる。
 ステップS4では、演算装置200は、ステップS3において決定された受信時間をもとに、受信するシリアルデータのデータ長(受信するモータ情報の個数)を計算する。 
Next, in step S2, the arithmetic device 200 determines whether the connection with the USB-UART conversion cable has been normally performed. When it is determined that the connection has not been made, the process proceeds to step S15, and when it is determined that the connection has been normally made, the process proceeds to step S3.
In step S3, the arithmetic device 200 determines the data reception time. Here, the reception time can be determined, for example, based on the driving conditions of the motor specified by the user from the GUI.
In step S4, the arithmetic unit 200 calculates the data length of the serial data to be received (the number of received motor information) based on the reception time determined in step S3.
 ステップS5では、演算装置200は、内部メモリ等にシリアルデータを格納する配列を生成する。
 ステップS6では、演算装置200は、USB-UART変換ケーブルのバッファをパージする。このように、バッファをパージすることで、演算装置200がバッファに残っている過去のデータを受信して間違った処理を実行してしまうことを防止することができる。
 ステップS7では、演算装置200は、USB-UART変換ケーブルを介して、モータ装置100に対してモータ情報の送信要求コマンド(データ出力ONコマンド)を送信する。すると、モータ装置100は、データ出力ONコマンドを受信し、USB-UART変換ケーブルを介して、シリアルデータを連続して送信する。
In step S5, the arithmetic unit 200 generates an array for storing serial data in an internal memory or the like.
In step S6, the arithmetic unit 200 purges the buffer of the USB-UART conversion cable. By purging the buffer in this way, it is possible to prevent the arithmetic device 200 from receiving past data remaining in the buffer and executing erroneous processing.
In step S7, the arithmetic device 200 transmits a motor information transmission request command (data output ON command) to the motor device 100 via the USB-UART conversion cable. Then, the motor device 100 receives the data output ON command, and continuously transmits serial data via the USB-UART conversion cable.
 ステップS8では、演算装置200は、モータ装置100から送信されたシリアルデータをUSB-UART変換ケーブルを介して受信し、ステップS9において、シリアルデータの受信を正常に行えたか否かを判定する。そして、演算装置200は、シリアルデータの受信を行えなかったと判定した場合には、ステップS15に移行し、シリアルデータ
の受信が正常に行えたと判定した場合にはステップS10に移行する。
 ステップS10では、演算装置200は、所定時間(例えば10ms)待機し、ステップS11に移行する。
 ステップS11では、演算装置200は、データ送信処理が中断されたか否かを判定する。例えば、ユーザが演算装置200の表示部202に表示されたGUIから処理を中断するコマンドを入力した場合、演算装置200は、データ送信処理が中断されたと判定する。そして、演算装置200は、データ送信処理が中断されたと判定すると、ステップS15に移行し、データ送信処理が中断されていないと判定した場合にはステップS12に移行する。
In step S8, the arithmetic unit 200 receives the serial data transmitted from the motor device 100 via the USB-UART conversion cable, and determines in step S9 whether the serial data has been normally received. If the arithmetic unit 200 determines that serial data cannot be received, the process proceeds to step S15, and if it determines that serial data has been successfully received, the process proceeds to step S10.
In step S10, the arithmetic unit 200 waits for a predetermined time (for example, 10 ms), and proceeds to step S11.
In step S11, the arithmetic device 200 determines whether the data transmission process has been interrupted. For example, when the user inputs a command to interrupt the process from the GUI displayed on the display unit 202 of the arithmetic device 200, the arithmetic device 200 determines that the data transmission process has been interrupted. When the arithmetic device 200 determines that the data transmission process has been interrupted, the process proceeds to step S15, and when it determines that the data transmission process has not been interrupted, the process proceeds to step S12.
 ステップS12では、演算装置200は、受信したシリアルデータをモータ情報の種類ごと、および、制御周期(サンプリング周期)ごとに分割して保持する。具体的には、演算装置200は、ステップS5において生成した配列に分割したデータを格納する。
 ステップS13では、演算装置200は、受信したシリアルデータを、これまでに受信したシリアルデータに加算する。
 ステップS14では、演算装置200は、ステップS3において決定された受信時間分、シリアルデータを受信したか否かを判定する。そして、演算装置200は、上記受信時
間分シリアルデータを受信していないと判定した場合にはステップS8に戻り、上記受信時間分シリアルデータを受信したと判定した場合には、受信完了と判定してステップS15に移行する。
 ステップS15では、演算装置200は、通信ポートを閉じて図7の処理を終了する。
In step S12, the arithmetic unit 200 divides and holds the received serial data for each type of motor information and for each control cycle (sampling cycle). Specifically, the arithmetic unit 200 stores the data divided into the array generated in step S5.
In step S13, the arithmetic unit 200 adds the received serial data to the serial data received so far.
In step S14, the arithmetic unit 200 determines whether the serial data has been received for the reception time determined in step S3. If the arithmetic unit 200 determines that serial data has not been received for the reception time, the process returns to step S8. If it determines that serial data has been received for the reception time, it determines that reception has been completed. To step S15.
In step S15, the arithmetic unit 200 closes the communication port and ends the processing in FIG.
 図8は、演算装置200がモータ装置100から取得したシリアルデータをもとにグラフ描画を行う場合の手順を説明するフローチャートである。
 この図8に示す処理は、ユーザが演算装置200の表示部202に表示されたGUIから、モータの動作確認を指示するコマンドを入力したタイミングで開始される。なお、図8において、図7と同一処理を行うステップには、図7と同一ステップ番号を付し、以下、処理の異なる部分を中心に説明する。
FIG. 8 is a flowchart illustrating a procedure when the arithmetic device 200 performs the graph drawing based on the serial data acquired from the motor device 100.
The process shown in FIG. 8 is started at the timing when the user inputs a command for confirming the operation of the motor from the GUI displayed on the display unit 202 of the arithmetic device 200. In FIG. 8, steps for performing the same processing as in FIG. 7 are denoted by the same step numbers as in FIG. 7, and the following description will focus on the different parts of the processing.
 ステップS21では、演算装置200は、表示部202にグラフ描画する画面を表示し、ステップS22に移行する。ステップS22では、演算装置200は、リアルタイムなグラフ描画を中断するイベントを再生する。
 演算装置200とUSB-UART変換ケーブルとの接続が正常に行えたら、ステップS23において、演算装置200は、内部メモリ等にシリアルデータを格納する配列を生成する。このとき、演算装置200は、シリアルデータを格納する配列を十分な大きさに設定する。
In step S21, the arithmetic device 200 displays a screen for drawing a graph on the display unit 202, and proceeds to step S22. In step S22, the arithmetic device 200 reproduces an event that interrupts real-time graph drawing.
If the connection between the arithmetic unit 200 and the USB-UART conversion cable is normally performed, in step S23, the arithmetic unit 200 generates an array for storing serial data in an internal memory or the like. At this time, the arithmetic unit 200 sets the array for storing the serial data to a sufficient size.
 受信したシリアルデータが、モータ情報の種類ごと、および、制御周期ごとに分割されて保持されたら、ステップS24において、演算装置200は、保持されたデータを用いてモータの状態を表示部202に表示させる。具体的には、演算装置200は、保持されたデータを用いて、図8に示すように、横軸をモータ情報の取得時間Time、縦軸をモータ情報(例えば、回転速度情報Speed)として、モータの状態をグラフ化して表示部202に表示させる。このとき、図8に示すように、応答値を指令値に重畳させて表示すれば、ユーザは、正しくチューニングができたかどうかを容易に確認することができる。 If the received serial data is divided and stored for each type of motor information and for each control cycle, in step S24, the arithmetic unit 200 displays the state of the motor on the display unit 202 using the stored data. Let it. Specifically, the arithmetic device 200 uses the held data to set the horizontal axis as the acquisition time of the motor information Time and the vertical axis as the motor information (for example, rotation speed information Speed) as shown in FIG. The state of the motor is graphed and displayed on the display unit 202. At this time, as shown in FIG. 8, if the response value is displayed so as to be superimposed on the command value, the user can easily confirm whether or not the tuning has been correctly performed.
 ステップS25では、演算装置200は、グラフ描画を終了するか否かを判定し、グラフ描画を終了しないと判定した場合にはステップS8に戻り、グラフ描画が終了したと判定した場合にはステップS15に移行する。例えば、モータ停止のイベント処理が発生した場合、リアルタイムなグラフ描画を終了すると判定する。
 なお、図8に示す処理では、モータ停止のイベント処理が発生するまで、データを取得し、グラフを更新する場合について説明したが、予めデータの受信時間を決めておき、当該受信時間が経過したらグラフ描画を終了するようにしてもよい。
In step S25, the arithmetic unit 200 determines whether or not to end the graph drawing. If it is determined that the graph drawing is not to be ended, the process returns to step S8. If it is determined that the graph drawing has been ended, the processing proceeds to step S15. Move to For example, when a motor stop event process occurs, it is determined that real-time graph drawing is to be ended.
In the process shown in FIG. 8, a case has been described in which data is acquired and a graph is updated until an event process of a motor stop occurs. However, a data reception time is determined in advance, and when the reception time elapses. The graph drawing may be ended.
 以上説明したように、モータ装置100におけるデータ通信方法は、モータ制御装置(モータ制御回路)におけるモータの制御周期ごとにモータの状態を示す複数種類のモータ情報を取得する工程と、取得した複数種類のモータ情報を、取得した順番に順次連ねたシリアルデータを生成する工程と、生成した前記シリアルデータを送信する工程と、を含む。ここで、モータ情報は、モータが備えるロータの位置情報および回転速度情報を含む。
 このように、モータ装置100は、モータの制御周期ごとに複数回サンプリングした複数種類のモータ情報をまとめて送信することができるので、受信側装置である演算装置200においては、モータステータスを高分解能で観測・解析することができる。
As described above, the data communication method in the motor device 100 includes the steps of acquiring a plurality of types of motor information indicating the state of the motor for each motor control cycle in the motor control device (motor control circuit); Generating the serial data in which the motor information is sequentially arranged in the order of acquisition, and transmitting the generated serial data. Here, the motor information includes position information and rotation speed information of a rotor included in the motor.
As described above, the motor device 100 can collectively transmit a plurality of types of motor information sampled a plurality of times for each motor control cycle. Can be observed and analyzed.
 また、サンプリング周期が一定であるため、モータ情報の取得時間を送信する必要がない。そのため、モータ装置100におけるシリアルデータを生成する工程では、モータ情報の取得時間に関する情報を含まず、制御周期ごとに複数回取得されたモータ情報を順次連ねてシリアルデータを生成することができる。このように、シリアルデータに取得時間情報を含まないため、当該シリアルデータのデータ長を短くすることができ、より高速にモータ情報を送信することができる。
 また、モータ装置100におけるデータ通信方法は、モータ情報の送信要求コマンドを受信する工程をさらに含み、シリアルデータを送信する工程では、1回の送信要求コマンドに対して、シリアルデータを連続して送信することができる。このように、モータ装置100は、マスタースレーブ方式で通信せず、シリアルデータを連続的に送信するので、受信側装置である演算装置200は、高速なシリアルデータの取得が可能である。
Further, since the sampling period is constant, there is no need to transmit the acquisition time of the motor information. Therefore, in the step of generating serial data in the motor device 100, serial data can be generated by sequentially connecting the motor information obtained a plurality of times in each control cycle without including information on the acquisition time of the motor information. As described above, since the acquisition time information is not included in the serial data, the data length of the serial data can be reduced, and the motor information can be transmitted at higher speed.
Further, the data communication method in motor device 100 further includes a step of receiving a transmission request command for motor information. In the step of transmitting serial data, serial data is continuously transmitted in response to one transmission request command. can do. As described above, since the motor device 100 does not communicate in the master-slave system and continuously transmits serial data, the arithmetic device 200 as the receiving device can acquire high-speed serial data.
 さらに、演算装置200におけるデータ通信方法は、モータ制御装置(モータ制御回路)におけるモータの制御周期ごとに取得されたモータの状態を示す複数種類のモータ情報を順次連ねたシリアルデータを受信する工程と、受信したシリアルデータを、モータ情報の種類ごと、および、制御周期ごとに分割して保持する工程と、保持されたデータを用いてモータの状態を表示部に表示させる工程と、を含む。
 これにより、演算装置200は、受信したシリアルデータをもとに、モータステータスを高分解能で観測・解析し、モータの状態を表示部に表示させることができる。そのため、ユーザは、モータの状態を適切に把握することができる。
Further, the data communication method in the arithmetic device 200 includes a step of receiving serial data in which a plurality of types of motor information indicating a state of the motor acquired for each motor control cycle in the motor control device (motor control circuit) are sequentially connected. And a step of dividing the received serial data for each type of motor information and for each control cycle and holding the divided data, and a step of displaying the state of the motor on the display unit using the held data.
Thereby, the arithmetic unit 200 can observe and analyze the motor status with high resolution based on the received serial data, and can display the state of the motor on the display unit. Therefore, the user can appropriately grasp the state of the motor.
 また、演算装置200における表示部に表示させる工程では、保持されたデータを用いて、横軸をモータ情報の取得時間、縦軸をモータ情報として、モータの状態をグラフ化して表示部に表示させることができる。このように、演算装置200は、波形によりモータの状態を表示部に表示させることができるため、ユーザは、モータの状態を容易かつ適切に把握し、モータを適切に評価することができる。したがって、モータ評価時のユーザの負担を軽減し、利便性を向上させることができる。
 ここで、シリアルデータは、モータ情報の取得時間に関する情報を含まず、制御周期ごとに複数回取得されたモータ情報を順次連ねたデータとすることができる。サンプリング周期が一定であるため、シリアルデータにモータ情報の取得時間情報が含まれていなくても、演算装置200はモータ情報の取得時間を適切に把握することができる。したがって、演算装置200は、適切にモータの状態を表示部に表示させることができる。
Further, in the step of displaying on the display unit of the arithmetic device 200, using the stored data, the horizontal axis is the acquisition time of the motor information and the vertical axis is the motor information, and the state of the motor is graphed and displayed on the display unit. be able to. As described above, since the arithmetic unit 200 can display the state of the motor on the display unit using the waveform, the user can easily and appropriately grasp the state of the motor and appropriately evaluate the motor. Therefore, the burden on the user during motor evaluation can be reduced, and the convenience can be improved.
Here, the serial data does not include information on the acquisition time of the motor information, and may be data in which the motor information acquired a plurality of times in each control cycle is sequentially connected. Since the sampling period is constant, the arithmetic unit 200 can appropriately grasp the acquisition time of the motor information even if the acquisition time information of the motor information is not included in the serial data. Therefore, the arithmetic unit 200 can appropriately display the state of the motor on the display unit.
 さらに、演算装置200におけるデータ通信方法は、モータ情報の送信要求コマンドを
送信する工程をさらに含み、シリアルデータを受信する工程では、1回の送信要求コマン
ドの送信に対して、シリアルデータを連続して受信する。このように、演算装置200は、マスタースレーブ方式で通信せず、シリアルデータを連続的に受信するので、高速なシリアルデータの取得が可能である。
Further, the data communication method in the arithmetic device 200 further includes a step of transmitting a transmission request command for motor information. In the step of receiving serial data, the serial data is continuously transmitted in response to one transmission request command. To receive. As described above, since the arithmetic unit 200 does not communicate in the master-slave system and continuously receives serial data, high-speed acquisition of serial data is possible.
 以上のように、本実施形態におけるデータ通信方法は、モータの状態を示す複数種類の
モータ情報を、モータの制御周期(十数μsオーダー)で適切に観測することができる。
したがって、本実施形態におけるデータ通信方法を適用するデータ通信システムがチューニングシステムである場合、制御パラメータの調整精度を向上させることができる。
 なお、本実施形態におけるデータ通信方法を適用するデータ通信システムは、モータの状態を監視するシステムやモータの状態を評価するシステムなどであってもよく、チューニングシステムに限定されるものではない。
As described above, the data communication method according to the present embodiment can appropriately observe a plurality of types of motor information indicating the state of the motor in the motor control cycle (on the order of tens of μs).
Therefore, when the data communication system to which the data communication method according to the present embodiment is applied is a tuning system, the control parameter adjustment accuracy can be improved.
The data communication system to which the data communication method according to the present embodiment is applied may be a system for monitoring the state of a motor, a system for evaluating the state of a motor, or the like, and is not limited to a tuning system.
 また、本実施形態におけるチューニングシステム1000Aは、機電一体モータであるモータ装置100と、入力部および表示部を備える演算装置200と、モータ装置100と演算装置200とを通信可能に接続する通信モジュールと、を備える。ここで、通信モジュールは、モータ装置100の回路基板に実装された通信コネクタに接続された1本のシリアル通信ケーブル(通信ケーブル)300を有する。
 このように、チューニングシステム1000Aは、機電一体モータ100と演算装置200とを、1本のシリアル通信ケーブル300を有する通信モジュールで通信可能に接続した簡易なシステム構成で、モータのチューニングを行うことができる。
In addition, the tuning system 1000A according to the present embodiment includes a motor device 100 that is an electromechanical integrated motor, an arithmetic device 200 including an input unit and a display unit, and a communication module that communicably connects the motor device 100 and the arithmetic device 200. , Is provided. Here, the communication module has one serial communication cable (communication cable) 300 connected to a communication connector mounted on a circuit board of the motor device 100.
As described above, the tuning system 1000A can perform motor tuning with a simple system configuration in which the electromechanical integrated motor 100 and the arithmetic device 200 are communicably connected by the communication module having one serial communication cable 300. it can.
 従来のチューニングシステムは、入力装置とモータとをダイレクトに接続するものではなく、複数の機器を組み合わせたシステムであったため、高価かつ設定が複雑であった。これに対して、本実施形態では、入力部および表示部を備える演算装置とモータとをダイレクトに接続するため、安価でかつ複雑な設定を必要とすることなく、モータのチューニングを行うことができる。
 また、本実施形態におけるチューニングシステム1000Aは、機電一体モータ100と演算装置200とを、1本のシリアル通信ケーブル300を有する通信モジュールで通信可能に接続する。このように、複数本の信号線を必要としないため、簡易なシステム構成とすることができる。
The conventional tuning system does not directly connect the input device and the motor, but is a system in which a plurality of devices are combined, so that the setting is expensive and complicated. On the other hand, in the present embodiment, the motor is directly connected to the arithmetic unit having the input unit and the display unit and the motor, so that the motor can be tuned inexpensively and without complicated settings. .
In addition, the tuning system 1000A according to the present embodiment communicably connects the electromechanical integrated motor 100 and the arithmetic device 200 with a communication module having one serial communication cable 300. Thus, since a plurality of signal lines are not required, a simple system configuration can be achieved.
 また、本実施形態におけるチューニングシステム1000Aは、通信コネクタと演算装置200とを1本のシリアル通信ケーブルで直接接続する。このように、有線通信方式を用いることで、より簡易な構成で機電一体モータ100と演算装置200との通信を行うことができる。ここで、シリアル通信ケーブルは、USB-UART変換ケーブルとすることができる。これにより、機電一体モータ100と演算装置200との間で適切にシリアル通信を行うことができる。
 また、シリアル通信ケーブルは、シリアルデータを蓄積可能なバッファを有することができる。したがって、ケーブル内に一時的にデータを蓄積し、パケット単位でデータを送受信することができる。ここで、演算装置200は、当該ケーブルを使用するためのドライバを有する。これにより、ケーブルを通じたパケット単位のデータ送受信を適切に行うことができる。
In the tuning system 1000A according to the present embodiment, the communication connector and the arithmetic unit 200 are directly connected by one serial communication cable. In this way, by using the wired communication method, communication between the electromechanical integrated motor 100 and the arithmetic device 200 can be performed with a simpler configuration. Here, the serial communication cable may be a USB-UART conversion cable. Thus, serial communication can be appropriately performed between the electromechanical integrated motor 100 and the arithmetic device 200.
Further, the serial communication cable can include a buffer capable of storing serial data. Therefore, data can be temporarily stored in the cable, and data can be transmitted and received in packet units. Here, the arithmetic device 200 has a driver for using the cable. Thus, data transmission and reception in packet units through the cable can be appropriately performed.
 以上のように、本実施形態におけるチューニングシステム1000は、簡易な構成で、複数種類のモータ情報をモータの制御周期ごとに取得し、モータのチューニングを行うことができる。このように、本実施形態におけるチューニングシステム1000は、構成が簡素化されたシステムであるため、低コスト化を実現することができる。 As described above, the tuning system 1000 according to the present embodiment can acquire a plurality of types of motor information for each motor control cycle and tune the motor with a simple configuration. As described above, the tuning system 1000 according to the present embodiment is a system with a simplified configuration, so that cost reduction can be realized.
(第二の実施形態)
 次に、本発明における第二の実施形態について説明する。
 上述した第一の実施形態では、モータ装置100と演算装置200とを有線通線方式にて通信可能に接続するチューニングシステムについて説明した。この第二の実施形態では、モータ装置100と演算装置200とを無線通線方式にて通信可能に接続するチューニングシステムについて説明する。
(Second embodiment)
Next, a second embodiment of the present invention will be described.
In the above-described first embodiment, the tuning system in which the motor device 100 and the arithmetic device 200 are communicably connected to each other in a wired communication system has been described. In the second embodiment, a tuning system will be described in which the motor device 100 and the arithmetic device 200 are communicably connected by a wireless communication method.
 図10は、モータ装置100と演算装置200とが無線通線方式にて通信可能に接続されたチューニングシステム1000Bの構成例である。このチューニングシステム1000Bにおいて、モータ装置100と演算装置200とを通信可能に接続する通信モジュールは、通信ケーブル300と、無線モジュール(無線通信モジュール)400と、を備える。
 ここで、無線通信規格は、Bluetooth(登録商標)であってもよいし、IEEE802.11シリーズ規格に準拠した無線LANやWi-Fiであってもよい。なお、無線通信規格は上記に限定されない。
FIG. 10 is a configuration example of a tuning system 1000B in which the motor device 100 and the arithmetic device 200 are communicably connected by a wireless communication method. In the tuning system 1000B, the communication module that communicably connects the motor device 100 and the arithmetic device 200 includes a communication cable 300 and a wireless module (wireless communication module) 400.
Here, the wireless communication standard may be Bluetooth (registered trademark), or a wireless LAN or Wi-Fi compliant with the IEEE 802.11 series standard. Note that the wireless communication standard is not limited to the above.
 モータ装置100は、チューニングシステム1000Aが備える上述したモータ装置100と同様である。また、演算装置200は、チューニングシステム1000Aが備える上述した演算装置200に対して、無線通信機能を有する点で異なる。通信ケーブル300は、チューニングシステム1000Aが備える上述した通信ケーブル300と同様である。ただし、通信ケーブル300は、モータ装置100が有する通信コネクタと無線モジュール400を直接接続する点で異なる。 The motor device 100 is the same as the above-described motor device 100 included in the tuning system 1000A. The arithmetic device 200 is different from the arithmetic device 200 included in the tuning system 1000A in that the arithmetic device 200 has a wireless communication function. The communication cable 300 is the same as the communication cable 300 provided in the tuning system 1000A. However, the communication cable 300 differs in that the communication connector of the motor device 100 and the wireless module 400 are directly connected.
 無線モジュール400は、演算装置200と無線通信が可能であり、通信ケーブル300は、モータ装置100が備える通信コネクタと無線モジュール400とを接続する。なお、通信ケーブル300の構成は、チューニングシステム1000Aが備える上述した通信ケーブル300と同様である。
 また、無線モジュール400は、シリアルデータを蓄積可能なバッファを有する。当該バッファの機能は、通信ケーブル300が有するバッファと同様である。
The wireless module 400 can wirelessly communicate with the arithmetic device 200, and the communication cable 300 connects the communication connector of the motor device 100 to the wireless module 400. Note that the configuration of the communication cable 300 is the same as the above-described communication cable 300 included in the tuning system 1000A.
Further, the wireless module 400 has a buffer capable of storing serial data. The function of the buffer is the same as the buffer of the communication cable 300.
 さらに、シリアルデータ送信におけるパケットのフレーム構成は、上述した図6に示すフレーム構成と同様である。なお、データ部622の後に、チェックサム値が格納されたCRC部を配置する場合もある。 {Furthermore, the frame configuration of the packet in the serial data transmission is the same as the frame configuration shown in FIG. 6 described above. In some cases, a CRC section storing a checksum value may be arranged after the data section 622.
 図11は、演算装置200がモータ装置100からチューニングに必要なシリアルデータを取得する場合の手順を説明するフローチャートである。
 この図11に示す処理は、ユーザが演算装置200の表示部202に表示されたGUIから、モータ装置100と演算装置200との接続を指示するコマンドを入力したタイミングで開始される。なお、図11に示す処理は、演算装置200が実行する処理と、無線モジュール400が実行する処理とを示している。
 まずステップS31において、演算装置200は、無線モジュール400の設定を行う。なお、USB-UART変換ケーブルである通信ケーブル300の設定においては、演算装置200は、UART通信のレイテンシ時間を最短時間(例えば2ms)に設定し、無線モジュール400の通信ポートと通信ケーブル300とを接続する。
FIG. 11 is a flowchart illustrating a procedure when the arithmetic device 200 acquires serial data necessary for tuning from the motor device 100.
The process illustrated in FIG. 11 is started at a timing when a user inputs a command for instructing connection between the motor device 100 and the arithmetic device 200 from the GUI displayed on the display unit 202 of the arithmetic device 200. Note that the process illustrated in FIG. 11 illustrates a process executed by the arithmetic device 200 and a process executed by the wireless module 400.
First, in step S31, the arithmetic device 200 sets the wireless module 400. In setting the communication cable 300, which is a USB-UART conversion cable, the arithmetic unit 200 sets the latency time of the UART communication to the shortest time (for example, 2 ms), and connects the communication port of the wireless module 400 to the communication cable 300. Connecting.
 次にステップS32において、演算装置200は、無線モジュール400との接続が正常に行えたか否かを判定する。そして、接続が行えなかったと判定した場合には、ステップS51に移行し、接続が正常に行えたと判定した場合にはステップS33に移行する。
 ステップS33では、演算装置200は、データの受信時間を決定する。ここで、受信時間は、例えばユーザがGUIから指定したモータの駆動条件をもとに決定することができる。
 ステップS34では、演算装置200は、ステップS33において決定された受信時間をもとに、受信するシリアルデータのデータ長(受信するモータ情報の個数)を計算する。
Next, in step S32, the arithmetic device 200 determines whether or not the connection with the wireless module 400 has been normally performed. If it is determined that the connection has not been made, the process proceeds to step S51, and if it is determined that the connection has been made normally, the process proceeds to step S33.
In step S33, the arithmetic device 200 determines the data reception time. Here, the reception time can be determined, for example, based on the driving conditions of the motor specified by the user from the GUI.
In step S34, the arithmetic unit 200 calculates the data length of the received serial data (the number of received motor information) based on the reception time determined in step S33.
 ステップS35では、演算装置200は、内部メモリ等にシリアルデータを格納する配列を生成する。
 ステップS36では、演算装置200は、USB-UART変換ケーブルのバッファをパージする。このように、バッファをパージすることで、演算装置200がバッファに残っている過去のデータを受信して間違った処理を実行してしまうことを防止することができる。
 ステップS37では、演算装置200は、無線通信により、無線モジュール400に対してモータ情報の送信要求コマンド(データ出力ONコマンド)を送信する。ステップS38では、無線モジュール400は、演算装置200から当該送信要求コマンドを受信し、受信した送信要求コマンドを、USB-UART変換ケーブルを介してモータ装置100に対して送信する。すると、モータ装置100は、データ出力ONコマンドを受信し、USB-UART変換ケーブルを介して、シリアルデータを連続して送信する。
In step S35, the arithmetic device 200 generates an array for storing serial data in an internal memory or the like.
In step S36, the arithmetic unit 200 purges the buffer of the USB-UART conversion cable. By purging the buffer in this way, it is possible to prevent the arithmetic device 200 from receiving past data remaining in the buffer and executing erroneous processing.
In step S37, the arithmetic unit 200 transmits a motor information transmission request command (data output ON command) to the wireless module 400 by wireless communication. In step S38, the wireless module 400 receives the transmission request command from the arithmetic device 200, and transmits the received transmission request command to the motor device 100 via the USB-UART conversion cable. Then, the motor device 100 receives the data output ON command, and continuously transmits serial data via the USB-UART conversion cable.
 ステップS39では、無線モジュール400は、モータ装置100から送信されたシリアルデータをUSB-UART変換ケーブルを介して受信し、ステップS40において、シリアルデータの受信を正常に行えたか否かを判定する。そして、無線モジュール400は、シリアルデータの受信を行えなかったと判定した場合には、ステップS51に移行し、シリアルデータの受信が正常に行えたと判定した場合にはステップS41に移行する。
 ステップS41では、無線モジュール400は、所定時間(例えば10ms)待機し、ステップS42に移行する。
 ステップS42では、無線モジュール400は、モータ装置100から受信したシリアルデータを、無線通信により演算装置200へ送信する。
In step S39, the wireless module 400 receives the serial data transmitted from the motor device 100 via the USB-UART conversion cable, and determines in step S40 whether the serial data has been normally received. If the wireless module 400 determines that serial data cannot be received, the process proceeds to step S51, and if it determines that serial data has been successfully received, the process proceeds to step S41.
In step S41, the wireless module 400 waits for a predetermined time (for example, 10 ms), and proceeds to step S42.
In step S42, the wireless module 400 transmits the serial data received from the motor device 100 to the arithmetic device 200 by wireless communication.
 ステップS43では、演算装置200は、無線モジュール400からシリアルデータを受信し、受信したシリアルデータをモータ情報の種類ごと、および、制御周期(サンプリング周期)ごとに分割して保持する。具体的には、演算装置200は、ステップS35において生成した配列に分割したデータを格納する。
 ステップS44では、演算装置200は、受信したシリアルデータを、これまでに受信したシリアルデータに加算する。
 ステップS45では、演算装置200は、ステップS33において決定された受信時間分、シリアルデータを受信したか否かを判定する。そして、演算装置200は、上記受信時間分シリアルデータを受信していないと判定した場合にはステップS39に戻り、上記受信時間分シリアルデータを受信したと判定した場合には、受信完了と判定してステップS46に移行する。
In step S43, the arithmetic device 200 receives the serial data from the wireless module 400, and divides and holds the received serial data for each type of motor information and for each control cycle (sampling cycle). Specifically, the arithmetic device 200 stores the data divided into the array generated in step S35.
In step S44, the arithmetic unit 200 adds the received serial data to the serial data received so far.
In step S45, the arithmetic device 200 determines whether the serial data has been received for the reception time determined in step S33. If the arithmetic device 200 determines that serial data has not been received for the reception time, the process returns to step S39. If it determines that serial data has been received for the reception time, it determines that reception has been completed. Then, the process proceeds to step S46.
 ステップS46では、演算装置200は、無線通信により、無線モジュール400に対してモータ情報の送信停止コマンド(データ出力OFFコマンド)を送信する。ステップS47では、無線モジュール400は、演算装置200から当該送信停止コマンドを受信し、受信した送信停止コマンドを、USB-UART変換ケーブルを介してモータ装置100に対して送信する。そして、ステップS48では、無線モジュール400は、モータ装置100から送信停止コマンドに対する応答信号(ACK/NAK)を受信する。
 ステップS49では、演算装置200は、無線モジュール400のバッファをパージし、ステップS50において、無線モジュール400のバッファをパージが正常に行えたか否かを判定する。そして、演算装置200は、パージが行えていないと判定した場合にはステップS49へ戻り、パージが行えたと判定した場合にはステップS51に移行する。 ステップS51では、演算装置200は、通信ポートを閉じて図11の処理を終了する。
In step S46, the arithmetic device 200 transmits a motor information transmission stop command (data output OFF command) to the wireless module 400 by wireless communication. In step S47, the wireless module 400 receives the transmission stop command from the arithmetic device 200, and transmits the received transmission stop command to the motor device 100 via the USB-UART conversion cable. Then, in step S48, the wireless module 400 receives a response signal (ACK / NAK) to the transmission stop command from the motor device 100.
In step S49, the arithmetic device 200 purges the buffer of the wireless module 400, and determines in step S50 whether the purging of the buffer of the wireless module 400 has been performed normally. Then, when the arithmetic device 200 determines that the purging has not been performed, the process returns to step S49, and when the arithmetic device 200 determines that the purging has been performed, the process proceeds to step S51. In step S51, the arithmetic device 200 closes the communication port and ends the processing in FIG.
 図12は、演算装置200がモータ装置100から取得したシリアルデータをもとにグラフ描画を行う場合の手順を説明するフローチャートである。
 この図12に示す処理は、ユーザが演算装置200の表示部202に表示されたGUIから、モータの動作確認を指示するコマンドを入力したタイミングで開始される。なお、図12において、図11と同一処理を行うステップには、図11と同一ステップ番号を付し、以下、処理の異なる部分を中心に説明する。
FIG. 12 is a flowchart illustrating a procedure when the arithmetic device 200 performs the graph drawing based on the serial data acquired from the motor device 100.
The process illustrated in FIG. 12 is started at a timing when the user inputs a command for instructing the operation check of the motor from the GUI displayed on the display unit 202 of the arithmetic device 200. In FIG. 12, steps for performing the same processing as in FIG. 11 are denoted by the same step numbers as in FIG. 11, and the following description will focus on the different parts of the processing.
 ステップS61では、演算装置200は、表示部202にグラフ描画する画面を表示し、ステップS62に移行する。ステップS62では、演算装置200は、リアルタイムなグラフ描画を中断するイベントを再生する。
 演算装置200と無線モジュール400との接続が正常に行えたら、ステップS63において、演算装置200は、内部メモリ等にシリアルデータを格納する配列を生成する。このとき、演算装置200は、シリアルデータを格納する配列を十分な大きさに設定する。
In step S61, the arithmetic device 200 displays a screen for drawing a graph on the display unit 202, and proceeds to step S62. In step S62, the arithmetic device 200 reproduces an event for interrupting real-time graph drawing.
If the connection between the arithmetic device 200 and the wireless module 400 is normally performed, in step S63, the arithmetic device 200 generates an array for storing serial data in an internal memory or the like. At this time, the arithmetic unit 200 sets the array for storing the serial data to a sufficient size.
 また、演算装置200は、受信したシリアルデータを、モータ情報の種類ごと、および、制御周期ごとに分割して保持したら、ステップS64において、保持されたデータを用いてモータの状態を表示部202に表示させる。具体的には、演算装置200は、保持されたデータを用いて、上述した図8に示すように、横軸をモータ情報の取得時間Time、縦軸をモータ情報(例えば、回転速度情報Speed)として、モータの状態をグラフ化して表示部202に表示させる。このとき、図8に示すように、応答値を指令値に重畳させて表示すれば、ユーザは、正しくチューニングができたかどうかを容易に確認することができる。
 ステップS65では、演算装置200は、グラフ描画が終了したか否かを判定し、グラフ描画が終了していないと判定した場合にはステップS39に戻り、グラフ描画が終了したと判定した場合にはステップS46に移行する。
After the received serial data is divided and stored for each type of motor information and for each control cycle, the arithmetic unit 200 displays the state of the motor on the display unit 202 using the stored data in step S64. Display. Specifically, as shown in FIG. 8 described above, the arithmetic device 200 uses the stored data to obtain the motor information acquisition time Time on the horizontal axis and the motor information (for example, rotation speed information Speed) on the vertical axis. The state of the motor is graphed and displayed on the display unit 202. At this time, as shown in FIG. 8, if the response value is displayed so as to be superimposed on the command value, the user can easily confirm whether or not the tuning has been correctly performed.
In step S65, the arithmetic device 200 determines whether or not the graph drawing has been completed. If it is determined that the graph drawing has not been completed, the process returns to step S39. If it is determined that the graph drawing has been completed, Move to step S46.
 以上説明したように、本実施形態におけるチューニングシステム1000Bは、機電一体モータであるモータ装置100と、入力部および表示部を備える演算装置200と、モータ装置100と演算装置200とを通信可能に接続する通信モジュールと、を備える。ここで、通信モジュールは、モータ装置100の回路基板に実装された通信コネクタと無線通信モジュール400とを接続する1本のシリアル通信ケーブル(通信ケーブル)300と、演算装置200と無線通信が可能な無線通信モジュール400と、を備える。 As described above, the tuning system 1000B according to the present embodiment connects the motor device 100, which is an electromechanical integrated motor, the arithmetic device 200 including the input unit and the display unit, and the motor device 100 and the arithmetic device 200 so that they can communicate with each other. And a communication module. Here, the communication module is capable of wireless communication with one serial communication cable (communication cable) 300 connecting the communication connector mounted on the circuit board of the motor device 100 and the wireless communication module 400, and the arithmetic unit 200. And a wireless communication module 400.
 このように、チューニングシステム1000Bは、上述したチューニングシステム1000Aと同様に、簡易なシステム構成で機電一体モータ100と演算装置200との間でデータ送受信を行い、モータのチューニングを行うことができる。
 また、チューニングシステム1000Bは、無線通信により機電一体モータ100と演算装置200との間でデータ送受信を行うことができる。したがって、演算装置200は、遠隔操作でモータ装置100からモータ情報を取得し、モータのチューニングを行うことができる。また、遠隔操作でモータの状態を観測することができるので、有線通信方式
と比較して利便性を向上させることができる
As described above, similarly to the above-described tuning system 1000A, the tuning system 1000B can perform data transmission and reception between the electromechanical integrated motor 100 and the arithmetic unit 200 with a simple system configuration, and can tune the motor.
Further, the tuning system 1000B can transmit and receive data between the electromechanical integrated motor 100 and the arithmetic device 200 by wireless communication. Therefore, the arithmetic unit 200 can acquire motor information from the motor device 100 by remote control and perform motor tuning. Further, since the state of the motor can be observed by remote control, the convenience can be improved as compared with the wired communication method.
(変形例)
 なお、上記各実施形態においては、図12に示す制御パラメータ調整システム(チューニングシステム)1000Cや、図13に示す制御パラメータ調整システム(チューニングシステム)1000Dのように、パルス発生器500がモータ装置100に接続されていてもよい。この場合、図3に示すMCU130には、パルス発生器500から入力パル
ス信号(STMP)およびモータ回転方向(CW_CCW)が入力され、モータ装置10
0は、モータをパルス信号で駆動させることが可能である。
(Modification)
In each of the above embodiments, the pulse generator 500 is connected to the motor device 100 as in a control parameter adjustment system (tuning system) 1000C shown in FIG. 12 and a control parameter adjustment system (tuning system) 1000D shown in FIG. It may be connected. In this case, the input pulse signal (STMP) and the motor rotation direction (CW_CCW) are input from the pulse generator 500 to the MCU 130 shown in FIG.
0 means that the motor can be driven by a pulse signal.
 なお、本明細書において説明した各構成は、相互に矛盾しない範囲内において、適宜組み合わせ、または置き換えることができる。例えば、磁気センサは、エンコーダであってもよい。また、エンコーダは磁気式であってもよく、光式であってもよい。 The components described in this specification can be combined or replaced as appropriate without departing from the scope of the present invention. For example, the magnetic sensor may be an encoder. Further, the encoder may be a magnetic type or an optical type.
 100…モータ装置(機電一体モータ)、121…モータ、200…演算装置、201…入力部、202…表示部、300…通信ケーブル、400…無線通信モジュール # 100: motor device (mechanical integrated motor), 121: motor, 200: arithmetic unit, 201: input unit, 202: display unit, 300: communication cable, 400: wireless communication module

Claims (8)

  1.  モータと、
     演算装置と、
     前記モータと前記演算装置とを通信可能に接続する通信モジュールと、を備え、
     前記モータは、
      シャフトを有するロータと、
      前記ロータに対して径方向に対向するステータと、
      前記ロータおよび前記ステータを囲むハウジングと、
      モータ制御回路を有し、前記ハウジングの近傍に配置された回路基板と、
      前記回路基板に実装された通信コネクタと、を有し、
     前記通信モジュールは、
      前記通信コネクタに接続された1本のシリアル通信ケーブルを有し、
     前記演算装置は、
      データを入力する入力部と、
      データを表示する表示部と、
      前記モータから、前記通信モジュールを介してシリアルデータを受信し、当該シリアルデータに基づいて、前記モータ制御回路の制御パラメータの最適値を選出するパラメータ選出部と、
      前記モータに対して、前記制御パラメータを前記最適値に変更する指令を送信する指令送信部と、を有することを特徴とするチューニングシステム。
    Motor and
    An arithmetic unit;
    A communication module that communicably connects the motor and the arithmetic device,
    The motor is
    A rotor having a shaft;
    A stator radially facing the rotor,
    A housing surrounding the rotor and the stator;
    Having a motor control circuit, a circuit board disposed near the housing,
    A communication connector mounted on the circuit board,
    The communication module,
    Having one serial communication cable connected to the communication connector,
    The arithmetic device,
    An input unit for inputting data,
    A display for displaying data,
    From the motor, receiving serial data via the communication module, based on the serial data, a parameter selection unit that selects an optimal value of the control parameters of the motor control circuit,
    A tuning system, comprising: a command transmission unit that transmits a command to change the control parameter to the optimum value to the motor.
  2.  前記シリアル通信ケーブルは、前記通信コネクタと前記演算装置とを直接接続することを特徴とする請求項1に記載のチューニングシステム。 The tuning system according to claim 1, wherein the serial communication cable directly connects the communication connector and the processing device.
  3.  前記通信モジュールは、前記演算装置と無線通信が可能な無線通信モジュールをさらに備え、
     前記シリアル通信ケーブルは、前記通信コネクタと前記無線通信モジュールとを接続することを特徴とする請求項1に記載のチューニングシステム。
    The communication module further includes a wireless communication module capable of wireless communication with the arithmetic device,
    The tuning system according to claim 1, wherein the serial communication cable connects the communication connector and the wireless communication module.
  4.  前記シリアル通信ケーブルは、USB-UART変換ケーブルであることを特徴とする請求項1から3のいずれか1項に記載のチューニングシステム。 (4) The tuning system according to any one of (1) to (3), wherein the serial communication cable is a USB-UART conversion cable.
  5.  前記シリアル通信ケーブルは、シリアルデータを蓄積可能なバッファを有することを特徴とする請求項1から4のいずれか1項に記載のチューニングシステム。 The tuning system according to any one of claims 1 to 4, wherein the serial communication cable has a buffer capable of storing serial data.
  6.  前記モータは、
      前記回路基板に実装されたセンサをさらに備え、
     前記モータ制御回路は、
      前記センサの検出結果に基づいて、電力情報、前記ロータの位置情報、回転速度情報およびトルク情報の少なくとも1つを含むモータ情報を検出するモータ情報検出部と、
      前記演算装置に対して、前記通信モジュールを介して、前記モータ情報を含む前記シリアルデータを送信するモータ情報送信部と、をさらに備えることを特徴とする請求項1から5のいずれか1項に記載のチューニングシステム。
    The motor is
    Further comprising a sensor mounted on the circuit board,
    The motor control circuit,
    A motor information detecting unit that detects motor information including at least one of power information, rotor position information, rotation speed information, and torque information based on a detection result of the sensor;
    The motor device according to claim 1, further comprising: a motor information transmitting unit configured to transmit the serial data including the motor information to the arithmetic device via the communication module. The tuning system described.
  7.  前記演算装置は、
      前記モータに対して、前記モータ情報の送信要求コマンドを送信するコマンド送信部をさらに備え、
     前記モータ情報送信部は、
      1回の前記送信要求コマンドに対して、前記シリアルデータを連続して送信すること
    を特徴とする請求項6に記載のチューニングシステム。
    The arithmetic device,
    For the motor, further comprising a command transmission unit that transmits a transmission request command of the motor information,
    The motor information transmission unit,
    The tuning system according to claim 6, wherein the serial data is transmitted continuously for one transmission request command.
  8.  前記シリアルデータは、前記モータ制御回路の制御周期ごとに取得した複数の前記モータ情報を、取得した順番に順次連ねたデータであることを特徴とする請求項6または7に記載のチューニングシステム。 8. The tuning system according to claim 6, wherein the serial data is data obtained by sequentially connecting a plurality of pieces of motor information acquired in each control cycle of the motor control circuit in the order of acquisition. 9.
PCT/JP2019/024889 2018-06-26 2019-06-24 Tuning system WO2020004301A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-121351 2018-06-26
JP2018121351 2018-06-26

Publications (1)

Publication Number Publication Date
WO2020004301A1 true WO2020004301A1 (en) 2020-01-02

Family

ID=68986952

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/024889 WO2020004301A1 (en) 2018-06-26 2019-06-24 Tuning system

Country Status (1)

Country Link
WO (1) WO2020004301A1 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002136057A (en) * 2000-10-24 2002-05-10 Sofutoronikusu Kk Control/drive circuit integrated servo motor
JP2005162880A (en) * 2003-12-02 2005-06-23 Keyence Corp Ultraviolet irradiation device and method for identifying head part of ultraviolet irradiation device
JP2006260581A (en) * 1997-10-08 2006-09-28 Denso Corp Robot controller
JP2008252882A (en) * 2007-03-05 2008-10-16 Yaskawa Electric Corp Serial communication apparatus for sensor and serial communication method
JP2012115072A (en) * 2010-11-25 2012-06-14 Shinano Kenshi Co Ltd Motor device
JP2015204724A (en) * 2014-04-16 2015-11-16 株式会社日立産機システム Control method for motor drive device, and motor control system and program
JP2017169288A (en) * 2016-03-14 2017-09-21 オムロン株式会社 Motor control system, motor control device, program, and recording medium
JP2017175716A (en) * 2016-03-22 2017-09-28 シャープ株式会社 Wireless motor system
WO2017209097A1 (en) * 2016-06-01 2017-12-07 パナソニックIpマネジメント株式会社 Transmission device, reception device, cable, transmission method, and reception method
WO2018061552A1 (en) * 2016-09-29 2018-04-05 日本電産株式会社 Motor system, analysis device, and appliance

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006260581A (en) * 1997-10-08 2006-09-28 Denso Corp Robot controller
JP2002136057A (en) * 2000-10-24 2002-05-10 Sofutoronikusu Kk Control/drive circuit integrated servo motor
JP2005162880A (en) * 2003-12-02 2005-06-23 Keyence Corp Ultraviolet irradiation device and method for identifying head part of ultraviolet irradiation device
JP2008252882A (en) * 2007-03-05 2008-10-16 Yaskawa Electric Corp Serial communication apparatus for sensor and serial communication method
JP2012115072A (en) * 2010-11-25 2012-06-14 Shinano Kenshi Co Ltd Motor device
JP2015204724A (en) * 2014-04-16 2015-11-16 株式会社日立産機システム Control method for motor drive device, and motor control system and program
JP2017169288A (en) * 2016-03-14 2017-09-21 オムロン株式会社 Motor control system, motor control device, program, and recording medium
JP2017175716A (en) * 2016-03-22 2017-09-28 シャープ株式会社 Wireless motor system
WO2017209097A1 (en) * 2016-06-01 2017-12-07 パナソニックIpマネジメント株式会社 Transmission device, reception device, cable, transmission method, and reception method
WO2018061552A1 (en) * 2016-09-29 2018-04-05 日本電産株式会社 Motor system, analysis device, and appliance

Similar Documents

Publication Publication Date Title
KR102463968B1 (en) Diagnostic methods for servo systems, sensor hubs and industrial devices
EP1564611A2 (en) Machine controller
JP5416594B2 (en) Multi-axis drive driver control method, multi-axis drive driver, and multi-axis drive control system including the same
WO2020003738A1 (en) Control parameter adjustment method and control parameter adjustment device
KR102044328B1 (en) Monitering method and devise of pull cord switch, and belt conveyor comprising the monitering devise of pull cord switch
WO2021169442A1 (en) Monitoring device and camera
CN207937808U (en) Unmanned plane dynamic test device and system
WO2020004301A1 (en) Tuning system
WO2020004302A1 (en) Data communication method, data structure, and data communication system
CN108153204A (en) Unmanned plane dynamic test device and system
JPWO2012164740A1 (en) Multi-axis motor drive system and multi-axis motor drive device
JP2006300872A (en) Diagnostic apparatus and communication device
JP2009278603A (en) Serial communication apparatus
JP4728128B2 (en) Multi-axis motor position detection signal transmission device
JP4540957B2 (en) Control device and method for electric unit for microscope
JP4688058B2 (en) Electric motor control device
CN109768738B (en) Motor control device, control system, and motor control method
JP7498613B2 (en) MOTOR DRIVE CONTROL DEVICE, MOTOR DRIVE CONTROL SYSTEM, FAN SYSTEM, AND MOTOR DRIVE CONTROL METHOD
JP5424752B2 (en) Lens position control device for electronic endoscope
US11772285B2 (en) Malfunction detection device and malfunction detection method
JP5115121B2 (en) Waveform measuring device
JP5361296B2 (en) Endoscope device
KR20100047982A (en) Networked control system and its control method
JPH01200787A (en) Image pickup device
JP5481176B2 (en) Endoscope lens position control device

Legal Events

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

Ref document number: 19825173

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19825173

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP