A kind of two-way colour code distance and color lump are apart from automatic testing method and device
Technical field
The present invention relates to digital spray printing technical field more particularly to a kind of two-way colour code distances and the automatic detection of color lump distance
Method and device.
Background technique
Digital spray printing technology is a kind of contactless printing technology that high speed development gets up in recent years, digital inkjet printer
Appearance and rapid development, just changing the theory of traditional printing.With the continuous promotion of inkjet print head spray printing speed, print
Brush chart drive speed is also being continuously improved, and how to guarantee the synchronization between spray head even nozzle, improves chromatography precision, just become and determine spray
The important indicator of ink print machine performance.
In the prior art, it generally takes colour code to add the synchronizing device of encoder, is gone out by color spot graph and print start bit, then
Encoder pulse signal is converted by the distance of paper feed by encoder.However usually there is error in encoder itself, it is general to show
Transmission device in terms of, the actual range and theoretical calculation distance that cause each encoder pulse to represent
There are deviations to influence print quality so as to cause range error.
In cigarette packet print field, since the paper of printing is generally wider, and sheet-fed mode of printing is mostly used, paper meeting
There are certain deflections, sometimes can be using in such a way that a color mark sensor is respectively installed in paper two sides, to eliminate paper deflection
Afterwards to from chromatography error brought by color mark sensor farther out spray orifice.Mounting distance of two color mark sensors on page orientation
Also becoming an important factor for determining space of a whole page chromatography precision, the method that hand dipping obtains the distance not only operates inconvenience,
Measurement accuracy also it is difficult to ensure that.
Further, since the specific properties of cigarette packet stock, often there is multiple rows of colour code on a piece of paper face, need to guarantee colour code
Sensor has been correctly detecting each colour code.Paper deflection is possible to will lead to colour code missing inspection, and the space of a whole page of content complexity or
Dirt is likely to result in colour code erroneous detection again, so as to cause printing error.To prevent above situation from occurring, color can be added in systems
Defencive function is marked, the appearance position of each color lump is measured in advance, and increase by the error range of 1~5mm, occurs in the range
Colour code will correctly be responded, the colour code occurred outside the range will be filtered out, and not occur colour code Shi Keli in the range
A virtual colour code is automatically generated by system, guarantees that all image datas are all printed.Therefore, how correctly to prejudge every
The appearance position of a color lump will determine the final detection accuracy of colour code.If it is inaccurate that color lump prejudges position, increase can only be passed through
The method of error range guarantees that all colour codes are correctly responded, and so, when losing mark situation and really occurring, system is automatic
Generating benefit target movement will excessively lag, and influence image print quality.
Summary of the invention
The technical problems to be solved by the present invention are: existing colour code is big apart from detection error, cause print quality low
Problem.
In order to solve the above technical problems, a kind of two-way colour code distance of the present invention and color lump are apart from automatic testing method and dress
It sets, including following technical solution:
A kind of two-way colour code is apart from automatic testing method, comprising:
When first via color mark sensor detects first via colour code, the first counter of detection two-way colour code distance starts
It counts, when the first via color mark sensor often detects an encoder pulse, the value of first counter adds 1;
When the second road color mark sensor detects the second road colour code, first counter stops counting, described in determination
The value of first counter is two-way colour code distance;
Wherein, first counter is arranged on fpga chip.
Optionally, after the value of the determination first counter is two-way colour code distance, further includes:
Two-way colour code distance is stored on fpga chip.
Optionally, the two-way colour code is apart from automatic testing method further include:
The two-way colour code distance is shown on the interface of interactive software.
A kind of two-way colour code is apart from automatic detection device, comprising:
First via color mark sensor, the second road color mark sensor, encoder, signal processor and fpga chip;
The fpga chip includes the first counter;
The first via color mark sensor is for detecting first via colour code;
Second road color mark sensor is for detecting the second road colour code;
The encoder is for generating encoder pulse train;
The signal processor is for receiving the first via color mark sensor, the second road color mark sensor and encoder
Signal is simultaneously sent to the fpga chip;
First counter is used to determine two-way colour code distance according to the signal after signal processor processes.
Optionally, the fpga chip further includes memory;
The memory is for storing the two-way colour code distance.
A kind of color lump is apart from automatic testing method, comprising:
When first via color mark sensor detects first via colour code, the first counter and the inspection of two-way colour code distance are detected
The second counter for surveying the distance of first via color lump starts counting, and the first via color mark sensor often detects an encoder
When pulse, the value of first counter and the second counter adds 1;
When first via color mark sensor detects the new color lump of first via colour code, using the value of current second counter as
The initial position of the new color lump stores;
When the second road color mark sensor detects the second road colour code, first counter stops counting, described in determination
The value of first counter is two-way colour code distance;The third counter starts counting, the every inspection of second road color mark sensor
When measuring an encoder pulse, the value of the third counter adds 1;
When the second road color mark sensor detects the new color lump of the second road colour code, using the value of current third counter as
The initial position of the new color lump stores;
The color lump distance that first via colour code is determined according to the initial position of each color lump of first via colour code, according to the second tunnel
The initial position of each colour code of colour code determines the distance of the color lump of the second road colour code;
Wherein, first counter, the second counter and third counter are arranged on fpga chip.
The color lump further includes originating the color lump of the two-way colour code distance, first via colour code apart from automatic testing method
Position and the color lump initial position of the second road colour code are stored on fpga chip.
The color lump is apart from automatic testing method further include:
By the two-way colour code distance, the color lump initial position of the color lump initial position of first via colour code and the second road colour code
It shows on the interface of interactive software.
A kind of color lump is apart from automatic detection device, comprising:
First via color mark sensor, the second road color mark sensor, encoder, signal processor and fpga chip;
The fpga chip includes the first counter, the second counter and third counter;
The first via color mark sensor is for detecting first via colour code;
Second road color mark sensor is for detecting the second road colour code;
The encoder is for generating encoder pulse train;
The signal processor is for receiving the first via color mark sensor, the second road color mark sensor and encoder
Signal is simultaneously sent to the fpga chip;
First counter is used to determine two-way colour code distance according to the signal after signal processor processes;
Second counter is used to determine the color lump distance of first via colour code according to the signal after signal processor processes;
Second counter is used to determine the color lump distance of the second road colour code according to the signal after signal processor processes.
Optionally, the fpga chip further includes memory;
The initial position of each color lump of the memory for storing the two-way colour code distance, the first via colour code
With the initial position of each color lump of second road colour code.
Two-way colour code distance provided by the invention and color lump are apart from automatic testing method and device, using encoder pulse meter
Several methods detects the distance of two-way colour code automatically, avoid manual measurement two-way colour code apart from bring error.Meanwhile by
Actual metric length is replaced using encoder pulse count value in colour code distance, can eliminate that encoder pulse is practical to be represented
The deviation of paper distance and theoretical value.Two-way colour code distance and color lump of the invention is improved apart from automatic testing method and device
The precision of detection two-way colour code distance and color lump distance, improves printing quality.
Detailed description of the invention
The features and advantages of the present invention will be more clearly understood by referring to the accompanying drawings, and attached drawing is schematically without that should manage
Solution is carries out any restrictions to the present invention, in the accompanying drawings:
Fig. 1 shows flow diagram of the two-way colour code of one embodiment of the invention apart from automatic testing method;
Structural schematic diagram Fig. 2 shows the two-way colour code of one embodiment of the invention apart from automatic detection device;
Fig. 3 shows flow diagram of the color lump apart from automatic testing method of one embodiment of the invention;
Fig. 4 shows the counting flow diagram of the counter of one embodiment of the invention;
Fig. 5 shows the information schematic diagram that the interactive software of one embodiment of the invention is shown;
Fig. 6 shows structural schematic diagram of the color lump apart from automatic detection device of one embodiment of the invention;
Fig. 7 is to show the paper color lump distribution schematic diagram of one embodiment of the invention.
Specific embodiment
Below in conjunction with attached drawing, embodiments of the present invention is described in detail.
In following specific embodiments, paper type is sheet-fed, and two rows of color lumps, the color lump on paper are printed on every paper
Distribution is as shown in Figure 7.In practical applications, it is concordant on paper to have done corresponding first benchmark color lump for two-way colour code bed,
Guarantee the accuracy of two-way color mark sensor distance detection.
Fig. 1 is flow diagram of the two-way colour code of one embodiment of the invention apart from automatic testing method.Such as Fig. 1 institute
Show, which includes: apart from automatic testing method
S11: when first via color mark sensor detects first via colour code, the first counter of two-way colour code distance is detected
It starts counting, when the first via color mark sensor often detects an encoder pulse, the value of first counter adds 1;
S12: when the second road color mark sensor detects the second road colour code, first counter stops counting, and determines
The value of first counter is two-way colour code distance;
Wherein, first counter is arranged on fpga chip.
The two-way colour code of the present embodiment is detected double automatically apart from automatic testing method using the method for encoder pulse count
The distance of road colour code, avoid manual measurement two-way colour code apart from bring error.Simultaneously as colour code distance uses coding
Device counted number of pulses replaces actual metric length, can eliminate the practical paper distance and theoretical value represented of encoder pulse
Deviation.Embodiment improves the precision of detection two-way colour code distance, improve printing quality.
It is two-way colour code apart from it in the value of the determination first counter in a kind of optional embodiment
Afterwards, further includes:
Two-way colour code distance is stored on fpga chip.
In practical applications, in order to increase the user friendly of the two-way colour code apart from automatic testing method, the two-way color
Subject distance automatic testing method further include:
The two-way colour code distance is shown that on the interface of interactive software, user looks into which can be convenient on interactive software
The two-way colour code distance that inquiry is indicated with encoder pulse number.
Structural schematic diagram Fig. 2 shows the two-way colour code of one embodiment of the invention apart from automatic detection device.Such as Fig. 2
Shown, which includes: apart from automatic detection device
First via color mark sensor 21, the second road color mark sensor 22, encoder 23, signal processor 24 and fpga chip
25;
Fpga chip 25 includes the first counter;
First via color mark sensor 21 is for detecting first via colour code;
Second road color mark sensor 22 is for detecting the second road colour code;
Encoder 23 is for generating encoder pulse train;
Signal processor 24 is for receiving first via color mark sensor 21, the second road color mark sensor 22 and encoder 23
Signal is simultaneously sent to fpga chip 25;
First counter is used for that treated that signal determines two-way colour code distance according to signal processor 24.
It should be noted that
In a kind of optional embodiment, the fpga chip further includes memory;
The memory is for storing the two-way colour code distance.
In practical applications, settable interactive software, for receiving the two-way colour code distance of fpga chip storage and showing.
The two-way colour code of the present embodiment can be used for executing above method embodiment apart from automatic detection device, principle and
Technical effect is similar, and details are not described herein again.
Fig. 3 shows flow diagram of the color lump apart from automatic testing method of one embodiment of the invention.Such as Fig. 3 institute
Show, the color lump of the embodiment is apart from automatic testing method, comprising:
S31: when first via color mark sensor detects first via colour code, the first counter of two-way colour code distance is detected
It is started counting with the second counter of the distance of detection first via color lump, the first via color mark sensor often detects a volume
When code device pulse, the value of first counter and the second counter adds 1;
S32: when first via color mark sensor detects the new color lump of first via colour code, by the value of current second counter
Initial position as the new color lump stores;
S33: when the second road color mark sensor detects the second road colour code, first counter stops counting, and determines
The value of first counter is two-way colour code distance;The third counter starts counting, second road color mark sensor
When often detecting an encoder pulse, the value of the third counter adds 1;
S34: when the second road color mark sensor detects the new color lump of the second road colour code, by the value of current third counter
Initial position as the new color lump stores;
S35: determining the color lump distance of first via colour code according to the initial position of each color lump of first via colour code, according to
The initial position of each colour code of two road colour codes determines the distance of the color lump of the second road colour code;
Wherein, first counter, the second counter and third counter are arranged on fpga chip.
In a kind of optional embodiment, which further includes apart from automatic testing method, by the two-way colour code away from
Color lump initial position from, the color lump initial position of first via colour code and the second road colour code is stored on fpga chip.
Fig. 4 shows the counting flow diagram of the counter of one embodiment of the invention.As shown in figure 4, working as counter
When corresponding color mark sensor detects the 1st color lump, counter is started counting.When corresponding color mark sensor detects 1
When new color lump, the value of nonce counter is written in corresponding memory, while the color lump number that corresponding color mark sensor detects
Add 1, detecting when color lump number has reached designated value terminates.After counting starts, 1 encoder pulse, counter are often detected
Value add 1 automatically.When the value of counter reaches the upper limit, detection terminates.It was entirely detected in conclusion terminating color mark sensor
The condition of journey has 2, first is that the color lump number detected reaches requirement, second is that the value of counter reaches the upper limit.Above 2 conditions
As long as meet it is therein any one, detection terminate.
Embodiment with above-mentioned two-way colour code apart from automatic testing method is similar, which also wraps apart from automatic testing method
It includes:
By the two-way colour code distance, the color lump initial position of the color lump initial position of first via colour code and the second road colour code
It shows on the interface of interactive software.
In practical applications, the paper feed operation of certain distance need to be only completed, interactive software can be by two-way colour code distance, the
The color lump distance of colour code and the color lump distance of the second road colour code are shown all the way, replace artificial statistics and measurement, measurement completely
Visual result is reliable.
As shown in figure 5, the information schematic diagram that the interactive software for showing one embodiment of the invention is shown.Due to using volume
Code device step-by-step counting directly indicates the mode of distance, can eliminate calculating distance and actual measurement distance caused by encoder errors
Error, by color lump anticipation position tolerable error range reduce as far as possible, to the maximum extent promoted color spot graph protection essence
True property substantially reduces the probability of colour code missing inspection, erroneous detection, promotes the real-time for mending mark operation, improves print quality.
Fig. 6 shows structural schematic diagram of the color lump apart from automatic detection device of one embodiment of the invention.Such as Fig. 6 institute
Show, the color lump of the embodiment is seen apart from automatic detection device, comprising:
First via color mark sensor 61, the second road color mark sensor 62, encoder 63, signal processor 64 and fpga chip
65;
Fpga chip 65 includes the first counter, the second counter and third counter;
First via color mark sensor 61 is for detecting first via colour code;
Second road color mark sensor 62 is for detecting the second road colour code;
Encoder 63 is for generating encoder pulse train;
Signal processor 64 is for receiving first via color mark sensor 61, the second road color mark sensor 62 and encoder 63
Signal is simultaneously sent to fpga chip 65;
First counter is used to determine two-way colour code distance according to the signal after signal processor processes;
Second counter is used to determine the color lump distance of first via colour code according to the signal after signal processor processes;
Second counter is used to determine the color lump distance of the second road colour code according to the signal after signal processor processes.
In a kind of optional embodiment, the fpga chip further includes memory;
The initial position of each color lump of the memory for storing the two-way colour code distance, the first via colour code
With the initial position of each color lump of second road colour code.
The color lump of the present embodiment can be used for executing above method embodiment, principle and technology apart from automatic detection device
Effect is similar, and details are not described herein again.
Two-way colour code distance provided by the invention and color lump are apart from automatic testing method and device, using encoder pulse meter
Several methods detects the distance of two-way colour code automatically, avoid manual measurement two-way colour code apart from bring error.Meanwhile by
Actual metric length is replaced using encoder pulse count value in colour code distance, can eliminate that encoder pulse is practical to be represented
The deviation of paper distance and theoretical value.Two-way colour code distance and color lump of the invention is improved apart from automatic testing method and device
The precision of detection two-way colour code distance and color lump distance, improves printing quality.
Although the embodiments of the invention are described in conjunction with the attached drawings, but those skilled in the art can not depart from this hair
Various modifications and variations are made in the case where bright spirit and scope, such modifications and variations are each fallen within by appended claims
Within limited range.