The specific embodiment
Fig. 1 is the structural representation of the utility model embodiment embroidery machine control device, and Fig. 2 is the utility model embodiment embroidery machine control device and schematic diagram after many embroidery machines are connected.As shown in Figure 1, 2, the utility model provides a kind of embroidery machine control device, and this device comprises:
Reception is provided with the receiver module 1 of data and style data.
Corresponding with many embroidery machines that connect, be used for a plurality of interface modules that the described embroidery machine of Xiang Getai sends control information and receives the feedback information that each described embroidery machine returns.The utility model embodiment is an example with two interface modules; promptly first interface module 31 and second interface module 32 are connected with first embroidery machine 61 is with second embroidery machine 62 corresponding respectively; send control information to first embroidery machine 61 and second embroidery machine 62 respectively; and receive the feedback information (those skilled in the art can be provided with two or more interface modules as required, and the number of the interface module in the present embodiment does not specifically limit protection domain of the present utility model) that first embroidery machine 61 and second embroidery machine 62 return respectively.
Be used for described the processing module 2 that data and style data are converted to control information, feedback information that described embroidery machine is returned detects processing in real time being set, described processing module 2 connects described receiver module 1, first interface module 31 and second interface module 32 respectively.
Be specially, receiver module 1 receives data is set, and the control parameter is set thus, embroidery pattern is set and operation such as colour changing is set.First interface module 31 and second interface module 32 are connected with first embroidery machine 61 is with second embroidery machine 62 corresponding respectively, send control information to first embroidery machine 61 and second embroidery machine 62 respectively, and receive the feedback information that first embroidery machine 61 and second embroidery machine 62 return respectively.Processing module 2 connects receiver module 1, and connects first interface module 31 and second interface module 32 respectively, realizes carrying out the mutual transmission of information with first embroidery machine 61 and second embroidery machine 62 by first interface module 31 and second interface module 32.Processing module 2 with receiver module 1 receive data are set or the style data are added the control information that is converted into the control embroidery machine in the fifo buffer to, the control information meeting in the fifo buffer sends to first embroidery machine 61 or second embroidery machine 62 one by one by first interface module 31 or second interface module 32; Simultaneously, processing module 2 is also handled by first embroidery machine 61 of first interface module 31 and 32 receptions of second interface module and the feedback information that second embroidery machine 62 returns, and first embroidery machine 61 and second embroidery machine 62 are detected processing in real time.
The embroidery machine control device that the utility model embodiment provides, by a plurality of interface modules are set, can realize many embroidery machines being monitored by an embroidery machine control device, thereby can realize that an operator can carry out control operation to many embroidery machines simultaneously, has improved production efficiency.Simultaneously, because many embroidery machines can be controlled by an embroidery machine control device, reduced production cost, energy savings.
Further, the embroidery machine control device can comprise: be used to import the input equipment 4 that data and style data are set, input equipment 4 is connected with receiver module 1. and input equipment 4 can be keyboard and/or mouse and/or touch-screen, the staff is provided with parameter by input equipment 4 input corresponding data information, embroidery pattern is set and operation such as colour changing is set. last, data are set for these and the style data message is received by receiver module 1, and pass to processing module 2, with being set, data and style data add the control information that is converted into the control embroidery machine in the fifo buffer by processing module 2 to.
By input equipment is set, can the handled easily personnel in the embroidery machine control device, import data and style data are set, realized that operating personnel can carry out parameter setting and control by input equipment to the embroidery machine control device at any time.
In addition, the embroidery machine control device can also comprise: in order to duty that shows processing module 2 and the display module 5 that shows the duty of embroidery machine, display module 5 is connected with processing module 2.Be specially, display module 5 can be LCD and/or touch-screen, this display module 5 is connected with processing module 2, and the feedback information that the control information that will obtain after will handling by processing module 2 and embroidery machine return is presented on the screen, wherein the information that shows on the screen comprises: the duty of embroidery machine control device, for example: the data message of input equipment input and the progress of work of processing module; The running status of each embroidery machine, for example: information such as position coordinates that embroidery machine is current and embroidery style.
Can handled easily personnel control embroidery machine control device by display module is set, operating personnel can learn the duty of embroidery machine control device and the duty of embroidery machine by display module, can judge easily thus whether embroidery machine control device and embroidery machine be working properly.
In actual applications, after embroidery machine control device and embroidery machine connect and connect power supply, at first the PORT COM of the hardware port of initialization input equipment and receiver module, interface module, software resource dispose and create various threads, mainly are the input threads, receive the data thread, send data thread and user interface (UserInterface; Hereinafter to be referred as: UI) thread.The priority of thread is arranged to different priority according to the actual motion pattern, and high priority thread can be seized the operation of low priority thread, and system is rescheduled to the low priority thread operation of being seized again after the high priority thread operation finishes.In the various threads of creating, adopt the poll processing except receiving the data thread, other threads all adopt thread synchronization to handle, and can save the idle period of thread like this, improve data processing speed.
Fig. 3 is the workflow diagram of the utility model embodiment embroidery machine control device.As shown in Figure 3, the workflow of embroidery machine control device is as follows:
Step 301, receiver module receive data and style data are set.Data are set for this and the style data are imported by input equipment by operating personnel, and this is provided with the parameter that data are used to be provided with embroidery machine, the data message that the style data are used to that embroidery pattern is set and control embroidery machines such as colour changing are set.
When receiver module receive that input module sends data are set the time, the input thread will be handled input equipment, as shown in Figure 4, step 401, judge whether input equipment is operated, and execution in step 402 if input equipment is operated; Step 402, obtain the data of input equipment input; Whether step 403, judgment data are used to operate embroidery machine, if execution in step 404 then, otherwise execution in step 405; Step 404, data are sent to interface module send in the data-message formation, use by sending the data thread; Step 405, data are sent in the UI message queue, use by the UI thread.
Step 302, processing module are provided with data and the control information of style data transaction with what receiver module received.Processing module will receive receiver module be used for operating embroidery machine data are set and the style data are added the control information that fifo buffer is converted into the control embroidery machine to.
Step 303, processing module judge whether control information is to pass to first interface module, if execution in step 304 then; Otherwise execution in step 305.Processing module if this control information is to be used for first embroidery machine of control connection on first interface module, then passes to first interface module with this control information by the content in the analysis and judgement control information; Otherwise this control information is to be used for second embroidery machine of control connection on second interface module, then this control information is passed to second interface module.
Step 304, first interface module send control information to first embroidery machine.Send the data thread by calling, control information is sent to first embroidery machine by first interface module.As shown in Figure 5, it is as follows to the step that first embroidery machine sends data by first interface module to send thread: step 501, judge whether first interface module transmission data queue has control information, if having then execution in step 502; Step 502, obtain the control information that will send; Step 503, control information is sent to first embroidery machine by first interface module.
Step 305, second interface module send control information to second embroidery machine.Send the data thread by calling, control information is sent to second embroidery machine by second interface module.Concrete steps are the same, do not giving unnecessary details at this.
In addition, embroider in the process of work at embroidery machine, embroidery machine also can return feedback information to the embroidery machine control device by interface module, will call this moment to receive data thread reception embroidery machine feedack.As shown in Figure 6, step 601, judge whether interface module has feedback information to arrive, if execution in step 603 then, otherwise execution in step 602; Step 602, reception data thread enter sleep state (Sleep), and receive the processing time that the data thread does not take CPU this moment, has no progeny in through a clock, receives the data thread and be waken up, and regains the processing time of CPU; Step 603, receiver module are obtained and will be received the feedback information that embroidery machine returns; Step 604, feedback information is sent in the UI message queue, by the UI thread process.By above analysis as can be known, what receive that the data thread adopts is the poll processing mode, when not receiving data, receives the data thread and will enter the Sleep state and have no progeny in through a clock and be waken up the response that obtains CPU again.
Controlling embroidery machine at the embroidery machine control device embroiders in the process of work, the UI thread is used to handle the information of the user interface that shows by display module, and the course of work of UI thread step 701, judges whether data are arranged in the UI message queue as shown in Figure 7, if have, then execution in step 702; Step 702, obtain the data in the UI message queue; Step 703, UI thread are handled the data in the UI message queue.Data in the UI message queue comprise: the staff is used to adjust the data of embroidery machine control device parameter and feedback data that embroidery machine returns etc. by input equipment input.When the staff operates the embroidery machine control device by input equipment, parameter is set, embroidery pattern is set, when operation such as pattern is set, the embroidery machine control device need transfer data to embroidery machine, at this moment, sends the processing that the data thread is seized the UI thread, etc. data send finish after, dispatch the UI thread again to work on; Simultaneously, do in the process in the embroidery machine embroidery, when reception data thread has detected data arrival, the UI thread will be seized and receive the data thread, and after upgrading interface information, scheduling reception data thread works on again.
It should be noted that at last: above embodiment only in order to the explanation the technical solution of the utility model, is not intended to limit; Although the utility model is had been described in detail with reference to previous embodiment, those of ordinary skill in the art is to be understood that: it still can be made amendment to the technical scheme that aforementioned each embodiment put down in writing, and perhaps part technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the spirit and scope of each embodiment technical scheme of the utility model.