Encoder and measurement system
The encoder allows users to switch communication speed through a memory controller and non-volatile memory, addressing the complexity of existing configurations and enhancing reliability.
Patent Information
- Application Number
- PCT/JP2024/040636
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-19
- Filing Date
- 2024-11-15
- Publication Date
- 2025-08-28
AI Technical Summary
Existing encoders require dedicated circuits and components to switch communication speed, leading to a complicated configuration.
An encoder with a memory controller that allows users to switch communication speed without complicating the configuration by using a non-volatile memory to store communication speed settings and a signal processing controller to manage communication speed changes.
Enables users to switch communication speed without complicating the encoder's configuration, improving reliability and flexibility in communication speed settings.
Smart Images

Figure JP2024040636_28082025_PF_FP_ABST
Abstract
Description
Encoders and Measuring Systems
[0001] The present invention relates to an encoder and a measurement system, and more particularly to setting the communication speed between a controller and an encoder.
[0002] The encoder detects the state of the device to be measured, for example, the rotation angle of a motor or a wheel. Upon receiving a transmission request signal from the controller, the encoder transmits detected state information relating to the state of the device to the controller.
[0003] The encoder stores a communication speed setting in non-volatile memory, and communicates with an external controller at a communication speed based on this communication speed setting. The communication speed setting is written to the non-volatile memory by the manufacturer before the encoder is shipped. This means that users cannot change the encoder's communication speed.
[0004] On the other hand, a technique for switching the communication speed of an encoder on the user side is disclosed in the following Patent Document 1.
[0005] Japanese Patent Application Laid-Open No. 2022-54536
[0006] As described in the above-mentioned Patent Document 1, by providing a command determination unit, setting unit, storage unit, etc. in the communication unit, it becomes possible for the user to switch the communication speed of the encoder. However, this requires dedicated circuits and components in the communication unit, which cannot be handled by general transmission and reception circuits, resulting in a problem of a complicated configuration.
[0007] For this reason, it is desirable to enable the user to switch the communication speed of the encoder without complicating the configuration of the communication unit.
[0008] An object of the present invention is to provide an encoder and a measurement system that allows the user to switch the communication speed of the encoder without complicating the configuration of the communication section.
[0009] The encoder according to the present invention comprises a memory controller, a signal processing controller, a non-volatile memory for storing a communication speed setting value, a sensing unit for detecting the state of a device to be measured, a signal processing unit for generating state detection information from the detection results of the sensing unit, and a communication unit for communicating with an external controller. When the power is turned on, the memory controller reads the communication speed setting value written in the memory and sets the communication unit to receive or transmit at the communication speed set by the read communication speed setting value. When the signal processing controller receives a transmission request signal from the controller via the communication unit, it controls the state detection information generated by the signal processing unit to be sent to the controller via the communication unit. The memory controller responds to memory access from the controller and has a function of writing data to a specified address in the memory. When the memory controller receives a communication speed setting memory access command from the controller via the communication unit, which includes a new communication speed setting value and an address in memory for the new communication speed setting value, it writes the new communication speed setting value to the address in the memory.
[0010] In the encoder of the present invention, the memory controller may start up when the power is turned on in a state in which it does not accept writing of a new communication speed setting value to the memory, and when it receives a memory access command for communication speed change permission, which includes a change permission flag and the address of the change permission flag in memory, from the controller via the communication unit, it may enter a state in which it is possible to write a new communication speed setting value to the memory.
[0011] In the encoder according to the present invention, the memory controller may return to a state in which it does not accept writing of a new communication speed setting value to the memory after writing the new communication speed setting value to the memory.
[0012] In the encoder of the present invention, when the memory controller is in a state where it is possible to write a new communication speed setting value to memory, and receives a memory access command for disallowing a communication speed change from the controller via the communication unit, the memory access command including a change disallowance flag and the address of the change disallowance flag in memory, the memory controller may return to a state where it does not accept the writing of a new communication speed setting value to memory.
[0013] In the encoder according to the present invention, the memory controller has a function of responding to memory access from the controller and reading data from a specified address in the memory, and when it receives a memory access command for confirming the communication speed setting value, which includes the address of the communication speed setting value written in the memory, from the controller via the communication unit, it reads the communication speed setting value from the address in the memory and transmits the read communication speed setting value to the controller via the communication unit.
[0014] In the encoder of the present invention, the communication unit may have a receiving unit that is capable of changing the communication speed and receives at a communication speed set by a communication speed setting value, a transmitting unit that is capable of changing the communication speed and transmits at the communication speed set by the communication speed setting value, and a fixed-speed receiving unit that receives at a predetermined fixed communication speed.
[0015] In the encoder of the present invention, the communication unit may have a plurality of receiving units that are capable of changing the communication speed and receive at different communication speeds set by a communication speed setting value, a plurality of transmitting units that are capable of changing the communication speed and transmit at different communication speeds set by a communication speed setting value, and a plurality of fixed-speed receiving units that receive at different predetermined fixed communication speeds.
[0016] In the encoder according to the present invention, the fixed communication speed of the communication unit may be set to be lower than the lowest communication speed set by the communication speed setting value.
[0017] In the encoder according to the present invention, the fixed communication speed of the communication unit may be set to be lower than half the minimum communication speed set by the communication speed setting value.
[0018] The measurement system according to the present invention comprises a controller that communicates with an encoder, and the encoder that communicates with the controller, and the controller and the encoder communicate at a communication speed set by a communication speed setting value written in memory based on a communication speed setting memory access command from the controller.
[0019] According to the encoder of the present invention, the communication speed of the encoder can be switched on the user side without complicating the configuration of the communication unit. According to the measurement system of the present invention, the communication speed of the encoder can be switched on the user side without complicating the configuration of the communication unit of the encoder.
[0020] FIG. 1 is a configuration diagram showing the configuration of a measurement system including a controller and an encoder in embodiment 1. FIG. 2 is an explanatory diagram showing an example of the format of a memory access command used in embodiment 1. FIG. 3 is a configuration diagram showing the configuration of a measurement system including a controller and an encoder in embodiment 2. FIG. 4 is a configuration diagram showing an encoder in embodiment 2 together with a speed setting value. FIG. 5 is a configuration diagram showing the configuration of a measurement system including a controller and an encoder in embodiment 3. FIG. 6 is a configuration diagram showing an encoder in embodiment 3 together with a speed setting value. FIG. 7 is a configuration diagram showing the configuration of a measurement system including a controller and an encoder in a comparative example.
[0021] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An encoder and a measurement system according to an embodiment of the present invention will now be described with reference to the accompanying drawings. In the drawings, the same parts are designated by the same reference numerals.
[0022] First Embodiment First, the configuration of a measurement system 1 in a first embodiment will be described with reference to Fig. 1. Fig. 1 is a configuration diagram showing the configuration of a measurement system 1 including a controller 10 and an encoder 100 in the first embodiment. Here, the controller 10 functions as a host computer, and the encoder 100 functions as a terminal device.
[0023] 1, the encoder 100 is configured to be able to communicate with an external controller 10. The encoder 100 mainly includes a control unit 110, a memory 120, a communication unit 130, a sensing unit 150, and a signal processing unit 160.
[0024] The control unit 110 includes a memory controller 111 and a signal processing controller 112 .
[0025] The main functions of the memory controller 111 are as follows: When the encoder 100 is powered on, the memory controller 111 reads the communication speed setting value stored in the memory 120 and sets the communication unit 130 to receive or transmit at the communication speed set by the read communication speed setting value. When the memory controller 111 receives a communication speed setting memory access command from the controller 10, it stores a new communication speed setting value in the memory 120. The communication speed setting memory access command includes the new communication speed setting value and the address of the new communication speed setting value in the memory 120. When the memory controller 111 powers on, it sets the memory 120 to a state in which it does not accept the storage of a new communication speed setting value. At this time, the memory controller 111 references a change permission flag or a change prohibition flag stored at a predetermined address in the memory 120. When the memory controller 111 receives a communication speed change permission memory access command from the controller 10, it sets the memory 120 to a state in which it is possible to store a new communication speed setting value. The memory access command for permitting a communication speed change includes a change permission flag and the address of the change permission flag in the memory 120. The memory controller 111 stores the change permission flag at a predetermined address in the memory 120. When the memory controller 111 receives the memory access command for disallowing a communication speed change from the controller 10, the memory controller 111 returns to a state in which writing of a new communication speed set value to the memory 120 is not permitted. The memory access command for disallowing a communication speed change includes a change prohibition flag and the address of the change prohibition flag in the memory 120. The memory controller 111 then stores the change prohibition flag at a predetermined address in the memory 120. When the memory controller 111 receives the memory access command for checking the communication speed set value from the controller 10, which includes the address of the communication speed set value, the memory controller 111 reads the communication speed set value from the specified address in the memory 120 and transmits the read communication speed set value to the controller 10 via the communication unit 130.
[0026] In response to a transmission request signal from the external controller 10, the signal processing controller 112 transmits the state detection information generated by the signal processing unit 160 to the controller 10 via the communication unit 130.
[0027] The memory 120 stores various setting values, a change permission flag, a change non-permission flag, and a communication speed setting value at predetermined addresses under the control of the memory controller 111. Note that with respect to the memory 120, the terms "memorize," "store," and "write" have the same meaning.
[0028] The communication unit 130 includes a receiving unit 131 and a transmitting unit 132. The receiving unit 131 and the transmitting unit 132 communicate with the external controller 10 at a communication speed set by the communication speed setting value read from the memory 120 by the memory controller 111.
[0029] The receiving unit 131 is configured to be able to change the communication speed. The receiving unit 131 receives from the controller 10 a transmission request signal, a memory access command for setting a communication speed, a memory access command for allowing a change in communication speed, a memory access command for not allowing a change in communication speed, and a memory access command for checking the communication speed setting value, at the communication speed set by the memory controller 111 from the memory 120.
[0030] The transmitting unit 132 is configured to be able to change the communication speed. The transmitting unit 132 transmits the status detection information generated by the signal processing unit 160 and the communication speed setting value read from the memory 120 to the controller 10 at the communication speed set by the communication speed setting value read from the memory 120 by the memory controller 111.
[0031] The sensing unit 150 magnetically or optically detects the state of the measurement target device, for example, the rotation angle of a motor or a wheel, and supplies the detection result regarding the state of the measurement target device to the signal processing unit 160.
[0032] The signal processing unit 160 processes the detection results of the sensing unit 150 and generates state detection information including the position, angle, or speed. The state detection information generated by the signal processing unit 160 is transmitted to the controller 10 via the communication unit 130 under the control of the signal processing controller 112 in response to a transmission request signal from the controller 10.
[0033] Comparative Example: Here, the configuration of a measurement system 1x as a comparative example to the measurement system 1 in the first embodiment will be described with reference to FIG. 7. FIG. 7 is a configuration diagram showing the configuration of a measurement system 1x including a controller 10x and an encoder 100x in the comparative example. In FIG. 7, in the configuration of the measurement system 1x, the same components as those in FIG. 1 are given the same reference numerals, and components different from those in FIG. 1 are given an "x" at the end of the reference numeral. Therefore, redundant explanations will be omitted, and the explanation will focus on the parts that are different from FIG. 1.
[0034] 7, the encoder 100x is configured to be able to communicate with an external controller 10x. The encoder 100x mainly includes a control unit 110x, a memory 120x, a communication unit 130, a sensing unit 150, and a signal processing unit 160.
[0035] The control unit 110x includes a memory controller 111x and a signal processing controller 112.
[0036] Before the encoder 100x is shipped, the memory 120x stores the communication speed setting value via a dedicated port or the like indicated by the dashed line in Fig. 7. After the encoder 100x is shipped, the memory 120x cannot store a new communication speed setting value via the memory controller 111x.
[0037] When the power of the encoder 100x is turned on, the memory controller 111x reads the communication speed setting value stored in the memory 120x and sets the communication unit 130 to receive or transmit at the communication speed set by the read communication speed setting value.
[0038] The communication unit 130 includes a receiving unit 131 and a transmitting unit 132. The communication unit 130 communicates with the external controller 10x at a communication speed set by the communication speed setting value read from the memory 120x by the memory controller 111x.
[0039] That is, the receiving unit 131 receives a transmission request signal from the controller 10x at the communication speed set by the communication speed setting value read from the memory 120x by the memory controller 111x. The transmitting unit 132 transmits the status detection information generated by the signal processing unit 160 to the controller 10x at the communication speed set by the communication speed setting value read from the memory 120x by the memory controller 111x.
[0040] [Operation of Encoder 100x in Comparative Example] The encoder 100x shown in Fig. 7 communicates with an external controller 10x via a communication unit 130 set with a communication speed setting value stored in a non-volatile memory 120x. The communication speed setting value is written to the memory 120x by the manufacturer before shipping the encoder 100x via a dedicated port or the like indicated by the dashed line in Fig. 7. For this reason, the user cannot change or switch the communication speed of the encoder 100x.
[0041] [Operation of encoder 100 in embodiment 1] Below, the operation of encoder 100 will be explained separately for when power is turned on, when a request signal for a transmission request is received, when a memory access command for setting the communication speed is received, when a memory access command for allowing a communication speed change is received, when a memory access command for not allowing a communication speed change is received, and when a memory access command for confirming the communication speed setting value is received.
[0042] Here, the transmission request signal is a general request signal known as RTS (Request To Send), and is a signal that requests the controller 10 to transmit status detection information generated by the signal processing unit 160 based on the detection results of the sensing unit 150. The communication speed setting memory access command is a command that stores the new communication speed setting value in the memory 120, and includes, as data, a new communication speed setting value to be stored in the memory 120 and the address of the new communication speed setting value in the memory 120. The communication speed change permission memory access command is a command that includes a change permission flag and the address of the change permission flag in the memory 120, and enables the memory 120 to store a new communication speed setting value. The communication speed change prohibition memory access command is a command that includes a change prohibition flag and the address of the change prohibition flag in the memory 120, and disables the memory 120 from storing a new communication speed setting value. The memory access command for confirming the communication speed setting value includes a command to read the communication speed setting value written in memory 120 and the address of the communication speed setting value in memory 120, and is a command requesting that the communication speed setting value read from memory 120 be sent to the controller 10.
[0043] The above-mentioned memory access command for setting the communication speed, memory access command for allowing a change in the communication speed, memory access command for not allowing a change in the communication speed, and memory access command for checking the communication speed setting value can be realized using the communication format of a general direct memory access command shown in Figure 2 (a).
[0044] For example, the fields in the format shown in Figure 2(a) are as follows: The control field CF is command information related to the type of command. The address field ADF is address information for writing to or reading from memory 120. The data field EDF is information on the communication speed setting value or various flags to be written to memory 120. In the case of a memory access command for confirming the communication speed setting value, the data field EDF is composed of dummy data. The check field CRC is error check information using a CRC (Cyclic Redundancy Check) for all bits excluding the start bit and delimiter of all fields other than the CRC field.
[0045] When the communication speed setting value read from the memory 120 is transmitted from the encoder 100 to the controller 10 in response to a memory access command for confirming the communication speed setting value, a communication format shown in Figure 2(b), which is similar to Figure 2(a), can be used. In Figure 2(b), the control field CF uses the field contents of Figure 2(a) as is. The address field ADF contains information about the address when read from the memory 120. The data field EDF contains information about the communication speed setting value read from the memory 120. The check field CRC contains information about error checks using CRC for all bits excluding the start bit and delimiter of all fields other than the CRC field.
[0046] When power is turned on: When power is turned on to the encoder 100, the control unit 110 initializes each section and performs the following initial operations. The memory controller 111 reads out the communication speed setting value stored at a predetermined address in the memory 120. The memory controller 111 sets the receiving section 131 to receive at the communication speed set by the read communication speed setting value, and sets the transmitting section 132 to transmit at the communication speed set by the read communication speed setting value. The memory controller 111 may start up in a state where it does not accept the storage of a new communication speed setting value in the memory 120, in order to prevent erroneous storage of the communication speed setting value in the memory 120 and to prevent unauthorized operation.
[0047] When a transmission request signal is received: The receiving unit 131 receives the transmission request signal from the controller 10 at the communication speed set by the communication speed setting value. The receiving unit 131 sends the received transmission request signal to the signal processing controller 112. In response to the transmission request signal from the controller 10, the signal processing controller 112 sends status detection information generated by the signal processing unit 160 based on the detection result of the sensing unit 150 to the transmitting unit 132. The transmitting unit 132 transmits the status detection information to the controller 10 at the communication speed set by the communication speed setting value.
[0048] When a memory access command for permitting a change in communication speed is received: When the encoder 100 is powered on, the memory controller 111 may start up in a state in which it does not accept the storage of a new communication speed setting value in the memory 120. The receiving unit 131 receives the memory access command for permitting a change in communication speed from the controller 10 at the communication speed set by the communication speed setting value. The receiving unit 131 sends the received memory access command for permitting a change in communication speed to the memory controller 111. This memory access command for permitting a change in communication speed includes a change permission flag and the address of the change permission flag in the memory 120. In response to the memory access command for permitting a change in communication speed from the controller 10, the memory controller 111 writes the change permission flag to a specified address in the memory 120. The memory controller 111 references the change permission flag at the specified address in the memory 120, cancels the state in which it does not accept the storage of a new communication speed setting value in the memory 120, and makes it possible to store a new communication speed setting value in the memory 120. Therefore, since the memory 120 is in a state where it does not accept storage of a new communication speed setting value until it receives a memory access command for permitting a communication speed change from the controller 10, it is possible to protect the communication speed setting value in the memory 120 and improve reliability. After the memory controller 111 has made it possible to store a new communication speed setting value in the memory 120 by means of the memory access command for permitting a communication speed change, the memory controller 111 may return to a state where it does not accept storage of a new communication speed setting value in the memory 120 after a certain period of time has elapsed or after storing the new communication speed setting value in the memory 120.
[0049] Upon receiving a memory access command for disallowing a change in communication speed: The receiving unit 131 receives the memory access command for disallowing a change in communication speed from the controller 10 at the communication speed set by the communication speed setting value. The receiving unit 131 sends the received memory access command for disallowing a change in communication speed to the memory controller 111. The memory access command for disallowing a change in communication speed includes a change disallowance flag and the address of the change disallowance flag in the memory 120. In response to the memory access command for disallowing a change in communication speed from the controller 10, the memory controller 111 writes the change disallowance flag to a specified address in the memory 120. The memory controller 111 references the change disallowance flag at the specified address in the memory 120 and sets the memory 120 to a state in which it does not accept the storage of a new communication speed setting value, thereby disabling the storage of a new communication speed setting value in the memory 120. As a result, the state changes from one in which it is possible to accept the storage of a new communication speed setting value in memory 120 to one in which it is not possible to accept the storage of a new communication speed setting value in memory 120, thereby protecting the communication speed setting value in memory 120 and improving reliability.
[0050] When a communication speed setting memory access command is received: The receiving unit 131 receives the communication speed setting memory access command from the controller 10 at the communication speed set by the communication speed setting value. The receiving unit 131 sends the received communication speed setting memory access command to the memory controller 111. The communication speed setting memory access command includes a new communication speed setting value and the address of the new communication speed setting value in the memory 120. In response to the communication speed setting memory access command from the controller 10, the memory controller 111 writes the new communication speed setting value to the specified address in the memory 120. In this case, the memory controller 111 overwrites the communication speed setting value already stored in the memory 120 with the new communication speed setting value.
[0051] When a memory access command for checking a communication speed setting value is received: The receiving unit 131 receives the memory access command for checking a communication speed setting value from the controller 10 at the communication speed set by the communication speed setting value. The receiving unit 131 sends the received memory access command for checking a communication speed setting value to the memory controller 111. The memory access command for checking a communication speed setting value includes a command for reading the communication speed setting value written in the memory 120 and the address of the communication speed setting value in the memory 120. In response to the memory access command for checking a communication speed setting value from the controller 10, the memory controller 111 reads the communication speed setting value stored in the memory 120 from the specified address and transmits the read communication speed setting value from the transmitting unit 132 to the controller 10 at the communication speed set by the communication speed setting value. This allows the controller 10 to reliably know the communication speed setting value of the encoder 100.
[0052] [Effects Obtained by First Embodiment] The encoder 100 of the first embodiment includes a control unit 110, a non-volatile memory 120 that stores a communication speed setting value, a sensing unit 150 that detects the state of the device to be measured, a signal processing unit 160 that generates state detection information from the detection result of the sensing unit 150, and a communication unit 130 that communicates with the external controller 10. When the power is turned on, the memory controller 111 reads the communication speed setting value stored in the memory 120 and sets the communication unit 130 to receive or transmit at the communication speed set by the read communication speed setting value. The signal processing controller 112 controls the state detection information generated by the signal processing unit 160 to be transmitted to the controller 10 via the communication unit 130 in response to a transmission request signal from the controller 10 via the communication unit 130. When the memory controller 111 receives a communication speed setting memory access command from the controller 10 via the communication unit 130, it writes a new communication speed setting value to a specified address in the memory 120. According to the encoder 100 described above, it becomes possible for the user to switch the communication speed of the encoder 100 from the controller 10, without complicating the configuration of the communication unit 130. According to the measurement system 1 having the controller 10 and the encoder 100 described above, it becomes possible for the user to switch the communication speed of the encoder 100 from the controller 10, without complicating the configuration of the communication unit 130 of the encoder 100.
[0053] In the encoder 100 of the first embodiment, when the memory controller 111 receives a memory access command for permitting a communication speed change from the controller 10 via the communication unit 130 while the memory controller 111 is not accepting the storage of a new communication speed setting value in the memory 120, the memory controller 111 enters a state where it is possible to store a new communication speed setting value in the memory 120. Therefore, until the memory access command for permitting a communication speed change is received from the controller 10, the memory controller 111 is not accepting the storage of a new communication speed setting value in the memory 120, and therefore the communication speed setting value in the memory 120 can be protected and reliability can be improved.
[0054] In the encoder 100 of the first embodiment, the memory access command for permitting a communication speed change enables storage in the memory 120, and after a new communication speed setting value is stored in the memory 120, the memory controller 111 returns to a state in which it does not accept the storage of a new communication speed setting value in the memory 120. Therefore, after a new communication speed setting value is stored in the memory 120, the memory controller 111 again returns to a state in which it does not accept the storage of a new communication speed setting value in the memory 120, thereby protecting the communication speed setting value in the memory 120 and improving reliability.
[0055] In the encoder 100 of the first embodiment, when a memory access command for permitting a change in communication speed is received from the controller 10 via the communication unit 130, the memory controller 111 enters a state in which it will not accept the storage of a new communication speed setting value in the memory 120. As a result, since it will not accept the storage of a new communication speed setting value in the memory 120, it is possible to protect the communication speed setting value in the memory 120 and improve reliability.
[0056] In the encoder 100 of the first embodiment, when the memory controller 111 receives a memory access command for confirming the communication speed setting value from the controller 10, it transmits the communication speed setting value stored in the memory 120 to the controller 10. This allows the controller 10 to reliably know the communication speed setting value of the encoder 100 even if the controller 10 does not recognize the communication speed setting value stored in the memory 120 of the encoder 100.
[0057] Second Embodiment Next, the configuration of a measurement system 1 in a second embodiment will be described with reference to Fig. 3. Fig. 3 is a configuration diagram showing the configuration of a measurement system 1 including a controller 10 and an encoder 100 in a second embodiment. Next, the configuration of a measurement system 1 in a second embodiment will be described with reference to Fig. 3. Fig. 3 is a configuration diagram showing the configuration of a measurement system 1 including an encoder 100 in a second embodiment. In Fig. 3, the same components as in Fig. 1 are assigned the same reference numerals. Therefore, duplicated explanations will be omitted, and the explanation will focus on the parts that differ from Fig. 1.
[0058] [Configuration of Encoder 100 of Second Embodiment] The encoder 100 shown in FIG. 3 differs from the encoder 100 shown in FIG. 1 in the following respects.
[0059] In addition to the receiving unit 131 and the transmitting unit 132, the communication unit 130 is further provided with a fixed-rate receiving unit 133 that receives at a fixed communication rate. The fixed-rate receiving unit 133 receives in parallel with the receiving unit 131 at a communication rate that does not overlap with that of the receiving unit 131. The fixed communication rate of the fixed-rate receiving unit 133 is predetermined to be slower than the communication rate of the receiving unit 131, which is determined by the rate setting value.
[0060] The control unit 110 is further provided with a switching unit 113 in addition to the memory controller 111 and the signal processing controller 112. The switching unit 113 provides the signal processing controller 112 with a transmission request signal received from the controller 10 by the receiving unit 131 or the fixed-speed receiving unit 133. The switching unit 113 provides the memory access command for setting the communication speed, the memory access command for permitting a change in communication speed, the memory access command for not permitting a change in communication speed, and the memory access command for checking the communication speed setting value received from the controller 10 by the receiving unit 131 or the fixed-speed receiving unit 133 to the memory controller 111.
[0061] [Operation of Encoder 100 in Second Embodiment] In the second embodiment, when the controller 10 does not recognize the communication speed setting value stored in the memory 120 in the encoder 100, it transmits a transmission request signal, a communication speed setting memory access command, a communication speed change permission memory access command, a communication speed change non-permission memory access command, and a communication speed setting value confirmation memory access command to the encoder 100 at a fixed communication speed. The various access commands transmitted from the controller 10 at the fixed communication speed are received by the fixed speed receiving unit 133. The various access commands received by the fixed speed receiving unit 133 are sent to the control unit 110.
[0062] In a specific and effective usage mode, when the controller 10 does not recognize the communication speed setting value stored in the memory 120 of the encoder 100, the controller 10 transmits a memory access command for confirming the communication speed setting value to the encoder 100 at a fixed communication speed. The fixed-speed receiving unit 133 receives the memory access command for confirming the communication speed setting value transmitted from the controller 10 at the fixed communication speed. The received memory access command for confirming the communication speed setting value is sent to the memory controller 111 via the switching unit 113. In response to the memory access command for confirming the communication speed setting value from the controller 10, the memory controller 111 reads the communication speed setting value stored in the memory 120 and transmits the read communication speed setting value from the transmitting unit 132 to the controller 10 at the communication speed set by the communication speed setting value. This allows the controller 10 to reliably know the communication speed setting value of the encoder 100. In addition to the above description, the second embodiment can perform the same operations as those of the first embodiment using the receiving unit 131 and the transmitting unit 132.
[0063] [Specific Example of Communication Speed Setting in Encoder 100 of Embodiment 2] A specific example of communication speed setting by the communication unit 130 in the encoder 100 will be described below with reference to Fig. 4. Fig. 4 is a configuration diagram showing the encoder 100 of Embodiment 2 together with the speed setting value. The receiving unit 131 receives a transmission request signal, a communication speed setting memory access command, a communication speed change permission memory access command, a communication speed change non-permission memory access command, and a communication speed setting value confirmation memory access command from the controller 10 at the second communication speed within the range of 1.25 Mbps to 10 Mbps set by the communication speed setting value. The transmitting unit 132 transmits the status detection information generated by the signal processing unit 160 and the communication speed setting value read from the memory 120 to the controller 10 at the second communication speed within the range of 1.25 Mbps to 10 Mbps set by the communication speed setting value. The fixed speed receiving unit 133 receives a request signal for requesting transmission, a memory access command for setting the communication speed, a memory access command for allowing a change in the communication speed, a memory access command for not allowing a change in the communication speed, and a memory access command for confirming the communication speed setting value from the controller 10 at a predetermined fixed communication speed of 0.5 Mbps.
[0064] In the above specific example, to ensure reliable communication between the controller 10 and the encoder 100, the fixed communication speed of the fixed-speed receiving unit 133 is set lower than the minimum communication speed of the receiving unit 131 and the transmitting unit 132. On the other hand, to improve the responsiveness of the encoder 100, the communication speeds of the receiving unit 131 and the transmitting unit 132 are set higher than the fixed communication speed of the fixed-speed receiving unit 133. If the communication speed of the receiving unit 131 and the fixed communication speed of the fixed-speed receiving unit 133 overlap, the receiving unit 131 and the fixed-speed receiving unit 133 will receive the same data simultaneously, which is undesirable. Therefore, to prevent the communication speed of the receiving unit 131 and the fixed communication speed of the fixed-speed receiving unit 133 from overlapping, the fixed communication speed of the fixed-speed receiving unit 133 is set lower than the minimum communication speed of the receiving unit 131. In order to prevent the fixed-speed receiving unit 133 from responding at a cycle that is half the minimum value of the communication speed of the receiving unit 131, the fixed communication speed of the fixed-speed receiving unit 133 is set lower than half the minimum value of the communication speed of the receiving unit 131. With this configuration, the controller 10 and the encoder 100 can communicate at either a slow but reliable fixed communication speed, or a changeable communication speed that is faster than the fixed communication speed.
[0065] [Effects Obtained by Second Embodiment] According to the second embodiment, the following effects can be obtained in addition to the effects of the first embodiment.
[0066] In the encoder 100 of the second embodiment, the communication unit 130 includes a receiving unit 131 that receives data at a communication speed set by a communication speed setting value, a transmitting unit 132 that transmits data at a communication speed set by the communication speed setting value, and a fixed-speed receiving unit 133 that receives data at a predetermined fixed communication speed. With this configuration, in the encoder 100, either the receiving unit 131 or the fixed-speed receiving unit 133 can reliably receive communications from the controller 10, depending on the communication speed of the external controller 10. This allows the controller 10 and the encoder 100 to communicate at either a slow but reliable fixed communication speed or a changeable communication speed that is faster than the fixed communication speed. This allows the user to switch the communication speed of the encoder 100 from the controller 10 without complicating the configuration of the communication unit 130 of the encoder 100.
[0067] In the encoder 100 of the second embodiment, the fixed communication speed of the fixed-speed receiving unit 133 is set to a low speed that is lower than the lowest communication speed of the receiving unit 131. Therefore, the low fixed communication speed ensures reliable communication between the controller 10 and the encoder 100. On the other hand, the communication speed between the receiving unit 131 and the transmitting unit 132 is set to a higher speed than the fixed communication speed of the fixed-speed receiving unit 133, thereby improving the responsiveness of the encoder 100.
[0068] In the encoder 100 of the second embodiment, the fixed communication speed of the fixed-speed receiving unit 133 is set lower than half the minimum communication speed of the receiving unit 131. This makes it possible to prevent the fixed-speed receiving unit 133 from responding at a cycle half the minimum communication speed of the receiving unit 131.
[0069] Third Embodiment Next, the configuration of a measurement system 1 in a third embodiment will be described with reference to Fig. 5. Fig. 5 is a configuration diagram showing the configuration of a measurement system 1 including an encoder 100 in a third embodiment. In Fig. 5, the same components as those in Figs. 1 and 3 are given the same reference numerals, and components different from those in Figs. 1 and 3 are given the suffix "a" or "b". Therefore, redundant explanations will be omitted, and the explanation will focus on the parts that are different from Figs. 1 and 3.
[0070] [Configuration of encoder 100 of embodiment 3] In Figure 5, the communication unit 130 is provided with multiple receiving units 131a, 131b that receive at different communication speeds set by a communication speed setting value, multiple transmitting units 132a, 132b that transmit at different communication speeds set by the communication speed setting value, and multiple fixed speed receiving units 133a, 133b that receive at different predetermined fixed communication speeds.
[0071] [Specific Example of Communication Speed Setting in Encoder 100 of Third Embodiment] A specific example of communication speed setting of the communication unit 130 in the encoder 100 will be described below with reference to Fig. 6. Fig. 6 is a configuration diagram showing the encoder 100 of the third embodiment together with the speed setting value.
[0072] The receiving unit 131a receives a transmission request signal, a communication speed setting memory access command, a communication speed change permission memory access command, a communication speed change prohibition memory access command, and a communication speed setting value confirmation memory access command from the controller 10 at a communication speed within the range of 1.25 Mbps to 10 Mbps set by the communication speed setting value. The receiving unit 131b receives a transmission request signal, a communication speed setting memory access command, a communication speed change permission memory access command, a communication speed change prohibition memory access command, and a communication speed setting value confirmation memory access command from the controller 10 at a communication speed within the range of 50 Mbps to 100 Mbps set by the communication speed setting value.
[0073] The transmitting unit 132a transmits the status detection information generated by the signal processing unit 160 and the communication speed setting value read from the memory 120 to the controller 10 at a communication speed within the range of 1.25 Mbps to 10 Mbps set by the communication speed setting value. The transmitting unit 132b transmits the status detection information generated by the signal processing unit 160 and the communication speed setting value read from the memory 120 to the controller 10 at a communication speed within the range of 50 Mbps to 100 Mbps set by the communication speed setting value.
[0074] The fixed speed receiving unit 133a receives, at a predetermined fixed communication speed of 0.2 Mbps, a request signal for requesting transmission, a memory access command for setting a communication speed, a memory access command for allowing a communication speed change, a memory access command for not allowing a communication speed change, and a memory access command for checking a communication speed set value from the controller 10. The fixed speed receiving unit 133b receives, at a predetermined fixed communication speed of 0.5 Mbps, a request signal for requesting transmission, a memory access command for setting a communication speed, a memory access command for allowing a communication speed change, a memory access command for not allowing a communication speed change, and a memory access command for checking a communication speed set value from the controller 10.
[0075] The receiving units 131a and 131b are configured with circuit configurations and elements suitable for their respective communication speed ranges. Similarly, the transmitting units 132a and 132b are configured with circuit configurations and elements suitable for their respective communication speed ranges. Similarly, the fixed-speed receiving units 133a and 133b are configured with circuit configurations and elements suitable for their respective communication speed ranges. Therefore, by dividing the receiving units 131a and 131b, the transmitting units 132a and 132b, and the fixed-speed receiving units 133a and 133b into low-speed and high-speed units, it is possible to more easily accommodate a wide range of communication speeds than by using a single receiving unit 131, a single transmitting unit 132, and a single fixed-speed receiving unit 133.
[0076] 5 and 6 show a state in which the number of receiving units 131a and 131b, the number of transmitting units 132a and 132b, and the number of fixed-speed receiving units 133a and 133b is two. However, it is also possible to set the number of receiving units to three or more, and receive and transmit at low speed, medium speed, high speed, and ultra-high speed. In this case, too, by configuring with circuit configurations and elements suitable for each communication speed range, it becomes possible to efficiently support wideband communication speeds.
[0077] [Effects Obtained by Embodiment 3] In the encoder 100 of Embodiment 3, the communication unit 130 includes a plurality of receiving units 131a and 131b, a plurality of transmitting units 132a and 132b, and a plurality of fixed-speed receiving units 133a and 133b. Here, the plurality of receiving units 131a and 131b receive at different communication speeds set by a communication speed setting value. The plurality of transmitting units 132a and 132b transmit at different communication speeds set by a communication speed setting value. The plurality of fixed-speed receiving units 133a and 133b receive at different predetermined fixed communication speeds. The plurality of receiving units 131a and 131b, the plurality of transmitting units 132a and 132b, and the plurality of fixed-speed receiving units 133a and 133b can be configured with circuit configurations and elements suitable for their respective communication speed ranges. This makes it possible to more easily accommodate broadband communication speeds than with a single fixed-rate receiving unit 133, a single receiving unit 131, and a single transmitting unit 132.
[0078] 1 Measurement system, 10 Controller, 100 Encoder, 110 Control unit, 111 Memory controller, 112 Signal processing controller, 113 Switching unit, 120 Memory, 130 Communication unit, 131, 131a, 131b Receiving unit, 132, 132a, 132b Transmitting unit, 133, 133a, 133b Fixed speed receiving unit, 150 Sensing unit, 160 Signal processing unit.
Claims
1. An encoder comprising: a memory controller; a signal processing controller; a non-volatile memory for storing a communication speed setting value; a sensing unit for detecting the state of a device to be measured; a signal processing unit for generating state detection information from the detection result of the sensing unit; and a communication unit for communicating with an external controller, wherein when the power is turned on, the memory controller reads out the communication speed setting value written in the memory and sets the communication unit to receive or transmit at the communication speed set by the read communication speed setting value, and when the signal processing controller receives a transmission request signal from the controller via the communication unit, it controls the state detection information generated by the signal processing unit to be sent to the controller via the communication unit, and the memory controller responds to memory access from the controller and has a function of writing data to a specified address in the memory, and when it receives a communication speed setting memory access command from the controller via the communication unit, which includes a new communication speed setting value and an address in the memory of the new communication speed setting value, it writes the new communication speed setting value to the address in the memory.
2. The encoder of claim 1, wherein the memory controller starts up in a state where it does not accept writing of the new communication speed setting value to the memory when power is turned on, and when it receives a memory access command for communication speed change permission, which includes a change permission flag and the address of the change permission flag in the memory, from the controller via the communication unit, it becomes able to write the new communication speed setting value to the memory.
3. The encoder according to claim 2, wherein the memory controller returns to a state in which it does not accept writing of the new communication speed setting value to the memory after writing the new communication speed setting value to the memory.
4. The encoder of claim 2, wherein when the memory controller receives a memory access command for disallowing a communication speed change from the controller via the communication unit, the memory access command including a change disallowance flag and the address of the change disallowance flag in the memory, while the memory controller is in a state where the new communication speed setting value can be written to the memory, the memory controller returns to a state where it does not accept writing of the new communication speed setting value to the memory.
5. The encoder of claim 1, wherein the memory controller has a function of responding to memory access from the controller and reading data from a specified address in the memory, and when it receives a memory access command for confirming a communication speed setting value from the controller via the communication unit, which includes the address of the communication speed setting value written in the memory, it reads the communication speed setting value from the address in the memory and transmits the read communication speed setting value to the controller via the communication unit.
6. An encoder as described in claim 5, wherein the communication unit has: a receiving unit that is capable of changing the communication speed and receives at the communication speed set by the communication speed setting value; a transmitting unit that is capable of changing the communication speed and transmits at the communication speed set by the communication speed setting value; and a fixed-speed receiving unit that receives at a predetermined fixed communication speed.
7. An encoder as described in claim 1, wherein the communication unit has: a plurality of receiving units whose communication speed is changeable and which receive at different communication speeds set by the communication speed setting value; a plurality of transmitting units whose communication speed is changeable and which transmit at different communication speeds set by the communication speed setting value; and a plurality of fixed-speed receiving units which receive at different predetermined fixed communication speeds.
8. The encoder according to claim 6, wherein in said communication section, said fixed communication speed is set to be lower than the lowest value of said communication speed set by said communication speed setting value.
9. The encoder according to claim 6, wherein in said communication section, said fixed communication speed is set to be lower than half of the minimum value of said communication speed set by said communication speed setting value.
10. A measurement system comprising: a controller that communicates with an encoder; and the encoder according to any one of claims 1 to 9 that communicates with the controller, wherein the controller and the encoder communicate at a communication speed set by the communication speed setting value written in the memory based on a communication speed setting memory access command from the controller.
Citation Information
Patent Citations
Encoder and communication control method of encoder
JP2022054536A
Device and method for transmission processing
JP1991142597A
Encoder device and robot system
JP2004318439A
Electronic control device
JP2011248510A
Storage device and control method thereof
JP2013156929A