Position feedback method, system and device, computer equipment, readable storage medium and program product
By working collaboratively between the controller and the position encoder, different position feedback instructions and information acquisition instructions are generated according to the business type, solving the problem of inaccurate position feedback in the prior art and achieving high-precision position information acquisition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-04-03
AI Technical Summary
In existing technologies, the location feedback method cannot be switched according to different business scenarios, resulting in insufficient accuracy of location feedback.
By receiving the location feedback instruction determined by the controller based on the service type, the corresponding location information acquisition instruction is generated, and the location encoder acquires the absolute or incremental location information and returns it to the controller, thereby achieving accurate location feedback based on the service type.
This ensures the accuracy of location information acquisition, adapts to the needs of different business types, and improves the precision and reliability of motion control.
Smart Images

Figure CN121785381A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automation technology, and in particular to a position feedback method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology
[0002] In many industrial fields such as automation control, robotics, CNC machine tools, servo drives, and precision measuring instruments, accurate and reliable position feedback is the core foundation for achieving high-performance motion control. Position sensors (such as encoders and rotary transformers) are responsible for detecting the physical position, velocity, and acceleration of rotary or linear axes in real time and feeding this information back to the control system.
[0003] In related technologies, location feedback generally adopts incremental location feedback or absolute location feedback, which cannot realize the adoption of different location feedback methods based on different business scenarios, and cannot guarantee the accuracy of location feedback. Summary of the Invention
[0004] Therefore, it is necessary to provide a position feedback method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of position feedback in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a position feedback method applied to a driver, the method comprising:
[0006] Receive location feedback instructions; the instruction type of the location feedback instructions is determined by the controller based on the current service type.
[0007] Based on the instruction type of the location feedback instruction, a location information acquisition instruction is generated and sent to the location encoder;
[0008] Receive position information returned by the position encoder, which is obtained by the position encoder according to the position information acquisition command;
[0009] The location information is returned to the controller.
[0010] In one embodiment, the location feedback method further includes: obtaining the association between a pre-generated instruction type and a location information acquisition instruction; and determining a location information acquisition instruction based on the instruction type and association between the location feedback instruction and the location information acquisition instruction.
[0011] In one embodiment, generating a location information acquisition instruction based on the instruction type of the location feedback instruction and sending the location information acquisition instruction to the location encoder includes: when the instruction type of the location feedback instruction indicates that the feedback instruction is an absolute location feedback instruction, generating an absolute location information acquisition instruction and sending the absolute location information acquisition instruction to the location encoder; receiving location information returned by the location encoder includes: receiving absolute location information returned by the location encoder, wherein the absolute location information is obtained by the location encoder according to the absolute location information acquisition instruction.
[0012] In one embodiment, generating a location information acquisition instruction based on the instruction type of the location feedback instruction and sending the location information acquisition instruction to the location encoder includes: generating an incremental location information acquisition instruction when the instruction type of the location feedback instruction indicates that the feedback instruction is an incremental location feedback execution, and sending the incremental location information acquisition instruction to the location encoder; receiving location information returned by the location encoder includes: receiving incremental location information returned by the location encoder, wherein the incremental location information is obtained by the location encoder according to the incremental location information acquisition instruction.
[0013] Secondly, this application provides a position feedback method applied to a controller, the method comprising:
[0014] Obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, generate the location feedback instruction based on the instruction type, and send the generated location feedback instruction to the driver;
[0015] The position information returned by the receiving driver is obtained by the position encoder according to the position information acquisition instruction. The position information acquisition instruction is generated by the driver after parsing the position feedback instruction to obtain the instruction type of the position feedback instruction.
[0016] Thirdly, this application provides a location feedback system, the system comprising:
[0017] The controller is used to obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, generate the location feedback instruction based on the instruction type, and send the generated feedback instruction to the driver;
[0018] The driver is used to receive position feedback commands, parse position feedback commands, determine the command type of position feedback commands, generate position information acquisition commands based on the command type of position feedback commands, receive position information acquired by the feedback ruler based on the position information acquisition commands, and send the position information to the controller.
[0019] The feedback ruler is used to receive position information acquisition instructions, control the sensor to acquire position information according to the position acquisition instructions, and send the acquired position information to the driver.
[0020] The sensor is used to acquire position information and send it to the feedback ruler.
[0021] Fourthly, this application provides a position feedback device, the device comprising:
[0022] The instruction receiving module is used to receive location feedback instructions. The instruction type controller for the location feedback instructions is determined according to the current service type.
[0023] The first instruction generation module is used to generate a location information acquisition instruction based on the instruction type of the location feedback instruction, and send the location information acquisition instruction to the location encoder.
[0024] The location information receiving module is used to receive the location information returned by the location encoder, which is obtained by the location encoder according to the location information acquisition instruction.
[0025] The location information sending module is used to return location information to the controller.
[0026] Fifthly, this application provides a position feedback device, the device comprising:
[0027] The second instruction generation module is used to obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, generate the location feedback instruction based on the instruction type, and send the generated location feedback instruction to the driver.
[0028] The position information receiving module is used to receive position information returned by the driver. The position information is obtained by the position encoder according to the position information acquisition instruction. The position information acquisition instruction is generated by the driver after parsing the position feedback instruction to obtain the instruction type of the position feedback instruction.
[0029] Sixthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method embodiments.
[0030] In a seventh aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method embodiments.
[0031] Eighthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the above-described method embodiments.
[0032] The aforementioned location feedback method, apparatus, computer equipment, computer-readable storage medium, and computer program product, in the aforementioned location feedback method, different location feedback instructions are determined according to different business types, and different location information acquisition instructions are generated based on the different location feedback instructions, and location information is acquired based on the different location information acquisition instructions. This can achieve the acquisition of different location information according to different business types, ensuring the accuracy of location information acquisition. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a block diagram of a position feedback system in one embodiment;
[0035] Figure 2 This is a flowchart illustrating a position feedback method in one embodiment;
[0036] Figure 3 This is a flowchart illustrating the position feedback method in another embodiment;
[0037] Figure 4 This is a flowchart illustrating the position feedback method in another embodiment;
[0038] Figure 5 This is a schematic diagram of the signaling interaction process of the location feedback method in one embodiment;
[0039] Figure 6 This is a structural block diagram of a position feedback device in one embodiment;
[0040] Figure 7 This is a structural block diagram of the position feedback device in another embodiment;
[0041] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0043] In one embodiment, such as Figure 1 As shown, a position feedback system 100 is provided.
[0044] In an alternative embodiment, the position feedback system 100 includes a controller 102, a driver 104, a position encoder 106, and a sensor 108.
[0045] Optionally, the controller 102 is used to obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, generate the location feedback instruction based on the instruction type, and send the location feedback instruction to the driver.
[0046] In one embodiment, the controller can be a terminal, a server, or a system that includes both a terminal and a server.
[0047] Optionally, the driver 104 is configured to receive position feedback instructions, parse the position feedback instructions, determine the instruction type of the position feedback instructions, generate a position information acquisition instruction based on the instruction type of the position feedback instructions, receive the position information acquired by the position encoder based on the position information acquisition instruction, and send the position information to the controller.
[0048] In one embodiment, the driver can be a terminal, a server, or a system that includes both a terminal and a server.
[0049] Optionally, the position encoder 106 is used to receive a position information acquisition instruction, control the sensor to acquire position information according to the position acquisition instruction, and send the acquired position information to the driver.
[0050] In one alternative embodiment, the position encoder can be a feedback ruler. Optionally, the feedback ruler can be a grating ruler, encoder, or electronic ruler, etc.
[0051] Optionally, sensor 108 is used to acquire position information and send it to the position encoder.
[0052] In one embodiment, sensor 108 is mounted on position encoder 106.
[0053] In one embodiment, the controller 102 is communicatively connected to the driver 104 to enable data interaction between the controller and the driver. For example, the controller sends a position feedback command to the driver via the communication connection, and the driver sends the acquired position information back to the controller. Exemplarily, the communication protocol between the controller 102 and the driver 104 can be EtherCAT (Ethernet for Control Automation Technology, Industrial Real-Time Ethernet Protocol).
[0054] In an optional embodiment, the driver 104 is communicatively connected to the position encoder 106 to enable data interaction between the driver and the position encoder. For example, the driver sends a position information acquisition command to the position encoder via the communication connection, and the position encoder sends the position information back to the driver. Exemplarily, the communication protocol between the driver 104 and the position encoder 106 can be RS-485 ("Electrical / Physical Layer" standard).
[0055] In an optional embodiment, the position encoder 106 is communicatively connected to the sensor 108 to enable data interaction between the position encoder and the sensor. For example, the position encoder sends a command to the sensor to acquire position information, and the sensor transmits the acquired position information back to the position encoder. Exemplarily, the communication protocol between the position encoder 106 and the sensor 108 can be SPI (Serial Peripheral Interface).
[0056] In one embodiment, the sensor may be a Hall sensor or an AMR sensor (Anisotropic Magneto-Resistive, a "magnetoresistive" magnetic field / angle sensor).
[0057] In an alternative embodiment, the enable duration for the controller to send position feedback commands to the driver is relatively short.
[0058] Optionally, the enable duration for the driver to send the position information acquisition command to the position encoder is relatively long to ensure that the position encoder can acquire the position information acquisition command. For example, the enable duration for the position encoder to send the position information acquisition command can be four communication cycles of the position encoder.
[0059] Optionally, after receiving the position information acquisition command sent by the driver, the position encoder performs calculations based on the position information acquisition command, such as generating position information acquisition control information, and sends the position information acquisition control information to the sensor so that the sensor can acquire the relevant position information. After receiving the position information transmitted by the sensor, the encoder can reverse the enable of the driver to turn it off, such as sending feedback information to the driver indicating that the position information acquisition control command has been acquired, so as to prompt the driver not to maintain the state of sending position information acquisition control commands.
[0060] In the above embodiments, the controller generates different position feedback commands based on different service types, the driver generates different position information acquisition commands based on the different position feedback commands, and the position encoder acquires position information based on the different position information acquisition commands. This allows for the acquisition of different position information according to different service types, ensuring the accuracy of position information acquisition. Furthermore, the above components are decoupled and do not interfere with each other.
[0061] In one exemplary embodiment, such as Figure 2 As shown, a position feedback method is provided, which is applied to... Figure 1 Taking the driver in the example, the explanation includes the following steps 202 to 208. Wherein:
[0062] Step 202: Receive location feedback command.
[0063] The position feedback command is used to instruct the driver to perform the position information acquisition step.
[0064] Understandably, in many industrial fields such as automation control, robotics, CNC machine tools, servo drives, and precision measuring instruments, accurate and reliable position feedback is the core of achieving high-performance motion control. Accurate and efficient position feedback is particularly important. Therefore, when position feedback is required, position feedback commands can be generated, and position feedback can be achieved based on these commands.
[0065] For example, the step of the driver performing position information acquisition can be to send an instruction to the position encoder to acquire position information.
[0066] In one embodiment, location information may include, but is not limited to, absolute location information and incremental location information.
[0067] Optionally, the position feedback command is generated by the controller.
[0068] In one embodiment, the controller can obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, and generate the location feedback instruction based on the instruction type.
[0069] In an optional embodiment, when the current service type is a first service type, the instruction type of the generated location feedback instruction can be the first instruction type. For example, when the current service type represents the current service as power-on or power-off time, the instruction type of the generated location feedback instruction can be the first instruction type.
[0070] In an optional embodiment, when the current service type is the second service type, the instruction type of the generated location feedback instruction can be the second instruction type. For example, when the current service type represents a time when the current service is not powered on or off, the instruction type of the generated location feedback instruction can be the second instruction type.
[0071] The first instruction type is used to characterize the position feedback instruction as an instruction to obtain absolute position information.
[0072] The second instruction type is used to characterize the position feedback instruction as an instruction to obtain incremental position information.
[0073] In one embodiment, after generating a position feedback command, the controller can encapsulate the position feedback command into a message and send it to the driver.
[0074] Optionally, after receiving a message encapsulating a position feedback instruction, the driver parses the message to obtain the position feedback instruction included in the message, and determines the instruction type of the position feedback instruction so as to adopt different processing methods according to different instruction types. For example, different position information acquisition instructions are generated according to different instruction types of the position feedback instruction.
[0075] Step 204: Generate a location information acquisition instruction based on the instruction type of the location feedback instruction, and send the location information acquisition instruction to the location encoder.
[0076] The location information acquisition instruction is used to instruct the location encoder to acquire location information.
[0077] In one embodiment, the association between the pre-generated instruction type and the location information acquisition instruction is obtained, and the location information acquisition instruction is determined based on the instruction type and association between the location feedback instruction and the location information acquisition instruction.
[0078] In one embodiment, different instruction types correspond to different location information acquisition instructions, so as to instruct the location encoder to acquire different types of location information.
[0079] For example, when the instruction type of the position feedback instruction indicates that the feedback instruction is an absolute position feedback instruction, an absolute position information acquisition instruction is generated and sent to the position encoder.
[0080] Optionally, after receiving an absolute position information acquisition command, the position encoder acquires the absolute position information. For example, the position encoder controls the sensor to acquire the absolute position information.
[0081] In one embodiment, when the instruction type identifier of the position feedback instruction is incremental position feedback execution, an incremental position information acquisition instruction is generated and sent to the position encoder.
[0082] Optionally, after receiving an incremental position information acquisition command, the position encoder acquires the incremental position information. For example, the position encoder controls the sensor to acquire the incremental position information.
[0083] In one embodiment, there may be at least two sensors, with different sensors used to acquire absolute position information and incremental position information respectively.
[0084] Optionally, there may be only one sensor. The sensor acquires either absolute position information or incremental position information based on the different control information received from the position encoder. For example, if the control information received by the sensor from the position encoder indicates that absolute position information is required, the sensor acquires the absolute position information; if the control information received by the sensor from the position encoder indicates that incremental position information is required, the sensor acquires the incremental position information.
[0085] In one embodiment, the position encoder can be an encoder that determines the type of position information acquisition instruction received from the driver, so that the position encoder can generate corresponding position information acquisition control information and use the position information acquisition control information to control the sensor to acquire the corresponding position information.
[0086] Step 206: Receive the position information returned by the position encoder.
[0087] The location information is obtained by the location encoder according to the location information acquisition instruction.
[0088] Optionally, the position encoder acquires different position information depending on the position acquisition command.
[0089] For example, if the position encoder receives a position acquisition command indicating that absolute position information needs to be acquired, the position encoder controls the sensor to acquire the absolute position information.
[0090] For example, if the position encoder receives a position acquisition command indicating that incremental position information needs to be acquired, the position encoder controls the sensor to acquire the incremental position information.
[0091] In an optional embodiment, after the position encoder acquires the position information according to the received position information acquisition instruction, it sends the acquired position information to the driver.
[0092] For example, if the position encoder receives an absolute position feedback command, the position encoder acquires the absolute position information and returns the absolute position information to the driver.
[0093] For example, if the position encoder receives an incremental position feedback command, the position encoder acquires the incremental position information and returns the incremental position information to the driver.
[0094] In one embodiment, after acquiring absolute or incremental position information, the position encoder can encapsulate the absolute or incremental position information into a message and return it to the driver.
[0095] Optionally, after receiving the message, the driver parses the message and obtains absolute or incremental position information from it.
[0096] Step 208: Return the location information to the controller.
[0097] In one embodiment, after receiving position information from the position encoder, the driver can send the position information to the controller.
[0098] For example, if the position information received by the driver is incremental position information, the driver can send the incremental position information to the controller.
[0099] For example, if the position information received by the driver is absolute position information, the driver can send the absolute position information to the controller.
[0100] In one embodiment, after the driver obtains the incremental or absolute position information, it encapsulates the incremental or absolute position information into a message and sends the message to the controller, which then parses the received message to obtain the incremental or absolute position information.
[0101] In the above location feedback method, different location feedback instructions are generated according to different business types, and different location information acquisition instructions are generated based on the different location feedback instructions. The location information is then acquired based on the different location information acquisition instructions. This method can achieve different location information acquisition based on different business types, ensuring the accuracy of location information acquisition.
[0102] In one exemplary embodiment, such as Figure 3 As shown, a position feedback method is provided, which is applied to... Figure 1 Taking the driver in the example, the following steps are included:
[0103] Step 302: Receive location feedback command.
[0104] The instruction type for location feedback instructions is determined by the controller based on the current service type.
[0105] Step 304: Obtain the association between the pre-generated instruction type and the location information acquisition instruction.
[0106] Step 306: Determine whether the instruction similar to the position feedback instruction indicates that the feedback instruction is an absolute position feedback instruction. If yes, proceed to step 308; otherwise, proceed to step 314.
[0107] Step 308: Generate an absolute position information acquisition instruction based on the absolute position feedback instruction and the correlation relationship, and send the absolute position information acquisition instruction to the position encoder.
[0108] Step 310: Receive the absolute position information returned by the position encoder.
[0109] The absolute position information is obtained by the position encoder according to the absolute position information acquisition command.
[0110] Step 312: Send the absolute position information to the controller.
[0111] Step 314: Generate an incremental location information acquisition instruction based on the incremental location feedback instruction and the correlation relationship, and send the incremental location information acquisition instruction to the location encoder.
[0112] Step 316: Receive the incremental position information returned by the position encoder.
[0113] The incremental position information is obtained by the position encoder based on the incremental position information acquisition instruction.
[0114] Step 318: Send the incremental location information to the controller.
[0115] In the above location feedback method, different location feedback instructions are generated according to different business types, and different location information acquisition instructions are generated based on the different location feedback instructions. The location information is then acquired based on the different location information acquisition instructions. This method can achieve different location information acquisition based on different business types, ensuring the accuracy of location information acquisition.
[0116] In one exemplary embodiment, such as Figure 4 As shown, a position feedback method is provided, which is applied to... Figure 1 Taking the controller in the example, the explanation includes the following steps 402 to 404. Wherein:
[0117] Step 402: Obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, generate the location feedback instruction based on the instruction type, and send the generated location feedback instruction to the driver.
[0118] In one embodiment, the controller can obtain the current service type and generate a location feedback instruction based on the current service type.
[0119] Understandably, in many industrial fields such as automation control, robotics, machine tools, servo drives, and precision measuring instruments, accurate and reliable position feedback is the core of achieving high-performance motion control. Accurate and efficient position feedback is particularly important. When position feedback is needed, position feedback commands can be generated, and position feedback can be implemented based on these commands. Different industrial fields correspond to different business types, or even different processes within the same industrial field have different business types. The position feedback corresponding to different business types will also be different. For example, absolute position feedback may be needed at power-on and power-off times, while incremental position feedback may be needed at other times. To ensure the accuracy of position feedback, different position feedback commands can be generated based on different business types, so that position feedback can be implemented based on these different commands.
[0120] In an optional embodiment, when the current service type is a first service type, the instruction type of the generated location feedback instruction can be the first instruction type. For example, when the current service type represents the current service as power-on or power-off time, the instruction type of the generated location feedback instruction can be the first instruction type.
[0121] In an optional embodiment, when the current service type is the second service type, the instruction type of the generated location feedback instruction can be the second instruction type. For example, when the current service type represents a time when the current service is not powered on or off, the instruction type of the generated location feedback instruction can be the second instruction type.
[0122] The first instruction type is used to characterize the position feedback instruction as an instruction to obtain absolute position information.
[0123] The second instruction type is used to characterize the position feedback instruction as an instruction to obtain incremental position information.
[0124] In one embodiment, after generating a position feedback command, the controller can encapsulate the position feedback command into a message and send it to the driver. The driver can then parse the received message to obtain the position feedback command and perform processing based on the position feedback command.
[0125] Step 404: Receive the location information returned by the driver.
[0126] The position information is obtained by the position encoder according to the position information acquisition instruction, which is generated by the driver after parsing the position feedback instruction to obtain the instruction type of the position feedback instruction.
[0127] In one embodiment, after receiving a position feedback instruction from the controller, the driver can parse the position feedback instruction, determine the instruction type of the position feedback instruction, generate a position information acquisition instruction based on the instruction type, and send the position information acquisition instruction to the position encoder, which then acquires the corresponding position information based on the position information acquisition instruction.
[0128] In one embodiment, different instruction types correspond to different location information acquisition instructions, so as to instruct the location encoder to acquire different types of location information.
[0129] For example, when the instruction type identifier of the position feedback instruction is an absolute position feedback instruction, an absolute position information acquisition instruction is generated and sent to the position encoder.
[0130] Optionally, after receiving an absolute position information acquisition command, the position encoder acquires the absolute position information. For example, the position encoder controls the sensor to acquire the absolute position information.
[0131] In one embodiment, when the instruction type identifier of the position feedback instruction is incremental position feedback execution, an incremental position information acquisition instruction is generated and sent to the position encoder.
[0132] Optionally, after receiving an incremental position information acquisition command, the position encoder acquires the incremental position information. For example, the position encoder controls the sensor to acquire the incremental position information.
[0133] In one embodiment, after receiving the position information returned by the position encoder, the driver sends the position information to the controller.
[0134] For example, if the position encoder returns incremental position information, the driver will send the incremental position information to the controller after receiving the incremental position information returned by the position encoder.
[0135] For example, if the position encoder returns absolute position information, the driver will send the absolute position information to the controller after receiving it.
[0136] In the above location feedback method, different location feedback instructions are generated according to different business types, and different location information acquisition instructions are generated based on the different location feedback instructions. The location information is then acquired based on the different location information acquisition instructions. This method can achieve different location information acquisition based on different business types, ensuring the accuracy of location information acquisition.
[0137] In one exemplary embodiment, such as Figure 5As shown, a schematic diagram of a location feedback signaling interaction process is provided, including the following steps:
[0138] Step 502: The controller obtains the current service type, determines the instruction type of the location feedback instruction based on the current service type, and generates the location feedback instruction based on the instruction type.
[0139] Step 504: The controller sends a position feedback command to the driver.
[0140] Step 506: The driver receives the position feedback command, parses the position feedback command, and determines the command type of the position feedback command.
[0141] Step 508: The driver obtains the association between the pre-generated instruction type and the location information acquisition instruction.
[0142] Step 510: The driver determines the location information acquisition command based on the command type and association of the position feedback command.
[0143] Step 512: The driver sends a position information acquisition command to the position encoder.
[0144] Step 514: The position encoder receives the position information acquisition instruction and generates position information acquisition control information based on the position information acquisition instruction.
[0145] Step 516: Send the location information acquisition control information to the sensor.
[0146] Step 518: The sensor obtains control information based on the position information.
[0147] Step 520: The sensor sends the position information to the position encoder.
[0148] Step 522: The position encoder receives position information.
[0149] Step 524: The position encoder sends the position information to the driver.
[0150] Step 526: The driver receives location information.
[0151] In step 528, the driver sends the position information to the controller.
[0152] Step 530: The controller receives location information.
[0153] In the above embodiments, different location feedback instructions are generated according to different service types, and different location information acquisition instructions are generated based on the different location feedback instructions. The location information is acquired based on the different location information acquisition instructions. This can achieve the acquisition of different location information according to different service types, ensuring the accuracy of location information acquisition.
[0154] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0155] Based on the same inventive concept, this application also provides a position feedback device for implementing the position feedback method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more position feedback device embodiments provided below can be found in the limitations of the position feedback method described above, and will not be repeated here.
[0156] In one exemplary embodiment, such as Figure 6 As shown, a location feedback device 600 is provided, including: an instruction receiving module 602, a first instruction generating module 604, a location information receiving module 606, and a location information sending module 608, wherein:
[0157] The instruction receiving module 602 is used to receive location feedback instructions. The type of location feedback instruction is determined by the controller based on the current service type.
[0158] The first instruction generation module 604 is used to generate a location information acquisition instruction based on the instruction type of the location feedback instruction, and send the location information acquisition instruction to the location encoder.
[0159] The position information receiving module 606 is used to receive position information returned by the position encoder, which is obtained by the position encoder according to the position information acquisition instruction.
[0160] The location information sending module 608 is used to return location information to the controller.
[0161] In one embodiment, the first instruction generation module is further configured to obtain the association between the pre-generated instruction type and the location information acquisition instruction; and determine the location information acquisition instruction based on the instruction type of the location feedback instruction and the association.
[0162] In one embodiment, the first instruction generation module is further configured to generate an absolute position information acquisition instruction and send the absolute position information acquisition instruction to the position encoder when the instruction type of the position feedback instruction indicates that the feedback instruction is an absolute position feedback instruction.
[0163] The position information receiving module is also used to receive the absolute position information returned by the position encoder, which is obtained by the position encoder according to the absolute position information acquisition instruction.
[0164] In one embodiment, the first instruction generation module is further configured to generate an incremental position information acquisition instruction and send the incremental position information acquisition instruction to the position encoder when the instruction type of the position feedback instruction indicates that the feedback instruction is an incremental position feedback execution.
[0165] The position information receiving module is used to receive incremental position information returned by the position encoder. The incremental position information is obtained by the position encoder according to the incremental position information acquisition instruction.
[0166] In one exemplary embodiment, such as Figure 7 As shown, a position feedback device 700 is provided, including: a second instruction generation module 702 and a position information receiving module 704, wherein:
[0167] The second instruction generation module 702 is used to obtain the current service type, determine the instruction type of the location feedback instruction according to the service type, generate the location feedback instruction based on the instruction type, and send the generated location feedback instruction to the driver.
[0168] The position information receiving module 704 is used to receive position information returned by the driver. The position information is obtained by the position encoder according to the position information acquisition instruction. The position information acquisition instruction is generated by the driver after parsing the position feedback instruction to obtain the instruction type of the position feedback instruction.
[0169] Each module in the aforementioned position feedback device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0170] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 8As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When the computer program is executed by the processor, it implements a method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0171] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0172] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method embodiments.
[0173] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method embodiments.
[0174] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the above-described method embodiments.
[0175] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0176] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0177] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0178] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A position feedback method, characterized in that, The method is applied to a driver, and the method includes: Receive location feedback instructions, wherein the instruction type of the location feedback instructions is determined by the controller based on the current service type; Based on the instruction type of the location feedback instruction, a location information acquisition instruction is generated and sent to the location encoder; Receive position information returned by the position encoder, the position information being obtained by the position encoder according to the position information acquisition instruction; The location information is returned to the controller.
2. The method according to claim 1, characterized in that, The method further includes: Obtain the association between the pre-generated instruction type and the location information acquisition instruction; The location information acquisition instruction is determined based on the instruction type of the location feedback instruction and the association relationship.
3. The method according to claim 2, characterized in that, Determining the location information acquisition instruction based on the instruction type of the location feedback instruction and the association relationship includes: When the instruction type of the location feedback instruction indicates that the feedback instruction is an absolute location feedback instruction, the absolute location information acquisition instruction is determined according to the absolute location feedback instruction and the association relationship; The step of receiving the location information returned by the location encoder includes: The absolute position information returned by the position encoder is received, which is obtained by the position encoder according to the absolute position information acquisition instruction.
4. The method according to claim 2 or 3, characterized in that, Determining the location information acquisition instruction based on the instruction type of the location feedback instruction and the association relationship includes: When the instruction type of the position feedback instruction indicates that the feedback instruction is an incremental position feedback instruction, an incremental position information acquisition instruction is determined according to the incremental position feedback instruction and the association relationship, and the incremental position information acquisition instruction is sent to the position encoder; The step of receiving the location information returned by the location encoder includes: The incremental position information returned by the position encoder is received, which is obtained by the position encoder according to the incremental position information acquisition instruction.
5. A position feedback method, characterized in that, The method is applied to a controller, and the method includes: Obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, generate a location feedback instruction based on the instruction type, and send the generated location feedback instruction to the driver; The position information returned by the driver is received. The position information is obtained by the position encoder according to the position information acquisition instruction. The position information acquisition instruction is generated by the driver after parsing the position feedback instruction to obtain the instruction type of the position feedback instruction.
6. A position feedback system, characterized in that, The system includes: The controller is used to obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, generate a location feedback instruction based on the instruction type, and send the generated location feedback instruction to the driver. The driver is configured to receive the position feedback instruction, parse the position feedback instruction, determine the instruction type of the position feedback instruction, generate a position information acquisition instruction according to the instruction type of the position feedback instruction, receive the position information acquired by the position encoder according to the position information acquisition instruction, and send the position information to the controller. A position encoder is used to receive a position information acquisition command, control the sensor to acquire position information according to the position acquisition command, and send the acquired position information to the driver; A sensor is used to acquire the location information and send it to the location encoder.
7. A position feedback device, characterized in that, The device includes: The instruction receiving module is used to receive location feedback instructions, wherein the instruction type of the location feedback instructions is determined by the controller according to the current service type; The first instruction generation module is used to generate a location information acquisition instruction according to the instruction type of the location feedback instruction, and send the location information acquisition instruction to the location encoder; A location information receiving module is used to receive location information returned by the location encoder, wherein the location information is obtained by the location encoder according to the location information acquisition instruction; A location information sending module is used to return the location information to the controller.
8. A position feedback device, characterized in that, The device includes: The second instruction generation module is used to obtain the current service type, determine the instruction type of the location feedback instruction based on the current service type, generate the location feedback instruction based on the instruction type, and send the generated location feedback instruction to the driver. The location information receiving module is used to receive the location information returned by the driver. The location information is obtained by the location encoder according to the location information acquisition instruction. The location information acquisition instruction is generated by the driver after parsing the location feedback instruction to obtain the instruction type of the location feedback instruction.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 5.