Monitoring apparatus
The monitoring device simplifies encoder and communication path diagnostics by intercepting communication, allowing non-skilled personnel to use a mobile terminal for easy diagnosis, addressing the challenges of skilled labor and equipment requirements in existing methods.
Patent Information
- Application Number
- JP2024101327
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2026-01-13
AI Technical Summary
Existing encoder diagnostic methods require skilled personnel and specialized equipment to diagnose encoder abnormalities, and the process is time-consuming and cumbersome, especially when the machine is operating.
A monitoring device is inserted between the encoder and the drive device to intercept communication, allowing for easy diagnosis of encoder status and communication path issues using a user-friendly interface, enabling non-skilled personnel to perform diagnostics with a mobile terminal.
Facilitates easy and efficient encoder and communication path diagnosis without the need for specialized tools or skills, reducing operational burden and enabling diagnostics on large machines without system reconfiguration.
Smart Images

Figure 2026003398000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a device for monitoring an encoder used in a machine tool. [Background technology]
[0002] After explaining the general configuration of the conventional system, we will explain how to obtain the encoder diagnostic information and how to diagnose the status of the communication path.The general configuration of the conventional system is shown in Figure 6.
[0003] The system in Figure 6 is made up of an encoder 1 connected to the motor end, an encoder 2 connected near the drive shaft (hereinafter, when expressing both encoders 1 and 2 together, they will be referred to as the encoder), a motor 3, a drive unit 4, a drive mechanism 5, and a numerically controlled device 6 (hereinafter, referred to as the NC device). The drive unit 4 is housed in a control box 11 together with other FA equipment, and is a device that receives position information from the encoder and controls the rotation of the rotor of the motor 3. A practical example would be where Encoder 1 is a rotary encoder and Encoder 2 is a linear encoder.
[0004] The drive mechanism 5 is mainly composed of a ball screw 7, a support unit 8 incorporating a bearing that secures the ball screw, a table 9 connected to the ball screw nut, and a coupling 10 for connecting the ball screw 7 to the motor 3. In Figure 6, only parts that can be roughly understood are shown, and other mechanisms such as guide rails are omitted because they are not relevant.
[0005] First, we will explain how to diagnose an encoder. The communication data output by an encoder includes position information and diagnostic information used to control the drive axis. In order to diagnose an encoder, it is necessary to obtain the diagnostic information.
[0006] To obtain the desired diagnostic information about the encoder, it is necessary to rewrite the parameters in the encoder and switch the encoder to a mode that allows it to output diagnostic information. There are two main ways to do this.
[0007] The first method is to operate the NC unit 6 to change the parameter settings in the encoder and set the encoder to a mode in which it can output diagnostic information, in cases where the parameters in the encoder can be changed from the NC unit 6. In this case, if the changes can only be made when the encoder is started up, the encoder parameters are changed by restarting the encoder. Since the encoder is usually used for control, the encoder is restarted by restarting the NC unit 6 as a whole.
[0008] The second method is, when it is not possible to change the parameters in the encoder from the NC device 6, to turn off the power to the machine, install a dedicated PC device in the control box 11, connect it to the encoder, change the encoder parameters, and then restart the NC device 6.
[0009] Furthermore, when an encoder outputs diagnostic information, different methods can be considered for Encoder 1 connected to the motor end required for drive shaft control and Encoder 2 connected near the drive shaft. Encoder 1 connected to the motor end required for drive shaft control cannot lose position information. Therefore, in the case of Encoder 1, diagnostic information can be output following the position information, or can be output in addition to idle communication time.
[0010] Encoder 2, which is connected near the drive shaft and is not necessarily required for controlling the drive shaft due to the presence of encoder 1, can use not only the same communication method as encoder 1 described above, but also a method in which it is separated from the object controlled by the drive shaft and continues to send only diagnostic information during communication idle times, or a method in which the encoder's connection line is removed from drive unit 4 and connected to a separately prepared dedicated PC device (diagnostic device) or the like to send and receive diagnostic information. Although various other forms are possible, this specification will explain the case in which the encoder outputs diagnostic information following position information.
[0011] By using the above method, it is possible to display diagnostic information on the screen of the NC device 6 or the screen of a dedicated PC device. Furthermore, by connecting a measuring device to the FA device in the control box 11, it is also possible to display diagnostic information on the screen of the measuring device.
[0012] However, when diagnostic information is displayed on the screen of the NC unit 6, it must be visually checked while the machine is running, so there are cases where the necessary data cannot be confirmed due to the update cycle of the screen display or the operating status of the machine. Furthermore, even when displaying on the screen of a dedicated PC device or measuring equipment, it is necessary to prepare a dedicated device such as a communication relay adapter.
[0013] Next, we will explain below the method for diagnosing the status of the communication path between the encoder and the drive unit 4. Previously, a dedicated jig capable of connecting measuring equipment was inserted into the connection cable between the encoder and the drive unit 4, and the measuring equipment (such as an oscilloscope or multimeter) was connected to the jig to diagnose the status of the communication path. This not only required dedicated jigs and measuring equipment, but also required the skills to diagnose the status using the measuring equipment. Summary of the Invention [Problem to be solved by the invention]
[0014] When an abnormality occurs in the encoder itself, attempting to obtain diagnostic information from the encoder while the machine is operating in order to investigate the cause requires changing the parameter settings of the NC device and the encoder, which takes time and effort to prepare before starting the diagnostic work.Furthermore, when an abnormality occurs in the encoder's communication path, not only does it require the preparation of measuring equipment such as an oscilloscope or multimeter, but also the skills to perform the diagnosis.
[0015] Therefore, the object is to make it possible for even workers (service personnel) who do not have sufficient skills to perform diagnosis using measuring equipment, dedicated jigs, etc. to easily perform diagnosis. [Means for solving the problem]
[0016] The monitoring device disclosed in this specification is a monitoring device that monitors a system having an encoder that outputs position data and a drive device that receives the position data from the encoder and controls a motor, and is characterized in that it is inserted between the encoder and the drive device and performs at least one of diagnosing the encoder and diagnosing the communication between the encoder and the drive device by intercepting the communication between the encoder and the drive device.
[0017] In this case, the monitoring device has at least one input device, such as an input device provided on the monitoring device or a touch screen provided on the monitoring device, and operates upon receiving instructions from at least one of the input device, the touch screen, and a mobile terminal that is physically separated from the monitoring device but is capable of wireless communication with the monitoring device, and the diagnostic results obtained by the operation may be displayed on an output device, which is a display device provided on the monitoring device or a display device provided on the mobile terminal.
[0018] The monitoring device is also configured to receive communication data for the encoder from the driving device and transfer it to the encoder, and to receive communication data for the driving device from the encoder and transfer it to the driving device; when the monitoring device receives a diagnostic instruction for the encoder from an input device, a touch screen, or a mobile terminal, it replaces the position data request command sent from the driving device to the encoder with a command corresponding to the diagnostic instruction and sends it to the encoder, and based on the replaced command, the encoder switches between outputting and stopping diagnostic information or changes the content of the diagnostic information to be output; and further, when the position data cannot be obtained from the encoder due to the replacement of the instruction in the control cycle in which the instruction has been replaced, the monitoring device may predict a position in the replaced control cycle, and generate alternative position data based on the predicted position and output it to the driving device.
[0019] Furthermore, if the acceleration information of the cycle previous to the control cycle in which the command is replaced is A(t-1), the velocity information of the cycle previous to the control cycle is V(t-1), the position information of the cycle previous to the control cycle is P(t-1), and the deviation amount obtained by removing harmonic components from the deviation between past position information and predicted position information using a low-pass filter is Dlp(t-1), then the predicted position Psd(t) of the control cycle in which the command is replaced may be generated based on the following equation 1. Psd(t)=P(t-1)+(V(t-1)+A(t-1)*Δt)*Δt+Dlp(t-1) (1)
[0020] Furthermore, when an encoder abnormality that allows communication to continue occurs, the monitoring device may continue the transfer process of communication data for a specified time, then replace the command from the drive device to the encoder with a command to output alarm information stored in the encoder, send the replaced command to the encoder, and save the alarm information output from the encoder in a storage device of the monitoring device; when an encoder abnormality that makes it impossible to continue communication occurs and communication stops, the monitoring device may wait for a specified time, or temporarily cut off power to return to an initial state, then replace the command from the drive device to the encoder with a command to output alarm information stored in the encoder, send the replaced command to the encoder, and save the alarm information output from the encoder in a storage device of the monitoring device.
[0021] Furthermore, the monitoring device is equipped with a diagnostic counting circuit A that determines that noise is superimposed on the communication data when the communication data changes continuously at a timing faster than the 1-bit width of the communication data, or when the voltage of the communication data fluctuates above a specified level, and counts the number of times the phenomenon occurs, a diagnostic counting circuit B that counts the number of abnormalities contained in the received data, and a diagnostic counting circuit C that counts the number of times data specified to be included in the communication data could not be received, the communication data including timing synchronization commands transmitted at a specified synchronization command transmission cycle, commands transmitted at a fixed cycle shorter than the synchronization command transmission cycle, and encoder responses to the commands, and the diagnostic counting circuit B and the diagnostic counting circuit C may each be provided in plurality, the number of which corresponds to the number of fixed cycles included in the synchronization command transmission cycle. [Effects of the Invention]
[0022] The above means allow anyone to easily diagnose the encoder and communication path. Also, by operating a mobile terminal in the hands of an operator (serviceman), the operator can change the diagnostic information settings and read the diagnostic information in front of the operation panel of the NC device, which significantly reduces the burden on the operator.
[0023] Specifically, for large machines, diagnosis can be performed by connecting a dedicated PC or measuring equipment to the FA device in the control box on the back of the machine, reducing the effort required to operate the control panel on the front of the machine. Furthermore, even for older machines that do not have a monitoring device, diagnostic information can be easily collected by simply inserting a monitoring device without changing the system configuration. [Brief explanation of the drawings]
[0024] [Figure 1] Schematic diagram of the system according to the present invention [Figure 2] Schematic diagram of the monitoring device [Figure 3] Functional block diagram of the logic circuit and arithmetic circuit of the monitoring device [Figure 4] An example of a noise-contaminated waveform and its detection method [Figure 5] An example of a communication cycle and a diagnostic count circuit [Figure 6] Schematic diagram of conventional system DETAILED DESCRIPTION OF THE INVENTION
[0025] First, a schematic configuration of the system according to the present invention will be described, followed by a description of a method for acquiring diagnostic information from the monitoring device 20 and a method for diagnosing the state of the communication path. The overall configuration of the system according to the present invention is shown in Figure 1, and each component will be described.
[0026] The system of the present invention comprises an encoder 1 connected to the motor end, an encoder 2 connected near the drive shaft (hereinafter, when encoder 1 and encoder 2 are collectively referred to as encoders), a motor 3, a drive unit 4, a drive mechanism 5, a numerically controlled device 6, and a monitoring device 20. The monitoring device 20 of the present invention is inserted between the encoder 1 and the drive unit 4, and the encoder 1 and the encoder 2 are connected within the drive unit 4. Here, the monitoring device 20 is inserted between the encoder 1 and the drive unit 4, but the monitoring device 20 may also be inserted between the encoder 2 and the drive unit 4. A description of other components that are the same as those of the conventional system will be omitted.
[0027] The monitoring device 20 has input / output devices (no reference numerals are given) including an input device provided on the monitoring device main body and a touch screen (display device) provided on the monitoring device main body. The monitoring device 20 operates by receiving instructions from at least one of the input device, the touch screen, and an external mobile terminal 27 (see FIG. 2). The diagnostic results obtained as a result of the operation are output to a display device (i.e., an output device) provided on the monitoring device 20 or the mobile terminal 27. An example of operation by the external mobile terminal 27 will be described below. Furthermore, various modes are possible for the output method of the communication data output by the encoder, but this specification will describe a case where diagnostic information is output following position information, as described in the background art.
[0028] 2 shows a schematic configuration of the inside of the monitoring device 20, and FIG. 3 shows a functional block diagram of the logic circuit 22 and arithmetic circuit 23 that make up the monitoring device 20. The monitoring device 20 has a communication circuit 21, a logic circuit 22 such as an FPGA, an arithmetic circuit 23 such as an MPU, a wireless circuit 24, an antenna 28, a power supply circuit 25, and a recording circuit 26.
[0029] Specifically, the monitoring device 20 intercepts the initialization communication data sent from the drive device 4 when the encoder is started, acquires various communication setting values, and prepares the various transmission / reception buffers and communication data diagnostic count circuits 61a, 61b, and 61c (hereinafter, when there is no need to distinguish between the three, they will be simply referred to as the "diagnostic count circuit 61") in the logic circuit 22 according to the communication settings. The intercepted initialization communication data is transferred to the encoder 1. Furthermore, the response from the encoder 1 to the initialization communication data is also intercepted and transferred to the drive device 4. Furthermore, because the drive device 4 has a structure in which the encoder 1 and the encoder 2 are connected, the monitoring device 20 also intercepts the response from the encoder 2 to the initialization communication data.
[0030] Even after the initialization of each encoder is completed and the system transitions to steady-state communication, the monitoring device 20 continues to intercept and transfer communication data (commands from the drive device 4 and responses from each encoder). After the transition to steady-state communication, the monitoring device 20 starts diagnosing the intercepted communication data and transitions to a standby state where it waits for instructions from the mobile terminal 27 held by the worker (serviceman). Thereafter, the monitoring device 20 exchanges the intercepted communication data and diagnostic data with the mobile terminal 27 in accordance with instructions from the mobile terminal 27.
[0031] The diagnostic count circuit 61 includes a diagnostic count circuit A61a that counts when it detects noise superimposition on the communication line, a diagnostic count circuit B61b that counts when it detects an abnormality in the communication data, and a diagnostic count circuit C61c that counts when it cannot receive the communication data. Each of the diagnostic count circuits 61a, 61b, and 61c has multiple diagnostic counters.
[0032] The communication circuit 21 is composed of a transmission / reception circuit 21a on the upper device side and a transmission / reception circuit 21b on the lower device side, each of which is a circuit configured with electronic components such as RS485 drivers 31a, 31b, termination resistors 30a, 30b, common mode choke coils 33a, 33b, and comparators 32a, 32b. Here, connectors and their relay sections that connect to external connection cables are not relevant to the explanation, so they are omitted, and for the sake of explanation, the upper device side and the lower device side are distinguished by the additional letters a and b.
[0033] The transmitter / receiver circuit will be explained using the transmitter / receiver circuit 21a as an example. Commands from the drive unit 4 are input via a communication line in the transmitter / receiver circuit 21a on the host device side (the side to which the drive unit 4 is connected), converted from a differential signal to a single-ended signal by the RS485 driver 31a, and received by the logic circuit 22. Furthermore, communication data to the host device side output from the logic circuit 22 is converted from a single-ended signal to a differential signal via the RS485 driver 31a, and output to the host device side via the communication line in the transmitter / receiver circuit 21a.
[0034] The logic circuit 22 includes a communication interface 40a, a communication interface 40b, and a communication interface 40c. The communication interface 40a includes a receive buffer 41a for storing communication data received through the transceiver circuit 21a on the host device side, a transmit buffer 42a for transmitting the communication data to the transceiver circuit 21a on the host device side, and a second transmit buffer 43a for replacing the communication data to be transmitted. The communication interface 40b includes a receive buffer 41b for storing communication data received through the transceiver circuit 21b on the lower device side, a transmit buffer 42b for transmitting the communication data to the transceiver circuit 21b on the lower device side, and a second transmit buffer 43b for replacing the data to be transmitted. The communication interface 40c includes a transmit buffer 45c for transmitting communication data to the arithmetic circuit 23, and a receive buffer 46c for receiving communication data from the arithmetic circuit 23. The logic circuit 22 further has a diagnostic unit 49 for diagnosing the communication paths between the upper device and the lower device, a diagnostic count circuit 61 for displaying the diagnosis results, a register 62 for temporarily storing data to be transmitted to the arithmetic circuit 23, an interrupt generation circuit 63 used for adjusting timing with the arithmetic circuit 23, and a PLL circuit 64 for multiplying an externally input clock signal and converting it into a clock signal to be used internally. The logic circuit 22 exchanges various data stored in the buffers, registers 62, etc. with the arithmetic circuit 23 via the external bus of the communication interface 40c.
[0035] Specifically, the logic circuit 22 stores commands received from the drive unit 4 in a receive buffer 41a and transfers them to a transmit buffer 42b on the lower device side for output to the lower device. The output communication data is output to the RS485 driver 31b on the lower device side and transferred to the encoder 1. The logic circuit 22 also stores the encoder 1's response to the command from the drive unit 4 in a receive buffer 41b and transfers it to a transmit buffer 42a on the upper device side for output to the upper device. The output communication data is output to the RS485 driver 31a on the upper device side and transferred to the drive unit 4. This introduces a delay due to the time required to retransmit the communication, but it eliminates the need for an extra branch in the communication path, making it effective for increasing communication speed and preventing reflections.
[0036] The arithmetic circuit 23 is a circuit having a communication interface 44d, a communication interface 57, a DMA controller (Direct Memory Access Controller) 50 for periodically communicating with the logic circuit 22, an external bus controller (Bus Controller) 51 for controlling the external bus, a CPU (Central Processing Unit) 55 for performing arithmetic, a ROM (Read Only Memory) 52 for storing programs and initial values for operating the CPU 55, a RAM (Random Access Memory) 53 for temporarily storing operational variables, and an interrupt controller unit (Interrupt Controller Unit) 54 for controlling interrupt signals from various external and internal functions. The communication interface 44d includes a transmit buffer 45d for communicating with the logic circuit 22 via the external bus and a receive buffer 46d for receiving communication data from the logic circuit 22. The communication interface 57 includes a transmit buffer 58 for communicating with the radio circuit 24 and a receive buffer 59 for storing communication data from the radio circuit 24. The arithmetic circuit 23 operates in synchronization with an interrupt signal from the logic circuit 22 in accordance with instructions from a portable terminal 27 held by the worker.
[0037] The wireless circuit 24 is a circuit for communicating with a portable terminal 27 held by a worker (serviceman) via antennas 28 and 29, and exchanging information output from the arithmetic circuit 23 and commands from the portable terminal 27. The power supply circuit 25 has a circuit for converting electricity supplied from an internal battery into the voltage required for each circuit, and also has a circuit for charging the battery with electricity input from an external power source. Although the present invention has been described as having an internal battery, the circuit may not have an internal battery. In that case, it only has a circuit for converting electricity supplied externally via an AC adapter or the like into the voltage required for each circuit.
[0038] The recording circuit 26 is a circuit that stores various data (such as alarm history and diagnostic information) acquired from the drive device 4, encoder, etc. in a non-volatile memory. In the present invention, the recording circuit 26 is described as being provided separately from the arithmetic circuit 23, but it may be substituted by the ROM 52 provided in the arithmetic circuit 23. Furthermore, if it is not necessary to store the data within the monitoring device 20, it may be left stored in the RAM 53 within the arithmetic circuit 23, or the data stored in the RAM 53 may be stored on the mobile terminal 27 side.
[0039] Next, a method for acquiring diagnostic information of the monitoring device 20 will be described. In the above configuration, an operator (serviceman) selects parameters output by the encoder and monitoring device 20 from software in the mobile terminal 27, and performs a predetermined procedure to display the parameters acquired by the monitoring device 20 on the screen of the mobile terminal 27, thereby performing a status diagnosis. A detailed description of the operation of the mobile terminal 27 will be omitted as it is not related to the present invention.
[0040] When the NC device 6 starts up, the monitoring device 20 intercepts the initialization communication flowing between the encoder and the drive device 4, analyzes the communication settings, and waits for steady-state communication to start between the encoder and the drive device 4. When steady-state communication starts, the monitoring device 20 intercepts position request commands from the drive device 4 and encoder position information responses that flow through the connection cable, and stores these in receive buffers 41a and 41b within the monitoring device 20. The intercepted communication data is stored in the receive buffers 41a and 41b, and is also transferred directly to the other party's send buffers 42a and 42b, whereby the communication data is sent to each device.
[0041] In order to obtain the desired encoder diagnostic information in the above state, the monitoring device 20 performs a process of replacing the position request command transmitted from the drive device 4 with a command (a diagnostic information setting change command) transmitted from the mobile terminal 27. In this embodiment, the diagnostic information setting change command is written in a form that does not include a position request command, but it may also be a command that includes the contents of the position request command. In that case, there is no need to perform the position estimation described below, and since there is a diagnostic information setting change completion response along with the position information response, it is sufficient to transfer only the position information response to the higher-level device. The command replacement process is described below.
[0042] The monitoring device 20 receives a command from the mobile terminal 27 via the antenna 28 and stores it in the receive buffer 59 of the arithmetic circuit 23 via the wireless circuit 24. The arithmetic circuit 23 analyzes the command received from the wireless circuit 24 and stores a diagnostic information setting change command corresponding to the command in the transmit buffer 45d. The command stored in the transmit buffer 45d is output to the logic circuit 22 via the external bus and stored in the receive buffer 46c. The command stored in the receive buffer 46c is transferred to the second transmit buffer 43b on the lower device side. Once the storage in the second transmit buffer 43b is complete, the diagnostic information setting change command stored in the second transmit buffer 43b is transmitted to the lower device at the next communication timing in place of the position request command stored in the transmit buffer 42b. At this time, the data stored in the transmit buffer 42b is discarded. The encoder that receives the replaced command changes its output value according to the diagnostic information setting change command and returns a response (ACK) indicating that the change has been completed. Upon receiving a response from the encoder indicating that the change has been completed, the monitoring device 20 creates a position information response from the estimated position information Psd(t) created within the monitoring device 20 and transmits the position information response to the driving device 4 instead of the encoder. At this time, the values stored in the previous receive buffer 41b are used for other information such as the status to be added to the position information response. This completes the command replacement process, and from the next cycle onwards the encoder operates by adding diagnostic information to the position information response to a position request command.
[0043] In the above, the timing for replacing the command is described as the timing when the command from the first transmission buffer is transmitted after data has been stored in the second transmission buffer 43b, but the command may also be output at any free time, such as when there is no command from the drive unit 4 or no response communication from the encoder.
[0044] Here, the subscript symbol of t represents the current time as the number of time divisions from the reference time in digital, Δt represents the smallest unit time width in digital, and t*Δt represents the elapsed time from the reference time. Therefore, the time one time before the present is expressed as t-1, and the time two times before the present is expressed as t-2.
[0045] The estimated position information Psd(t) is calculated in a steady communication state as follows: Speed information V(t) (= P(t) - P(t-1)) is generated from the difference between the position information P(t) received from the encoder and the previous position information P(t-1), and acceleration information A(t) (= V(t) - V(t-1)) is generated from the difference between the speed information V(t) and the previous speed information V(t-1). In addition, the next predicted speed Vpr(t) (= V(t) + A(t) * Δt) is generated from the internally generated acceleration information A(t) and speed information V(t), and the next predicted position Ppr(t) (= P(t) + Vpr(t) * Δt) is generated from the predicted speed Vpr(t) and position information P(t). Deviation Dp(t) (= P(t) - Ppr(t)) is calculated from the difference between the position information P(t) and the predicted position Ppr(t). This is passed through a low-pass filter (LPF) to calculate the steady-state deviation Dlp(t). Estimated position information Psd(t+1) (= Ppr(t) + Dlp(t)) is generated for the next transmission in case the command is replaced. Since there is no position information response in the communication cycle in which the command is replaced, the previously calculated estimated position information Psd(t+1) is transmitted as the current estimated position information Psd(t). However, if it is determined that the axis drive has stopped, it is also possible to continue sending estimated position information of the position where it has been determined to have stopped, or position information from the detector. The amount of fluttering in the position information may be measured when the machine is started, and the range (amount of fluttering) within which the axis is considered to have stopped may be determined. Note that, since command replacement is usually performed only once when a command is received from the portable terminal 27, this estimated position information is sent only once, and is not transmitted continuously. However, since steady-state deviation is used to generate the estimated position information, it is constantly being calculated.
[0046] The monitoring device 20 receives the encoder response with the diagnostic information added, and transfers the communication data other than the newly added diagnostic information to the host device, while recalculating the error correction code and adding it to the communication data for transfer processing. The acquired diagnostic information is stored in the receive buffer 41b of the logic circuit 22, and then stored in a register at a specified timing, and waits to be transmitted to the arithmetic circuit 23.
[0047] The arithmetic circuit 23 retrieves the necessary information from the registers and buffers of the logic circuit 22 as set in advance by the mobile terminal 27, and transmits it from the wireless circuit 24 to the mobile terminal 27. At this time, since the necessary data is fixed, the DMA 50 in the arithmetic circuit 23 is used to import the data from the register 62 of the logic circuit 22 into the RAM 53 of the arithmetic circuit 23. The operation of the interfaces 40c and 44d related to communication such as external buses is the same as above, so a description will be omitted. The software of the mobile terminal 27 displays the received diagnostic data on the screen in a display method suited to each data item, and notifies the operator of its status.
[0048] When an alarm occurs in the encoder, the monitoring device 20 performs the following process to collect the alarm history. At this time, if diagnostic data is being collected, the monitoring device 20 operates with priority given to transferring data to the mobile terminal 27, and not collecting the alarm history.
[0049] Encoder abnormalities can be roughly divided into two types depending on the alarm occurrence situation: an encoder abnormality where it is determined that communication can continue, and an encoder abnormality where communication reliability has been lost and it is determined that communication cannot continue. When an alarm occurs, the encoder has the function of recording the main parameters at the time the alarm occurs.
[0050] When an encoder abnormality occurs that allows communication to continue, the monitoring device 20 continues the communication transfer process for a certain period of time, then replaces the command from the driving device 4 (with a command to read parameters), collects alarm information from the encoder, and stores it in the internal recording circuit 26. At this time, upon receiving the command to read parameters, the encoder outputs the information stored in the encoder at the time of alarm occurrence. Here, the certain period of time is a period of time sufficient for the operation of the machine to stop when the machine being driven is stopped due to the occurrence of an alarm.
[0051] Furthermore, when an encoder abnormality occurs that makes it impossible to continue communication and communication stops, the monitoring device 20 waits for a certain period of time, replaces or cuts off the command from the drive device 4, and performs test communication. After it is confirmed that encoder communication has stopped, the power is temporarily cut off to return the encoder to its initial state, and then alarm information is collected and saved in the recording circuit 26 inside the monitoring device 20. The contents stored in the recording circuit 26 inside the monitoring device 20 can be exchanged wirelessly in response to instructions from the mobile terminal 27, making it possible to check the contents of the alarm history immediately after the alarm has stopped, which can be used as an aid in alarm analysis. Also, by reserving a storage area on the monitoring device 20 side, it is possible to secure a large-capacity recording circuit 26 without having to worry about size limitations like with an encoder.
[0052] In the present invention, it has been described that the power supplied to the encoder side can be automatically turned off and on when an encoder abnormality occurs that makes it impossible to continue communication, but it may also be possible to turn the power off and on only when instructed by the mobile terminal 27. In this case, alarm history collection is also performed according to instructions from the mobile terminal.
[0053] The method for diagnosing the state of a communication path will be described below. The following steps are carried out as a method for diagnosing the intrusion of noise into a communication path.
[0054] The monitoring device 20 has a diagnostic unit 49 that has the function of detecting signals that change continuously at a timing faster than the time it takes to transmit 1 bit of information, and comparators 32a and 32b that detect signals when the communication voltage fluctuates above a specified level, so that it can detect when noise with a higher frequency and higher voltage level than communication within a predetermined range is mixed in.
[0055] The above-mentioned diagnostic method will be explained in detail with reference to Figure 4. Figure 4 shows various time-series signals when communication data flowing as a differential signal is converted into a single-ended signal, received by the logic circuit 22, and the status is diagnosed by the diagnostic unit 49. The signals flow from left to right, and if we consider that the measurements are being taken at the same measurement point, the signals are drawn in such a way that time passes from right to left.
[0056] The various time-series signals described above include six types: a differential signal (communication data) flowing through the communication line; a single-ended signal converted by the RS485 drivers 31a and 31b; a comparator signal which is an output signal of the comparators 32a and 32b to which one signal line of the differential signal is input; an operating clock CLK of the logic circuit 22; an input signal representing the communication data input to the logic circuit 22; and latched received data which is a signal obtained after the input signal is latched by the CLK inside the logic circuit 22.
[0057] Specifically, a case will be described in which the logic circuit 22 receives a differential signal flowing through a communication line. An asynchronous input signal must be latched using the operating clock CLK of the logic circuit 22 and taken into the logic circuit 22. In this case, the frequency of the CLK used to latch the input signal must be higher than the frequency of the input signal, and a frequency obtained by multiplying the frequency of the input signal is used. Therefore, the input signal is latched at the edge of the CLK signal at a timing near the center of the 1-bit width of the input signal to generate received data.
[0058] In Figure 4, the CLK frequency is four times the input signal, and the input signal is latched at both edges. Eight black circles represent an example of a 1-bit input signal latched at a CLK edge. Five white circles represent an example of the CLK signal edge when the input signal is latched to generate received data. Noise has also been added in two places to explain how to diagnose noise intrusion.
[0059] First, the diagnostic unit 49 will be described using the noise insertion point shown on the left side of Figure 4. Although there are limitations on the frequency that can be acquired, the input signal line is latched on both edges (rising and falling edges) of the multiplied frequency, as indicated by the black circles on the input signal. At this time, if a change in the signal due to noise insertion is detected, it is determined that noise has been mixed in, and a dedicated count circuit (hereinafter referred to as the diagnostic count circuit A61a) is counted up. Alternatively, if a signal change is detected more than a specified number of times, it is determined that noise has been mixed in, and the diagnostic count circuit A61a is counted up. Furthermore, if there is a lot of noise, the noise detection may be performed and the bits of the received data may be determined by majority vote of the signals latched on both edges of the CLK. This allows for more time for maintenance before an alarm is generated.
[0060] Next, we will explain the diagnostic method for when the signal changes above a specified level due to noise, using the noise insertion points shown on the right side of Figure 4. Comparators 32a and 32b, which are inserted in parallel with RS485 drivers 31a and 31b, located downstream of termination resistors 30a and 30b, monitor the voltage waves passing through the communication path. If the voltage exceeds a specified level, it is determined that noise has been introduced and the diagnostic count circuit A61a counts up. While the example in Figure 2 shows only comparators 32a and 32b that compare the upper limit voltage, a comparator that compares the lower limit voltage may also be included. This mechanism makes it possible to detect noise that causes communication abnormalities.
[0061] Furthermore, a method for diagnosing received data will be described as a method for diagnosing the state of a communication path. For the sake of explanation, the following describes a case where a communication command for timing alignment is present between the encoder and the drive unit 4. In a system such as an encoder that performs detection in accordance with a clock signal, the timing of synchronization performed between the NC unit 6 and the drive unit 4 may be used as the reference, or the timing may be set at a convenient interval that makes diagnosis easy.
[0062] To synchronize the timing between the encoder and the drive unit 4, a synchronization command is periodically transmitted from the drive unit 4. The cycle for transmitting the synchronization command is set as one large cycle (hereinafter referred to as the synchronization command transmission cycle), and within this cycle, request commands for position information and the like are repeatedly issued in fixed cycles. The example in Figure 5 shows a case where the synchronization command transmission cycle is 500 μs, the fixed cycle is 100 μs, and the encoder 2 responds only in the first fixed cycle.
[0063] Using the fixed cycle as one unit, receive buffers 41a and 41b are provided for transferring communication data, and a plurality of diagnostic count circuits B61b and diagnostic count circuits C61c are provided for each of the fixed cycles included in the synchronous cycle (five in this example). That is, if the number of fixed cycles included in the synchronous cycle is N, then N diagnostic count circuits B61b and N diagnostic count circuits C61c are provided.
[0064] The diagnostic count circuit C61c has four counters for detecting errors, which count missing received data, excessive received data, pattern errors in received data, and error correction code (CRC) errors, respectively. The diagnostic count circuit B61b has eight counters for counting the reception status of each communication data, including start flags, destination addresses, source addresses, commands and position information, diagnostic information, other received data, error correction codes (CRC, etc.), and end flags, for each of the synchronization commands, request commands, and encoder responses flowing as communication data.
[0065] The logic circuit 22 counts up the diagnostic count circuit B61b and the diagnostic count circuit C61c in accordance with the occurrence of abnormalities in the received data, thereby making it possible to grasp in detail which error occurred at what timing.
[0066] By communicating wirelessly with the diagnostic count circuit 61 described above in response to instructions from the mobile terminal 27, it is possible to check for phenomena while operating the machine.
[0067] Although the embodiments of the present disclosure have been described above, the present invention is not limited to the above-described embodiments. In the present disclosure, functions have been described as possessed by hardware as a monitoring device, but software having similar functions can also be incorporated into other devices. Furthermore, while the present disclosure has been described as relating to communication between an encoder and a drive device, the present disclosure may also be configured to monitor communication between other devices. Furthermore, although the monitoring device 20 has been described as having two input devices, an input device and a touch screen, it may be configured as a display device (output device) that only displays information, rather than a touch screen that functions as an input device, or in order to reduce the cost and size of the monitoring device 20, it may be configured without an input device or a display device, with all operation and display of the monitoring device 20 dependent on an external mobile terminal. [Explanation of symbols]
[0068] 1 motor end encoder, 2 encoder near drive shaft, 3 motor, 4 drive unit, 5 drive mechanism, 6 numerical control device, 7 ball screw, 8 support unit, 9 table, 10 coupling, 11 control box, 20 monitoring device, 21 communication circuit, 21a, 21b transmission / reception circuit, 22 logic circuit, 23 calculation circuit, 24 wireless circuit, 25 power supply circuit, 26 recording circuit, 27 mobile terminal, 28, 29 antenna, 30a, 30b termination resistor, 31a, 31b RS485 driver, 32a, 32b comparator, 33a, 33b common mode choke coil, 40a, 40b, 40c communication interface, 41a, 41b receive buffer, 42a, 42b transmit buffer, 43a, 43b second transmit buffer, 44d communication interface, 45c, 45d Transmit buffer, 46c, 46d receive buffer, 49 diagnostic unit, 50 DMA controller, 51 external bus controller, 52 ROM, 53 RAM, 54 interrupt controller, 55 CPU, 57 communication interface, 58 transmit buffer, 59 receive buffer, 61 diagnostic count circuit, 61a diagnostic count circuit A, 61b diagnostic count circuit B, 61c diagnostic count circuit C, 62 register, 63 interrupt generation circuit, 64 PLL circuit.
Claims
1. A monitoring device for monitoring a system having an encoder that outputs position data and a driving device that receives the position data from the encoder and controls a motor, A monitoring device that is inserted between the encoder and the drive device, and performs at least one of diagnosing the encoder and diagnosing the communication between the encoder and the drive device by intercepting the communication.
2. The monitoring device according to claim 1, The monitoring device has at least one input device provided on the monitoring device or a touch screen provided on the monitoring device, and The monitoring device operates in response to instructions from at least one of the input device, the touch screen, and a mobile terminal that is physically separated from the monitoring device and capable of wireless communication with the monitoring device, and displays the diagnostic results obtained by the operation on an output device that is a display device provided in the monitoring device or a display device provided in the mobile terminal. A monitoring device characterized by:
3. The monitoring device according to claim 1, the monitoring device is configured to receive communication data for the encoder from the driving device and transfer it to the encoder, and to receive communication data for the driving device from the encoder and transfer it to the driving device; The monitoring device further comprises: when receiving an instruction to diagnose the encoder from an input device, a touch screen, or a mobile terminal, replacing a request command for position data transmitted from the drive device to the encoder with an instruction corresponding to the instruction to diagnose the encoder, and transmitting the replaced command to the encoder; The encoder switches between outputting and stopping diagnostic information and changes the content of the information to be output based on the replaced command, Furthermore, in the control cycle in which the instruction has been replaced, when the position data cannot be acquired from the encoder due to the replacement of the instruction, the monitoring device predicts a position in the replaced control cycle, generates substitute position data based on the predicted position, and outputs the substitute position data to the drive device. A monitoring device characterized by being configured as follows.
4. The monitoring device according to claim 3, A monitoring device characterized in that, when the acceleration information of the previous cycle of the control cycle in which the command is replaced is A(t-1), the velocity information of the previous cycle is V(t-1), the position information of the previous cycle is P(t-1), and the deviation amount obtained by removing harmonic components from the deviation between past position information and predicted position information using a low-pass filter is Dlp(t-1), the predicted position Psd(t) of the control cycle in which the command is replaced is generated based on the following equation 1. Psd(t)=P(t-1)+(V(t-1)+A(t-1)*Δt)*Δt+Dlp(t-1) (1)
5. The monitoring device according to claim 3, The monitoring device When an encoder abnormality that allows communication to continue occurs, the communication data transfer process is continued for a specified time, and then the command from the drive device to the encoder is replaced with a command to output alarm information stored in the encoder, and the alarm information output from the encoder is stored in a storage device of the monitoring device. When an encoder abnormality occurs that makes it impossible to continue communication and communication stops, the monitoring device waits for a specified time, or temporarily cuts off power to return to an initial state, then replaces the command from the driving device to the encoder with a command to output alarm information stored in the encoder, transmits the replaced command to the encoder, and saves the alarm information output from the encoder in a storage device of the monitoring device. A monitoring device characterized by being configured as follows.
6. The monitoring device according to claim 5, The monitoring device a diagnostic counting circuit A that counts communication data when the communication data changes continuously at a timing faster than the 1-bit width of the communication data or when the voltage of the communication data fluctuates to a specified level or more, assuming that noise is superimposed on the communication data; a diagnostic count circuit B that counts abnormalities contained in the received data; a diagnostic count circuit C that counts when data specified to be included in the communication data cannot be received; Equipped with the communication data includes a timing synchronization command transmitted at a specified synchronization command transmission cycle and a command transmitted at a fixed cycle shorter than the synchronization command transmission cycle; the diagnostic count circuit B and the diagnostic count circuit C are provided for the same number of fixed cycles included in the synchronization command transmission cycle, respectively; A monitoring device characterized by: