Trolley of ink-jet printer avoiding collision, device and computer readable storage medium
Technical field
The present invention relates to printing technique field more particularly to a kind of trolley of ink-jet printer avoiding collisions, device and calculating
Machine readable storage medium storing program for executing.
Background technique
With extensive use of the computer on figure or word processing, the application of printer is also become increasingly prevalent,
By printer, people can very easily will be on the text or images outputting to picture in computer.
In current print system, printing person assigns print command by computer, and printer is transmitted computer
Information printed.Common printer has ink-jet printer and laser printer, wherein ink-jet printer using spray head into
Row printing, and laser printer carries out static dump using laser beam and photosensitive drums.Ink-jet printer is cheap and wide because of its
It is general to be applied to Industrial Printing field.
Spray head on ink-jet printer is mounted on the bottom plate of trolley, and under the drive of trolley, spray head can be not
Tongfang moves up.Under normal circumstances, the trolley of ink-jet printer can rolling that is longitudinal and transverse above print platform, erecting three directions
It is driven and is moved by servo motor on pearl guide rail.Wherein trolley is gone up and down in slide rail pair by servo motor driving screw rod, spray head
It is mounted on the bottom plate of trolley, exists between the upper surface of printing medium apart from Serve Motor Control on the spray orifice face of spray head and platform
Between 2~3 millimeters.Frictional force between slide rail pair sliding block and guide rail can because in sliding block containing the oil ageing in oil felt pad
(oxidation of air, the destruction of dust) is failed and is increased, to make lift servo motor position error increase, until causing trolley
Bottom plate and work top collide, and cause ink-jet moving of car abnormal, trolley is beyond maximum or minimum stroke, with printer trolley
Mechanicalness collision occurs for anticollision edge, damages to trolley and printer trolley anticollision.
It is existing to prevent trolley from colliding major mechanical anticollision, or learnt by spray vehicle direction of travel setting elastic slice and sensor
It will collide, then issue instruction and stop motor movement, spray the necessary emergency stop of vehicle at this time, these Anticollision Measures only will collision
Damage reduce, the generation that can not be avoided collision from source.
Summary of the invention
It is a primary object of the present invention to propose a kind of trolley of ink-jet printer avoiding collision, device and computer-readable deposit
Storage media, it is intended to solve not can avoid the technical issues of trolley collides in existing trolley of ink-jet printer anticollision.
To achieve the above object, one aspect of the present invention provides a kind of printer trolley avoiding collision, which comprises
According to trolley current location and trolley current kinetic Distance Judgment trolley whether dyskinesia;
When dyskinesia occurs for trolley, stop to the motor transmission movement instruction for driving moving of car.
Further, it is described according to trolley current location and trolley current kinetic Distance Judgment trolley whether dyskinesia packet
It includes:
Trolley current location is determined according to grating;
It is counted by motor pulse and determines trolley current kinetic distance;
By the current location and current kinetic distance respectively compared with trolley predeterminated position and predetermined movement distance
Compared with, judge trolley whether dyskinesia.
Further, it is described by the current location and current kinetic distance respectively with trolley predeterminated position and default
Move distance compares, and judges whether dyskinesia includes: trolley
Corresponding current preset position is determined according to the current location;
Corresponding current preset move distance is determined according to the current preset position;
When the current kinetic distance, which deviates the current preset move distance, exceeds the first preset range, trolley is determined
Dyskinesia occurs;
When the current kinetic distance deviates the current preset move distance without departing from the first preset range, determine small
Dyskinesia does not occur for vehicle.
Optionally, the predeterminated position and predetermined movement distance are stored in predeterminated position and the corresponding table of predetermined movement distance
In, it is described to determine that corresponding current preset move distance includes: according to the current preset position
The corresponding predetermined movement distance in current preset position is searched in predeterminated position and the corresponding table of predetermined movement distance, i.e.,
For current preset move distance.
Optionally, the predeterminated position and predetermined movement distance meet default equation, described according to the current preset position
It sets and determines that corresponding current preset move distance includes:
Current preset move distance is determined according to current preset position and the default equation.
Further, the method also includes:
When dyskinesia does not occur for trolley, judge whether the motion impulse of trolley counts distance anti-beyond printer trolley
The range hit;
When the motion impulse of trolley counts the range that distance exceeds printer trolley anticollision, prompt system reports an error letter
Breath stops starting moving of car.
Another aspect of the present invention also provides a kind of printer trolley anticollision device, collision-prevention device, the printer trolley anticollision device, collision-prevention device packet
It includes:
First judgment module, it is different for whether being moved according to trolley current location and trolley current kinetic Distance Judgment trolley
Often;
First control module, for when dyskinesia occurs for trolley, stopping to the motor transmission fortune for driving moving of car
Dynamic instruction.
Further, the first judgment module includes:
First determining module, for determining trolley current location according to grating;
Second determining module determines trolley current kinetic distance for counting by motor pulse;
Comparison module, for by the current location and current kinetic distance respectively with trolley predeterminated position and default
Move distance compares, judge trolley whether dyskinesia.
Further, the printer trolley anticollision further include:
Second judgment module, for when dyskinesia does not occur for trolley, judge trolley motion impulse count distance be
The no range beyond printer trolley anticollision;
Second control module counts the maximum row that distance exceeds printer trolley anticollision for the motion impulse when trolley
Journey, prompt system error information stop starting moving of car.
Another aspect of the present invention also provides a kind of computer readable storage medium, the computer-readable recording medium storage
There is one or more program, one or more of programs can be executed by one or more processor, above-mentioned to realize
Each step of any printer trolley avoiding collision.
A kind of printer trolley avoiding collision, device and computer readable storage medium provided by the invention, by real-time
Trolley current location and trolley current kinetic distance are obtained, according to trolley current location and trolley current kinetic Distance Judgment trolley
Whether dyskinesia;When dyskinesia occurs for trolley, stop to the motor transmission movement instruction for driving moving of car.Pass through
The present invention can prejudge whether trolley can collide according to the motion conditions of trolley, when determining that trolley can send collision
When, stop moving of car in time, to effectively trolley be avoided to collide, reduces mechanical damage, extend printer trolley anticollision
Service life.
Detailed description of the invention
Fig. 1 is a kind of printer trolley avoiding collision flow chart that the embodiment of the present invention one provides;
Fig. 2 be the embodiment of the present invention it is a kind of judge trolley whether the flow chart of dyskinesia;
Fig. 3 is a kind of printer trolley avoiding collision flow chart provided by Embodiment 2 of the present invention;
Fig. 4 is a kind of structural schematic diagram for printer trolley anticollision device, collision-prevention device that the embodiment of the present invention three provides;
Fig. 5 is the structural schematic diagram of the trolley of ink-jet printer anticollision gear of the embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element
Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
The present invention provides a kind of printer trolley avoiding collision, which comprises
S1, according to trolley current location and trolley current kinetic Distance Judgment trolley whether dyskinesia;
S2, when trolley occur dyskinesia when, stop to drive moving of car motor send movement instruction.
A kind of printer trolley avoiding collision provided by the invention, it is current by obtaining trolley current location and trolley in real time
Move distance, according to trolley current location and trolley current kinetic Distance Judgment trolley whether dyskinesia;When trolley is transported
When dynamic abnormal, stop to the motor transmission movement instruction for driving moving of car.It through the invention can be according to the movement feelings of trolley
Condition prejudges whether trolley can collide, and when determining that trolley can send collision, stops moving of car in time, thus effectively
It avoids trolley from colliding, reduces mechanical damage, extend the service life of printer trolley anticollision.
Detailed description of the preferred embodiments below.
Embodiment one
A kind of printer trolley avoiding collision provided as shown in Figure 1 for the embodiment of the present invention one, which comprises
S101, according to trolley current location and trolley current kinetic Distance Judgment trolley whether dyskinesia;
Specifically, this step includes:
S1011, trolley current location is determined according to grating;
Specifically, grating can be grating scale, it is also possible to grating sensor.
S1012, determining trolley current kinetic distance is counted by motor pulse;
S1013, by the current location and current kinetic distance respectively with trolley predeterminated position and predetermined movement away from
From comparing, judge trolley whether dyskinesia.
Specifically, as shown in Fig. 2, this step includes:
S201, corresponding current preset position is determined according to the current location;
Wherein, current preset position is to be stored in advance in small truck position information in print system, specifically can be trolley company
The location information of continuous property, is also possible to the location information of trolley discontinuity.For successional location information, can find small
The corresponding current preset position in the real-time current location of vehicle;It, in the specific implementation process, may for the location information of discontinuity
It appearance the case where searching current preset position corresponding less than the real-time current location of trolley, can will be in current location distance recently
Predeterminated position be set as current preset position, alternatively, by be located at current location pre-determined distance within the scope of predeterminated position be arranged
For current preset position.
S202, corresponding current preset move distance is determined according to the current preset position;
Wherein, predeterminated position and predetermined movement distance be the pre-stored trolley of system in the location of synchronization and
The distance of moving of car.
In a specific embodiment, the predeterminated position and predetermined movement distance are stored in predeterminated position and default fortune
In the dynamic corresponding table of distance, for example, in table 1, using 5S as time interval, obtain predeterminated position and predetermined movement distance be stored in it is default
At interval of the position that should be reached 5S and move distance when position and predetermined movement distance correspond to table, i.e. moving of car.
1 predeterminated position of table and predetermined movement distance are stored in predeterminated position and the corresponding table of predetermined movement distance
It is described to determine that corresponding current preset move distance includes: according to the current preset position in present embodiment
The corresponding predetermined movement distance in current preset position is searched in predeterminated position and the corresponding table of predetermined movement distance, i.e.,
For current preset move distance.
In another embodiment specific implementation mode, the predeterminated position and predetermined movement distance meet default equation.Specifically
Equation is related to the motion profile of trolley, and the default equation of predeterminated position and predetermined movement distance satisfaction can be moved according to physics
Rule determines;For example, trolley is along linear motion, then predeterminated position s1And predetermined movement distance s2Meet equation: s1=s0+
s2;s0For trolley initial position.
It is described to determine that corresponding current preset move distance includes: according to the current preset position in present embodiment
Current preset move distance is determined according to current preset position and the default equation.
Specifically, default equation can be linear equation, parabolic equation etc., the present invention is not especially limited.
S203, when current kinetic distance deviates the current preset move distance and exceeds the first preset range, really
Determine trolley and dyskinesia occurs.
Wherein, the first preset range can according to the actual situation and error allow range be determined.
S102, when trolley occur dyskinesia when, stop to drive moving of car motor send movement instruction.
Embodiment two
Second embodiment of the present invention provides a kind of printer trolley avoiding collisions, as shown in figure 3, this method comprises:
S301, according to trolley current location and trolley current kinetic Distance Judgment trolley whether dyskinesia;
Specifically, this step includes:
S3011, trolley current location is determined according to grating;
Specifically, grating can be grating scale, it is also possible to grating sensor.
S3012, determining trolley current kinetic distance is counted by motor pulse;
S3013, by the current location and current kinetic distance respectively with trolley predeterminated position and predetermined movement away from
From comparing, judge trolley whether dyskinesia.
Specifically, this step includes:
S21, corresponding current preset position is determined according to the current location;
Wherein, current preset position is to be stored in advance in small truck position information in print system, specifically can be trolley company
The location information of continuous property, is also possible to the location information of trolley discontinuity.For successional location information, can find small
The corresponding current preset position in the real-time current location of vehicle;It, in the specific implementation process, may for the location information of discontinuity
It appearance the case where searching current preset position corresponding less than the real-time current location of trolley, can will be in current location distance recently
Predeterminated position be set as current preset position, alternatively, by be located at current location pre-determined distance within the scope of predeterminated position be arranged
For current preset position.
S22, corresponding current preset move distance is determined according to the current preset position;
Wherein, predeterminated position and predetermined movement distance be the pre-stored trolley of system in the location of synchronization and
The distance of moving of car.
In a specific embodiment, the predeterminated position and predetermined movement distance are stored in predeterminated position and default fortune
It is described to determine that corresponding current preset move distance includes: according to the current preset position in the dynamic corresponding table of distance
The corresponding predetermined movement distance in current preset position is searched in predeterminated position and the corresponding table of predetermined movement distance, i.e.,
For current preset move distance.
In another embodiment specific implementation mode, the predeterminated position and predetermined movement distance, which meet, presets equation, and described
Determine that corresponding current preset move distance includes: according to the current preset position
Current preset move distance is determined according to current preset position and the default equation.
Wherein, default equation can be linear equation, parabolic equation etc., and the present invention is not especially limited.
S23, when current kinetic distance deviates the current preset move distance without departing from the first preset range, really
Determine trolley and dyskinesia does not occur.
Wherein, the first preset range can according to the actual situation and error allow range be determined.
S302, when dyskinesia does not occur for trolley, judge that whether the motion impulse of trolley counts distance beyond printer
The range of trolley anticollision;
S303, range of the motion impulse counting distance beyond printer trolley anticollision when trolley, prompt system report
Wrong information stops starting moving of car.
Wherein, system error information can be prompted in a manner of voice, can also printed in a manner of text or image
The display onscreen cue of the anticollision of machine trolley or terminal.
Based on above-mentioned each embodiment of the method, the following each printer trolley anticollision embodiment of the present invention is proposed.
Embodiment three
A kind of printer trolley anticollision device, collision-prevention device 4, as shown in figure 4, printer trolley anticollision device, collision-prevention device 4 includes:
First judgment module 41, for whether being moved according to trolley current location and trolley current kinetic Distance Judgment trolley
It is abnormal;
First control module 42, for when dyskinesia occurs for trolley, stopping to the motor transmission for driving moving of car
Movement instruction.
Second judgment module 43, for when dyskinesia does not occur for trolley, judging that the motion impulse of trolley counts distance
Whether the range of printer trolley anticollision is exceeded;
Second control module 44 counts the maximum row that distance exceeds printer trolley anticollision for the motion impulse when trolley
Journey, prompt system error information stop starting moving of car.
In a kind of specific embodiment, the first judgment module 41 includes:
First determining module, for determining trolley current location according to grating;
Second determining module determines trolley current kinetic distance for counting by motor pulse;
Comparison module, for by the current location and current kinetic distance respectively with trolley predeterminated position and default
Move distance compares, judge trolley whether dyskinesia.
In a specific embodiment, the comparison module includes:
Third determining module, for determining corresponding current preset position according to the current location;
4th determining module, for determining corresponding current preset move distance according to the current preset position;
Abnormal determining module, it is pre- beyond first for working as the current kinetic distance deviation current preset move distance
If when range, determining that dyskinesia occurs for trolley.
Normal determining module, for for when current kinetic distance deviate the current preset move distance without departing from
When the first preset range, determine that dyskinesia does not occur for trolley.
In a kind of optional embodiment, the predeterminated position and predetermined movement distance are stored in predeterminated position and preset
Move distance corresponds in table,
4th determining module is specifically used for searching in predeterminated position and the corresponding table of predetermined movement distance current pre-
If the corresponding predetermined movement distance in position, as current preset move distance.
In a kind of optional embodiment, the predeterminated position and predetermined movement distance meet default equation, and described the
Four determining modules, specifically for determining current preset move distance according to current preset position and the default equation.
In addition, the trolley of ink-jet printer avoiding collision in conjunction with Fig. 1 embodiment of the present invention described can be by inkjet printing
Machine trolley anticollision gear is realized.Fig. 5 shows the hardware of trolley of ink-jet printer anticollision gear provided in an embodiment of the present invention
Structural schematic diagram.
Trolley of ink-jet printer anticollision gear may include processor 401 and the storage for being stored with computer program instructions
Device 402.
Specifically, above-mentioned processor 401 may include central processing unit (CPU) or specific integrated circuit
(Application Specific Integrated Circuit, ASIC), or may be configured to implement implementation of the present invention
One or more integrated circuits of example.
Memory 402 may include the mass storage for data or instruction.For example it rather than limits, memory
402 may include hard disk drive (Hard Disk Drive, HDD), floppy disk drive, flash memory, CD, magneto-optic disk, tape or logical
With the combination of universal serial bus (Universal Serial Bus, USB) driver or two or more the above.It is closing
In the case where suitable, memory 402 may include the medium of removable or non-removable (or fixed).In a suitable case, it stores
Device 402 can be inside or outside data processing equipment.In a particular embodiment, memory 402 is nonvolatile solid state storage
Device.In a particular embodiment, memory 402 includes read-only memory (ROM).In a suitable case, which can be mask
ROM, programming ROM (PROM), erasable PROM (EPROM), the electric erasable PROM (EEPROM), electrically-alterable ROM of programming
(EAROM) or the combination of flash memory or two or more the above.
Processor 401 is by reading and executing the computer program instructions stored in memory 402, to realize above-mentioned implementation
The method of any one printer trolley anticollision in example.
In one example, the equipment of printer trolley anticollision may also include communication interface 403 and bus 410.Wherein, such as
Shown in Fig. 5, processor 401, memory 402, communication interface 403 connect by bus 410 and complete mutual communication.
Communication interface 403 is mainly used for realizing in the embodiment of the present invention between each module, device, unit and/or equipment
Communication.
Bus 410 includes hardware, software or both, and the component of the equipment of printer trolley anticollision is coupled to each other one
It rises.For example it rather than limits, bus may include accelerated graphics port (AGP) or other graphics bus, enhancing industrial standard frame
Structure (EISA) bus, front side bus (FSB), super transmission (HT) interconnection, Industry Standard Architecture (ISA) bus, infinite bandwidth interconnection,
Low pin count (LPC) bus, memory bus, micro- channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-
Express (PCI-X) bus, Serial Advanced Technology Attachment (SATA) bus, Video Electronics Standards Association part (VLB) bus or
The combination of other suitable buses or two or more the above.In a suitable case, bus 410 may include one
Or multiple buses.Although specific bus has been described and illustrated in the embodiment of the present invention, the present invention considers any suitable bus
Or interconnection.
Example IV
The embodiment of the present invention four provides a kind of computer readable storage medium, and the computer-readable recording medium storage has
One or more program, one or more of programs can be executed by one or more processor, to realize following step
It is rapid:
According to trolley current location and trolley current kinetic Distance Judgment trolley whether dyskinesia;
When dyskinesia occurs for trolley, stop to the motor transmission movement instruction for driving moving of car.
In a specific embodiment, described to be according to trolley current location and trolley current kinetic Distance Judgment trolley
In no dyskinesia step, one or more of programs can be executed by one or more processor, to realize following step
It is rapid:
Trolley current location is determined according to grating;
It is counted by motor pulse and determines trolley current kinetic distance;
By the current location and current kinetic distance respectively compared with trolley predeterminated position and predetermined movement distance
Compared with, judge trolley whether dyskinesia.
In a specific embodiment, described that the current location and current kinetic distance is pre- with trolley respectively
If position and predetermined movement distance compare, trolley is judged whether in dyskinesia step, one or more of programs can
It is executed by one or more processor, to perform the steps of
Corresponding current preset position is determined according to the current location;
Corresponding current preset move distance is determined according to the current preset position;
When the current kinetic distance deviates the current preset move distance preset range, determine that trolley moves
It is abnormal;
When the current kinetic distance deviates the current preset move distance without departing from the first preset range, determine small
Dyskinesia does not occur for vehicle.
In a specific embodiment, the predeterminated position and predetermined movement distance are stored in predeterminated position and default fortune
It is described to be determined in corresponding current preset move distance step according to the current preset position in the dynamic corresponding table of distance, it is described
One or more program can be executed by one or more processor, to perform the steps of
The corresponding predetermined movement distance in current preset position is searched in predeterminated position and the corresponding table of predetermined movement distance, i.e.,
For current preset move distance.
In a specific embodiment, the predeterminated position and predetermined movement distance meet default equation, the basis
The current preset position determines in corresponding current preset move distance step that one or more of programs can be by one
Or multiple processors execute, to perform the steps of
Current preset move distance is determined according to current preset position and the default equation.
In a specific embodiment, described to be according to trolley current location and trolley current kinetic Distance Judgment trolley
After no dyskinesia step, one or more of programs can be executed by one or more processor, following to realize
Step:
When dyskinesia does not occur for trolley, judge whether the motion impulse of trolley counts distance anti-beyond printer trolley
The range hit;
When the motion impulse of trolley counts the range that distance exceeds printer trolley anticollision, prompt system reports an error letter
Breath stops starting moving of car.
A kind of printer trolley avoiding collision, device and computer readable storage medium provided by the invention, by real-time
Trolley current location and trolley current kinetic distance are obtained, according to trolley current location and trolley current kinetic Distance Judgment trolley
Whether dyskinesia;When dyskinesia occurs for trolley, stop to the motor transmission movement instruction for driving moving of car.Pass through this
Invention can prejudge whether trolley can collide according to the motion conditions of trolley, when determining that trolley can send collision,
Stop moving of car in time, to effectively trolley be avoided to collide, reduces mechanical damage, extend making for printer trolley anticollision
Use the service life.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the printer trolley anticollision that include a series of elements not only include that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of printer trolley anticollision.In the absence of more restrictions, limited by sentence "including a ..."
Element, it is not excluded that including that there is also other identical in the process, method of the element, article or printer trolley anticollision
Element.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a printer trolley anticollision (can be mobile phone, count
Calculation machine, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form, all of these belong to the protection of the present invention.