Simulation method of mop wheel device, electronic device, storage medium and simulation system
By simulating the trajectory and motor parameters of the real spindle running by the virtual spindle, the problem of the mop wheel device simulation method relying on spindle electrical control and panel is solved, and efficient development and quality inspection are achieved.
Patent Information
- Application Number
- CN202411871726.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-01
AI Technical Summary
The simulation method of the mop wheel device relies on spindle electrical control and panels, resulting in low development efficiency.
The virtual spindle simulates the trajectory of the real spindle operation, sets the actual running parameters in combination with the motor parameters, generates a lift control signal and a motor encoder signal, and drives the tow wheel controller to perform synchronous shuffle work.
It realizes debugging of different models of mop wheels without relying on spindle electrical control and panels, improving development efficiency, and supporting quality inspection without relying on other controllers and operating panels.
Smart Images

Figure CN119739072A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of equipment simulation and debugging, and relates to a simulation method, and in particular to a simulation method for a mop wheel device, an electronic device, a storage medium, and a simulation system. Background Art
[0002] At present, there are more and more scenarios where sewing equipment uses a mop wheel device. When sewing, the fabric is too thick and cannot pass through the presser foot of the sewing machine. The feed dogs cannot feed the fabric and need to be manually dragged from behind. Manual dragging will cause the sewing machine needle to break frequently and make the sewing stitches uneven. Therefore, a mop wheel is used. The use of a mop wheel device can completely solve this problem.
[0003] In addition, sewing equipment using a mop wheel device is usually implemented in a highly integrated manner, that is, the control of the mop wheel is closely integrated with the control system of the original equipment. This requires in-depth development of the mop wheel control for different models and processes, and the development process is highly dependent on the spindle signal and panel operation of the equipment, resulting in low development efficiency. Summary of the invention
[0004] The present application provides a simulation method, electronic equipment, storage medium and simulation system for a mop wheel device, which are used to solve the problem that the mop wheel simulation depends on the spindle electronic control and panel.
[0005] In a first aspect, the present application provides a simulation method for a mop wheel device, the method comprising: determining a virtual spindle corresponding to a mop wheel model to be simulated, so as to call motor parameters adapted to the mop wheel model; the motor parameters represent the operating parameter range of the mop wheel model; using the virtual spindle to perform mop wheel lifting and lowering settings, and generating a lifting and lowering control signal; and using the virtual spindle to simulate the trajectory of the real spindle operation, and setting actual operating parameters in combination with the motor parameters during simulation, including maximum operating speed, acceleration time, deceleration time, maximum speed duration and motor model; generating a motor encoder signal according to the lifting and lowering control signal or the actual operating parameters; and driving the mop wheel controller to follow the motor encoder signal to perform synchronous mopping work.
[0006] In an implementation of the first aspect, the step of using the virtual spindle to set the mop wheel lifting and lowering and generating a lifting and lowering control signal includes: receiving a mop wheel lifting and lowering signal associated with the virtual spindle, and controlling the lifting and lowering of the mop wheel according to the mop wheel lifting and lowering signal; setting the speed of lifting the mop wheel, the displacement of lifting, and the speed of lowering the mop wheel, and the displacement of lowering; in the automatic running-in mode, setting the time interval for lifting and lowering the mop wheel, the total running-in time, and the number of running-in times.
[0007] In an implementation of the first aspect, the method further includes: setting parameters for the mop wheel controller, including adopting a custom table design, wherein the table style is index, function, device parameter number, current value, default value, valid range, and comment; providing a template for a commonly used machine model, and the parameters can be exported as an Excel table, or imported into an Excel table for parameter loading, and custom table parameters are supported; providing a coding method selection for table operations to avoid data garbled characters after the simulation platform is converted; performing parameter monitoring on the mop wheel controller, including refreshing and monitoring parameter data according to a set period, and supporting template import and custom table import; performing control operations on the mop wheel to cooperate with the virtual spindle for functional debugging; assisting the mop wheel controller in parameter adaptation, including: combining values such as mop wheel stitch length, stitch length compensation value, mop wheel start angle, mop wheel end angle, reduction ratio, mop wheel diameter, spindle encoder harness, spindle current angle, spindle previous angle, and spindle speed for simulation calculation to obtain a numerical calculation process and a reference optimal Q value, wherein the optimal Q value refers to the optimal matching value between the rotation speed and the mop speed.
[0008] In an implementation of the first aspect, the method further includes: configuring serial port and network port parameters related to the communication connection with the mop wheel controller, and pre-configuring different mop wheel process codes and parameters for different machine model templates.
[0009] In an implementation of the first aspect, the method further includes: drawing a curve in real time for the detected and collected parameter data of the mop wheel controller.
[0010] In an implementation of the first aspect, the method further includes: generating observation code for mop wheel debugging according to variables of the simulation debugging process, including: exporting the variables to generate a table, automatically generating a C file and an H file according to a preset template for the variable address, variable name, comment, etc. in the table, and using the C file and the H file to directly compile and generate observation code suitable for a virtual oscilloscope in conjunction with the mop wheel project.
[0011] In a second aspect, the present application provides an electronic device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the described method.
[0012] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the method described when the computer program is executed.
[0013] In a fourth aspect, the present application provides a mop wheel simulation system, the system comprising: the electronic device and a data acquisition board, and a mop wheel controller; the data acquisition board is communicatively connected to the electronic device and the mop wheel controller respectively; the data acquisition board is used to transmit high-speed communication signals between the electronic device and the mop wheel controller.
[0014] In an implementation of the fourth aspect, the data acquisition board includes an x86 host or an ARM motherboard; if the data acquisition board is an x86 host, the x86 host transmits the high-speed communication signal to an adapter board, the adapter board generates an actual physical ABZ signal according to the high-speed communication signal and transmits it to the mop wheel controller, and the mop wheel controller performs mopping work according to the ABZ signal; if the data acquisition board is a microprocessor, the microprocessor uses the on-board hardware to directly output the ABZ signal of the high-speed communication signal to the mop wheel controller, and the mop wheel controller performs mopping work according to the ABZ signal.
[0015] As described above, the simulation method, electronic device, storage medium and simulation system of the mop wheel device described in the present application have the following beneficial effects:
[0016] This application provides a simulation system based on the development of mop wheel process, which can debug mop wheels of different models. It does not require spindle electronic control, mechanical machine, and operation panel. Therefore, it is not limited by the fixed settings of hardware spindle electronic control and cannot be changed. This application can directly simulate and debug according to different machine model parameters to improve development efficiency. At the same time, it can also be used as a test tool to realize the quality inspection of mop wheel controller, without relying on other controllers and operation panels. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 Shown is a schematic diagram of an application scenario of the simulation method for the mop wheel device described in an embodiment of the present application.
[0018] Figure 2 Shown is a principle flow chart of the simulation method of the mop wheel device described in an embodiment of the present application.
[0019] Figure 3 Shown is a schematic diagram of the virtual spindle function of the simulation method of the mop wheel device described in an embodiment of the present application.
[0020] Figure 4 Shown is a flowchart of calculation of adaptation parameters of the simulation method of the mop wheel device described in an embodiment of the present application.
[0021] Figure 5 Shown is a communication mechanism principle diagram of the simulation method of the mop wheel device described in an embodiment of the present application.
[0022] Figure 6 Shown is an observation code generation flow chart of the simulation method of the mop wheel device described in an embodiment of the present application.
[0023] Figure 7 Shown is a schematic diagram of the structural connection of an electronic device described in an embodiment of the present application.
[0024] Figure 8 Shown is a schematic diagram of the structural connection of the mop wheel simulation system described in an embodiment of the present application.
[0025] Fig. 9 Shown is a structural principle diagram of the mop wheel simulation system described in an embodiment of the present application.
[0026] Fig.10 Shown is the x86 hardware solution diagram of the mop wheel simulation system described in the embodiment of the present application.
[0027] Fig.11 Shown is a design framework diagram of an adapter plate for the mop wheel simulation system described in an embodiment of the present application.
[0028] Fig.12 Shown is an ARM hardware solution diagram of the mop wheel simulation system described in an embodiment of the present application.
[0029] Fig.13 Shown is the ARM board design framework diagram of the mop wheel simulation system described in the embodiment of the present application.
[0030] Component number description
[0031] 1 Electronic equipment
[0032] 11 Processor
[0033] 12 Memory
[0034] 13 Communication Interface
[0035] 14 System Bus
[0036] 2 Data acquisition board
[0037] 3 Mop wheel controller
[0038] Steps S21 to S24 DETAILED DESCRIPTION
[0039] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0040] It should be noted that the illustrations provided in the following embodiments are only used to illustrate the basic concept of the present application in a schematic manner, and therefore the illustrations only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0041] The following embodiments of the present application provide a simulation method, electronic device, storage medium and simulation system for a mop wheel device, including but not limited to a mop wheel simulation system applied to an entirety, and the following description will be given taking this application scenario as an example.
[0042] See also Figure 1 , which is a schematic diagram of an application scenario of the simulation method of the mop wheel device described in the embodiment of the present application. Figure 1 As shown, this embodiment provides a mop wheel simulation system, which mainly includes simulation system software, communication transmission mechanism, and supporting execution hardware. The hardware can be a computer with X86 architecture or an embedded board with ARM (Advanced RISCMachine, reduced instruction set microprocessor) architecture. The simulation system is a software system that can be deployed across platforms and has multiple sub-modules, including parameter setting, parameter monitoring, parameter adaptation, virtual spindle, virtual rear tug, equipment configuration, curve drawing, and code generation.
[0043] The technical solutions in the embodiments of the present application will be described in detail below in conjunction with the drawings in the embodiments of the present application.
[0044] See also Figure 2 , which is a principle flow chart of the simulation method of the mop wheel device according to the embodiment of the present application. This embodiment provides a simulation method of the mop wheel device, which specifically includes steps S21 to S24.
[0045] S21, determining a virtual main axis corresponding to the mop wheel machine model to be simulated, so as to call motor parameters adapted to the mop wheel machine model; the motor parameters represent the operating parameter range of the mop wheel machine model.
[0046] S22, using the virtual spindle to set the mop wheel lifting and lowering, generating a lifting and lowering control signal; and using the virtual spindle to simulate the trajectory of the real spindle operation, and setting the actual operating parameters in combination with the motor parameters during simulation, including the maximum operating speed, acceleration time, deceleration time, maximum speed duration and motor model.
[0047] See also Figure 3 , which is a schematic diagram of the virtual spindle function of the simulation method of the mop wheel device according to the embodiment of the present application. Figure 3 As shown, in one embodiment, the step of using the virtual spindle to perform the mop wheel lifting and lowering setting and generating the lifting and lowering control signal includes:
[0048] (1) receiving a mop wheel lifting and lowering signal associated with the virtual spindle, and controlling the mop wheel to be lifted and lowered according to the mop wheel lifting and lowering signal.
[0049] (2) Set the speed and displacement of the mop wheel when it is lifted, and the speed and displacement of the mop wheel when it is lowered.
[0050] (3) In the automatic running-in mode, set the time interval for lifting and lowering the mop wheel, the total running-in time, and the number of running-in times.
[0051] S23, generating a motor encoder signal according to the lifting and placing control signal or the actual operating parameter.
[0052] Specifically, the motor encoder signal refers to an ABZ signal.
[0053] S24, driving the mopping wheel controller to follow the motor encoder signal to perform synchronous mopping work.
[0054] Combination Figure 3 The various functions of the virtual spindle are shown. The virtual spindle is used to simulate the electric control spindle to actually control the mop wheel controller. The main control methods include lifting and lowering tug wheel signal control, spindle speed control, HMI (Human Machine Interface) communication interaction, and debugging module.
[0055] Among them, the lifting and lowering signal realizes the lifting and lowering function of the tug cloth controller. The difference from the current electric control spindle is that in addition to the conventional IO signal control lifting and lowering, the virtual spindle supports lifting and lowering by communication method, and the lifting and lowering method is achieved by setting different signal modes; the actual electric control spindle can be simulated to lift and lower the mop wheel, and the designed running-in can design the lifting and lowering speed and frequency, and there is no need to develop tooling separately.
[0056] When testing the synchronization performance of the spindle and the mop wheel, set the model of the virtual spindle. Different models have different acceleration and deceleration curves. The corresponding acceleration and deceleration array generated by the curve is sent to the X86 or ARM control board. If the mop wheel has a high-speed communication interface, the trajectory parameter array generated by the motor operation can be directly transmitted to the mop wheel by communication (the mop wheel needs to switch the ABZ signal mode to the communication mode) or the control board receives the array and converts it into ABZ data. The ABZ encoder signal is output to the mop wheel in an approximately simulated manner through the corresponding hardware port, replacing the encoder signal of the actual electric control spindle.
[0057] The HMI communication between the virtual spindle and the mop wheel controller performs handshake, data synchronization, parameter setting, and parameter monitoring according to the actual process, which specifically includes process communication and extended communication. Process communication can be the communication of various process parameters. Extended communication, such as the electronic needle distance function, only requires switching the protocol content in the simulation system.
[0058] The debugging module inputs the virtual oscilloscope interface of the mop wheel, and can observe the waveform of the debuggable parameters during the operation of the mop wheel. Especially matched with the running trajectory curve of the virtual spindle, it can observe the synchronization between the two axes and the waveform of the lifting and lowering of the tug wheel in real time, and realize the process debugging of the mop wheel without the spindle electronic control and panel.
[0059] In one embodiment, the method also includes: setting parameters for the mop wheel controller, including using a custom table design, the table style is index, function, equipment parameter number, current value, default value, valid range, and comments; providing common model templates, which can export parameters as Excel tables, and can also import Excel tables for parameter loading, and support custom table parameters.
[0060] Specifically, in order to support cross-platform, table operations will provide encoding options to avoid garbled data after platform conversion. The parameters are consistent with the controller parameters of the mop wheel. In normal communication mode, modifying the parameter values of the simulation system will update the underlying mapping parameters of the controller in real time. At the same time, the parameters of the controller will also be updated in real time to the parameter setting module of the simulation system, and refreshed in the current value column.
[0061] In one embodiment, the method further includes: performing parameter monitoring on the mop wheel controller, including refreshing and monitoring parameter data according to a set period, supporting template import and custom table import; and controlling the mop wheel to cooperate with the virtual spindle for functional debugging.
[0062] In one embodiment, the method further includes: assisting the mop wheel controller to perform parameter adaptation, including: combining the mop wheel stitch length, stitch length compensation value, mop wheel start angle, mop wheel end angle, reduction ratio, mop wheel diameter, spindle encoder harness, spindle current angle, spindle previous angle, spindle speed and other numerical values to perform simulation calculations to obtain the numerical calculation process and the reference optimal Q value, wherein the optimal Q value refers to the optimal matching value between the rotation speed and the mop speed.
[0063] Specifically, parameter adaptation is used to assist controller programming. It performs simulation calculations based on values such as tugboat stitch length, stitch length compensation value, tugboat start angle, tugboat end angle, reduction ratio, tugboat diameter, spindle encoder harness, spindle current angle, spindle previous angle, and spindle speed, and gives the numerical calculation process and the best reference Q value. If you are not satisfied with the current Q value, you can adjust the Q value, and after the adjustment, the numerical calculation process and reference suggestions will be displayed. Users only need to enter a numerical value to obtain the best Q value and guide the underlying coding of the mop wheel controller, thereby improving development efficiency.
[0064] See also Figure 4 , which is a flowchart showing the calculation of adaptation parameters of the simulation method of the mop wheel device described in the embodiment of the present application. Figure 4 As shown, the implementation process of automatically calculating the adaptation parameters includes: after the adaptation starts, load the parameters (such as rounds), determine whether the parameters meet 24 times, if they meet 24 times, output the calculation process and results of the best round, and then determine whether to adjust the Q value. If so, recalculate the K value, if not, end the adaptation process. If 24 times are not met, calculate the stroke n1, the number of pulses per degree n2 and the target position n3, set the values to obtain the amplified n1, n2, n3 and K values, obtain the n3 value and the error value, compare the two rounds with smaller errors, and then continue to determine whether the parameter meets 24 times.
[0065] In one embodiment, the method further comprises:
[0066] Configure serial port and network port parameters related to the communication connection with the mop wheel controller, and pre-configure different mop wheel process codes and parameters for different machine model templates.
[0067] See also Figure 5 , which is a schematic diagram showing the communication mechanism of the simulation method of the mop wheel device described in the embodiment of the present application. Figure 5As shown, the present embodiment can configure the serial port and network port parameters to realize the communication connection between the simulation system and the data acquisition control board and the mop wheel control board; select the machine model template, and there are different mop wheel process codes and parameters for different machine models. The configuration is selected when the machine is turned on and initialized. After startup, the process communication is carried out with the mop wheel. First, handshake communication is carried out. If it succeeds, the upgrade state is synchronized mode. The synchronized mode will send the parameters of the specific model of the simulation system to the mop wheel controller, and send the specific verification value of the parameter at the same time. After the mop wheel controller receives and verifies the parameters in full in the order of parameters, it enters the transmission mode; in the transmission mode, the simulation system can set parameters and monitor parameters for the mop wheel controller; when the communication between the simulation system and the mop wheel controller is abnormal, the existing state will be downgraded. At the same time, the simulation system can force the upgrade state to restore communication.
[0068] In one embodiment, the method further comprises: drawing a curve of the detected and collected parameter data of the mop wheel controller in real time.
[0069] Specifically, the high-speed communication interface between the simulation system and the mop wheel controller exchanges data. The simulation system sends a communication instruction to the mop wheel controller to set the variable address to be collected, and the mop wheel controller uploads the data corresponding to the variable to the simulation system in real time and periodically, and the simulation system draws the collected data in real time.
[0070] In one embodiment, the method further comprises:
[0071] The observation code used for mop wheel debugging is generated according to the variables of the simulation debugging process, including: exporting the variables to generate a table, automatically generating a C file and an H file according to a preset template for the variable address, variable name, comment, etc. in the table, and using the C file and the H file to directly compile and generate observation code suitable for a virtual oscilloscope in conjunction with the mop wheel project.
[0072] Specifically, the variables in the simulation system debugging process can be exported to generate a table, and then the table can be used to generate observation code suitable for the eight-channel virtual oscilloscope. This includes: automatically generating c files and h files according to specific templates for the variable addresses, variable names, comments, etc. in the table. These two files can be directly compiled to generate code with the mop wheel project. When debugging the mop wheel on the machine later, the data waveform can be observed by directly investigating the parameter address without having to write observation code yourself.
[0073] See also Figure 6 , which is a flowchart of the observation code generation of the simulation method of the mop wheel device described in the embodiment of the present application. Figure 6As shown, the implementation process of code generation includes: after starting execution, obtain the debug parameter table to load, call the template file to create the file, determine whether the creation is successful, if not, end the code generation process; if the creation is successful, write the included header file, specific function and specific variable. Determine whether the parameters are generated, if so, write the remaining function block and end the code generation process; if not, write the parameter branch in the function block, write the comment branch in the function block, and then continue to determine whether the parameters are generated.
[0074] An embodiment of the present application provides an electronic device, comprising: a processor and a memory; the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the simulation method of the mop wheel device.
[0075] See also Figure 7 , which is a schematic diagram showing the structural connection of the electronic device described in the embodiment of the present application. Figure 7 As shown, the electronic device 1 of the present application includes: a processor 11, a memory 12, a communication interface 13 and / or a system bus 14. The memory 12 and the communication interface 13 are connected to the processor 11 through the system bus 14 and communicate with each other. The memory 12 is used to store computer programs, the communication interface 13 is used to communicate with other devices, and the processor 11 is used to run computer programs so that the electronic device 1 executes each step of the simulation method of the mop wheel device.
[0076] The above-mentioned processor 11 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0077] The memory 12 may include a random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory.
[0078] The system bus 14 mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The system bus 14 can be divided into an address bus, a data bus, a control bus, etc. The communication interface is used to realize the communication between the database access device and other devices (such as a client, a read-write library, and a read-only library).
[0079] In practical applications, the electronic device may be a computer including all or part of the components such as a memory, a storage controller, one or more processing units (CPU), a peripheral interface, an RF circuit, an audio circuit, a speaker, a microphone, an input / output (I / O) subsystem, a display screen, other output or control devices, and an external port; the computer includes but is not limited to personal computers such as desktop computers, laptop computers, tablet computers, smart phones, smart TVs, and personal digital assistants (PDAs). In other embodiments, the electronic device may also be a server, which may be arranged on one or more physical servers according to various factors such as function and load, or may be a cloud server composed of a distributed or centralized server cluster, which is not limited in this embodiment.
[0080] The embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed, the simulation method of the mop wheel device is implemented.
[0081] A person of ordinary skill in the art can understand that all or part of the steps in the method for implementing the above-mentioned embodiment can be completed by instructing a processor through a program, and the program can be stored in a computer-readable storage medium, and the storage medium is a non-transitory medium, such as a random access memory, a read-only memory, a flash memory, a hard disk, a solid-state hard disk, a magnetic tape, a floppy disk, an optical disc, and any combination thereof. The above-mentioned storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state disk (SSD)), etc.
[0082] See also Figure 8, which is a schematic diagram showing the structural connection of the mop wheel simulation system described in the embodiment of the present application. Figure 8 As shown, this embodiment provides a mop wheel simulation system, which specifically includes: the electronic device 1 and the data acquisition board 2, and the mop wheel controller 3; the data acquisition board 2 is respectively connected to the electronic device 1 and the mop wheel controller 3 for communication; the data acquisition board 2 is used to transmit high-speed communication signals between the electronic device 1 and the mop wheel controller 3.
[0083] See also Fig. 9 , which is a structural schematic diagram of the mop wheel simulation system described in the embodiment of the present application. Fig. 9 As shown, the mop wheel simulation system includes the simulation system software, communication transmission mechanism, and supporting execution hardware built into the electronic device 1. The hardware of the data acquisition board 2 can be a computer with an X86 architecture or an embedded board with an ARM (Advanced RISC Machine, reduced instruction set microprocessor) architecture. The mop wheel simulation system is a software system that can be deployed across platforms and has multiple sub-modules, including parameter setting, parameter monitoring, parameter adaptation, virtual spindle, virtual rear tug, equipment configuration, curve drawing, and code generation. In addition, the mop wheel controller 3 is also provided with a lifting module, an HMI module, an encoder module, and a debugging module.
[0084] In one embodiment, the data acquisition board includes an x86 host or an ARM mainboard.
[0085] If the data acquisition board is an x86 host, the x86 host transmits the high-speed communication signal to an adapter board, and the adapter board generates an actual physical ABZ signal according to the high-speed communication signal and transmits it to the mop wheel controller, and the mop wheel controller performs mopping work according to the ABZ signal.
[0086] See also Fig.10 , which shows the x86 hardware solution diagram of the mop wheel simulation system described in the embodiment of the present application. Fig.10As shown, the data acquisition board is deployed on an X86 controller, such as a PC (Personal Computer), and an external adapter board is required. General x86 computers do not have the ability to output high-speed ABZ signals and ordinary IO signals separately, so it is necessary to develop a unique adapter board to obtain data from the x86 computer and convert it into ABZ and IO signals, and then transmit it to the mop wheel controller. The high-speed bus between the X86 computer and the adapter board can be USB (Universal Serial Bus), Ethernet bus, and high-speed 485 bus. The adapter board is developed with a microprocessor or a processor with FPGA (Field-Programmable Gate Array), stores the large-capacity array of virtual axis operation generated by the simulation system, and uses DMA (Direct Memory Access) to directly move and generate ABZ signal output.
[0087] See also Fig.11 , which shows the design framework diagram of the adapter plate of the mop wheel simulation system described in the embodiment of the present application. Fig.11 As shown, the adapter board is designed with 4 serial ports, two of which are connected to the computer (the serial port on the left and the second serial port), and the other two are connected to the mop wheel, which are divided into low-speed serial ports and high-speed serial ports; 1 network port design, the computer can send path files through the serial port, and can also send path files through the network port; at the same time, the path file can also be sent wirelessly via WiFi; after receiving the instructions, the adapter board processor will output IO signals, ABZ signals and HMI signals to the mop wheel to execute specific processes; the external interfaces are electrically isolated for protection.
[0088] If the data acquisition board is a microprocessor, the microprocessor directly outputs the ABZ signal of the high-speed communication signal to the mop wheel controller using the onboard hardware, and the mop wheel controller performs mopping work according to the ABZ signal.
[0089] See also Fig.12 , which shows the ARM hardware solution diagram of the mop wheel simulation system described in the embodiment of the present application. Fig.12 As shown, the simulation system is deployed on an ARM architecture processor (ARM board), and the ARM board can be directly used to output ABZ signals and IO signals.
[0090] See also Fig.13 , which shows the ARM board design framework diagram of the mop wheel simulation system described in the embodiment of the present application. Fig.13As shown, unlike the adapter board, the ARM type has its own display interface, which can be connected to the RGB screen through the RGB interface, or to an external display through the HDMI interface; it can be expanded to connect to a mouse, keyboard or other USB-compatible devices through USB; in terms of the processor, in addition to the ARM processor responsible for communication, display and logic processing, it is also equipped with a coprocessor responsible for high-frequency and high-speed ABZ signals, and the signal interface is also electrically isolated.
[0091] Combination Figure 3 The virtual spindle function shown in the figure, the implementation principle of the mop wheel simulation system is as follows:
[0092] (1) For lifting and lowering tugboats, the specific implementation includes:
[0093] The virtual spindle sets the speed, displacement of the mop wheel lifting and the speed, displacement of the mop wheel lowering through HMI communication; in the manual lifting and lowering mode, through the manual lifting and lowering button under the virtual spindle of the client, click to lift the tug wheel, and the client will transmit the corresponding signal to the adapter board, and the adapter board will convert the corresponding action signal into the corresponding "1" digital signal to the mop wheel controller, and the controller will lift the tug wheel after receiving the "1" signal; click to lower the tug wheel, and the corresponding adapter board will output a "0" signal to the controller, and the controller will lower the tug wheel after receiving the "0" signal. In particular, if the IO signal mode is configured in the simulation system to be implemented by HMI communication, the corresponding "1" or "0" signal is directly transmitted to the controller through HMI communication to realize the lifting and lowering function, without the need to realize the "1" or "0" signal output through the adapter board, but the HMI communication output has a delay effect, which is not as fast as the output response of the adapter board, which is applicable to the manual lifting and lowering function.
[0094] Automatic running-in is a function that is realized by introducing running-in switch and running-in mode on the basis of manual lifting and lowering function. The running-in mode needs to configure the time interval of lifting and lowering, the total running-in time, and the number of running-in; the running-in switch is the main switch for starting and pausing the running-in. When the running-in is turned on, the virtual spindle will periodically send "1" or "0" signals to the controller according to the set running-in mode to realize the controller's lifting and lowering tugwheel function. The number and time will be recorded for each successful completion. When the preset time or number of times is reached, the running-in will be stopped and the running-in result will be prompted; during the automatic running-in, you can press the cancel button at any time to pause the running-in, or you can restart the running-in after pausing, resume and continue the remaining running-in; when the running-in time is not set, the running-in will continue.
[0095] (2) Regarding the spindle speed, the specific implementation includes:
[0096] The virtual spindle is a function that simulates the spindle of sewing equipment. Taking the flat-bed sewing machine as an example, when the A5E model is selected on the interface, the client will automatically call the motor parameters adapted to the A5E model, including motor acceleration and deceleration parameters, common speed models and other parameters. Then set the trajectory of the simulated spindle operation, and set the actual maximum operating speed, acceleration time, deceleration time, maximum speed duration, motor model and other parameters. After setting, the simulation system will automatically calculate and generate the data table corresponding to ABZ. If it is an x86 host, the data will be passed to the adapter board, and the adapter board will generate the actual physical ABZ signal and pass it to the mop wheel controller. The controller performs synchronous mopping according to the input ABZ signal. If it is an ARM motherboard, after conversion, the onboard hardware is directly used to directly output the ABZ signal to drive the mop wheel controller for synchronous scrolling.
[0097] (3) Regarding HMI communication, the specific implementation includes:
[0098] It is mainly used for parameter setting and status monitoring. In addition, it has extended communication functions. In addition to tugboat simulation, other functions can be realized through HMI, such as electronic needle distance function, which only requires switching the protocol content in the simulation system.
[0099] (4) For the debugging module, the specific implementation includes:
[0100] Utilizing the virtual oscilloscope function, the controller integrates the virtual oscilloscope driving code. When the mop wheel is lifted and lowered, and rolled synchronously, the simulation system sets the monitoring parameters of the controller through the debugging interface, and collects the monitoring data uploaded by the mop wheel controller in real time. At the same time, the simulation system draws the collected data in real time on the page. The user makes judgments through the drawn 8-channel curves, and uses this to modify the controller parameters to form a closed-loop simulation effect. The virtual spindle sends running instructions to drive the mop wheel controller to run. The collected running data is compared with the spindle data to determine whether the current controller drive meets the preset requirements. If not, the controller program is modified until it meets the requirements. No additional hardware equipment is required during this period.
[0101] This application can improve the efficiency of mop wheel development. Most function debugging can be achieved by relying on the simulation system without the help of hardware equipment. At the same time, the generated observation code can assist the subsequent on-machine debugging process, greatly improving the development efficiency. As a tooling tool, it can quickly detect signals on the mop wheel controller, saving tooling equipment.
[0102] The protection scope of the simulation method of the mop wheel device described in the embodiment of the present application is not limited to the execution order of the steps listed in the present embodiment. All solutions implemented by adding, reducing or replacing steps in the prior art based on the principles of the present application are included in the protection scope of the present application.
[0103] The mop wheel simulation system described in the embodiment of the present application can implement the simulation method of the mop wheel device described in the present application, but the implementation device of the simulation method of the mop wheel device described in the present application includes but is not limited to the structure of the mop wheel simulation system listed in the present embodiment, and all structural deformations and replacements of the prior art made according to the principles of the present application are included in the protection scope of the present application.
[0104] In the several embodiments provided in the present application, it should be understood that the disclosed system, device or method can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of modules / units is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules or units, which can be electrical, mechanical or other forms.
[0105] The modules / units described as separate components may or may not be physically separated, and the components displayed as modules / units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules / units may be selected according to actual needs to achieve the purpose of the embodiments of the present application. For example, the functional modules / units in the various embodiments of the present application may be integrated into one processing module, or each module / unit may exist physically separately, or two or more modules / units may be integrated into one module / unit.
[0106] Those of ordinary skill in the art should further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application. The descriptions of the processes or structures corresponding to the above-mentioned figures have different emphases. For parts that are not described in detail in a process or structure, please refer to the relevant descriptions of other processes or structures.
[0107] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A simulation method for a mop wheel device, characterized in that: The method comprises: Determine a virtual spindle corresponding to the mop wheel machine model to be simulated, so as to call motor parameters adapted to the mop wheel machine model; the motor parameters represent the operating parameter range of the mop wheel machine model; The virtual spindle is used to set the mop wheel lifting and lowering to generate a lifting and lowering control signal; and the virtual spindle is used to simulate the trajectory of the real spindle operation, and the actual operation parameters are set in combination with the motor parameters during the simulation, including the maximum speed, acceleration time, deceleration time, maximum speed duration and motor model; Generate a motor encoder signal according to the lifting and placing control signal or the actual operating parameter; The mopping wheel controller is driven to perform synchronous mopping work following the motor encoder signal.
2. The method according to claim 1, characterized in that The step of using the virtual spindle to set the mop wheel lifting and lowering and generating a lifting and lowering control signal comprises: receiving a mop wheel lifting and lowering signal associated with the virtual spindle, and controlling the mop wheel to be lifted and lowered according to the mop wheel lifting and lowering signal; Set the speed and displacement of the mop wheel when it is lifted, and the speed and displacement of the mop wheel when it is lowered; In the automatic running-in mode, set the time interval for lifting and lowering the mop wheel, the total running-in time and the number of running-in times.
3. The method according to claim 1, characterized in that The method further comprises: The mop wheel controller is parameterized, including a custom table design, where the table style is index, function, device parameter number, current value, default value, valid range, and comment; common machine model templates are provided, parameters can be exported as Excel tables, and Excel tables can be imported for parameter loading, supporting custom table parameters; encoding mode selection is provided for table operations to avoid garbled data after simulation platform conversion; Perform parameter monitoring on the mop wheel controller, including refreshing and monitoring parameter data according to a set period, supporting template import and custom table import; perform control operations on the mop wheel to cooperate with the virtual spindle for functional debugging; Assisting the mop wheel controller to perform parameter adaptation, including: combining the mop wheel stitch length, stitch length compensation value, mop wheel start angle, mop wheel end angle, reduction ratio, mop wheel diameter, spindle encoder harness, spindle current angle, spindle previous angle, spindle speed and other numerical values to perform simulation calculations, and obtain the numerical calculation process and the reference optimal Q value, wherein the optimal Q value refers to the optimal matching value between the rotation speed and the mop speed.
4. The method according to claim 1, characterized in that: The method further comprises: Configure serial port and network port parameters related to the communication connection with the mop wheel controller, and pre-configure different mop wheel process codes and parameters for different machine model templates.
5. The method according to claim 1, characterized in that The method further comprises: The parameter data of the mop wheel controller collected by detection is plotted in real time.
6. The method according to claim 1, characterized in that The method further comprises: The observation code used for mop wheel debugging is generated according to the variables of the simulation debugging process, including: exporting the variables to generate a table, automatically generating a C file and an H file according to a preset template for the variable address, variable name, comment, etc. in the table, and using the C file and the H file to directly compile and generate observation code suitable for a virtual oscilloscope in conjunction with the mop wheel project.
7. An electronic device, characterized in that: The electronic device comprises: a processor and a memory; The memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed, the method according to any one of claims 1 to 6 is implemented.
9. A mop wheel simulation system, characterized in that: The system comprises: the electronic device as claimed in claim 7, a data acquisition board, and a mop wheel controller; the data acquisition board is respectively connected to the electronic device and the mop wheel controller for communication; The data acquisition board is used to transmit high-speed communication signals between the electronic device and the mop wheel controller.
10. The system according to claim 9, characterized in that The data acquisition board includes an x86 host or an ARM mainboard; If the data acquisition board is an x86 host, the x86 host transmits the high-speed communication signal to an adapter board, and the adapter board generates an actual physical ABZ signal according to the high-speed communication signal and transmits it to the mop wheel controller, and the mop wheel controller performs mopping work according to the ABZ signal; If the data acquisition board is a microprocessor, the microprocessor directly outputs the ABZ signal of the high-speed communication signal to the mop wheel controller using the onboard hardware, and the mop wheel controller performs mopping work according to the ABZ signal.