Photoelectric encoder measurement result display method and system, and computer program product
Through the subdivision and binary codes output by the output of the optical code disk output, the programmable only reads the memory and LED digital tubes, which solves the expensive and complicated problems of the device when the optical code disk measures. High -precision, low cost display effect.
Patent Information
- Application Number
- CN202411937817.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-01-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When measuring angular displacements of existing photoelectric discs, absolute photoelectric discs are expensive, while incremental photoelectric discs are inconvenient to use and require complex peripheral circuits.
By subdividing, counting and standard binary code conversion of the sine and cosine square wave signals output by the photoelectric code wheel, and using programmable read-only memory and LED digital tubes, the measurement results of the photoelectric code wheel can be displayed.
It achieves effective display of incremental photoelectric code disk sine and cosine square wave signals, reduces hardware circuit complexity and cost, and improves display accuracy and anti-interference ability.
Smart Images

Figure CN119354249A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a display method, and specifically to a method, system, and computer program product for displaying measurement results of a photoelectric encoder. Background Art
[0002] When measuring angular displacement, a photoelectric encoder is usually used, and then a microcomputer or microprocessor is used to perform data discrimination and data processing to obtain the corresponding result. Photoelectric encoders are generally divided into two types: absolute and incremental. Among them, the absolute photoelectric encoder can determine the angle of rotation based on the starting and ending positions of the encoder during measurement, regardless of the intermediate process. The incremental photoelectric encoder only reads the relative increment value of the angle of rotation.
[0003] In practical applications, absolute photoelectric encoders are highly accurate and easy to use, but they are expensive and not suitable for small-batch production. Incremental photoelectric encoders are cheap and highly accurate, but they are inconvenient to use and require more complex peripheral circuits. Summary of the invention
[0004] The present application aims to solve the technical problems that the current photoelectric encoder is used to measure angular displacement, the absolute photoelectric encoder is expensive, the incremental photoelectric encoder is inconvenient to use, and requires a more complex peripheral circuit, and provides a method, system, and computer program product for displaying the measurement results of a photoelectric encoder.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions: In a first aspect, the present application proposes a method for displaying measurement results of a photoelectric encoder, comprising: Subdivide the sine and cosine square wave signals output by the photoelectric encoder to obtain subdivided signals; Counting the subdivided signal and converting it into a standard binary code; After flipping and isolating the standard binary code, an isolated signal is obtained; Connecting the isolation signal to the first part of the address lines of the first programmable read-only memory, the digital combinations of the isolation signal connected to the first part of the address lines respectively correspond to different address units of the first programmable read-only memory and correspond to the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder; The isolation signal is connected to the second part of the address line of the first programmable read-only memory, and the digital combination of the isolation signal connected to the second part of the address line corresponds to the selected LED digital tubes among the multiple LED digital tubes; the multiple LED digital tubes correspond to the digits of different digits of the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder, and the number of the LED digital tubes is determined according to the display accuracy; Decoding the output of the first programmable read-only memory into control signals of different LED segments in the plurality of LED digital tubes according to the digital combination of the isolation signal connected to the first part of the address line and the second part of the address line; The control signal is input to a plurality of LED digital tubes to display the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder.
[0006] Furthermore, the first programmable read-only memory uses chip 27256; The first part of the address lines are A0-A of chip 27256 11 Address lines; The second part of the address line is the A of chip 27256 13 -A 14 Address lines.
[0007] Further, the step of connecting the isolation signal to a first portion of address lines of a first programmable read-only memory comprises: Connect the isolated signal to A0-A of chip 27256 11 The output of chip 27256 is connected to the input terminals of the buffer respectively, and the output terminals of the buffer are connected to the input terminals of multiple LED digital tubes respectively.
[0008] Further, the step of connecting the isolation signal to the second part of the address lines of the first programmable read-only memory comprises: The A of chip 27256 13 -A 14 The address line is inputted from the input end of the first counter, and the output end of the first counter is connected to the input ends of a plurality of LED digital tubes after being passed through a decoder.
[0009] Furthermore, the output end of the buffer is connected to the input ends of a plurality of LED digital tubes respectively, and further comprises: The output end of the buffer is connected to the input ends of multiple LED digital tubes through integrated resistors.
[0010] Furthermore, the conversion into standard binary code includes: The counted subdivision signal is converted into a standard binary code through the second programmable read-only memory.
[0011] Furthermore, the second programmable read-only memory adopts chip 2764.
[0012] In a second aspect, the present application proposes a photoelectric code disk measurement result display system, comprising: A subdivision module is used to subdivide the sine and cosine square wave signals output by the photoelectric encoder to obtain subdivided signals; A conversion module, used for counting the subdivided signal and then converting it into a standard binary code; An isolation module, used for flipping and isolating the standard binary code to obtain an isolation signal; A first programming module is used to connect the isolation signal to a first part of address lines of a first programmable read-only memory, wherein the digital combinations of the isolation signals connected to the first part of address lines correspond to different address units of the first programmable read-only memory and to the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder disk; A second programming module is used to connect the isolation signal to the second part of the address lines of the first programmable read-only memory, the digital combinations of the isolation signals connected to the second part of the address lines respectively correspond to the selected LED digital tubes from the plurality of LED digital tubes; the plurality of LED digital tubes respectively correspond to the digits of different digits of the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder, and the number of the LED digital tubes is determined according to the display accuracy; A control signal module, used for decoding the output of the first programmable read-only memory into control signals of different LED segments in the plurality of LED digital tubes according to a digital combination of the isolation signals connected to the first part of the address lines and the second part of the address lines; The display module is used to input the control signal into a plurality of LED digital tubes to display the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder.
[0013] Furthermore, in the conversion module, the subdivision signal is counted by a counter 74HC193.
[0014] In a third aspect, the present application proposes a computer program product, which includes instructions, and when the instructions are executed by a processor, the above-mentioned method for displaying measurement results of a photoelectric code disk is implemented.
[0015] Compared with the prior art, this application has the following beneficial effects: The present application proposes a method for displaying the measurement results of a photoelectric encoder disk, which subdivides the sine-cosine square wave signal output by the photoelectric encoder disk, and then counts and converts it into a standard binary code. After flipping and isolating, the measurement results of the photoelectric encoder disk are displayed through multiple LED digital tubes by cleverly using a first programmable read-only memory. The present application can use a counter and a first programmable read-only memory to transform the sine-cosine square wave signal of an incremental photoelectric encoder disk into a decimal number that can be displayed by an LED digital tube, and display it on an LED digital tube, thereby completing the measurement and display of the angular displacement of the photoelectric encoder disk on the rotation of the shaft. The present application can directly adjust the display accuracy of the LED digital tube by reasonably selecting the first programmable read-only memory to be used. It is flexible to use and has a low implementation cost. In practical applications, the circuit construction is simple and the anti-interference ability is strong. It can also be applied to other similar test equipment.
[0016] The present application also proposes a photoelectric code disk measurement result display system and a computer program product, which have all the advantages of the above-mentioned photoelectric code disk measurement result display method. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A schematic diagram of a method for displaying measurement results of a photoelectric encoder according to the present application; Figure 2 This is a schematic diagram of the first part of the implementation principle of a method for displaying measurement results of a photoelectric encoder in this application; Figure 3 This is a schematic diagram of the second part of the implementation principle of a method for displaying measurement results of a photoelectric encoder in this application; Figure 4 This is a schematic diagram of a photoelectric encoder measurement result display system of the present application. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations.
[0020] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0021] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0022] In the description of the embodiments of the present application, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the drawings, or the orientation or position relationship in which the invented product is usually placed when used. It is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0023] In addition, if the term "horizontal" appears, it does not mean that the component is required to be absolutely horizontal, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", which does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0024] In the description of the embodiments of the present application, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal connection of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0025] Using a photoelectric encoder to measure the angular displacement of a rotating shaft is a common and accurate method. The photoelectric encoder consists of a code disc (grating disc) and a photoelectric detection device. The code disc is a circular plate of a certain diameter with several rectangular holes opened in equal parts, or with reflective and translucent areas engraved to form a fixed coding pattern. The photoelectric detection device is composed of electronic components such as photodiodes, which are used to transmit and receive light signals. When the code disc rotates with the rotating shaft, the photoelectric detection device will generate corresponding electrical signal outputs according to the translucent or reflective areas on the code disc. After processing, these output electrical signals can reflect the angular displacement of the rotating shaft.
[0026] Photoelectric encoders are generally divided into two types: absolute and incremental. When measuring with the absolute type, the angle of rotation can be determined based on the starting and ending positions of the encoder, regardless of the intermediate process. The incremental photoelectric encoder only reads the relative incremental value of the angle of rotation. The absolute photoelectric encoder has high precision and is easy to use, but it is expensive and not suitable for piece and small batch production. The incremental photoelectric encoder is cheap and has high precision, but it is inconvenient to use and requires a more complex peripheral circuit.
[0027] At present, microcomputers or microprocessors are often used to distinguish and process data to obtain corresponding results. Microcomputers or microprocessors receive output signals from photoelectric encoders through specific interface circuits. These interface circuits are responsible for converting the electrical signals of the photoelectric encoders into digital signals that can be recognized by the microprocessor. For incremental photoelectric encoders, the microprocessor analyzes the phase relationship between the A-phase and B-phase pulse signals to determine the direction of rotation, and measures the displacement by counting the number of pulses. For absolute photoelectric encoders, the microprocessor directly reads the output digital code without the need for a complex decoding process. When processing data, direction judgment and displacement calculation need to be performed. When judging the direction, for incremental photoelectric encoders, the microprocessor judges the direction of rotation by comparing the order of A-phase and B-phase pulses. When performing displacement calculation, whether it is an incremental photoelectric encoder or an absolute photoelectric encoder, the microprocessor can calculate the current displacement based on the received signal. For incremental photoelectric encoders, this is achieved by counting the number of pulses. For absolute photoelectric encoders, the digital code is directly read and converted into displacement. After processing, the microprocessor outputs the results to external devices or systems. These results may include information such as the current displacement, rotation direction, speed, etc., depending on the application requirements.
[0028] However, in the current method of using a microcomputer or a microprocessor for identification and data processing, the absolute photoelectric encoder is expensive, the incremental photoelectric encoder is inconvenient to use, and requires a more complex peripheral circuit.
[0029] Based on the above situation, the present application proposes a method, system and computer program product for displaying measurement results of a photoelectric code disk. The present application is described in detail below in conjunction with embodiments and drawings.
[0030] like Figure 1 FIG. 1 is a flow chart of a method for displaying measurement results of a photoelectric encoder according to the present application, which may include: S101, subdividing the sine-cosine square wave signal output by the photoelectric encoder to obtain a subdivided signal.
[0031] The sine and cosine square wave signals output by the photoelectric encoder usually have a fixed period and amplitude, and there is a fixed phase difference between the two. These signals can be shaped and processed by specific circuits, such as differential amplifiers and comparators, to obtain square wave signals that are easier to process. In practical applications, the sine and cosine square wave signals can be further processed to identify more details of the sine and cosine square wave signals within one period, thereby achieving higher resolution measurement of displacement or angle.
[0032] S102, counting the subdivided signal and converting it into a standard binary code.
[0033] In practical applications, the subdivision signal is usually a series of high-frequency pulses, each pulse represents a small angle or displacement of the photoelectric encoder. These high-frequency pulses can be accumulated by a counter. Each time a pulse arrives, the counter is increased or decreased by 1 according to the direction of rotation to obtain the total angle or displacement. If the counter counts in non-binary code, it also needs to be converted into binary code.
[0034] S103, after flipping and isolating the standard binary code, obtaining an isolation signal.
[0035] In practical applications, flipping is to invert each bit in the standard binary code, that is, 0 becomes 1, 1 becomes 0, which can be used to change the logic level of the signal. Isolation operation refers to electrically isolating the flipped standard binary code from other signals or circuits. Flipping and isolation can prevent interference or short circuits.
[0036] S104, connecting the isolation signal to the first part of the address lines of the first programmable read-only memory, the digital combinations of the isolation signals connected to the first part of the address lines respectively correspond to different address units of the first programmable read-only memory and correspond to the rotation angle represented by the sine-cosine square wave signals output by the photoelectric encoder.
[0037] The isolation signal is a standard binary code obtained after flipping and isolating operations, representing a certain quantitative value of the angle or displacement of the photoelectric code disk. Each address unit in the first programmable read-only memory corresponds to a unique address code, which is determined by the connected address line. Since the isolation signal represents the angle of the photoelectric code disk, each address unit can correspond to a specific rotation angle output by the photoelectric code disk. In practical applications, during the programming process of the first programmable read-only memory, the address code corresponding to each rotation angle can be determined according to the resolution and measurement range of the photoelectric code disk, and these address codes are mapped to the storage units in the first programmable read-only memory to ensure that each rotation angle can find the corresponding storage unit. In addition, it should be noted that the specific selection of the first part of the address lines can be designed accordingly according to the actual selection of the first programmable read-only memory.
[0038] S105, connecting the isolation signal to the second part of the address lines of the first programmable read-only memory, wherein the digital combinations of the isolation signals connected to the second part of the address lines correspond to the selected LED digital tubes from a plurality of LED (Light Emitting Diode) digital tubes; the plurality of LED digital tubes correspond to the digits of different digits of the rotation angle represented by the sine-cosine square wave signals output by the photoelectric encoder, and the number of the LED digital tubes is determined according to the display accuracy.
[0039] Here, the isolated signal is connected to the second part of the address lines of the first programmable read-only memory, and these address lines are further used to select one or more specific LED digital tubes in multiple LED digital tubes to realize the digital display of the rotation angle output by the photoelectric encoder. In the present application, the isolated signal is used as the basis for selecting the LED digital tube at the second part of the address lines, and the specific LED digital tube is activated by different digital combinations. In practical applications, the number of address lines to be used can be determined according to the number of LED digital tubes and the display accuracy requirements, and the corresponding number of bits of the isolated signal can be connected to the second part of the address lines of the first programmable read-only memory. These address lines will directly control the selection of the LED digital tube.
[0040] As an application method, each LED digital tube can display a number, and these numbers can be combined to represent the degree of rotation output by the photoelectric encoder. In practical applications, a lookup table can be stored in the first programmable read-only memory, and the digital combination corresponding to the isolated signal is associated with the display content of the LED digital tube through the lookup table. In addition, more LED digital tubes mean higher display accuracy, but at the same time, more address lines and more complex circuits are required, which can be specifically designed according to usage needs.
[0041] S106, decoding the output of the first programmable read-only memory into control signals of different LED segments in the plurality of LED digital tubes according to the digital combination of the isolation signals connected to the first part of the address lines and the second part of the address lines.
[0042] The first part of the address line and the second part of the address line are respectively connected to different bits of the isolation signal, and these bits are combined to form a unique address code. This address code is used to select a specific storage unit in the first programmable read-only memory, and the storage unit contains control information related to the display of the LED digital tube. In practical applications, the output of the first programmable read-only memory is determined according to the content in the storage unit read by the address code. These contents are usually control signals stored in binary form. These control signals are used to control the light and dark of different LED segments in the LED digital tube, so as to display specific numbers. If the output of the first programmable read-only memory is a control signal that directly corresponds to the LED segment, then these signals can be directly sent to the driver of the LED digital tube. If the output of the first programmable read-only memory needs to be further decoded to obtain the control signal of the LED segment, a decoder or other circuit elements can also be used to implement this decoding process. Each LED digital tube is composed of multiple LED segments, and each LED segment corresponds to a specific control signal. Through the control signal, different digital displays can be combined.
[0043] S107, inputting the control signal into a plurality of LED digital tubes for displaying the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder.
[0044] The following is another embodiment of a method for displaying measurement results of a photoelectric code disk of the present application. The present application is further described in detail by way of example. Figure 2 and Figure 3 FIG. 1 is a schematic diagram showing the implementation principle of a method for displaying measurement results of a photoelectric encoder, wherein: Figure 2 This is the first part of the schematic diagram of the implementation principle of a method for displaying measurement results of a photoelectric encoder. Figure 3 The second part of the schematic diagram of the implementation principle of a method for displaying measurement results of a photoelectric encoder disk may include: S201, subdividing the sine and cosine square wave signals output by the photoelectric encoder through a differential circuit.
[0045] S202, after being counted by the second counter 74HC193, the signal is input into two second programmable read-only memories, the second programmable read-only memories use chip 2764, and chip 2764 converts the counted signal into standard binary code.
[0046] S203, the standard binary code passes through the inverter, drives the photoelectric isolation circuit to prevent interference, and is input into the first programmable read-only memory. The first programmable read-only memory uses chip 27256. After being decoded by the internal program in chip 27256, the corresponding digital code is input into multiple LED digital tubes. This corresponding digital code is the digital code of the angular displacement corresponding to the standard binary number.
[0047] At this time, multiple LED digital tubes can display the angle of the shaft. The specific method of using chip 27256 to make multiple LED digital tubes display the angle of the shaft is: The isolation signal is a twelve-bit binary number. For example, the device accuracy requirement is 0.1°, so 3599 = EOFH, which is twelve bits. Each binary number corresponds to a rotation angle, for example, 000H is 0.0°, 00FH is 1.5°, EOFH is 359.90°, etc. Connect these binary numbers to the chip 27256 ~ The OE and CE pins of chip 27256 are connected to the ground line, and the output of chip 27256 is connected to the input of buffer 74HC541. Buffer 74HC541 is an 8-bit in-phase buffer with three-state output. ~ The address line is input by the first counter 74HC4060, which is a binary serial counter with its own oscillator. The oscillation frequency can be set to about 50Hz. The output of the first counter 74HC4060 controls four LED digital tubes through the decoder 74HC139. In practical applications, ~ When the address lines are 00, 01, 10, and 11, the tenth, ones, tens, and hundreds of the LED digital tube are selected respectively. Therefore, each state of the twelve-bit binary number corresponds to an address unit of chip 27256. This means that each rotation angle of the shaft (with an accuracy of 0.1°) has a corresponding address unit in chip 27256.
[0048] For example, if the shaft rotates 1.2° (starting from zero), the binary code obtained can be expressed as OCH, which is the number of chip 27256. ~ The output of the address lines is:
[0049] Plus the data read from the decoder 74HC139 ~ The data of the address line, the total input of the address line of chip 27256 is:
[0050] It should be noted that, in this embodiment, The address lines are not used and are indicated by "X". State 1 to State 4 correspond to ~ Data on the address lines.
[0051] The output of chip 27256 corresponding to state 1 to state 4 is ~ The corresponding programming is:
[0052] Among them, chip 27256 ~ The LED digital tubes a~g are respectively corresponding to the state 1~state 4, and the first counter 74HC4060 selects the LED digital tubes representing the tenth place, the one place, the tenth place, and the hundredth place respectively. The output of the four LED digital tubes can be displayed as "1.2" (where the tenth and hundredth places are blanked), realizing the angle output.
[0053] For another example, the actual angle of the shaft is 349.8°, and the twelve-bit binary number is DAAH. Then the total input of chip 27256 is:
[0054] The programming output corresponding to chip 27256 is:
[0055] Because 7FH, 77H, 53H, and 67H correspond to "8943" respectively in the LED digital tube, the output of the four LED digital tubes is displayed as "349.8".
[0056] From this, it can be seen that the programming procedure of chip 27256 actually establishes a table, which corresponds to the input signal and obtains the output digital display signal, thereby obtaining the correct shaft angle display.
[0057] In practical applications, since the reset terminal Z of the photoelectric encoder is connected to the reset terminals of four second counters 74HC193 through a 10K current-limiting resistor, when the shaft reverses, the second counter 74HC193 decreases from FFFH. As long as the decremented binary number is stored in the chip 27256 in correspondence with the LED digital tube according to the above method, the reversal angle value can be correctly displayed.
[0058] In summary, if four LED digital tubes are controlled by conventional general methods, four EPROMs (Erasable Programmable Read-Only Memory) and four bus drivers must be used. This not only increases the hardware circuit, but also the current consumed by the LED digital tubes in this case is above 0.4A, which increases the power consumption.
[0059] like Figure 2In the above embodiment, four LED digital tubes are displayed in time-sharing mode and are controlled by the first counter 74HC4060. When the oscillation frequency of the first counter 74HC4060 is set to about 50 Hz, the human eye cannot distinguish the flickering of the digital tube. The method of the present application not only saves hardware circuits, but also makes the current consumption of the digital tube about 0.1A, greatly reducing power.
[0060] Therefore, the photoelectric encoder measurement result display method of this application has the following characteristics: (1) Simple and high precision. The chip 27256 is used to realize angle display. The circuit is simple and easy to master. It can not only realize the display of the rotation axis with an accuracy of 0.1°, but also successfully realize the display accuracy of 0.01° by changing the internal encoding program in the chip 27256.
[0061] (2) Low consumption probability. Using the first counter 74HC4060 to control the LED digital tube in time-sharing not only simplifies the circuit, but also enables the 32 light-emitting diodes in the four LED digital tubes to display in time, reducing the total power consumption of the circuit by nearly 1 / 4 compared with the commonly used circuit, saving energy.
[0062] (3) Low cost and strong applicability. The present application directly uses EPROM to realize angle display, which is not only low cost, simple circuit, strong anti-interference ability, but also very suitable for the display of other related products.
[0063] The present application can successfully transform the sine and cosine square wave output of the incremental photoelectric code disk into a +-base number by using chip 2764 and chip 27256, and display it on the LED digital tube, thus completing the angular displacement measurement and display of the rotating shaft. It can not only greatly simplify the hardware circuit and significantly reduce the cost, but also effectively improve the conversion speed. By programming chip 27256, the function of code conversion can be arbitrarily changed, and good results have been obtained after practical application.
[0064] like Figure 4 As shown, the present application also proposes a photoelectric code disk measurement result display system, comprising: A subdivision module is used to subdivide the sine and cosine square wave signals output by the photoelectric encoder to obtain subdivided signals; A conversion module, used for counting the subdivided signal and then converting it into a standard binary code; An isolation module, used for flipping and isolating the standard binary code to obtain an isolation signal; A first programming module is used to connect the isolation signal to a first part of address lines of a first programmable read-only memory, wherein the digital combinations of the isolation signals connected to the first part of address lines correspond to different address units of the first programmable read-only memory and to the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder disk; A second programming module is used to connect the isolation signal to the second part of the address lines of the first programmable read-only memory, the digital combinations of the isolation signals connected to the second part of the address lines respectively correspond to the selected LED digital tubes from the plurality of LED digital tubes; the plurality of LED digital tubes respectively correspond to the digits of different digits of the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder, and the number of the LED digital tubes is determined according to the display accuracy; A control signal module, used for decoding the output of the first programmable read-only memory into control signals of different LED segments in the plurality of LED digital tubes according to a digital combination of the isolation signals connected to the first part of the address lines and the second part of the address lines; The display module is used to input the control signal into a plurality of LED digital tubes to display the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder.
[0065] It should be noted that in the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of each module is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another device, or some features can be ignored or not executed. The module described as a separate component may or may not be physically separated. The component displayed as a module may be a physical unit or multiple physical units, that is, it may be located in one place, or it may be distributed in multiple different places. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0066] In addition, each module in each embodiment of the present invention may be integrated into a processing unit, each module may exist physically separately, or two or more modules may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.
[0067] The present application also proposes a computer program product, which includes instructions, and when the instructions are executed by a processor, the steps in the above-mentioned method for displaying the measurement results of the photoelectric encoder are implemented. Alternatively, when the processor executes the computer program, the functions of each module / unit in the above-mentioned system embodiment are implemented.
[0068] The computer program may be divided into one or more modules / units, and the one or more modules / units are stored in a memory and executed by the processor to accomplish the present invention.
[0069] The carrier for implementing the above-mentioned computer program product may be a computer device, or the computer program product may be stored in a computer storage medium.
[0070] The computer device may be a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The computer device may include, but is not limited to, a processor and a memory.
[0071] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0072] The memory may be used to store the computer programs and / or modules, and the processor implements various functions of the computer device by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory.
[0073] If the module / unit integrated in the computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0074] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for displaying measurement results of a photoelectric encoder, characterized in that: include: Subdivide the sine and cosine square wave signals output by the photoelectric encoder to obtain subdivided signals; Counting the subdivided signal and converting it into a standard binary code; After flipping and isolating the standard binary code, an isolated signal is obtained; Connecting the isolation signal to the first part of the address lines of the first programmable read-only memory, the digital combinations of the isolation signal connected to the first part of the address lines respectively correspond to different address units of the first programmable read-only memory and correspond to the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder; The isolation signal is connected to the second part of the address line of the first programmable read-only memory, and the digital combination of the isolation signal connected to the second part of the address line corresponds to the selected LED digital tubes among the multiple LED digital tubes; the multiple LED digital tubes correspond to the digits of different digits of the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder, and the number of the LED digital tubes is determined according to the display accuracy; Decoding the output of the first programmable read-only memory into control signals of different LED segments in the plurality of LED digital tubes according to the digital combination of the isolation signal connected to the first part of the address line and the second part of the address line; The control signal is input to a plurality of LED digital tubes to display the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder.
2. A method for displaying measurement results of a photoelectric encoder according to claim 1, characterized in that: The first programmable read-only memory uses chip 27256; The first part of the address lines are A0-A of chip 27256 11 Address lines; The second part of the address line is the A of chip 27256 13 -A 14 Address lines.
3. A method for displaying measurement results of a photoelectric encoder according to claim 2, characterized in that: The method of connecting the isolation signal to a first portion of address lines of a first programmable read-only memory comprises: Connect the isolated signal to A0-A of chip 27256 11 The output of chip 27256 is connected to the input terminals of the buffer respectively, and the output terminals of the buffer are connected to the input terminals of multiple LED digital tubes respectively.
4. A method for displaying measurement results of a photoelectric encoder according to claim 3, characterized in that: The method of connecting the isolation signal to the second part of the address lines of the first programmable read-only memory comprises: The chip 27256 A 13 -A 14 The address line is input from the input end of the first counter, and the output end of the first counter is connected to the input ends of a plurality of LED digital tubes after passing through a decoder.
5. A method for displaying measurement results of a photoelectric encoder according to claim 4, characterized in that: The output end of the buffer is connected to the input ends of a plurality of LED digital tubes respectively, and further comprises: The output end of the buffer is connected to the input ends of multiple LED digital tubes through integrated resistors.
6. A method for displaying measurement results of a photoelectric encoder according to claim 5, characterized in that: The conversion into standard binary code comprises: The counted subdivision signal is converted into a standard binary code through the second programmable read-only memory.
7. A method for displaying measurement results of a photoelectric encoder according to claim 6, characterized in that: The second programmable read-only memory uses chip 2764.
8. A photoelectric encoder measurement result display system, characterized in that: include: A subdivision module is used to subdivide the sine and cosine square wave signals output by the photoelectric encoder to obtain subdivided signals; A conversion module, used for counting the subdivided signal and then converting it into a standard binary code; An isolation module, used for flipping and isolating the standard binary code to obtain an isolation signal; A first programming module is used to connect the isolation signal to a first part of address lines of a first programmable read-only memory, wherein the digital combinations of the isolation signals connected to the first part of address lines correspond to different address units of the first programmable read-only memory and to the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder disk; A second programming module is used to connect the isolation signal to the second part of the address lines of the first programmable read-only memory, the digital combinations of the isolation signals connected to the second part of the address lines respectively correspond to the selected LED digital tubes from the plurality of LED digital tubes; the plurality of LED digital tubes respectively correspond to the digits of different digits of the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder, and the number of the LED digital tubes is determined according to the display accuracy; A control signal module, used for decoding the output of the first programmable read-only memory into control signals of different LED segments in a plurality of LED digital tubes according to a digital combination of the isolation signals connected to the first part of the address lines and the second part of the address lines; The display module is used to input the control signal into a plurality of LED digital tubes to display the rotation angle represented by the sine-cosine square wave signal output by the photoelectric encoder.
9. A photoelectric encoder measurement result display system according to claim 8, characterized in that: In the conversion module, the subdivision signal is counted by a counter 74HC193.
10. A computer program product, characterized in that: The computer program product comprises instructions, and when the instructions are executed by a processor, a method for displaying measurement results of a photoelectric encoder according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Photoelectric encoder rotating pulse display device
CN103162725A
Signal processing method and system for incremental encoders
CN109855661A
Single-chip digital absolute value photoelectric angle position coding method
CN117848395A
Measurement device for power factor
CN205388622U
Digital circuit device for measuring nonlinear electricity
CN2234622Y