CN110286652A - A kind of control system method based on H-BOT structure - Google Patents
A kind of control system method based on H-BOT structure Download PDFInfo
- Publication number
- CN110286652A CN110286652A CN201910533800.2A CN201910533800A CN110286652A CN 110286652 A CN110286652 A CN 110286652A CN 201910533800 A CN201910533800 A CN 201910533800A CN 110286652 A CN110286652 A CN 110286652A
- Authority
- CN
- China
- Prior art keywords
- quadrant
- control module
- interpolation
- control
- module
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 25
- 238000004891 communication Methods 0.000 claims abstract description 13
- 230000033001 locomotion Effects 0.000 claims description 29
- 238000004364 calculation method Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 9
- 238000004422 calculation algorithm Methods 0.000 description 8
- 238000010586 diagram Methods 0.000 description 6
- 238000013461 design Methods 0.000 description 4
- 230000007246 mechanism Effects 0.000 description 4
- 238000013459 approach Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 238000012360 testing method Methods 0.000 description 3
- 230000005611 electricity Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000003754 machining Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 238000012913 prioritisation Methods 0.000 description 1
- 238000004064 recycling Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
- G05B19/41—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by interpolation, e.g. the computation of intermediate points between programmed end points to define the path to be followed and the rate of travel along that path
- G05B19/4103—Digital interpolation
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/30—Nc systems
- G05B2219/34—Director, elements to supervisory
- G05B2219/34092—Polar interpolation
Landscapes
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Numerical Control (AREA)
Abstract
The present invention provides a kind of control system method based on H-BOT structure comprising control module, OLED module, independent key, stepper motor, wherein there is control module serial ports asynchronous communication, data parsing, G code to parse functional unit;STEP, DIR pin of control module are by inputting different pulse signal frequencies and configuring the positive and negative rotation of different state value control stepper motors;Control module is connect by its serial ports asynchronous communication interface with OLED module and independent key module by signal.The present invention solves the problems, such as that circular interpolation cannot be across quadrant due to designing using four-quadrant circular interpolation.
Description
Technical field
The invention belongs to numerical control open-loop control system field more particularly to a kind of control system sides based on H-BOT structure
Method.
Background technique
The structure of H-BOT converts cartesian coordinate system, and the rotation of two stepper motors is followed with a synchronous belt
And move, when left and right stepper motor direction of rotation is identical, executing agency is mobile to X-axis, when two motor opposite directions rotate,
Executing agency is mobile to Y-axis.When two motors rotate simultaneously, the torque of stepper motor is greater than the torque that single motor generates,
Motor imagination is improved, and also reduces the weight of the stepper motor above XY platform.
As shown in Figure 1, the motion principle of stepper motor is as follows:
A is inverse along B, moves to+Y-axis;
A is suitable against B, moves to-Y-axis;
A is suitable along B, moves to+X-axis;
A is inverse against B, moves to-X-axis.
Δ X=1/2 (Δ A+ Δ B), Δ Y=1/2 (Δ A- Δ B) (1-1)
Δ A=Δ X+ Δ Y, Δ B=Δ X- Δ Y (1-2)
Common circular interpolation is used in H-BOT structure, because the conversion of coordinate can not realize circular interpolation just
Often work.When circular interpolation, adjacent two quadrants circular interpolation calculation formula is different, and direction of feed is different, therefore, crosses quarter round
It needs to consider quadrant problem when arc interpolation, otherwise, mistake will occur for when interpolation.
The mark that circular arc crosses quadrant is moving coordinates xi=0 or yi=0.So carry out circular interpolation when, reference axis often into
To a step, other than needing to carry out end point judging, quadrantal points is the variation that carry out interpolation operation.(it is detailed in " point-by-point comparison circular arc
Locus interpolation crosses the analysis differentiated when quadrant with symbol "-Wu Xiaosu)).
At " motion control arithmetic of plane H-bot mechanism ", Ding Chengjun, " the sketch robot based on Arduino is set
Meter " algorithm research of linear interpolation in H-BOT structure is only able to find in document, corresponding arc interpolation is not found, and
And be that circular arc is approached using camber line for two axis open source numerical control system G RBL (G code interpreter) its circular interpolation, so needing
A kind of interpolation algorithm of the circular interpolation across quadrant.
Summary of the invention
It is an object of the invention to solve the problems of the above-mentioned prior art, a kind of control based on H-BOT structure is provided
Systems approach processed can be designed using four-quadrant circular interpolation, and due to reducing the judgement of quadrant, calculation code is more succinct high
Effect, solves the problems, such as that original design circular interpolation cannot be across quadrant.
The present invention adopts the following technical scheme:
A kind of control system method based on H-BOT structure, comprising the following steps:
The setting of step 1. system initialization, presses the button, from serial ports input data to control module, OLED is made to enter system
Main interface.
Step 2. control module parses data, including extracting the floating number that designated character starts in character string,
Nonnumeric character stopping is encountered, and is assigned to double-precision floating points value;Control module parses G code.
Step 3. control module judges motion control or steering engine control according to the instruction of input;
If motion control, then pulse frequency is calculated;
If linear interpolation, then controls stepper motor and move to designated position, and string is passed through by control module, that is, slave computer
Mouth returns data into host computer.
If circular interpolation, then controls stepper motor and move to designated position, and string is passed through by control module, that is, slave computer
Mouth returns data into host computer.
The further technical solution of the present invention is, the control system of H-BOT structure includes: control module, OLED module, solely
Vertical key, stepper motor,
Wherein there is control module serial ports asynchronous communication, data parsing, G code to parse functional unit;
STEP, DIR pin of control module are by inputting different pulse signal frequencies and configuring different state value controls
The positive and negative rotation of stepper motor processed;
Control module is connect by its serial ports asynchronous communication interface with OLED module, the equal signal of independent key module.
Beneficial effects of the present invention:
The present invention is suitable for plotter, engraving machine, 3D printer and plotter dispatch control system.It is specifically a set of
Control system can normally realize the moving interpolation in X/Y plane coordinate system using the mechanism of H-BOT structure.
This set control system, which cleverly solves existing H-BOT structure, can not directly adopt the embarrassment of arc interpolation
Situation optimizes algorithm more, improves the time of response, is with a wide range of applications in H-BOT structural control system.
Detailed description of the invention
Background technique Fig. 1 of the invention is with reference to figure (kinematic sketch of mechanism of H-BOT structure);
Fig. 2 control system flow chart;
Linear interpolation figure in the first and second quadrant of Fig. 3;
Fig. 4 is the pulse feed directional diagram of linear interpolation;
Fig. 5 is linear interpolation process flow diagram;
Fig. 6 is the error analysis figure of linear interpolation;
Fig. 7 is improved linear interpolation flow chart;
Fig. 8 is first quartile along circular arc pulse feed directional diagram;
Fig. 9 is that first quartile is suitable, inverse circular interpolation pulse flow chart;
Figure 10 is that the first and second quadrant is suitable, inverse circular interpolation pulse flow chart;
Figure 11 is that four-quadrant is suitable, inverse circular interpolation pulse feed directional diagram;
Figure 12 is common circular interpolation design flow diagram;
Circular interpolation flow chart after Figure 13 is improved;
Figure 14 is the linear interpolation image of first quartile;
Figure 15 is the linear interpolation image of the second quadrant;
Figure 16 is the linear interpolation image of third quadrant;
Figure 17 is the linear interpolation image of fourth quadrant;
Figure 18 is the clockwise arc interpolating image across one, four-quadrant;
Figure 19 is the counterclockwise arc interpolating image across one, two quadrant;
Figure 20 is the clockwise arc interpolating image across two, three quadrant;
Figure 21 is the circular interpolation image of full circle;
Figure 22 is the circular interpolation image in first quartile.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, the technical solution below in the present invention carries out clear
Chu is fully described by, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
Symbol and term are explained:
H-BOT: being the synchronous belt drive mechanism after a kind of simplified Corexy;
OLED: Organic Light Emitting Diode (Organic Light-Emitting Diode, OLED);
G code: G code is the instruction in numerical control program.Generally referred to as G instruction.It is quickly fixed to may be implemented using G code
Position, suitable circle interpolation, intermediate point circular interpolation, radius programming, jumps processing at inverse circle interpolation;
| Xe |: the total step number that cutter should be walked in the X-axis direction;
| Ye |: the total step number that cutter should be walked in the Y-axis direction;
F: deviation;
When linear interpolation starts, F=0,
Dynamic point is the case where passing through reference axis, when Xc=0 and Yc > 0, indicates the positive axis of the dynamic point Jing Guo Y-axis, remaining
Situation and so on.
For sake of convenience, it is as follows that some symbols are defined first:
L: straight line;
SR: along circular arc;
NR: inverse circular arc;
Footnote number: quadrant where curve:
L1, L2, L3 and L4: the quadrant straight line of the 1st, 2,3 and 4;
SR1, SR2, SR3 and SR4: the quadrant of the 1st, 2,3 and 4 is along circular arc;
NR1, NR2, NR3 and NR4: the quadrant of the 1st, 2,3 and 4 is against circular arc.
Fi+1=Fi-2|Yi|+1
Fi+1=Fi+2|Xi|+1
Fi+1=Fi-2|Xi|+1
Fi+1=Fi+2|Yi|+1。
FiIt is the deviation of interpolation, Xi, YiFor moving coordinates.It goes to judge next step F by calculating deviationi+1Circular interpolation
Direction.
Following functions need to be had by executing system structure of the invention:
The present invention mainly realize serial ports asynchronous communication, OLED show, independent key, serial data parsing, G code parsing,
The positive and negative rotation of stepper motor, linear interpolation, circular interpolation are across quadrant.
(1) serial ports asynchronous communication, it is main to complete host computer data are sent in real time to slave computer, slave computer by receiving on
The data of position machine parse and execute movement, return to special parameter after the completion of movement;
USART serial communication is the asynchronous communication configured by STM32, realizes that the data of host computer and slave computer are transmitted.
(2) display module shows current goal position coordinates and laststate position coordinates, provides human-computer interaction interface,
The real time monitoring to drawing may be implemented;
It is that human-computer interaction interface is realized on single-chip microcontroller by 4 line SPI communication interfaces that OLED, which is shown,.
(3) independent key, whether key scan has by key pressing, and flag bit is arranged, and is if condition satisfaction enters
System, draws, and it is to be opened otherwise to exit drawing etc..
Independent key is the start and stop mode by the selection realization system of key.
(4) data parse, and extract the floating number that designated character starts in character string, encounter nonnumeric character stopping, and
It is assigned to double-precision floating points value.
Data parsing is that the serial data for sending host computer is parsed into corresponding specific value.
(5) G code parses, and different state values is arranged according to the G code read, with linear interpolation later and circle
The operating mode of arc interpolation selects.
(6) positive and negative rotation of stepper motor, the normal work of stepper motor need annular distributor circuit and pulse amplifying circuit,
But the stepper motor drive module that the present invention uses only needs to input a pulse signal, can automatically generate four tunnels driving electricity
Road signal.So the pulse signal frequency connected by the DIR for configuring the different state value of DIR pin and A4988 module, reaches
To the purpose of positive and negative rotation and speed regulation.
The control of stepper motor is that the G code set received carries out assignment, choosing at different state values, and to coordinate value
Select different motor patterns.
(7) linear interpolation approaches the process of big line segment with small line segment by point-to-point comparison method, and the present invention is inserted using straight line
The optimization algorithm of benefit reduces the byte that linear interpolation program occupies inside single-chip microcontroller.
(8) circular interpolation, traditional circular interpolation can only complete circular interpolation in single quadrant, and the design uses four-quadrant
Circular interpolation is limited, solves the problems, such as that circular interpolation cannot be across quadrant.
A kind of control system method based on H-BOT structure, which comprises the following steps:
The setting of step 1. system initialization, presses the button, from serial ports input data to control module, OLED is made to enter system
Main interface.
Step 2. control module parses data, including extracting the floating number that designated character starts in character string,
Nonnumeric character stopping is encountered, and is assigned to double-precision floating points value;Control module parses G code.
Step 3. control module judges motion control or steering engine control according to the instruction of input;
If the linear interpolation in motion control, then pulse frequency being calculated, control stepper motor moves to designated position, and
Host computer is returned data by serial ports by control module, that is, slave computer.
The algorithm of linear interpolation is a kind of interpolating method that big line segment is approached using small line segment.Any digital control system all has
Handle the ability of different quadrant straight lines, it is necessary first to determine four quadrants that interpolation executes, then hold in the different quadrants of judgement
The different interpolation scheme of row.
A. the prioritization scheme of linear interpolation:
It is as follows that some symbols are defined first:
L: straight line;
Footnote number: quadrant where curve;
L1, L2, L3 and L4: being respectively the 1st, 2,3 and 4 quadrant straight lines;
1. the second quadrant linear interpolation
As shown in figure 3, when straight line is in the 2nd, 3 or 4 quadrant, it can inserting using symmetrical 1st quadrant straight line therewith
It mends calculation formula to be calculated, different directions of feed is only used according to quadrant difference.
That is, the interpolation that the interpolation problem of the quadrant straight line of the 2nd, 3 and 4 can be attributed to symmetrical 1st quadrant straight line therewith is asked
Topic.
Following table shows the interpolation direction of feed and interpolation calculation formula of four quadrant straight lines
According to upper table and Fig. 4, the linear interpolation process flow diagram in four quadrants is as shown in Figure 5.
The process of linear interpolation with point by point comparison mainly includes bias judge, coordinate feeding, the calculating of new deviation, end point judging
Four processes.Process shown in fig. 5 is first to calculate the total step number ∑ to be walked of two reference axis of X, Y.Pass through judgment bias value F's
The positive and negative feeding to carry out X-axis and Y-axis, wherein calculating and tabling look-up by deviation to obtain the negative value of coordinate feeding, finally when ∑=0
When, interpolation is completed.
As shown in Fig. 6 (a), Fig. 6 (b), Fig. 6 (a), Fig. 6 (b) for example, relative coordinate (Xe, Ye) be (0,4) and the
One-pass is arranged without exception in X-axis machining direction, then there are the errors of radical sign 2 between (0,4) and (1,3) after the completion of interpolation, but
It is when differentiating | Ye | > | Xe | it after complete, can be set first to Y-axis feed, similarly (4,0) are also the same.
But above-mentioned Computation schema has a disadvantage, when F=0, if agreement walks cutter axis orientation feed in X-direction without exception,
For | Ye | > | Xe | straight line, application condition is big, maximum reachableA pulse equivalency.When F=0, if agreement is without exception in Y-axis
Direction feed, then for | Xe | > | Ye | straight line, error is also bigger, maximum same reachableA pulse equivalency.
In order to make up the defect of above-mentioned algorithm, it is assumed that no matter initial deviation F=0 is due up for the first time to X-axis feed
Or to Y-axis feed, it may all expand error.
To reduce error, the case where for F=0, it should according to the concrete condition of straight line, be respectively processed.
1. for | Ye | > | Xe | straight line, be about scheduled on Y direction and make a move;
2. for | Xe | > | Ye | straight line, then be about scheduled on X-direction and make a move.
According to the linear interpolation flow chart that improved algorithm designs, as shown in Figure 7.
Fig. 7 is increased to Fig. 5 | Ye | with | Xe | size differentiate process, first calculate what two reference axis of X, Y to be walked
Total step number ∑ and judgement | Ye | with | Xe | size, by the positive and negative feeding to carry out X-axis and Y-axis of judgment bias value F, wherein
It calculates and tables look-up by deviation to obtain the negative value of coordinate feeding;
The case where for F=0, it should according to the concrete condition of straight line, be respectively processed:
1. for | Ye | > | Xe | straight line, be about scheduled on Y direction and make a move;
2. for | Xe | > | Ye | straight line, then be about scheduled on X-direction and make a move, finally when ∑=0, interpolation is completed.
Emulation testing
Simulation Test Environment is Matlab, tests the linear interpolation of four quadrants altogether, and F=0 is the initial of linear interpolation
State, by comparing the X of target absolute coordinate, the size of Y feeding, to give an initial direction of feed.
As shown in figure 14, first quartile linear interpolation inputs terminal abscissa X, Xe=100, exports terminal point coordinate Y, Ye
=30, export step-length, h=4.
As shown in figure 15, the second quadrant linear interpolation inputs terminal point coordinate X, Xe=-30, inputs terminal ordinate Y, Ye
=45, input step-length, h=1.
As shown in figure 16, third quadrant linear interpolation inputs terminal abscissa X, Xe=90, inputs terminal ordinate Y, Ye
=-37 input step-length h=3.
As shown in figure 17, fourth quadrant linear interpolation, inputs terminal abscissa X, and Xe=-39 inputs terminal ordinate Y, Ye
=-44 input step-length h=1.
If circular interpolation, then controls stepper motor and move to designated position, and number is returned to by serial ports by detection module
According to control module.
For the circular interpolation in four quadrants, first analysis first quartile along circular arc during circular interpolation, except as
Outside limit problem, there are also circular arcs to move towards problem.
Equipped with first quartile along circular arc SE, as shown in Figure 8.
Deviation calculation formula are as follows:
Cutter moving direction is
1. feeding a step to -Y direction when dynamic point is on circular arc or in circular arc lateral area;
2. feeding a step to +X direction when dynamic point is in circular arc inside region.
3. deviation calculation formula discretization can be obtained following computational chart:
First quartile is summarized as follows along the case where circular arc and inverse circular arc:
Both of these case is compared, it can be found that two features:
1. X, Y are exchanged, then the direction of feed of SR1 is just changed into the direction of feed of NR1;The direction of feed of same NR1 turns
Become the direction of feed of SR1.
2. X, Y are exchanged, then the deviation calculation formula of SR1 is just changed into the deviation calculation formula of NR1;Same NR1's is inclined
Poor calculation formula is changed into the deviation calculation formula of SR1.
Second and third, four-quadrant along the interpolation problem of circular arc can be exchanged into interpolation problem of the first quartile against circular arc, conversion side
Method is as follows:
1. the X, Y coordinates of circular arc starting point are exchanged, as first quartile against the starting point of circular arc;
The X, Y coordinates of circular arc terminal are exchanged again, as first quartile against the terminal of circular arc;
2. carrying out interpolation operation against circular arc to the first quartile being converted to:
When calculated result is that -X direction moves, the practical control signal of -Y direction is issued;
When calculated result is that +Y direction moves, the practical control signal of +X direction is issued;
The symmetry of different quadrant circular interpolations
Using similar approach analyzes the circular arc of trends different in other quadrants, then its direction of feed and deviation calculate
The case where formula See Figure 11 and following table shown in:
(1) SR1 → NR2 (X-axis is reversed);
SR1 → NR4 (Y-axis is reversed);
SR1 → SR3 (X-axis, Y-axis are reversed simultaneously);
NR1 → SR2 (X-axis is reversed);
NR1 → SR4 (Y-axis is reversed);
NR1 → NR3 (X-axis, Y-axis are reversed simultaneously);
(2) SR1 → NR1 (X, Y are exchanged);
NR1 → SR1 (X, Y are exchanged);
Its feature can sum up as follows:
(1) SR1 → NR2 (X-axis is reversed);
SR1 → NR4 (Y-axis is reversed);
SR1 → SR3 (X-axis, Y-axis are reversed simultaneously);
The deviation calculation formula of these four line styles of SR1, NR2, SR3 and NR4 is all identical.
NR1 → SR2 (X-axis is reversed);
SR1 → SR4 (Y-axis is reversed);
SR1 → NR3 (X-axis, Y-axis are reversed simultaneously);
The deviation calculation formula of these four line styles of NR1, SR2, NR3 and SR4 is also all identical.
(2) SR1 → NR1 (X, Y are exchanged);
NR1 → SR1 (X, Y are exchanged);
As it can be seen that the circular interpolation movement of each quadrant difference trend all may be used by exchanging X, Y-signal and changing direction of feed
It is completed with being calculated by progress first quartile along the interpolation calculating of circular arc or the interpolation of first quartile against circular arc.It is corresponding with upper table
Flow chart it is as shown in figure 12.
Explanation to four-quadrant circular interpolation
Cross quadrant for circular arc, with original four-quadrant interpolation have enter and leave, H-Bot structure coordinate conversion after, record
Position usually has the feature across quadrant, and four-quadrant circular interpolation cannot be met the requirements.
Straight line is only possible in a quadrant, therefore quadrant problem was not present.But circular arc is possible across several
At this moment quadrant needs to do corresponding processing in the junction of two quadrants, i.e. circular arc crosses quadrant problem for this.
When circular arc crosses quadrant, have a characteristic that
1. the symbol of moving coordinates can change before and after crossing quadrant;
2. moving towards for circular arc is constant after crossing quadrant.
Inverse circular arc crosses the sequence of quadrant are as follows: and NR1 → NR2 → NR3 → NR4 → NR1 →
The sequence of quadrant is crossed along circular arc are as follows: SR1 → SR4 → SR3 → SR2 → SR1 →
3. Multi-quadrant arc and reference axis must have intersection point, must have a coordinate value when dynamic point is in reference axis is zero.
This puts the mark that can be used as quadrant.
4. end point judging simply cannot directly use three kinds of methods above-mentioned, a part of arc profile otherwise will be lost.
Three kinds of methods are respectively as follows:
1. the dynamic point of judgement is at a distance from the center of circle, i.e.,
2. the common circular interpolation for judging quadrant,
Fi+1=Fi-2Yi+1
Fi+1=Fi+2Xi+1
3. using the Novel arc interpolation of symmetry,
Fi+1=Fi-2|Yi|+1
Fi+1=Fi+2|Xi|+1
Fi+1=Fi-2|Xi|+1
Fi+1=Fi+2|Yi|+1
It is inserted by the circular arc mentioned in " across any quadrant straight line and the research of circular interpolation principle and track emulation-Wang Hongwei "
The thought of benefit, it is only necessary to judge that circular interpolation has intersection point number several times between point circular arc and terminal circular arc.And the present invention is not required to
Carry out such judgement, the quadrant where the dynamic point of judgement again after the completion of each interpolation, ingenious can avoid calculating circular arc with
The intersection point number of reference axis.
Quadrant during recycling interpolation constantly where the dynamic point of judgement is only needed, common circular arc is then carried out again and inserts
Process of the circular interpolation across quadrant can be completed by mending program.Wherein there is a difficult point exactly when dynamic point moves in reference axis,
How coordinate system where the dynamic next movement tendency of point is judged, because the movement tendency of suitable, inverse circular arc is different, institute
To draw the following conclusions.If in reference axis,
Clockwise arc:
If (Xc==0&&Yc > 0) movement tendency is first quartile
If (Xc > 0&&Yc==0) movement tendency is fourth quadrant
If (Xc==0&&Yc < 0) movement tendency is third quadrant
If (Xc < 0&&Yc==0) movement tendency is the second quadrant
Counterclockwise arc:
If (Xc==0&&Yc > 0) movement tendency is the second quadrant
If (Xc < 0&&Yc==0) movement tendency is third quadrant
If (Xc==0&&Yc < 0) movement tendency is fourth quadrant
If (Xc > 0&&Yc==0) movement tendency is first quartile
The method that the present invention uses avoids the calculating time for sacrificing single-chip microcontroller floating number.Than being used before " across any
Quadrant straight line and the research of circular interpolation principle and track emulation " interpolation algorithm that is previously mentioned in document is more succinct quick.
The present invention is to receive and parse through a G code to execute, and has parsed a G code and has executed an interpolation process.And
And the single-chip microcontroller of stm32 that the present invention takes is using ARM cortex-M3 as carrier, is 32 8-digit microcontrollers, is in same price,
The most fast MCU of arithmetic speed in addition to DSP can satisfy normal work and require.
Simulated environment Matlab, circular interpolation data content:
As shown in figure 18, terminal abscissa Xc, Xc=70 are inputted, terminal ordinate Yc, Yc=71 are inputted, input terminal is horizontal
Coordinate X, Xt=56, input terminal ordinate Y, Yt=-82, input bIsCW 0- > clockwise, 1- > counterclockwise, bIsCW=0,
Step-length=227.
As shown in figure 19, across one, two quadrant, terminal abscissa Xc, Xc=70 are inputted, inputs terminal ordinate Yc, Yc=
71, terminal abscissa X, Xt=-94 are inputted, terminal ordinate Y, Yt=34 are inputted, inputs bIsCW 0- > 1- > inverse time clockwise
Needle, bIsCW=1, step-length=259.
As shown in figure 20, the interpolation of major arc inputs terminal abscissa Xc, Xc=-59, inputs terminal ordinate Yc, Yc=-
81, terminal abscissa X, Xt=-94 are inputted, terminal ordinate Y, Yt=34 are inputted, inputs bIsCW 0- > 1- > inverse time clockwise
Needle, bIsCW=1, step-length=644.
As shown in figure 21, full circle interpolation inputs terminal abscissa Xc, Xc=100, inputs terminal ordinate Yc, Yc=0,
Input terminal abscissa X, Xt=100, input terminal ordinate Y, Yt=0, input bIsCW 0- > 1- clockwise > counterclockwise,
BIsCW=0, step-length=800.
As shown in figure 22,1/4 circular interpolation inputs terminal abscissa Xc, Xc=100, inputs terminal ordinate Yc, Yc=
0, input terminal abscissa X, Xt=0, input terminal ordinate Y, Yt=100, input bIsCW 0- > 1- clockwise > counterclockwise,
BIsCW=1, step-length=200.
The further technical solution of the present invention is, the control system of H-BOT structure includes: control module, OLED module, solely
Vertical key, stepper motor;
Wherein there is control module serial ports asynchronous communication, data parsing, G code to parse functional unit;
The DIR pin of control module controls stepping electricity by inputting different pulse signal frequencies and configuring different state values
The positive and negative rotation of machine;
Control module is connect by its serial ports asynchronous communication interface with OLED module, the equal signal of independent key module.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used
To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features;
And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and
Range.
Claims (2)
1. a kind of control system method based on H-BOT structure, which comprises the following steps:
The setting of step 1. system initialization, presses the button, from serial ports input data to control module, OLED is made to enter the main boundary of system
Face;
Step 2. control module parses data, including extracting the floating number that designated character starts in character string, encounters
Nonnumeric character stops, and is assigned to double-precision floating points value;Control module parses G code;
Step 3. control module judges motion control or steering engine control according to the instruction of input;
If motion control, then control module calculates pulse frequency;
When a. if linear interpolation, then controls stepper motor and move to designated position, and string is passed through by control module, that is, slave computer
Mouth returns data into host computer;
Linear interpolation specifically:
Control module determines starting point coordinate and terminal point coordinate, then calculates total step number ∑ and judgement that two reference axis of X, Y to be walked |
Ye | with | Xe | size, by the positive and negative feeding to carry out X-axis and Y-axis of judgment bias value F, wherein calculated by deviation and
It tables look-up to obtain the direction of coordinate feeding;
The case where for F=0, is respectively processed according to the concrete condition of straight line:
1. for | Ye | > | Xe | straight line, be about scheduled on Y direction and make a move;
2. for | Xe | > | Ye | straight line, then be about scheduled on X-direction and make a move, finally when ∑=0, interpolation is completed;
B. it if circular interpolation, then controls stepper motor and moves to designated position, and serial ports is passed through by control module, that is, slave computer
Return data into host computer;
Control module determines starting point coordinate and terminal point coordinate first, determines step-length, judges along circular arc or inverse circular arc, in each interpolation
Judge whether interpolation needs by reference axis and determine the coordinate system of dynamic point after the completion, judges F size, calculated according to deviation public
Formula:
Fi+1=Fi-2|Yi|+1
Fi+1=Fi+2|Xi|+1
Fi+1=Fi-2|Xi|+1
Fi+1=Fi+2|Yi|+1
Judge cutter moving direction, is terminated when moving coordinates are identical as target endpoint;
If by reference axis,
When clockwise arc:
If (Xc==0&&Yc > 0) movement tendency is first quartile
If (Xc > 0&&Yc==0) movement tendency is fourth quadrant
If (Xc==0&&Yc < 0) movement tendency is third quadrant
If (Xc < 0&&Yc==0) movement tendency is the second quadrant,
Until ∑=0 terminates;
Or counterclockwise arc:
If (Xc==0&&Yc > 0) movement tendency is the second quadrant
If (Xc < 0&&Yc==0) movement tendency is third quadrant
If (Xc==0&&Yc < 0) movement tendency is fourth quadrant
If (Xc > 0&&Yc==0) movement tendency is first quartile,
Until ∑=0 terminates.
2. a kind of control system method based on H-BOT structure according to claim 1, which is characterized in that H-BOT structure
Control system include: control module, OLED module, independent key, stepper motor;Wherein, control module has serial ports asynchronous
Communication, data parsing, G code parse functional unit;STEP, DIR pin of control module are by exporting different pulse signal frequencies
Rate and the positive and negative rotation for configuring different state value control stepper motors;Control module by its serial ports asynchronous communication interface with
The equal signal connection of OLED module, independent key module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910533800.2A CN110286652B (en) | 2019-06-19 | 2019-06-19 | Control system method based on H-BOT structure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910533800.2A CN110286652B (en) | 2019-06-19 | 2019-06-19 | Control system method based on H-BOT structure |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110286652A true CN110286652A (en) | 2019-09-27 |
CN110286652B CN110286652B (en) | 2021-08-27 |
Family
ID=68004351
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910533800.2A Active CN110286652B (en) | 2019-06-19 | 2019-06-19 | Control system method based on H-BOT structure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110286652B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111176482A (en) * | 2019-12-12 | 2020-05-19 | 珠海博杰电子股份有限公司 | Circular arc track interpolation method |
CN111190659A (en) * | 2019-12-09 | 2020-05-22 | 航天信息股份有限公司 | Communication method and device for upper computer and transmission mechanism, electronic equipment and medium |
CN111338399A (en) * | 2019-12-12 | 2020-06-26 | 珠海博杰电子股份有限公司 | Multi-axis motion control structure and control method thereof |
CN112925268A (en) * | 2021-01-27 | 2021-06-08 | 浙江工业大学 | High-performance cutting bed motion control system based on FPGA |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1049725A (en) * | 1989-08-24 | 1991-03-06 | 朱怀义 | Digital control wire-electrode cutting tapering job operation and equipment |
US5216344A (en) * | 1989-01-30 | 1993-06-01 | Fanuc Ltd. | Involute interpolation speed control system |
EP1086556B1 (en) * | 1998-06-10 | 2008-04-23 | Network-1 Security Solutions, Inc. | Integrated voice and data communications over a local area network |
CN102147599A (en) * | 2011-03-30 | 2011-08-10 | 华南理工大学 | Elliptic arc interpolation method |
CN102354151A (en) * | 2011-08-04 | 2012-02-15 | 浙江工业大学 | Tangential following interpolation method applied to multilayer shoe leather numerical control cutting machine tool |
CN104133424A (en) * | 2014-08-19 | 2014-11-05 | 福州大学 | Industrial robot linear interpolation method based on programmable logic controller |
CN104155916A (en) * | 2014-07-16 | 2014-11-19 | 北京航空航天大学 | High-precision quick space arc interpolating method |
CN104191428A (en) * | 2014-08-27 | 2014-12-10 | 深圳科瑞技术股份有限公司 | Movement path planning method and system based on SCARA |
CN104597848A (en) * | 2014-12-30 | 2015-05-06 | 浙江中控研究院有限公司 | State machine principle-based interpolation control method |
CN107786138A (en) * | 2017-10-30 | 2018-03-09 | 山东理工大学 | Non-orthogonal axes linkage stepper motor linear interpolation control method |
CN108594765A (en) * | 2018-04-08 | 2018-09-28 | 哈尔滨理工大学 | A kind of point-to-point comparison method plane and straight line interpolation computational methods |
-
2019
- 2019-06-19 CN CN201910533800.2A patent/CN110286652B/en active Active
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5216344A (en) * | 1989-01-30 | 1993-06-01 | Fanuc Ltd. | Involute interpolation speed control system |
CN1049725A (en) * | 1989-08-24 | 1991-03-06 | 朱怀义 | Digital control wire-electrode cutting tapering job operation and equipment |
EP1086556B1 (en) * | 1998-06-10 | 2008-04-23 | Network-1 Security Solutions, Inc. | Integrated voice and data communications over a local area network |
CN102147599A (en) * | 2011-03-30 | 2011-08-10 | 华南理工大学 | Elliptic arc interpolation method |
CN102354151A (en) * | 2011-08-04 | 2012-02-15 | 浙江工业大学 | Tangential following interpolation method applied to multilayer shoe leather numerical control cutting machine tool |
CN104155916A (en) * | 2014-07-16 | 2014-11-19 | 北京航空航天大学 | High-precision quick space arc interpolating method |
CN104133424A (en) * | 2014-08-19 | 2014-11-05 | 福州大学 | Industrial robot linear interpolation method based on programmable logic controller |
CN104191428A (en) * | 2014-08-27 | 2014-12-10 | 深圳科瑞技术股份有限公司 | Movement path planning method and system based on SCARA |
CN104597848A (en) * | 2014-12-30 | 2015-05-06 | 浙江中控研究院有限公司 | State machine principle-based interpolation control method |
CN107786138A (en) * | 2017-10-30 | 2018-03-09 | 山东理工大学 | Non-orthogonal axes linkage stepper motor linear interpolation control method |
CN108594765A (en) * | 2018-04-08 | 2018-09-28 | 哈尔滨理工大学 | A kind of point-to-point comparison method plane and straight line interpolation computational methods |
Non-Patent Citations (2)
Title |
---|
丁承君 等: "平面型Hbot机构的运行控制算法", 《天津工业大学学报》 * |
王宏伟 等: "跨任意象限直线和圆弧插补原理研究与轨迹仿真", 《机械设计与制造》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111190659A (en) * | 2019-12-09 | 2020-05-22 | 航天信息股份有限公司 | Communication method and device for upper computer and transmission mechanism, electronic equipment and medium |
CN111190659B (en) * | 2019-12-09 | 2023-05-30 | 航天信息股份有限公司 | Communication method and device of upper computer and transmission mechanism, electronic equipment and medium |
CN111176482A (en) * | 2019-12-12 | 2020-05-19 | 珠海博杰电子股份有限公司 | Circular arc track interpolation method |
CN111338399A (en) * | 2019-12-12 | 2020-06-26 | 珠海博杰电子股份有限公司 | Multi-axis motion control structure and control method thereof |
CN112925268A (en) * | 2021-01-27 | 2021-06-08 | 浙江工业大学 | High-performance cutting bed motion control system based on FPGA |
Also Published As
Publication number | Publication date |
---|---|
CN110286652B (en) | 2021-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110286652A (en) | A kind of control system method based on H-BOT structure | |
CN104786221B (en) | A kind of open method for controlling robot based on Ethernet | |
CN102121175B (en) | Programming control system of pattern sewing machine based on PLC (Programmable Logic Controller) | |
CN104698982B (en) | Stepping type CNC system and the generation method of processed file, real-time control method | |
CN104714477B (en) | A kind of generation method of processed file planning system and processed file | |
CN104741718B (en) | Quick wire cutting control system | |
CN202997981U (en) | Multi-axis motion AC servo control system based on SERCOS bus and CAN bus | |
CN105834578A (en) | Bi-axial synchronous laser cutting machine control system | |
CN102291073A (en) | Multi-axis stepper motor interpolation controller and multi-axis stepper motor motion control card | |
CN101763071A (en) | Independent multi-axis motion controller | |
Xu et al. | Research and development of open CNC system based on PC and motion controller | |
CN107783501A (en) | A kind of numerical control interpolation system of PCIe controls | |
CN110172787B (en) | Control system and method of machine head rotating type sewing machine | |
CN204036852U (en) | A kind of 3D printer controller | |
CN108375979A (en) | Self-navigation robot general-purpose control system based on ROS | |
CN104874893A (en) | Groove cutting machine based on ZYNQ7000 SOC and control system thereof | |
CN103744354A (en) | PLC control system for manufacturing robot, and control method thereof | |
CN105955202A (en) | Network-based economical embedded five-axis numerical control system and control method thereof | |
CN109408991A (en) | A kind of model parameter visualization processing method based on FANUC PICTURE man-machine interface | |
CN203872095U (en) | Stepper motor control circuit in 3D printing | |
CN104375467A (en) | Numerical control cutting machine control system based on PCI+DSP+FPGA | |
CN201654544U (en) | Integral multi-axis movement controller based on Ethernet | |
CN201945835U (en) | Embedded control system used for carton proofing machine | |
CN207965590U (en) | A kind of numerically-controlled machine tool Three-dimensional Control System | |
CN106094663A (en) | A kind of multi-axis motion controller communication system based on RTX+DSP |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231121 Address after: Room 805, Building A, Yanxiang City Plaza, No. 56 Jinye 1st Road, High tech Zone, Xi'an City, Shaanxi Province, 710075 Patentee after: Xi'an Mailang Automation Co.,Ltd. Address before: Sichuan University of Science & Engineering Patentee before: Sichuan University of Science & Engineering |
|
TR01 | Transfer of patent right |