Position detection sensor
The position detection sensor addresses the challenge of indicating the piston's location within the moving section by providing visual indicators, improving installation ease and usability.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- KEYENCE CORP
- Filing Date
- 2024-12-03
- Publication Date
- 2026-06-15
Smart Images

Figure 2026096303000001_ABST
Abstract
Description
【Technical Field】 【0001】 The present invention relates to a position detection sensor. 【Background Art】 【0002】 In factory automation, air cylinders are used to realize operations such as pushing, pulling, and grasping. According to Patent Document 1, it has been proposed to detect the position of a piston that moves inside an air cylinder by air pressure or hydraulic pressure. Furthermore, according to Patent Document 1, a display unit that emits light when the piston reaches a predetermined position has also been proposed. 【Prior Art Documents】 【Patent Documents】 【0003】 【Patent Document 1】 Japanese Patent Application Laid-Open No. 2003-240531 【Summary of the Invention】 【Problems to be Solved by the Invention】 【0004】 However, the invention described in Patent Document 1 only knows that the piston has reached a predetermined position. Generally, the piston moves in a moving section from the start position of movement to the end position of movement. Therefore, it would be convenient if it could specifically indicate where the piston is located in the moving section. In particular, the work of installing a position detection sensor for detecting the position of the piston on the cylinder would be facilitated. Therefore, an object of the present invention is to facilitate the installation work of the position detection sensor. 【Means for Solving the Problems】 【0005】 The present invention is, for example, a position detection sensor that detects the position of a displacement body that is movable parallel to a first direction, a detection device that generates a detection signal corresponding to the position of a magnet provided on the displacement body, A positioning unit that identifies the position of the displaced body in the first direction based on the detection signal generated by the detection device, A first housing that houses at least a portion of the detection device and extends along the first direction, The first housing is connected to the second housing via a cable, The second housing is provided with an input unit that receives operation input, A display unit provided in the second housing has a plurality of display elements arranged in the second housing at mutually different positions along a second direction corresponding to the first direction, and displays a position symbol indicating the position of the displaced body along the first direction and a threshold symbol indicating the position of the threshold, A display control unit is provided in the second housing and controls the display unit to display the position symbol at different positions on the plurality of display elements in different ways, thereby displaying the first state in which the displaced body is located at a first position corresponding to one end of the displacement range, the second state in which the displaced body is located at a second position corresponding to the other end of the displacement range, and the intermediate state in which the displaced body is located at an intermediate position between the first position and the second position, and also controls the display unit to display the threshold symbol at different positions on the plurality of display elements in accordance with the threshold value set according to the operation input received via the input unit. We provide a position detection sensor equipped with the following features. [Effects of the Invention] 【0006】 According to the present invention, the installation of position detection sensors becomes easier. [Brief explanation of the drawing] 【0007】 [Figure 1] A diagram illustrating a position detection sensor. [Figure 2] A perspective view illustrating the cylinder sensor and cylinder. [Figure 3] Exploded perspective view of the cylinder sensor. [Figure 4] A schematic cross-sectional view of the cylinder sensor and cylinder. [Figure 5] Figure showing the control system of the cylinder sensor. [Figure 6] Figure showing the control system of the relay amplifier. [Figure 7] Figure explaining the symbols. [Figure 8] Figure explaining the symbols. [Figure 9] Flowchart showing the display control method. [Figure 10] Figure explaining the symbols. [Figure 11] Figure explaining the symbols. [Figure 12] Flowchart showing the setting method. [Figure 13] Flowchart showing the deletion method. [Figure 14] Figure explaining the symbols. [Figure 15] Figure explaining the user interface in the relay amplifier. [Figure 16] Figure showing other examples of the symbols. [Figure 17] Figure showing other examples of the symbols. [Figure 18] Figure showing other examples of the symbols. [Figure 19] Figure explaining the symbols displayed on the relay amplifier or display panel. [Figure 20] Figure explaining the symbols displayed on the relay amplifier or display panel. [Figure 21] Figure explaining the symbols displayed on the relay amplifier or display panel. [Figure 22] Flowchart showing the display control method in the relay amplifier. [Figure 23] Flowchart showing the setting method in the relay amplifier. [Figure 24] Flowchart showing the deletion method in the relay amplifier. [Figure 25] Figure explaining the display panel. [Figure 26] Figure explaining the symbols displayed on the display panel. [Figure 27] Figure explaining the symbols displayed on the display panel. [Figure 28] A diagram explaining the symbols displayed on the display panel. [Figure 29] A diagram explaining the symbols displayed on the display panel. [Figure 30] A flowchart illustrating the display control method for a display panel. [Figure 31] A flowchart showing how to configure settings on the display panel. [Figure 32] A diagram showing another example of a cylinder sensor control system. [Figure 33] A diagram illustrating other examples of position detection sensors. [Figure 34] A diagram showing another example of a control system for a relay amplifier. [Modes for carrying out the invention] 【0008】 The embodiments will be described in detail below with reference to the attached drawings. Note that the following embodiments do not limit the invention as defined in the claims, and not all combinations of features described in the embodiments are essential to the invention. Two or more features from the multiple features described in the embodiments may be combined arbitrarily. Furthermore, identical or similar configurations will be given the same reference numeral, and redundant descriptions will be omitted. 【0009】 1. Position detection sensor Figure 1 shows the position detection sensor 100. The valve system 101 includes one or more valves 122 connected to the air cylinder 102 via an air tube 111, and a controller 121 that controls the valves 122. The controller 121 communicates with the relay amplifier 104 via an IO-Link cable 112. IO-Link is merely an example of a communication standard, and other communication standards may be used. The relay amplifier 104 is a relay device that relays the detection results of the cylinder sensor 103 to the controller 121, and relays the power supplied from the valve system 101 to the cylinder sensor 103. The relay amplifier 104 does not need to have a signal amplification function. The relay amplifier 104 communicates with the cylinder sensor 103 via an IO-Link cable 113. The cylinder sensor 103 detects the position of a piston that is movably installed in the air cylinder 102 and outputs the detection result to the relay amplifier 104. The relay amplifier 104 outputs the detection result of the cylinder sensor 103 to the controller 121. As a result, the controller 121 recognizes the position of the piston and controls the direction of air supply to the air cylinder 102 by the valve 122 according to the position of the piston. 【0010】 The position detection sensor 100 may optionally have a display panel 105. In the work site (factory) where the position detection sensor 100 is installed, it may be required to display the detection results of the position detection sensor 100 on a larger screen. This is to allow users located at a distance from the air cylinder 102 to see the detection results. Alternatively, this may be because the display area of the display function of the air cylinder 102 is smaller than the display area of the display panel 105. The controller 121 of the valve system 101 and the display panel 105 are connected by an Ethernet® cable 114, and various signals are sent and received. In particular, the valve system 101 has a dedicated communication port 123 to which the display panel 105 is connected, and the display panel 105 is connected to this dedicated communication port 123. 【0011】 The cylinder sensor 103 is positioned relative to the air cylinder 102 according to the user's preference. Indications may be provided to the user to facilitate the installation of the cylinder sensor 103. 【0012】 The cylinder sensor 103 and the relay amplifier 104 may be integrated into one unit. Alternatively, the cylinder sensor 103 (sensor head) and the relay amplifier 104 (main unit) may be separated. This allows, for example, the sensor head to be miniaturized. As a result, it may be possible to install the cylinder sensor 103 even on air cylinders 102 with limited mounting space. 【0013】 2. Arrangement of cylinder sensor and air cylinder Figure 2 shows how the cylinder sensor 103 is installed on the air cylinder 102. In this example, the air cylinder 102 has one or more grooves 131 that extend along the longitudinal direction of the air cylinder 102. The cylinder sensor 103 is inserted into and fixed in one of the grooves 131. Here, the external dimensions of the housing 200 of the cylinder sensor 103 are slightly smaller than the dimensions of the internal space of the groove 131. This allows the cylinder sensor 103 to slide within the groove 131. Note that the cylinder sensor 103 can also be installed on a cylinder 102 that does not have grooves 131. In this case, the cylinder sensor 103 may be fixed to the cylinder 102 using a band and fittings. 【0014】 A translucent cover 201 is provided on the top of the housing 200. Below the cover 201 are a power LED 204 indicating power on / off, a first output LED 205 indicating that the first output signal is being output, and a second output LED 206 indicating that the second output signal is being output. LED is an abbreviation for light-emitting diode. The user can configure which detection results are assigned to the first output signal and the second output signal. For example, when it is detected that the position of the piston of the air cylinder 102 is within the first detection range, the level of the first output signal may change from low to high. When it is detected that the position of the piston of the air cylinder 102 is within the second detection range, the level of the second output signal may change from low to high. 【0015】 The operation button 202 is used by the user to make various settings for the cylinder sensor 103. 【0016】 The display window 203 displays a symbol indicating the position of the piston in the air cylinder 102. Here, the symbol may be realized by lighting up an LED corresponding to the piston position. The symbol may also be a bar indicating the piston position, or a bar indicating the distance the piston has traveled from a reference position. LEDs are just one example; liquid crystal displays or organic light-emitting diode (OLED) displays may also be used. EL is an abbreviation for electroluminescence. OLED is an abbreviation for organic light-emitting diode. In this case, the symbol may be a numerical value, or a combination of an image (e.g., a bar) and a numerical value. Furthermore, LEDs and displays may be combined. 【0017】 3. Structure of the cylinder sensor Figure 3 is an exploded perspective view of the cylinder sensor 103. The cover 201 is provided with a housing hole 301 for housing the operation button 202. A control board 302 is fixed inside the housing 200. An operation switch 303 is provided on the control board 302. The operation switch 303 may be, for example, a tact switch in which a movable contact makes contact with a fixed contact and conducts electricity when pressed by the operation button 202. 【0018】 The control board 302 further has a plurality of LEDs 305 located below the display window 203. The plurality of LEDs 305 may be arranged at predetermined fixed intervals (e.g., 2 mm). The plurality of LEDs 305 display symbols indicating the position detection result. The plurality of LEDs 305 may be RGB LEDs capable of displaying information in color, having red light-emitting elements, green light-emitting elements, and blue light-emitting elements. The plurality of LEDs 305 may simultaneously display a symbol indicating a first detection range corresponding to a first output signal, a symbol indicating a second detection range corresponding to a second output signal, and a symbol indicating the current position of the piston. For example, the plurality of LEDs 305 corresponding to the first detection range may light up in blue, the plurality of LEDs 305 corresponding to the second detection range may light up in orange, and one or more LEDs 305 corresponding to the current position of the piston may light up in green. When the piston enters the first detection range, the LED 305 corresponding to the current position of the piston may light up in another color (e.g., white, red, yellow, flashing green, flashing blue). 【0019】 Multiple Hall elements 304 are arranged on the side of the control board 302, in the area closest to the bottom. The multiple Hall elements 304 are an example of magnetic sensing elements that detect changes in magnetic flux density received from a magnet built into the piston and output a detection signal. The multiple Hall elements 304 are arranged at predetermined fixed intervals (e.g., 4 mm or more and 6 mm or less). Thus, the spacing between the multiple Hall elements 304 is larger than the spacing between the multiple LEDs 305. The spacing between the multiple Hall elements 304 may be about 10 mm. The fact that the spacing between the multiple Hall elements 304 is larger than the spacing between the multiple LEDs 305 is just one example, and this condition is not essential. 【0020】 The top surface of the housing 200 has a screw hole 311. A fixing screw 312 is screwed into the screw hole 311. The tip of the fixing screw 312 protrudes from the side of the housing 200 and presses against the groove 131 of the air cylinder 102. This firmly fixes the cylinder sensor 103 within the groove 131 of the air cylinder 102. When the fixing screw 312 is loosened, the cylinder sensor 103 can slide freely within the groove 131. 【0021】 Figure 4 is a schematic cross-sectional view showing the air cylinder 102 and the cylinder sensor 103. The air cylinder 102 includes a cylinder tube 400 located below the groove 131, a piston 402 that can slide inside the cylinder tube 400, a magnet 403 provided on the piston 402, and a piston rod 401. The piston 402 moves in conjunction with the push-out or draw-in of air by the valve system 101, thereby moving the piston rod 401. The piston rod 401 may also operate a robot hand (gripper) or the like. 【0022】 The cylinder sensor 103 calculates the position of the piston 402 based on the detection results output from multiple Hall elements 304, and controls the illumination and extinguishing of multiple LEDs 305, the first output LED 205, and the second output LED 206 based on the calculation result. The illumination control may include control of the illumination color. 【0023】 4. Control System 4-1. Cylinder Sensor Figure 5 shows the controller of the cylinder sensor 103. The CPU 501 is a processor or processing circuit that realizes various functions by executing a control program 521 stored in the memory 502. One or more of the functions described below may be implemented in an integrated circuit provided outside the CPU 501. A drive circuit is provided between the CPU 501 and the load to generate a drive current for driving the load, but the drive circuit is not shown in Figure 5. The Hall element control unit 511 supplies power to a plurality of Hall elements 304, which are an example of magnetic sensing elements, and acquires detection signals output from the plurality of Hall elements 304. The position identification unit 512 identifies the position of the piston 402 based on the detection signals output from the plurality of Hall elements 304. 【0024】 The setting unit 513 performs various settings necessary for the valve system 101 to utilize the detection results of the cylinder sensor 103. The range setting unit 514 sets the position of the i-th detection range corresponding to the i-th output signal. i is an integer of 1 or more. For example, the start and end positions of the i-th detection range may be set. Alternatively, either the start or end position of the i-th detection range and the width of the i-th detection range may be set. In the following, i is 1 or 2, but i may be 3 or more. The width setting unit 515 sets the width of the i-th detection range. The setting unit 513 may set the cylinder sensor 103 in response to setting instructions input from the relay amplifier 104, valve system 101, or display panel 105 via the external input terminal 503. The setting unit 513 may perform various settings in response to a predetermined operation on the operation switch 303 (e.g., long press for a predetermined number of seconds, short press, double-click). 【0025】 The display control unit 516 controls the indicator lights 504 and the symbol display 505 to display various information to the user. For example, when the CPU 501 is started up by power supplied through the power terminal 507 connected to the power line included in the IO-Link cable 113, the display control unit 516 lights up the power LED 204. If the position of the piston 402 identified by the position identification unit 512 is included in the first detection range, the display control unit 516 lights up the first output LED 205. If the position of the piston 402 identified by the position identification unit 512 is included in the second detection range, the display control unit 516 lights up the second output LED 206. The display control unit 516 lights up one or more LEDs 305 corresponding to the first detection range. The display control unit 516 lights up one or more LEDs 305 corresponding to the second detection range. The display control unit 516 lights up one or more LEDs 305 corresponding to the third detection range. In this way, the display control unit 516 lights up one or more LEDs 305 corresponding to the i-th detection range. 【0026】 The output unit 517 outputs position information indicating the position of the piston 402 identified by the position identification unit 512 to the relay amplifier 104 via the external output terminal 506 and the IO-Link cable 113. Here, the information output from the output unit 517 may include at least one of the following pieces of information. ●Position information of the piston 402 of the air cylinder 102...Information indicating the position of the piston 402 inside the air cylinder 102. The position information may include the distance from a predetermined reference point to the current position of the piston 402. ●Operating speed of air cylinder 102...This is the operating speed of piston 402. Unit information specifying the unit of operating speed (e.g., mm / sec, m / sec, inches / sec, feet / sec) may be included. ●Acceleration...The acceleration of the piston 402. This information is included if the cylinder sensor 103 can detect the acceleration of the piston 402. Unit information specifying the unit of acceleration (e.g., mm / s^2, m / s^2) may also be included. ●Output information...Information indicating whether the piston 402 is within the detection range of the piston 402's position, which is set when the cylinder sensor 103 is installed on the air cylinder 102. This may be an output signal that is output only when the piston 402 is within the detection range. ●Position deviation detection status...Information output when piston 402 is stopped outside the detection range. ●Aircraft condition, model...Model-specific information such as the length and slot type of cylinder sensor 103. ●Error...Information indicating damage to cylinder sensor 103, etc. ●Setting parameters (internal memory information)...Setting information such as output position, output width (range in which the output signal is turned on), span (slope of the actual travel distance relative to the travel distance of the piston 402 / mainly used in chucks, etc.), offset (any position is set to zero), installation direction (up, down, left, or right direction in which the cylinder sensor 103 is installed), NPN / PNP (output polarity), and units (e.g., mm, mm, inches, feet, etc.). 【0027】 The CPU 501 may also receive the following information from the relay amplifier 104. ●Setting parameters such as teaching (setting the output position), span (the slope of the actual travel distance relative to the travel distance of the piston 402 / mainly used in chucks, etc.), offset (setting any position as zero), installation direction (which direction the cylinder sensor 103 is installed in, up, down, left, or right), output position, NPN / PNP (output polarity), output logic (whether to close or open the contact when ON), and units (e.g., mm, m, inches, feet). ● Instruction information such as communication synchronization (communication synchronization signal), output set (output position setting signal), and factory reset (initialization). ●Error...Error information sent to the cylinder sensor 103 when an abnormal condition is detected in the installed air cylinder 102, such as in the valve system 101 or the air cylinder 102 itself. 【0028】 If the position of piston 402 falls within the first detection range, the output unit 517 outputs a first output signal. If the position of piston 402 falls within the second detection range, the output unit 517 outputs a second output signal. If the position of piston 402 falls within the third detection range, the output unit 517 outputs a third output signal. Thus, if the position of piston 402 falls within the i-th detection range, the output unit 517 outputs the i-th output signal. Here, outputting an output signal may also involve changing the logic of the output signal according to predetermined rules. 【0029】 Memory 502 is a storage device that includes memory elements such as random access memory (RAM) and non-volatile memory elements such as read-only memory (ROM). 【0030】 4-2. Relay Amplifier Figure 6 shows the controller of the relay amplifier 104. The CPU 601 is a processor or processing circuit that implements various functions by executing the control program 621 stored in memory 602. One or more of the functions described below may be implemented in an integrated circuit located outside the CPU 601. 【0031】 The communication circuit 604 is a circuit that communicates with the valve system 101 via the IO-Link cable 112 and with the cylinder sensor 103 via the IO-Link cable 113. The power terminal 607 receives power from the valve system 101 via the IO-Link cable 112 and supplies power to the cylinder sensor 103 via the IO-Link cable 113. The external input terminal 603 includes a terminal to which the IO-Link cable 112 is connected and a terminal to which the IO-Link cable 113 is connected, and is a terminal for receiving information transmitted from the cylinder sensor 103 and the valve system 101. The external output terminal 606 includes a terminal to which the IO-Link cable 112 is connected and a terminal to which the IO-Link cable 113 is connected, and is a terminal for transmitting information to the cylinder sensor 103 and the valve system 101. 【0032】 The operation switch 605 is a switch for receiving various operation inputs from the user. The indicator light 614 is an LED that displays the detection status of the cylinder sensor 103. The indicator light 614 may also include a power LED 624 that indicates whether the relay amplifier 104 is on or off, a first output LED 625 that indicates whether the first output signal is being output from the cylinder sensor 103, and a second output LED 626 that indicates whether the second output signal is being output from the cylinder sensor 103. 【0033】 The OLED display 630 is a display composed of organic EL light-emitting diodes. The memory 602 is a memory device that includes memory elements such as random access memory (RAM) and non-volatile memory elements such as read-only memory (ROM). 【0034】 The following functions are implemented by the CPU 601: The device identification unit 611 communicates with the devices connected to the relay amplifier 104 (valve system 101 and cylinder sensor 103) to specifically identify the devices. The device update unit 612 updates the setting information and control program 521 of the devices connected to the relay amplifier 104 (e.g., cylinder sensor 103). 【0035】 The setting unit 613 sets the operation of the relay amplifier 104. Furthermore, the setting unit 613 may set the cylinder sensor 103 instead of, or in cooperation with, the setting unit 513. For example, the range setting unit 634 sets the position of the detection range of the piston 402 in the cylinder sensor 103. The width setting unit 635 sets the width of the detection range of the piston 402 in the cylinder sensor 103. The range setting unit 634 and the width setting unit 635 may operate when the cylinder sensor 103 does not have a symbol indicator 505. In this case, the OLED display 630 functions as the symbol indicator 505. 【0036】 The display control unit 616 controls the lighting and extinguishing of the indicator light 614 and displays information on the OLED display 630. For example, the display control unit 616 may display a position symbol indicating the position of the piston 402 on the OLED display 630 according to the position information of the piston 402 output from the cylinder sensor 103. Furthermore, the display control unit 616 may display a range symbol indicating the detection range on the OLED display 630 based on range information indicating the detection range of the piston 402. The position symbol and range symbol may be displayed in conjunction with both the cylinder sensor 103 and the relay amplifier 104. This is because the relay amplifier 104 can obtain the position information of the piston 402 and the range information of the detection range from the cylinder sensor 103. 【0037】 The output unit 617 generates an output signal corresponding to the detection result received from the cylinder sensor 103 and outputs it to the valve system 101. The output unit 617 may also transfer various information received from the cylinder sensor 103 to the valve system 101. 【0038】 5. Teaching (Installation of cylinder sensor) Figure 7(A) shows the display state when the cylinder sensor 103 is powered on by an external power supply. The power LED 204 indicates that power is being supplied to the cylinder sensor 103 (power ON state). Multiple LEDs 305 may display a symbol indicating that the power has just been turned on. For example, multiple LEDs 305 may be controlled so that the lit LEDs 305 switch sequentially. This may result in the output of light like a wave moving from right to left. Multiple LEDs 305 may continuously display a symbol indicating that the power has just been turned on until the position identification unit 512 can identify the position of the piston 402. Alternatively, after displaying the symbol for a certain period of time, multiple LEDs 305 may turn off simultaneously. 【0039】 Figure 7(B) shows the state in which the position identification unit 512 has identified the position of the piston 402. Of the multiple LEDs 305, only the LED 305 corresponding to the position of the piston 402 is lit. Here, the LED 305 may be lit in the first color (e.g., green). When the user moves the cylinder sensor 103 relative to the air cylinder 102, the multiple LEDs 305 will light up or turn off to follow the position of the piston 402. In other words, only the LED 305 corresponding to the position of the piston 402 may be lit. Alternatively, all LEDs 305 to the right of the position of the piston 402 may be lit. Or, all LEDs 305 to the left of the position of the piston 402 may be lit. In this case, the position of the piston 402 may be displayed as a bar symbol. 【0040】 Figure 7(C) shows the symbols for cases where there is no LED 305 corresponding to the position of piston 402 identified by the position identification unit 512, or where piston 402 is located outside the detectable range of cylinder sensor 103. In this example, since there is no LED 305 corresponding to the position of piston 402, only the leftmost LED 305, which is the outermost of the multiple LEDs 305, may light up. The leftmost LED 305 may light up in a second color (e.g., red) or blink in the first or second color to indicate that piston 402 is located outside the detectable range. 【0041】 Figure 8(A) shows the symbol when the first detection range 801 and the second detection range 802 have been set by teaching. In this example, three LEDs 305 are assigned to the first detection range 801 and three to the second detection range 802, respectively. The three LEDs 305 assigned to the first detection range 801 may indicate the position and width of the first detection range 801 by lighting up in a third color (e.g., blue). The three LEDs 305 assigned to the second detection range 802 may indicate the position and width of the second detection range 802 by lighting up in a fourth color (e.g., orange). 【0042】 In Figure 8(A), the piston 402 is located in the intermediate range between the first detection range 801 and the second detection range 802. Therefore, of the multiple LEDs 305 located in the intermediate range, only one LED 305 corresponding to the position of the piston 402 is lit. Here, LED 305 may be lit in the first color (e.g., green). 【0043】 Figure 8(B) shows the symbol when the piston 402 is located in the first detection range 801. In this example, the piston 402 is located in the center of the first detection range 801. Therefore, of the three LEDs 305 corresponding to the first detection range 801, the central LED 305 is lit in a different color (e.g., white) than the other two LEDs 305. In this way, by using different colors to indicate the first detection range 801 and the position of the piston 402, the user will be able to clearly recognize the position of the piston 402. Note that when the piston 402 is located in the first detection range 801, the LED 305 corresponding to the position of the piston 402 may blink. When blinking occurs in this way, the color of the LED 305 corresponding to the position of the piston 402 may be different from or the same as the color of the other two LEDs 305. 【0044】 According to Figure 8(B), the first output LED 205 is also lit. This indicates that the position of the piston 402 is within the first detection range 801, and that the first output signal is being output (the first output signal is high). The logic of the output signal (High / Low) is configurable by the user. Therefore, the logic of the output signal depends on the user setting. 【0045】 Figure 8(C) shows the symbol when the piston 402 is located in the second detection range 802. In this example, the piston 402 is located in the center of the second detection range 802. Therefore, of the three LEDs 305 corresponding to the second detection range 802, the central LED 305 is lit in a different color (e.g., white) than the other two LEDs 305. In this way, by using different colors to indicate the second detection range 802 and the position of the piston 402, the user will be able to clearly recognize the position of the piston 402. Note that when the piston 402 is located in the second detection range 802, the LED 305 corresponding to the position of the piston 402 may blink. In this case, the color of the LED 305 corresponding to the position of the piston 402 may be different from or the same as the color of the other two LEDs 305. 【0046】 According to Figure 8(C), the second output LED 206 is also lit. This indicates that the position of the piston 402 is within the second detection range 802, and that the second output signal is being output (the second output signal is high). 【0047】 Here, the first output LED 205 and the second output LED 206 are shown as examples, but third, fourth, ... output LEDs may also be implemented. 【0048】 6. Flowchart of display control method Figure 9 shows the display control method executed by the CPU 501 of the cylinder sensor 103 according to the control program 521. When the CPU 501 is started up by power supplied from the relay amplifier 104, it performs the following processes. 【0049】 In S901, the CPU 501 (display control unit 516) refers to the setting information stored in memory 502 and determines whether one or more detection ranges are set. If one or more detection ranges are not set, the CPU 501 skips S902 and proceeds to S903. If one or more detection ranges are set, the CPU 501 proceeds to S902. 【0050】 In step S902, the CPU 501 (display control unit 516) lights up the LED 305 corresponding to the detection range. The memory 502 may store a table showing the relationship between the detection range and the identification information of the LED 305. The N LEDs 305 may be assigned identification numbers in ascending order from the LED 305 on the right to the LED 305 on the left. In this case, the identification information of the LED 305 may be the identification number. The setting information may also include color information indicating the lighting color of the LED 305 corresponding to the i-th detection range. The CPU 501 lights up Mi LEDs 305 corresponding to the i-th detection range in the color corresponding to the color information. Mi is a variable indicating the width of the i-th detection range and corresponds to the number of LEDs 305 to be lit. 【0051】 In S903, the CPU 501 (position determination unit 512) performs a position calculation to determine the position of the piston 402 based on the detection results of multiple Hall elements 304. The position calculation may be a calculation that determines the position corresponding to the Hall element 304 that outputs the largest detection signal among the multiple Hall elements 304. Alternatively, the position of the piston 402 may be calculated by performing a weighting calculation or interpolation calculation on the magnitude of the detection signals output from the multiple Hall elements 304. In the latter case, the position can be determined with finer precision. 【0052】 In S904, the CPU 501 (position determination unit 512 or display control unit 516) determines whether it has been able to determine the position of the piston 402. For example, if the cylinder sensor 103 is not attached to the air cylinder 102, the position calculation fails. On the other hand, if the cylinder sensor 103 is correctly attached to the air cylinder 102, the position calculation succeeds. If the position of the piston 402 has not been determined, the CPU 501 proceeds to S905. In S905, the CPU 501 (display control unit 516) displays a symbol indicating that position determination is in progress using multiple LEDs 305. After that, the CPU 501 returns from S905 to S903 and continues the position calculation. On the other hand, if the position of the piston 402 has been determined, the CPU 501 proceeds to S906. 【0053】 In S906, the CPU 501 (position identification unit 512 or display control unit 516) determines the LED 305 corresponding to the position of the piston 402. Memory 502 stores a table showing the correspondence between the position of the piston 402 and the identification number of the LED 305. The CPU 501 identifies the identification number of the LED 305 corresponding to the position of the piston 402 by referring to this table. 【0054】 In S907, the CPU 501 (position identification unit 512 or display control unit 516) determines whether there is an LED 305 corresponding to the position of the piston 402. If there is an LED 305 corresponding to the position of the piston 402, the CPU 501 proceeds to S908. In S908, the CPU 501 (display control unit 516) lights up the LED 305 corresponding to the position of the piston 402. After that, the CPU 501 proceeds from S908 to S909. On the other hand, there may be cases where there is no LED 305 corresponding to the position of the piston 402. For example, as shown in Figure 7(C), the position of the piston 402 may become impossible to determine if the piston 402 moves further after its position has been identified. In this case, the CPU 501 proceeds from S907 to S920. In S920, the CPU 501 (display control unit 516) lights up the outermost LED 305 among the multiple LEDs 305. For example, the last leftmost or rightmost LED 305 to light up may be determined as the LED 305 corresponding to the position of the piston 402. Furthermore, the CPU 501 selects a color for the last leftmost or rightmost LED 305 to indicate that position detection failed, or that the piston 402 is outside the detectable range. The CPU 501 then proceeds from S920 to S912. 【0055】 In S909, the CPU 501 (position identification unit 512 or display control unit 516) determines whether the position of the piston 402 is within the detection range. Here, the position of the piston 402 is compared with the first detection range 801 and the second detection range 802 included in the setting information. If the position of the piston 402 is not within either detection range, the CPU 501 proceeds from S909 to S912. If the position of the piston 402 is within either detection range, the CPU 501 proceeds from S909 to S910. 【0056】 In S910, the CPU 501 (display control unit 516) lights up the output LED corresponding to the detection range that includes the position of the piston 402 among multiple detection ranges. If the piston 402 is in the first detection range 801, the first output LED 205 lights up. If the piston 402 is in the second detection range 802, the second output LED 206 lights up. If the piston 402 is in the j-th detection range, the LEDs corresponding to the j-th detection range and the j-th output signal light up. 【0057】 In S911, the CPU 501 (output unit 517) outputs an output signal (control output) corresponding to the detection range that includes the position of the piston 402 from among multiple output signals (control outputs) to the relay amplifier 104. If the piston 402 is in the first detection range 801, the first output signal is output. If the piston 402 is in the second detection range 802, the second output signal is output. If the piston 402 is in the j-th detection range, the j-th output signal is output. 【0058】 In S912, CPU501 determines whether the power has been turned off (power supply from relay amplifier 104 has stopped). If the power is not turned off, CPU501 returns from S912 to S903. If the power is turned off, the display control method ends. 【0059】 7. Flowchart for setup instructions Figure 10(A) shows the process of attaching the cylinder sensor 103 to the air cylinder 102 and positioning the cylinder sensor 103 in the desired location. The user pushes and pulls the piston rod 401 to position the piston 402 in the desired location within the air cylinder 102. The user inserts the cylinder sensor 103 into the groove 131 of the air cylinder 102 and positions the cylinder sensor 103 by sliding it within the groove 131. In this example, of the multiple LEDs 305, the leftmost LED 305 corresponding to the position of the piston 402 is illuminated. Note that the order of performing the temporary installation of the cylinder sensor 103 on the air cylinder 102 and the positioning of the piston rod 401 may be reversed. In either case, fine adjustment of the position of the cylinder sensor 103 will be performed as follows. 【0060】 Figure 10(B) shows that the cylinder sensor 103 has been moved further to the left. The air cylinder 102 has moved to the right relative to the cylinder sensor 103. The CPU 501 detects the position of the piston 402 and lights up the second LED 305 from the left, which corresponds to the position of the piston 402. When the user positions the piston 402 to the desired position, they press and hold the operation button 202. The press and hold period is, for example, 2 seconds. The CPU 501 may measure the time the operation button 202 is pressed and identify the user's instruction according to the measured time. The memory 502 may store a table showing the relationship between time and instruction. The CPU 501 identifies the user instruction by referring to the table based on the measured time. 【0061】 When the CPU 501 (setting unit 513) detects a long press of the operation button 202 via the operation switch 303, it transitions from operation mode to setting mode. 【0062】 As shown in Figure 10(C), in setting mode, the CPU 501 displays a symbol indicating that it is in setting mode by lighting up several LEDs 305. This symbol may be, for example, caused by blinking the four LEDs on the far right of the multiple LEDs 305. The LEDs 305 that are lit up may switch sequentially from right to left. 【0063】 The CPU 501 illuminates Mi LEDs 305 corresponding to the i-th detection range based on the position of the piston 402 detected using the Hall element 304 and the width of the detection range. In this example, the width Mi of the i-th detection range is set to 3. Therefore, one LED 305 corresponding to the position of the piston 402, the LED 305 to its right, and the LED 305 to its left are illuminated. This allows the user to visually confirm the detection range. The user may further slide the cylinder sensor 103 while confirming that the Mi LEDs 305 corresponding to the i-th detection range are illuminated. Once the position of the i-th detection range is determined, the user presses and holds the operation button 202. The holding period is, for example, 2 seconds. 【0064】 Figure 11(A) shows a symbol indicating that the detection range has been determined. In this example, the CPU 501 displays the determination symbol by simultaneously lighting up all of the LEDs 305 among the multiple LEDs 305. 【0065】 Figure 11(B) shows a symbol indicating that the detection range setting is complete. In this example, the CPU 501 displays the setting completion symbol by blinking the LED 305 located in the center of the set detection range for a predetermined time. Note that the symbol shown in Figure 11(B) may be displayed after the symbol shown in Figure 11(A), or only one of the symbols may be displayed. Alternatively, as long as the operation button 202 is pressed for more than the predetermined time, the confirmation symbol shown in Figure 11(A) may be displayed. After that, when the finger is released from the operation button 202, the setting completion symbol in Figure 11(B) may be displayed. 【0066】 Figure 11(C) shows the state after the setting completion symbol shown in Figure 11(B) has been displayed for a predetermined period of time. Here, a symbol indicating the set detection range is displayed. In other words, CPU 501 transitions from setting mode to operation mode. 【0067】 Figure 12 is a flowchart showing the method for setting the detection range that the CPU 501 executes according to the control program 521. The memory 502 may store a variable h that indicates the number of set detection ranges. If no set detection ranges exist, the variable h is assigned the value of zero. If one detection range has been set, the variable h is assigned the value of 1. 【0068】 In S1201, the CPU 501 (setting unit 513) determines whether a setting start operation has been input. The setting start operation may be, for example, the operation button 202 being pressed down continuously for a predetermined time (e.g., 2 seconds) in the operating mode. The setting start operation may also be the operation button 202 being double-clicked. 【0069】 In S1202, the CPU 501 (display control unit 516) displays a setting symbol using multiple LEDs 305. For example, a setting symbol like the one shown in Figure 10(C) may be displayed. 【0070】 In S1203, the CPU 501 (position determination unit 512) performs a position calculation to determine the position of the piston 402 based on the detection result of the Hall element 304. 【0071】 In S1204, the CPU 501 (position identification unit 512 or display control unit 516) determines the LED 305 corresponding to the position of the piston 402. 【0072】 In S1205, the CPU 501 (position identification unit 512 or display control unit 516) determines whether there is a corresponding LED 305 that corresponds to the position of the piston 402. The cylinder sensor 103 may not yet be installed on the air cylinder 102, or the piston 402 may be outside the detectable range. In this case, the CPU 501 determines that there is no corresponding LED 305 and returns from S1205 to S1202. If there is a corresponding LED 305, the CPU 501 proceeds from S1205 to S1206. 【0073】 In S1206, the CPU 501 (display control unit 516) lights up the corresponding LED 305 and the adjacent LED 305. As described above, Mi LEDs 305 corresponding to the width of the detection range are lit. 【0074】 In S1207, the CPU 501 (range setting unit 514) determines whether a confirmation operation for the detection range has been input to the operation button 202. If no confirmation operation has been input, the CPU 501 returns from S1207 to S1202. If a confirmation operation has been input, the CPU 501 proceeds from S1207 to S1208. 【0075】 In S1208, the CPU 501 (display control unit 516) displays a confirmed symbol using multiple LEDs 305. For example, the confirmed symbol may be one of the symbols exemplified in Figure 11(A). 【0076】 In S1209, the CPU 501 (display control unit 516) displays a setting completion symbol using multiple LEDs 305. For example, the setting completion symbol may be the symbol exemplified in Figure 11(B). 【0077】 In S1210, the CPU 501 (range setting unit 514) stores setting information indicating the i-th detection range in memory 502. Here, i is the variable h plus 1. The setting information may include position information indicating the location of the i-th detection range and width information indicating the width (initial value or a value set by the user). Here, the position information indicates at least one of the left edge, center, or right edge of the detection range. The range setting unit 514 may assign a lighting color that has not been assigned to any of the detection ranges from the 1st detection range to the i-1th detection range to the i-th detection range, and store color information indicating the lighting color in the setting information. 【0078】 In S1211, the CPU 501 (range setting unit 514) updates the variable h, which indicates the number of set detection ranges. That is, 1 is added to the value of variable h. Alternatively, the value of variable i is assigned to variable h. 【0079】 Figure 13 is a flowchart showing how to delete pre-configured detection ranges all at once. 【0080】 In S1301, the CPU 501 (setting unit 513) determines whether a batch delete operation has been input to the operation button 202. For example, in operation mode, if the operation button 202 is pressed continuously for a predetermined time (e.g., 3 seconds) or if three short presses are input to the operation button 202, the CPU 501 may determine that a batch delete has been instructed. An upper limit may be set for the number of detection ranges. In this case, a batch delete operation may also be defined as the number of set detection ranges matching the upper limit and a long press of the operation button 202 being detected. When a batch delete is instructed, the CPU 501 proceeds from S1301 to S1302. 【0081】 In S1302, the CPU 501 (range setting unit 514) deletes the previously set detection ranges. For example, the CPU 501 deletes all previously set detection range information from the setting information stored in memory 502. 【0082】 In S1303, the CPU 501 (range setting unit 514) resets the number h of the set detection ranges to zero. 【0083】 8. Setting the width of the detection range Figures 14(A) and 14(B) show the process of setting the width of the detection range in setting mode. Setting the width of the detection range may be included, for example, in S1206. 【0084】 Figure 14(A) shows that the width Mi is set to 3. Figure 14(B) shows that the width Mi is set to 5. For example, if there are multiple selectable widths, each time the operation button 202 is briefly pressed, the CPU 501 (width setting unit 515 and display control unit 516) switches the width and turns the adjacent LED corresponding to the width on and off. For example, if the operation button 202 is briefly pressed when the width Mi is 3 as shown in Figure 14(A), the width Mi is changed to 5 as shown in Figure 14(B). If the operation button 202 is briefly pressed when the width Mi is 5 as shown in Figure 14(B), the width Mi is changed to 3 as shown in Figure 14(A). Multiple width values may be switched in a cyclical manner in this way. There may be three or more selectable widths. In this case as well, the width values will be switched in a cyclical manner. 【0085】 9. Distance display in relay amplifiers Figure 15 shows the screen displayed on the OLED display 630 of the relay amplifier 104. The relay amplifier 104 can receive information indicating the detection range (threshold) and information indicating the detection position of the piston 402 from the cylinder sensor 103. Furthermore, the relay amplifier 104 can receive the first output signal, the second output signal, and the i-th output signal. 【0086】 As shown in Figure 15, the distance display area 1501 is an area that displays the position of the piston 402 as the distance from the reference position. The distance display area 1501 may also display the unit of distance (e.g., mm). 【0087】 The threshold display area 1502 shows the threshold for each detection range (output signal). In this example, it is shown that the threshold for the first output signal corresponding to the first detection range 801 is 1056.50 mm. Here, the threshold may be at the right end, center, or left end of the first detection range 801. It is also shown that the threshold for the second output signal corresponding to the second detection range 802 is 36.20 mm. 【0088】 The output identification area 1503 is an area that displays whether the first output signal or the second output signal is being output. In other words, the output identification area 1503 may display which detection range the piston 402 is located in. For example, if the piston 402 is in the first detection range 801, the output identification area 1503 may light up in blue. If the piston 402 is in the second detection range 802, the output identification area 1503 may light up in orange. If the piston 402 is in an intermediate range between the first detection range 801 and the second detection range 802, the output identification area 1503 may display another color (e.g., black, white, green). 【0089】 10. Examples of other symbols Figures 16(A) and 16(B) show other examples of symbols indicating the position of piston 402. Here, it is assumed that a reference position is set on the left end of cylinder sensor 103. When CPU 501 detects the position of piston 402, it lights up all LEDs 305 that are located from the left end to the detection position. The user can recognize the distance traveled by piston 402 from the reference position from the number of lit LEDs 305. Thus, a symbol indicating the position of piston 402 may be implemented as a bar whose length changes according to the distance traveled. 【0090】 In the embodiment described above, multiple LEDs 305 are arranged directly below the display window 203, but this is merely one example. For example, a light guide (e.g., optical fiber, light-transmitting resin) may be placed between the multiple LEDs 305 arranged on the control board 302 and the display window 203. This would increase the flexibility in the placement of the multiple LEDs 305. 【0091】 Figure 17 shows another example of a symbol indicating the position of the piston 402. The OLED display 630 shows a position symbol 1701 that mimics the LED 305 indicating the position of the piston 402, the first detection range 801, and the second detection range 802. Thus, the OLED display 630 may be used in place of multiple LEDs 305. The OLED display 630 may also be a liquid crystal display. 【0092】 Figure 18 shows another example of symbols indicating the position of the piston 402, the first detection range 801, and the second detection range 802. The bar symbol 1801 is an image indicating the position of the piston 402. The CPU 501 lengthens or shortens the bar symbol 1801 depending on the position of the piston 402. The range symbols 1802 and 1803 are images indicating the boundaries of the detection ranges. The CPU 501 may display the range symbols 1802 and 1803 indicating each detection range based on the position information and width information of the detection ranges contained in the setting information stored in memory 502. 【0093】 Furthermore, the OLED display 630 may also display the first output LED 205 and the second output LED 206 as part of the image. 【0094】 12. Details of the display control method in the relay amplifier The above-described embodiment mainly explained the display control method for the cylinder sensor 103. Furthermore, as suggested in the above embodiment, the relay amplifier 104 and the display panel 105 may display symbols instead of, or in conjunction with, the display of symbols on the cylinder sensor 103. Displaying symbols related to the position of the displacement body by the relay amplifier 104 and the display panel 105 would be particularly useful when the cylinder sensor 103 does not have a display function, or when its display function has limited display capabilities. The user interface (UI) for the relay amplifier 104 is described below, and this UI can also be adopted for the display panel 105. 【0095】 Figures 19(A) to 19(C) show an example of the display screen of an OLED display 630 provided on the enclosure 1900 of the relay amplifier 104. The OLED display 630 is just one example, and a liquid crystal display (LCD) may also be used. In this example, the OLED display 630 displays multiple position icons (position symbols 1701) that mimic the LED 305, a power symbol 1904 that mimics the power LED 204, a first output symbol 1905 that mimics the first output LED 205, and a second output symbol 1906 that mimics the second output LED 206. 【0096】 When the display control unit 616 of the relay amplifier 104 receives position information indicating the position of the piston 402 detected by the cylinder sensor 103, it changes the color of the position symbol 1701 corresponding to the position information from the default color (e.g., white, black) to the first color (e.g., green). In Figure 19(A), since the piston 402 is at the left end of the displaceable range, the color of the position symbol 1701 located at the left end of the multiple position symbols becomes green. According to Figure 19(B), since the piston 402 is at an intermediate position, the color of the position symbol located at an intermediate position becomes green. According to Figure 19(C), since the piston 402 is at the right end of the displaceable range, the color of the position symbol 1701 located at the right end of the multiple position symbols 1701 becomes green. In this way, position symbols 1701 located at different positions depending on the position of the piston 402 may be displayed in a different color from the other position symbols 1701. 【0097】 Figures 20(A) to 20(C) show the position symbol 1701 and threshold symbol when the first detection range 801 and the second detection range 802 are set by the cylinder sensor 103 or the relay amplifier 104. Here, the threshold symbol is a concept that may include position symbol 1701 indicating the first detection range 801 and the second detection range 802 from among multiple position symbols 1701, position symbol 1701 or first output symbol 1905 indicating the presence of the piston 402 in the first detection range 801, position symbol 1701 or second output symbol 1906 indicating the presence of the piston 402 in the second detection range 802, etc. As described above, the detection range can be defined by position (threshold) and width. Therefore, these symbols can be called threshold symbols. 【0098】 According to Figure 20(A), the display control unit 616 displays the position symbol 1701 corresponding to the first detection range 801 in the third color (e.g., blue) and the position symbol 1701 corresponding to the second detection range 802 in the fourth color (e.g., orange), based on the setting information received from the cylinder sensor 103 or the setting information stored in the memory 602. Here, the lighting colors of the multiple LEDs 305 corresponding to the detection range in the cylinder sensor 103 and the display colors of the position symbols indicating the detection range displayed on the relay amplifier 104 may or may not match. According to Figure 20(A), since the position of the piston 402 is in the intermediate position, the position symbol corresponding to the intermediate position is displayed in the first color. The display control unit 616 displays the first output symbol 1905 in the default color because the position of the piston 402 is not included in the first detection range 801. The display control unit 616 displays the second output symbol 1906 in the default color because the position of the piston 402 is not included in the second detection range 802. 【0099】 Figure 20(B) shows that the piston 402 has moved to a position included in the first detection range 801. Based on the position information received from the cylinder sensor 103, the display control unit 616 changes the color of the position symbol 1701 corresponding to the position of the piston 402 from among the multiple position symbols 1701 corresponding to the first detection range 801 to a different color from the color of the adjacent position symbols 1701. This makes it possible to distinguish between the position in the first detection range 801 and the position of the piston 402. Based on the first output signal output from the cylinder sensor 103, the display control unit 616 switches the color of the first output symbol 1905 from the default color to a third color (e.g., blue). This allows the user to recognize that the piston 402 is located in the first detection range 801 and that the first output signal is being output from the cylinder sensor 103. 【0100】 Figure 20(C) shows that the piston 402 has moved to a position included in the second detection range 802. Based on the position information received from the cylinder sensor 103, the display control unit 616 changes the color of the position symbol corresponding to the position of the piston 402 among the multiple position symbols corresponding to the second detection range 802 to a different color from the color of the adjacent position symbols. This makes it possible to distinguish between the position in the second detection range 802 and the position of the piston 402. Based on the second output signal output from the cylinder sensor 103, the display control unit 616 switches the color of the second output symbol 1906 from the default color to a fourth color (e.g., orange). This allows the user to recognize that the piston 402 is located in the second detection range 802 and that the second output signal is being output from the cylinder sensor 103. 【0101】 Figures 21(A) to 21(C) show that the position symbol is implemented using the bar symbol 1801. As already explained using Figure 18, the cylinder sensor 103 can display a position symbol (bar symbol 1801) and threshold symbols (range symbols 1802, 1803). The relay amplifier 104 may similarly display the bar symbol 1801 and threshold symbols (range symbols 1802, 1803). 【0102】 Figure 21(A) shows the bar symbol 1801 when the piston 402 is in the intermediate position. The bar symbol 1801 is a bar image of variable length. The range symbols 1802 and 1803 are threshold symbols that indicate the detection range. In this example, the range symbols 1802 and 1803 are illustrated with vertical lines, but other images may be used. The range symbols 1802 and 1803 may also be images such as arrows or triangles that suggest the width of the detection range and the threshold. 【0103】 Figure 21(B) shows the bar symbol 1801 when the position of the piston 402 is included in the first detection range 801. In this example, the length of the bar symbol 1801 is shortened because the reference position of the bar symbol 1801 is set to the left end. Also, because the first output signal is being output, the first output symbol 1905 is displayed in the second color. 【0104】 Figure 21(C) shows the bar symbol 1801 when the position of piston 402 is included in the second detection range 802. In this example, the length of bar symbol 1801 has been increased. Since the second output signal is being output, the second output symbol 1906 is displayed in the third color. 【0105】 Incidentally, since the relay amplifier 104 also has an operation switch 605, the detection range (threshold, width) can be set by operating the operation switch 605. In other words, the operation switch 605 is used in place of the operation button 202. 【0106】 Figure 22 shows the display control method executed by the CPU 601 of the relay amplifier 104 according to the control program 621. When the CPU 601 is started by power supplied from the valve system 101, it performs the following processes. 【0107】 In S2201, the CPU 601 (display control unit 616) refers to the setting information stored in memory 602 and determines whether one or more detection ranges are set. The CPU 601 obtains the setting information from the cylinder sensor 103 and stores it in memory 602 beforehand. If one or more detection ranges are not set, the CPU 601 skips S2202 and proceeds to S2203. If one or more detection ranges are set, the CPU 601 proceeds to S2202. 【0108】 In S2202, the CPU 601 (display control unit 616) displays a threshold symbol at a position corresponding to the detection range. The threshold symbol may be implemented by a plurality of position symbols 1701, by a bar symbol 1801, or by range symbols 1802, 1803. The setting information may include color information indicating the display color of the threshold symbol corresponding to the i-th detection range. The CPU 601 displays the threshold symbol corresponding to the i-th detection range on the OLED display 630 in the color corresponding to the color information, according to the color information. The setting information may include a variable Mi indicating the width of the i-th detection range. The CPU 601 adjusts the width of the threshold symbol according to the variable Mi. 【0109】 In step S2203, the CPU 601 (position identification unit 618) acquires position information from the cylinder sensor 103. Here, the position information may be a numerical value indicating the position of the piston 402, or it may be raw data from the detection results of multiple Hall elements 304. In the latter case, the position identification unit 618 determines the position of the piston 402 by performing the same position calculation as the position identification unit 512. 【0110】 In S2204, the CPU 601 (position determination unit 618 or display control unit 616) determines whether the acquisition of position information is complete. For example, if the cylinder sensor 103 is not attached to the air cylinder 102, the position calculation fails, and therefore the acquisition of position information also fails. On the other hand, if the cylinder sensor 103 is correctly attached to the air cylinder 102, the position calculation succeeds, and therefore the acquisition of position information also succeeds. If position information has not been acquired, the CPU 601 proceeds to S2205. In S2205, the CPU 601 (display control unit 616) displays a symbol indicating that position determination is in progress using multiple position symbols 1701. After that, the CPU 601 returns from S2205 to S2203 and continues to acquire position information. On the other hand, if the position information of the piston 402 has been acquired, the CPU 601 proceeds to S2207. 【0111】 In S2207, the CPU 601 (position identification unit 618 or display control unit 616) determines whether the position symbol 1701 can be displayed at the display position corresponding to the position of the piston 402. If the position symbol 1701 can be displayed within the screen of the OLED display 630, the CPU 601 proceeds to S2208. In S2208, the CPU 601 (display control unit 616) displays the position symbol 1701 at the display position corresponding to the position of the piston 402. After that, the CPU 601 proceeds from S2208 to S2209. On the other hand, if the position symbol 1701 cannot be displayed at the display position corresponding to the position of the piston 402, the CPU 601 proceeds from S2207 to S2220. In S2220, the CPU 601 (display control unit 616) displays the position symbol 1701 on the outermost edge of the OLED display 630. Furthermore, the CPU 601 selects a color for the illumination of the position symbol 1701 that indicates a failure to detect the position, or a color that indicates the piston 402 is outside the detectable range. The CPU 601 may also make the position symbol 1701 blink. After that, the CPU 601 proceeds from S2220 to S2212. 【0112】 In S2209, the CPU 601 (position identification unit 618 or display control unit 616) determines whether the position of the piston 402 is within the detection range. Here, the position of the piston 402 is compared with the first detection range 801 and the second detection range 802 included in the setting information. If the position of the piston 402 is not within either detection range, the CPU 601 proceeds from S2209 to S2212. If the position of the piston 402 is within either detection range, the CPU 601 proceeds from S2209 to S2210. 【0113】 In S2210, the CPU 601 (display control unit 616) lights up the output symbol corresponding to the detection range that includes the position of the piston 402 among the multiple detection ranges. If the piston 402 is in the first detection range 801, the first output symbol 1905 lights up. If the piston 402 is in the second detection range 802, the second output symbol 1906 lights up. If the piston 402 is in the j-th detection range, the output symbols corresponding to the j-th detection range and the j-th output signal light up. 【0114】 In S2211, the CPU 601 (output unit 617) outputs an output signal to the valve system 101 that corresponds to the detection range that includes the position of the piston 402, from among multiple output signals (control outputs). If the piston 402 is in the first detection range 801, the first output signal is output. If the piston 402 is in the second detection range 802, the second output signal is output. If the piston 402 is in the j-th detection range, the j-th output signal is output. 【0115】 In S2212, CPU601 determines whether the power has been turned off (power supply from relay amplifier 104 has stopped). If the power is not turned off, CPU601 returns from S2212 to S2203. If the power is turned off, the display control method ends. 【0116】 Figure 23 is a flowchart showing the method for setting the detection range that the CPU 601 executes according to the control program 621. The memory 602 may store a variable h that indicates the number of set detection ranges. If no set detection ranges exist, the variable h is assigned the value of zero. If one detection range has been set, the variable h is assigned the value of 1. 【0117】 In S2301, the CPU 601 (setting unit 613) determines whether a setting start operation has been input. The setting start operation may be, for example, the operation switch 605 being continuously pressed down for a predetermined time (e.g., 2 seconds) in the operating mode. The setting start operation may also be the operation switch 605 being double-clicked. 【0118】 In S2302, the CPU 601 (display control unit 616) displays a setting symbol. For example, a setting symbol like the one shown in Figure 10(C) may be displayed. The setting symbol includes at least one of an image and / or text that signifies "setting in progress". In S2303, the CPU 601 (position identification unit 618) acquires position information indicating the position of the piston 402 from the cylinder sensor 103. 【0119】 In S2304, the CPU 601 (position identification unit 618 or display control unit 616) displays a threshold symbol based on the position information. The threshold symbol is placed at the display position on the OLED display 630 corresponding to the current position of the piston 402. The width of the threshold symbol is the initial value. 【0120】 In S2305, the CPU 601 (positioning unit 618 or display control unit 616) determines whether a width change operation has been input to the operation switch 605. The width change operation may be, for example, a short press of the operation switch 605. If no width change operation has been input, the CPU 601 proceeds from S2305 to S2307. If a width change operation has been input, the CPU 601 proceeds from S2305 to S2306. 【0121】 In S2306, the CPU 601 (display control unit 616) changes the width of the threshold symbol (detection range) by about one step. As described above, the width may change cyclically each time a width change operation is input. For example, the width may cycle as 2⇒4⇒6⇒2⇒4. 【0122】 In S2307, the CPU 601 (range setting unit 634) determines whether a confirmation operation for the detection range has been input to the operation switch 605. If no confirmation operation has been input, the CPU 601 returns from S2307 to S2302. If a confirmation operation has been input, the CPU 601 proceeds from S2307 to S2308. 【0123】 In S2308, the CPU 601 (display control unit 616) displays a confirmation symbol using a plurality of position symbols 1701. For example, the confirmation symbol may be one of the symbols exemplified in Figure 11(A). The confirmation symbol may also be an image or character indicating confirmation. 【0124】 In S2309, the CPU 601 (display control unit 616) displays a setting completion symbol using multiple position symbols. For example, the setting completion symbol may be the symbol exemplified in Figure 11(B). The setting completion symbol may also be an image or text indicating completion. 【0125】 In S2310, the CPU 601 (range setting unit 634) stores setting information indicating the i-th detection range in the memory 602 and transfers the setting information to the cylinder sensor 103. The CPU 501 of the cylinder sensor 103 receives the setting information and stores it in the memory 502. Here, i is the variable h plus 1. The setting information may include position information indicating the position of the i-th detection range and width information indicating the width (initial value or a value set by the user). Here, the position information indicates at least one of the left edge, center, or right edge of the detection range. The range setting unit 634 may assign a lighting color that is not assigned to any of the detection ranges from the 1st detection range to the i-1th detection range to the i-th detection range and store color information indicating the lighting color in the setting information. 【0126】 In S2311, CPU 601 (range setting unit 634) updates the variable h, which indicates the number of set detection ranges. That is, 1 is added to the value of variable h. Alternatively, the value of variable i is assigned to variable h. 【0127】 Figure 24 is a flowchart showing how to delete pre-configured detection ranges all at once. 【0128】 In S2401, the CPU 601 (setting unit 613) determines whether a batch deletion operation has been input to the operation switch 605. For example, in operation mode, if the operation switch 605 is pressed continuously for a predetermined time (e.g., 3 seconds) or if three short presses are input to the operation switch 605, the CPU 601 may determine that a batch deletion has been instructed. An upper limit may be set for the number of detection ranges. In this case, a batch deletion operation may also be defined as the number of set detection ranges matching the upper limit and a long press of the operation switch 605 being detected. When a batch deletion is instructed, the CPU 601 proceeds from S2401 to S2402. 【0129】 In S2402, the CPU 601 (range setting unit 634) deletes the set detection range from the memory 602 and sends a delete instruction to the cylinder sensor 103. Upon receiving the delete instruction, the CPU 501 of the cylinder sensor 103 deletes all set detection range information from the setting information stored in the memory 502. 【0130】 In S2403, CPU 601 (range setting unit 634) resets the number h of pre-set detection ranges to zero. 【0131】 15. Display control method for display panels 15-1. Structure of the display panel Figure 25 shows the structure of the display panel 105. The display panel 105 has a housing 2500. The housing 2500 houses and protects various components. 【0132】 The CPU 2501 implements various functions by executing the control program 2521 stored in the memory 2502. The memory 2502 includes ROM and RAM. The communication circuit 2504 connects to the valve system 101 via an Ethernet cable and is a circuit that sends and receives signals according to a predetermined communication protocol. The power terminal 2507 is a terminal that receives power supplied from the valve system 101. When PoE (Power over Ethernet) is adopted, the power terminal 2507 becomes one of the terminals on the RJ45 connector. RJ (Registered Jack) 45 is a standard registered with the U.S. Federal Communications Commission. 【0133】 When the display panel 105 is powered on and started up, the communication control unit 2511 assigns itself a predetermined IP address and attempts to connect to the valve system 101, which has been pre-assigned another predetermined IP address. IP stands for Internet Protocol. If the connection is successful, the communication control unit 2511 can acquire various information from the cylinder sensor 103 via the valve system 101 and the relay amplifier 104. This information includes position information indicating the position of the piston 402, setting information indicating the position and width of the detection range, information indicating the correspondence between the detection range and the output signal, model information and identification information of the cylinder sensor 103, and so on. 【0134】 The touch sensor 2505 detects human finger touches and touches from a touch pen (stylus). The OLED display 2530 displays information acquired from the valve system 101, relay amplifier 104, and cylinder sensor 103, and also displays setting screens for configuring these components. The display control unit 2516 uses screen templates 2522 stored in memory 2502 to display setting screens and operation screens on the OLED display 2530. An operation screen is, for example, a screen that displays position symbols 1701 indicating the position of the piston 402 detected by the cylinder sensor 103, and threshold symbols indicating the detection range. 【0135】 The setting unit 2513 is optional and performs the same setting process as the setting units 513 and 613. The range setting unit 2534 sets the position (e.g., threshold) of the detection range of the cylinder sensor 103. The width setting unit 2535 sets the width of the detection range. 【0136】 15-2. Operation screen Figure 26 shows the operation screen displayed on the display panel 105. The valve system 101 typically controls multiple air cylinders 102. Therefore, the display panel 105 may display the operating status of multiple air cylinders 102. 【0137】 In Figure 26, the upper display area shows the operating status of the first air cylinder 102. The display control unit 2516 displays the operating status corresponding to the output signal from the air cylinder 102 on the OLED display 2530 for the screen template 2522. The name of the first air cylinder 102 is "Air Cylinder ABC". This name may be obtained from the cylinder sensor 103. The current position of the piston 402 of the first air cylinder 102 is at the leftmost end of the displaceable range. Therefore, the leftmost position symbol 1701 among the multiple position symbols 1701 is displayed in the first color (e.g., green). In this example, a second detection range 802 is set, and a threshold position symbol consisting of three position symbols 1701 is displayed in the third color (e.g., orange). In this example, the display of the first detection range 801 is omitted, but the first detection range 801 may also be displayed by a threshold symbol. Furthermore, the power supply symbol 1904, the first output symbol 1905, and the second output symbol 1906 described above are also displayed. The display control unit 2516 lights up the power symbol 1904 when the cylinder sensor 103 is activated. Based on the output signal output from the cylinder sensor 103, the display control unit 2516 switches the first output symbol 1905 and the second output symbol 1906 on and off, or switches the display color. 【0138】 In Figure 26, the operating status of the second air cylinder 102 is shown at the bottom. The name of the second air cylinder 102 is displayed as "Air Cylinder DEF". Furthermore, a bar symbol 1801 is displayed to indicate the position of the piston 402. Range symbols 1802 and 1803 are also displayed to inform the user of the first detection range 801 and the second detection range 802. In addition, the power symbol 1904, first output symbol 1905, and second output symbol 1906 mentioned above are also displayed. The power symbol 1904, first output symbol 1905, and second output symbol 1906 are switched on and off, or their display colors are switched, based on the output signal output from the cylinder sensor 103. 【0139】 When displaying the operating status of multiple air cylinders 102 in this manner, different screen templates 2522 may be used for each, or the same screen template 2522 may be used. Depending on the application of the air cylinder 102 to be displayed, the user may select the desired screen template 2522 from among the multiple screen templates 2522 through the settings screen. 【0140】 The display area of the display panel 105 is much larger than that of the relay amplifier 104 and the air cylinder 102, allowing it to display more information. On the other hand, by adopting a UI similar to that of the relay amplifier 104 or the air cylinder 102 for the display panel 105, users will be able to grasp the operating status at a glance. 【0141】 Figures 27(A) to 27(C) show other operation screens. A chuck (gripper, robot hand) may be used as the control target of the air cylinder 102. The display control unit 2516 displays an operation screen on the OLED display 2530 according to the screen template 2522. The screen template 2522 may have a current value display area 1700, an operation display area 1710, and a status display area 2720. The current value display area 1700 displays the current position (current value) of the piston 402 indicated by the output signal output from the cylinder sensor 103. The operation display area 1710 displays the chuck 2701, the jaws 2702, and the output symbol 2705. The chuck 2701 is an icon modeled after the chuck that is the control target of the air cylinder 102. The jaws 2702 are icons modeled after multiple jaws that grip the workpiece 2703, which is the gripping target. The workpiece 2703 is, for example, a product or part manufactured on a production line. The output symbol 2705 is a symbol (indicator) that shows which of several preset detection ranges the jaw 2702 is located in. The status display area 2720 shows an image or text indicating the current status of the chuck 2701, as well as the detection range (threshold and width). 【0142】 Figure 27(A) shows the state in which the cylinder sensor 103 outputs a first output signal. In this example, the current position indicates the distance between the two claws 2702. The first detection range 801, which defines the conditions for the output of the first output signal, is defined by a threshold of 100 mm and a width of 8 mm. Therefore, the cylinder sensor 103 outputs a first output signal when the current position is 96 mm or greater and 104 mm or less. While the first output signal is being output, the output symbol 2705 is displayed in the color corresponding to the first output signal (e.g., blue). 【0143】 Figure 27(B) shows the state in which the cylinder sensor 103 outputs a second output signal. The second detection range 802, which defines the conditions for the output of the second output signal, is defined by a threshold of 60 mm and a width of 10 mm. Therefore, the cylinder sensor 103 outputs a second output signal when the current position is 50 mm or more and 70 mm or less. While the second output signal is being output, the output symbol 2705 is displayed in the color corresponding to the second output signal (e.g., orange). 【0144】 Figure 27(C) shows the state in which the cylinder sensor 103 outputs a third output signal. The third detection range, which defines the conditions for the output of the third output signal, is defined by a threshold of 30 mm and a width of 10 mm. Therefore, the cylinder sensor 103 outputs a third output signal when the current position is 20 mm or more and 40 mm or less. While the third output signal is being output, the output symbol 2705 is displayed in the color corresponding to the third output signal (e.g., purple). 【0145】 15-3. Settings screen Figure 28 shows an example of a setting screen displayed on the OLED display 2530 of the display panel 105. The display control unit 2516 displays the setting screen on the OLED display 2530 according to the screen template 2522. The signal selection units 2811, 2821, and 2831 are pull-down lists for selecting one output signal from among multiple output signals. The threshold input units 2812, 2822, and 2832 are input units for inputting threshold values. When a user touches the threshold input units 2812, 2822, and 2832 with their finger or a stylus, the OLED display 2530 may assist the user in inputting values by displaying a numeric keypad screen or up / down adjustment keys for the numbers. Alternatively, the values displayed on the threshold input units 2812, 2822, and 2832 may change in conjunction with the position information of the piston 402 output from the cylinder sensor 103. In this case, instead of inputting values with their finger, the user may open or close the two claws 2702. The display control unit 2516 may change the numerical values displayed in the threshold input units 2812, 2822, and 2832 based on the position information output from the cylinder sensor 103 according to the position of the claw 2702. As a result, the user can determine an appropriate threshold value by operating the claw 2702. 【0146】 Figure 29 shows another example of a settings screen displayed on the OLED display 2530 of the display panel 105. In this example, the display panel 105 can receive position information output from the cylinder sensor 103, but the display of the position information is omitted. 【0147】 The user selects the first output signal by operating the signal selection unit 2811, moves the two claws 2702 with their fingers, and stops the two claws 2702 at a position corresponding to the threshold value of the first output signal. When the set button 2911 is pressed, the setting unit 2513 determines the current position of the claws 2702 to be the threshold value corresponding to the first output signal and saves the threshold value in the setting information. 【0148】 The user selects the second output signal by operating the signal selection unit 2821, moves the two claws 2702, and stops the two claws 2702 at a position corresponding to the threshold value of the second output signal. The workpiece 2703 may also be placed between the two claws 2702. When the set button 2921 is pressed, the setting unit 2513 determines the current position of the claws 2702 to the threshold value corresponding to the second output signal and saves it in the setting information. 【0149】 The user selects the third output signal by operating the signal selection unit 2831, moves the two claws 2702, and stops the two claws 2702 at a position corresponding to the threshold value of the third output signal. In this case, the two claws 2702 are positioned at a position corresponding to a no-swing state. When the set button 2931 is pressed, the setting unit 2513 determines the current position of the claws 2702 to the threshold value corresponding to the third output signal and saves it in the setting information. 【0150】 The setting unit 2513 writes setting information to the cylinder sensor 103 via the valve system 101 and relay amplifier 104. This allows the cylinder sensor 103 to be configured via the display panel 105. 【0151】 15-3. Flowchart 15-3-1.Operation screen Figure 30 shows the display control method for the operation screen executed by the CPU 2501 of the display panel 105 according to the control program 2521. 【0152】 In S3001, the CPU 2501 (display control unit 2516) reads the configuration information from the memory 2502. 【0153】 In S3002, the CPU 2501 (display control unit 2516) reads the screen template 2522 specified by the configuration information and displays the operation screen on the OLED display 2530 according to the screen template 2522. If no configuration information exists, the display control unit 2516 may allow the user to select the desired screen template 2522 from among several screen templates 2522. 【0154】 In S3003, the CPU 2501 displays the current position, indicated by the position information output from the cylinder sensor 103, on the operation screen. As shown in Figure 26, the display control unit 2516 changes the display color of the position symbol 1701 corresponding to the current position, displays a bar symbol 1801 with a length corresponding to the current position, displays the current position in the current position display area 2700, and displays a claw 2702 at the position corresponding to the current position. 【0155】 In S3004, the CPU 2501 (display control unit 2516) determines whether it has received an output signal from the cylinder sensor 103. The cylinder sensor 103 outputs an output signal corresponding to the detection range when the piston 402 or claw 2702 is located within a preset detection range. If no output signal is output, the CPU 2501 returns from S3004 to S3003. If an output signal is output, the CPU 2501 proceeds from S3004 to S3005. 【0156】 In S3005, the CPU 2501 (display control unit 2516) displays the state corresponding to the output signal on the OLED display 2530. For example, as shown in Figure 26, if the first output signal is output, the display control unit 2516 changes the output symbol 1905 to a predetermined display color. If the second output signal is output, the display control unit 2516 changes the output symbol 1906 to a predetermined display color. As shown in Figure 27(A), if the first output signal is output, the display control unit 2516 changes the output symbol 2705 to a display color corresponding to the first output signal. The display control unit 2516 may also display a message, threshold, and width corresponding to the first output signal in the state display area 2720. As shown in Figure 27(B), if the second output signal is output, the display control unit 2516 changes the output symbol 2705 to a display color corresponding to the second output signal. The display control unit 2516 may also display a message, threshold, and width corresponding to the second output signal in the state display area 2720. As shown in Figure 27(C), if the third output signal is output, the display control unit 2516 changes the output symbol 2705 to the display color corresponding to the third output signal. The display control unit 2516 may also display a message, threshold, and width corresponding to the third output signal in the status display area 2720. 【0157】 In S3006, CPU2501 determines whether a power-off command has been issued. If a power-off command has not been issued, CPU2501 returns from S3006 to S3003. If a power-off command has been issued, CPU2501 terminates the display control method and shuts down. 【0158】 15-3-2. Settings screen Figure 31 shows the display control method for the operation screen executed by the CPU 2501 of the display panel 105 according to the control program 2521. When the touch sensor 2505 detects a setting start trigger (a predetermined operation by the user), the CPU 2501 starts the setting process according to the control program 2521. 【0159】 In step S3101, the CPU 2501 (display control unit 2516) displays a settings screen on the OLED display 2530 according to the screen template 2522 for the settings screen. The settings screen may be one of those exemplified in Figure 28 or one of those exemplified in Figure 29. Alternatively, the CPU 2501 may accept a setting screen specified by the user from among several settings screens and display the setting screen specified by the user on the OLED display 2530. 【0160】 In S3102, the CPU 2501 (setting unit 2513) accepts the selection of the output signal to be set. For example, the setting unit 2513 accepts the user's selection of an output signal from the output signal list displayed in the signal selection unit 2811. 【0161】 In S3103, the CPU 2501 (setting unit 2513) accepts the specification of a threshold value for defining the detection range. For example, the range setting unit 2534 accepts a numerical value input in the threshold input unit 2812 as the threshold value. For example, the range setting unit 2534 may accept the current value output from the cylinder sensor 103 as the threshold value. 【0162】 In S3104, the CPU 2501 (setting unit 2513) accepts a width specification to define the detection range. For example, the width setting unit 2535 may accept a numerical value input to the width input unit 2813 as the width. The width setting unit 2535 may also cycle through the width in response to tap input to the touch sensor 2505. 【0163】 In S3105, the CPU 2501 (setting unit 2513) determines via the touch sensor 2505 whether a setting completion instruction has been received. For example, if the touch sensor 2505 detects that the setting completion button 2850 has been touched, the setting unit 2513 may determine that a setting completion instruction has been received. If a setting completion instruction has not been received, the CPU 2501 returns to S3102 and accepts the setting for the next output signal. If a setting completion instruction is received, the CPU 2501 proceeds to S3106. 【0164】 In S3106, the CPU 2501 (setting unit 2513) creates setting information that associates the output signal with the detection range (threshold and width), saves the setting information in the memory 2502, and also transfers the setting information to the cylinder sensor 103. 【0165】 16. Summary As shown in Figure 4, the position detection sensor 100 detects the position of a displacement body (e.g., piston 402) that is movable parallel to a first direction (e.g., the longitudinal direction of the air cylinder 102). The cylinder sensor 103 is an example of a detection device that generates a detection signal corresponding to the position of a magnet 403 provided on the displacement body. The CPU 501 and position identification unit 512 are an example of a position identification unit that identifies the position of the displacement body in the first direction based on the detection signal generated by the detection device. As shown in Figures 2 and 4, the housing 200 is an example of a housing that houses at least a part of the detection device and extends along the first direction. The symbol display 505 is an example of a display unit that has a plurality of display elements (e.g., LED 305, display pixels of OLED display 630) arranged on the housing 200 at different positions along the first direction and displays a symbol indicating the position of the displacement body along the first direction. The CPU 501 and the display control unit 516 are an example of a display control unit that controls the display unit to display the first state in which the displacement body is located at a first position corresponding to one end of the displacement range (e.g., the left end of the detectable range), the second state in which the displacement body is located at a second position corresponding to the other end of the displacement range (e.g., the right end of the detectable range), and the intermediate state in which the displacement body is located at an intermediate position between the first and second positions, in different manner by displaying symbols at different positions on multiple display elements. Note that the one end and the other end may be the outermost positions, or they may be positions inside the outermost positions. 【0166】 According to this embodiment, not only the first and second states, but also intermediate states in between can be displayed, making the installation of the position detection sensor 100 easier. 【0167】 As Figures 2 and 3 suggest, the external input terminal 503 and the external output terminal 506 are examples of signal interface units provided at the ends of the housing 200. The CPU 501 and the output unit 517 are examples of output units that output position-related information (e.g., analog values indicating the position of the piston 402, digital values such as the first output signal and the second output signal) based on the position identified by the position identification unit 512 via the signal interface unit. By outputting this position-related information to the relay amplifier 104 and the valve system 101, it will be possible to display the position-related information in the relay amplifier 104 and control the valve 122 in the valve system 101 based on the position-related information. 【0168】 The multiple display elements may include at least three or more light sources (e.g., LED 305, display pixels of the OLED display 630) arranged along the first direction. The multiple display elements may also include at least four or more light sources (e.g., LED 305, display pixels of the OLED display 630) arranged along the first direction. The display control unit 516 may control the multiple display elements to display an intermediate state in which the displaced body is located at the third position as an intermediate position, and another intermediate state in which the displaced body is located at the fourth position as an intermediate position, in different manners. For example, the display control unit 516 may represent the intermediate state in which the displaced body is located at the third position with a first color, and display the other intermediate state in which the displaced body is located at the fourth position with a second color. 【0169】 As shown in Figure 3, the detection device (e.g., cylinder sensor 103) may include a plurality of magnetic detection elements (e.g., Hall elements 304) arranged along a first direction. 【0170】 As shown in Figure 3, multiple magnetic detection elements may be arranged at a first interval (e.g., 4 mm or more and 6 mm or less). Multiple display elements (e.g., LED 305, position image 1701) may be arranged at a second interval shorter than the first interval. For example, the second interval may be less than 10 mm and 1 mm or more. Alternatively, the second interval may be less than 4 mm and 2 mm or more. 【0171】 As shown in Figures 14(A) and 14(B), the display control unit 516 may display the first state, the second state, and the intermediate state using a variable-length bar realized by a plurality of display elements. As shown in Figures 16 and 18, the display control unit 516 may also display the position of the displacement body using a bar symbol 1801. 【0172】 As shown in Figures 14(A) and 14(B), the display control unit 516 may change the length of the bar by controlling the number of light sources that are lit among a plurality of light sources (e.g., LED 305, display pixels of the OLED display 630). 【0173】 The display control unit 516 may control the display unit (e.g., LED 305, OLED display 630) to display the first state, second state, and intermediate state in different colors. This will allow the user to clearly distinguish between the three states. 【0174】 The output unit 517 may output a first output signal when the displaced body is located in a first detection range 801 which includes the first position, and a second output signal when the displaced body is located in a second detection range 802 which includes the second position. 【0175】 The setting unit 513 is an example of a teaching unit that performs teaching, which is the process of setting the first detection range 801 and the second detection range 802 according to the user's instructions. 【0176】 As explained in relation to Figure 12, the operation button 202 and the operation switch 303 are examples of input units to which a first operation is input. When a first operation (e.g., pressing and holding the operation button 202 for 2 seconds) is input to the input unit, the setting unit 513 may start setting the first detection range 801. When a second operation (e.g., pressing and holding the operation button 202 for 2 seconds) is input to the input unit, the setting unit 513 may determine the first detection range 801 based on a first position where the displacement body exists and a predetermined width. 【0177】 The setting unit 513 may start setting the second detection range 802 after the first detection range 801 has been determined and a first operation is input at the input unit. The setting unit 513 may determine the second detection range 802 based on a second position where the displacement body is located and a predetermined width when the second operation is input at the input unit. Note that the operation to determine the first detection range 801 may be used in conjunction with the operation to start setting the second detection range 802. This will allow the user to continuously set the first detection range 801 and the second detection range 802. 【0178】 Incidentally, the number of detection ranges and output signals may be three or more. The output unit 517 may output a third output signal when the displaced body is located in a third detection range that includes the third position. The setting unit 513 may start setting the third detection range when a first operation is input to the input unit after the second detection range has been determined. The setting unit 513 may determine the third detection range based on the third position where the displaced body is located when the second operation is input to the input unit and a predetermined width. This may realize so-called three-point output. Here, three-point output means outputting output signals corresponding to three positions of the displaced body. For example, if the displaced body is a gripper (chuck) that grasps or releases an object, the states of two jaws being open, two jaws grasping an object, and two jaws failing to grasp an object (empty state) may be realized by the position of the piston 402 that opens and closes the jaws. In this case, three detection ranges and three corresponding output signals are set to distinguish between the three states. 【0179】 The setting unit 513 may include a width setting unit 515 that sets a predetermined width in response to instructions input from the input unit. As explained with reference to Figures 14(A) and 14(B), the width setting unit 515 may switch the width each time the operation button 202 is briefly pressed in setting mode. 【0180】 As explained using Figure 13, the setting unit 513 may reset (delete at once) the first detection range 801 and the second detection range 802 when the first operation is input to the input unit. Resetting the detection range with such a simple operation will make the reset process easier. 【0181】 The symbol indicator 505 may further include a first display element (e.g., first output LED 205) that indicates that a first output signal is being output, and a second display element (e.g., second output LED 206) that indicates that a second output signal is being output. 【0182】 As shown in Figures 8(A) to 8(C), the symbol indicator 505 may change the position of the symbol indicating the position of the displacement body in conjunction with the movement of the displacement body. This will make the installation of the cylinder sensor 103 easier. 【0183】 The detection device (e.g., cylinder sensor 103) may be powered and operated via a relay device (e.g., relay amplifier 104) installed between the moving device (e.g., valve system 101) that moves the displaced body and the housing 200. 【0184】 As shown in Figure 3, the housing 200 is an example of a first housing that houses at least a portion of the detection device and extends along the first direction. The housing 1900 of the relay amplifier 104 and the housing 2500 of the display panel 105 are examples of second housings connected to the first housing via cables (e.g., IO-Link cables, Ethernet cables). The operation switch 605 and the touch sensor 2505 are examples of input units provided in the second housing that receive operation inputs. The OLED displays 630 and 2530 are examples of display units provided in the second housing that have a plurality of display elements (e.g., display pixels) arranged in the second housing at different positions along a second direction corresponding to the first direction, and display position symbols indicating the position of a displacement body along the first direction and threshold symbols indicating the position of a threshold. The display control units 616 and 2512 are provided in the second housing and control the display unit to display the first state in which the displaced body is located at a first position corresponding to one end of the displacement range, the second state in which the displaced body is located at a second position corresponding to the other end of the displacement range, and the intermediate state in which the displaced body is located at an intermediate position between the first and second positions, in different manner by displaying position symbols at different positions on multiple display elements. The display unit may also be controlled to display threshold symbols at different positions on multiple display elements in accordance with threshold values set according to operation inputs received via the input unit. This will facilitate the installation of the position detection sensor 100. 【0185】 Multiple display elements may include at least three or more light sources (e.g., display pixels of OLED displays 630, 2530) arranged along the first direction. Multiple display elements may include at least four or more light sources (e.g., display pixels of OLED displays 630, 2530) arranged along the first direction. Display control units 616, 2512 may display an intermediate state in which the displacement body exists at the third position as an intermediate position, and another intermediate state in which the displacement body exists at the fourth position as an intermediate position, in different manners. As shown in Figure 19(A), the number of position symbols 1701 may be four or more. For example, N position symbols 1701 can distinguish and display N positions. 【0186】 The display control units 616 and 2512 may control the display unit to display the first state, second state, and intermediate state using a variable-length bar (e.g., bar symbol 1801) realized by multiple display elements. Since the OLED displays 630 and 2530 have a large number of display pixels, they can display the bar symbol 1801. The bar symbol 1801 can display the position of the piston 402 in more detail compared to multiple LEDs 305. 【0187】 Multiple display elements may be multiple light sources (display pixels). The display control units 616 and 2512 may change the length of the bar by controlling the number of light sources that are lit among the multiple light sources. 【0188】 As shown in Figures 20(A) to 20(C) and Figures 28(A) to 28(C), the display control units 616 and 2513 may display a setting screen for setting thresholds in response to operation inputs received via the input unit. As shown in Figures 20(A) to 20(C), Figures 28(A) to 28(C), and Figures 29(A) to 29(C), the display control units 616 and 2513 may control the display unit to display the first state, second state, and intermediate state in different ways on the setting screen. 【0189】 The second enclosure (e.g., enclosure 1900, 2500) may further include a storage unit (e.g., memory 602, 2502) that stores screen template information (screen templates 622, 2522) for displaying the settings screen. The display control units 616, 2512 may read the screen template information from the storage unit and display the settings screen on the display unit. 【0190】 The second enclosure (e.g., enclosure 1900, 2500) may further include a power supply unit (e.g., power terminals 607, 2507) that supplies power to the first enclosure. 【0191】 The output unit 517 may output an output signal when the position of the displaced body exceeds a threshold. For example, the output unit 517 may output an output signal when the displaced body is located within a detection range determined by the threshold and a width. 【0192】 The setting units 613 and 2513 may function as teaching units that perform teaching, which is the process of setting thresholds according to user instructions. The output unit 517 may be configured to output an output signal when the displaced body is located within a detection range determined by the threshold and width. The second housing may further include width setting units 635 and 2535 for adjusting the width. 【0193】 The first housing (e.g., housing 200) may further include a second display unit (e.g., LED 305) having a plurality of display elements arranged on the first housing at different positions along a first direction, which display position symbols and threshold symbols, and a second display control unit (e.g., display control unit 516) which controls the second display unit to display the first state, second state, and intermediate state in different ways by displaying the position symbols at different positions on the plurality of display elements of the second display unit, and also controls the second display unit to display the threshold symbols at different positions on the plurality of display elements of the second display unit. As described above, the air cylinder 102, relay amplifier 104, and display panel 105 each display the position of the piston 402 of the air cylinder 102. Therefore, the display content displayed on the display unit (e.g., OLED displays 630, 2530) provided on the second housing and the display content displayed on the second display unit (e.g., LED 305) can be linked. 【0194】 17. Other variations (1)External I / F5060 In the control system for the cylinder sensor 103 shown in Figure 5, the output unit 517 outputs position information indicating the position of the piston 402, which has been identified by the position identification unit 512, to the relay amplifier 104 via the external output terminal 506 and the IO-Link cable 113. However, as shown in Figure 32, for example, the external output terminal 506 may be changed to an external I / F 5060. 【0195】 In Figure 32, the external I / F 5060 includes a control output circuit 5060a for sending control outputs such as ON / OFF to a programmable logic controller (PLC), a communication circuit 5060b for sending position information, setting information, etc. to a relay amplifier 104 and an I / O link master (not shown), and an external output terminal 5060c. Here, one external output terminal 5060c is shared by the control output circuit 5060a and the communication circuit 5060b, but this is just one example. Two separate external output terminals 5060c may be provided. In this case, the control output circuit 5060a and the communication circuit 5060b can each use their respective corresponding individual external output terminals 5060c. 【0196】 The control output circuit 5060a is a circuit that has the function of converting a voltage value (e.g., 3.3V) output by the output unit 517, which indicates the control output, to a desired voltage level (e.g., 24V). The communication circuit 5060b is a circuit that has the function of converting a voltage value (e.g., 3.3V) output by the output unit 517, which indicates location information, to a desired voltage level (e.g., 24V). 【0197】 Furthermore, in Figure 32, the control output circuit 5060a and the communication circuit 5060b are physically implemented in a single integrated circuit, which improves the usability of the cylinder sensor 103 while keeping manufacturing costs down. Also, since the cylinder sensor 103 is often attached to grippers (chucks) or other movable parts, it is required to make its size as small as possible. By physically combining the control output circuit 5060a and the communication circuit 5060b, the size of the cylinder sensor 103 can be reduced. More specifically, when setting thresholds or other parameters for the cylinder sensor 103, a relay amplifier 104 is connected to the cylinder sensor 103. In this case, the cylinder sensor 103 can communicate with the relay amplifier 104 via the communication circuit 5060b of the external I / F 5060. On the other hand, when sending control output to a PLC, the relay amplifier 104 may be removed from the cylinder sensor 103, and the cylinder sensor 103 and the PLC may be directly connected. At this time, the cylinder sensor 103 can send a control output to the PLC via the control output circuit 5060a of the external I / F 5060. 【0198】 (2) I / O Link Master 1041 In the position detection sensor 100 shown in Figure 1, an example was described in which the cylinder sensor 103 is connected to the valve system 101 via a relay amplifier 104. The present invention is not limited to this, and for example, as shown in Figure 33(A), the cylinder sensor 103 can also be connected to the PLC 1042 via an I / O link master 1041. 【0199】 The I / O link master 1041 functions as a so-called data relay device, connecting sensors and actuators located at a distance from the PLC 1042 to the network to which the PLC 1042 is connected (e.g., Ethernet®), and relaying the measurement results of the sensors and actuators to the PLC 1042. To realize this relay function, the I / O link master 1041 has a CPU, storage device, relay memory (for temporary storage), communication circuitry, etc. The I / O link master 1041 communicates with the cylinder sensor 103 according to a predetermined communication protocol (e.g., IEC61131-9) to receive identification information and measurement results, and stores them in the relay memory. The measurement results are received cyclically and transferred to the PLC 1042 via the relay memory. When the PLC 1042 performs an input / output refresh, the I / O link master 1041 transfers (transmits) the measurement results held in the relay memory to the PLC 1042. Note that the first cycle (acquisition cycle) in which the I / O link master 1041 acquires information from the cylinder sensor 103 and the second cycle (so-called control cycle) in which the I / O link master 1041 transmits information to the PLC 1042 may be the same or different. If the first cycle is longer than the second cycle, the number of data acquired by the PLC 1042 will be relatively smaller, and the data processing load on the PLC 1042 will be reduced. If the first cycle is shorter than the second cycle, the PLC 1042 will be able to acquire the values from the cylinder sensor 103 without missing any, but the same value will be acquired multiple times, increasing the load on the PLC 1042. 【0200】 In Figure 33(A), the cylinder sensor 103 generates process data (such as position information) according to a predetermined output format at predetermined measurement intervals and transmits it to the I / O link master 1041. As described above, the PLC 1042 communicates with the I / O link master 1041 via an industrial network. The PLC 1032 receives the position information measured by the cylinder sensor 103 via the I / O link master 1041 and stores it in a predetermined recording area (data memory, relay device, word device, etc.). The PLC 1042 may perform either cyclic communication, which acquires data from the I / O link master 1041 at predetermined communication intervals, or message communication, which acquires data as a response by sending a command. 【0201】 On the other hand, as shown in Figure 33(B), if the cylinder sensor 103 is connected to the relay amplifier 104, the relay amplifier 104 may be connected to the mobile battery 1040. In this case, the external I / F 5060 (communication circuit 5060b) of the cylinder sensor 103 communicates with the relay amplifier 104. 【0202】 As shown in Figure 33(A), when the cylinder sensor 103 is connected to the PLC 1042 (via the I / O link master 1041), the control output circuit 5060a of the external I / F 5060 of the cylinder sensor 103 functions. On the other hand, as shown in Figure 33(B), when the cylinder sensor 103 is connected to the relay amplifier 104, the communication circuit 5060b of the external I / F 5060 of the cylinder sensor 103 functions. By sharing the external I / F 5060 in this way, the cylinder sensor 103 can be miniaturized. Furthermore, as mentioned above, by making the control output circuit 5060a and the communication circuit 5060b physically the same circuit, it is possible to further miniaturize the cylinder sensor 103. 【0203】 Here, as shown in Figure 33(B), the relay amplifier 104 may be connected to the mobile battery 1040. The relay amplifier 104 may have a desired voltage request unit 6070 and a voltage conversion unit 6071, for example, as shown in Figure 34. The desired voltage request unit 6070 requests a desired voltage (e.g., 5V) from the mobile battery 1040. In response to this request, the mobile battery 1040 supplies the desired voltage (a predetermined voltage) to the relay amplifier 104. The voltage conversion unit 6071 has the function of converting the voltage supplied from the mobile battery 1040 to an optimal voltage for supplying to the cylinder sensor 103. The relay amplifier 104 can also function as a power supply for communication. 【0204】 (3) Error handling Next, as another variation, we will describe the error handling that occurs when the cylinder sensor 103 is disconnected from the relay amplifier 104 and then reconnected to the relay amplifier 104. 【0205】 First, let's explain how to determine that the cylinder sensor 103 is connected to the relay amplifier 104. To make the cylinder sensor 103 recognize that it is connected to the relay amplifier 104 and to enable communication using the output line, the relay amplifier 104 sends pulses of a specific duration to the cylinder sensor 103 via the output line, causing the cylinder sensor 103 to transition into communication mode. After that, the relay amplifier 104 initiates communication, causing the cylinder sensor 103 to respond and enable communication. 【0206】 If the cylinder sensor 103 is disconnected from the relay amplifier 104, a communication error is determined if there is no response from the cylinder sensor 103 within a certain period of time to the transmission from the relay amplifier 104 to the cylinder sensor 103. The transmission from the relay amplifier 104 to the cylinder sensor 103 may be retried multiple times before a communication error is determined. 【0207】 Next, we will explain the process when the cylinder sensor 103 is disconnected from the relay amplifier 104 and then reconnected. For example, the following processing methods are possible: Pattern 1) To restore communication, the relay amplifier 104 sends pulses for a specific duration to transition the cylinder sensor 103 into communication mode. After that, the cylinder sensor 103 communicates with the relay amplifier 104, enabling transmission and reception. Pattern 2) The relay amplifier 104 does not attempt to automatically restore communication, but rather transitions the cylinder sensor 103 into communication mode through some kind of user operation (for example, pressing a button on the relay amplifier 104). 【0208】 Other error handling methods include, for example, errors in detecting magnetic flux density. Since the magnetic flux density threshold is stored on the cylinder sensor 103 side, it is possible to determine whether the magnetic flux density detected by the cylinder sensor 103 is within a predetermined threshold range and transmit the result of the determination to the relay amplifier 104. 【0209】 The invention is not limited to the embodiments described above, and various modifications and changes are possible within the scope of the gist of the invention. [Explanation of Symbols] 【0210】 100: Position detection sensor, 304: Hall element, 501: CPU, 200: Enclosure, 305: LED
Claims
[Claim 1] A position detection sensor for detecting the position of a displacement body that is movable parallel to a first direction, A detection device that generates a detection signal corresponding to the position of a magnet provided on the displacement body, A positioning unit that identifies the position of the displaced body in the first direction based on the detection signal generated by the detection device, A first housing that houses at least a portion of the detection device and extends along the first direction, The first housing is connected to the second housing via a cable, The second housing is provided with an input unit that receives operation input, A display unit provided in the second housing has a plurality of display elements arranged in the second housing at mutually different positions along a second direction corresponding to the first direction, and displays a position symbol indicating the position of the displaced body along the first direction and a threshold symbol indicating the position of the threshold, A display control unit is provided in the second housing and controls the display unit to display the position symbol at different positions on the plurality of display elements in different ways, thereby displaying the first state in which the displaced body is located at a first position corresponding to one end of the displacement range, the second state in which the displaced body is located at a second position corresponding to the other end of the displacement range, and the intermediate state in which the displaced body is located at an intermediate position between the first position and the second position, and also controls the display unit to display the threshold symbol at different positions on the plurality of display elements in accordance with the threshold value set according to the operation input received via the input unit. A position detection sensor equipped with the following features. [Claim 2] A signal interface section is provided at the end of the first housing, The first housing includes an output unit which outputs position-related information based on the position identified by the position identification unit via the signal interface unit, The position detection sensor according to claim 1, further comprising: [Claim 3] The position detection sensor according to claim 1, wherein the plurality of display elements include at least three or more light sources arranged along the first direction. [Claim 4] The plurality of display elements include at least four or more light sources arranged along the first direction, The position detection sensor according to claim 1, wherein the display control unit controls the plurality of display elements to display an intermediate state in which the displaced body is located at the third position as the intermediate position, and another intermediate state in which the displaced body is located at the fourth position as the intermediate position, in different manners. [Claim 5] The position detection sensor according to claim 1, wherein the detection device includes a plurality of magnetic detection elements arranged along the first direction. [Claim 6] The plurality of magnetic detection elements are arranged at a first interval, The position detection sensor according to claim 5, wherein the plurality of display elements are arranged at a second interval shorter than the first interval. [Claim 7] The position detection sensor according to claim 6, wherein the second interval is less than 10 mm and 1 mm or more. [Claim 8] The position detection sensor according to claim 1, wherein the display control unit controls the display unit to display the first state, the second state, and the intermediate state using a variable-length bar realized by the plurality of display elements. [Claim 9] The aforementioned multiple display elements include multiple light sources, The position detection sensor according to claim 8, wherein the display control unit changes the length of the bar by controlling the number of light sources that are lit among the plurality of light sources. [Claim 10] The position detection sensor according to claim 1, wherein the display control unit displays a setting screen for setting the threshold value in response to the operation input received via the input unit, and controls the display unit to display the first state, the second state, and the intermediate state in different ways on the setting screen. [Claim 11] The second housing further comprises a storage unit that stores screen template information for displaying the settings screen, The position detection sensor according to claim 10, wherein the display control unit reads the screen template information from the storage unit and displays the setting screen on the display unit. [Claim 12] The position detection sensor according to claim 1, wherein the second housing further comprises a power supply unit that supplies power to the first housing. [Claim 13] The position detection sensor according to claim 2, wherein the output unit outputs an output signal when the position of the displaced body exceeds the threshold. [Claim 14] The position detection sensor according to claim 13, further comprising a teaching unit that performs teaching, which is the process of setting the threshold in accordance with user instructions. [Claim 15] The output unit is configured to output an output signal when the displaced body is located within a detection range determined by the threshold value and width. The position detection sensor according to claim 2, wherein the second housing further comprises a width adjustment unit for adjusting the width. [Claim 16] The aforementioned first enclosure further, A second display unit having a plurality of display elements arranged in the first housing at mutually different positions along the first direction, which display the position symbol and the threshold symbol, A second display control unit controls the second display unit to display the first state, the second state, and the intermediate state in different ways by displaying the position symbols at different positions on the plurality of display elements of the second display unit, and controls the second display unit to display the threshold symbols at different positions on the plurality of display elements of the second display unit. Equipped with, The position detection sensor according to claim 1, wherein the display content shown on the display unit provided in the second housing and the display content shown on the second display unit are linked.