CN114815736A - Electronic cam curve generation method, system and computer readable storage medium - Google Patents
Electronic cam curve generation method, system and computer readable storage medium Download PDFInfo
- Publication number
- CN114815736A CN114815736A CN202210374713.9A CN202210374713A CN114815736A CN 114815736 A CN114815736 A CN 114815736A CN 202210374713 A CN202210374713 A CN 202210374713A CN 114815736 A CN114815736 A CN 114815736A
- Authority
- CN
- China
- Prior art keywords
- line segment
- discrete value
- electronic cam
- point
- value points
- 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.)
- Pending
Links
Images
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/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/06—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using cams, discs, rods, drums or the like
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Complex Calculations (AREA)
- Image Generation (AREA)
Abstract
本发明实施例中公开了一种电子凸轮曲线生成方法、系统和计算机可读存储介质。其中,方法包括:预先确定多条线段以及位于线段之间的离散型值点;将所述多条线段中的至少一条线段中的每条线段转换为多个离散型值点,且对所述多个离散型值点进行插值时能够得到所述线段;对所有离散型值点进行插值得到线段间的曲线,并最终形成电子凸轮曲线。本发明实施例中的技术方案能够较好地生成电子凸轮曲线。
Embodiments of the present invention disclose a method, system and computer-readable storage medium for generating an electronic cam curve. Wherein, the method includes: predetermining a plurality of line segments and discrete value points located between the line segments; converting each line segment in at least one line segment of the plurality of line segments into a plurality of discrete value points, and for the The line segment can be obtained when a plurality of discrete value points are interpolated; the curve between the line segments is obtained by interpolating all the discrete value points, and finally an electronic cam curve is formed. The technical solutions in the embodiments of the present invention can better generate the electronic cam curve.
Description
技术领域technical field
本发明涉及电子凸轮控制领域,特别是一种电子凸轮曲线生成方法、系统和计算机可读存储介质。The invention relates to the field of electronic cam control, in particular to a method, system and computer-readable storage medium for generating an electronic cam curve.
背景技术Background technique
在多轴同步运动控制领域,电子凸轮控制通过获取主轴位置,查看电子凸轮曲线(即主轴和从轴位置的对应关系),得出从轴位置,从而实现主轴和从轴的啮合运动。目前有一种电子凸轮曲线生成方法是采用分段插值法,即预先确定一些线段以及位于线段之间的一些离散型值点,然后对这些离散型值点进行插值得到线段间的曲线,并最终形成电子凸轮曲线。其中,预先确定的线段是需要精确对应关系的线段。In the field of multi-axis synchronous motion control, the electronic cam control obtains the position of the main shaft, checks the electronic cam curve (that is, the corresponding relationship between the position of the main shaft and the slave shaft), and obtains the position of the slave shaft, thereby realizing the meshing motion of the main shaft and the slave shaft. At present, a method for generating an electronic cam curve is to use a piecewise interpolation method, that is, to predetermine some line segments and some discrete value points between the line segments, and then interpolate these discrete value points to obtain a curve between the line segments, and finally form Electronic cam curve. Wherein, the predetermined line segment is a line segment that needs an exact correspondence.
目前的电子凸轮曲线生成方法中最多支持50条线段和10000个离散型值点。然而,随着技术要求的日益苛刻和复杂,电子凸轮曲线需要越来越多的线段来实现。The current electronic cam curve generation method supports up to 50 line segments and 10,000 discrete value points. However, with the increasingly demanding and complex technical requirements, the electronic cam curve needs more and more line segments to realize.
因此,本领域内的技术人员还在致力于寻找其他的电子凸轮曲线实现方法。Therefore, those skilled in the art are still striving to find other methods for realizing the electronic cam curve.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例中一方面提出了一种电子凸轮曲线生成方法,另一方面提出了一种电子凸轮曲线生成系统,用以较好地生成电子凸轮曲线。In view of this, the embodiments of the present invention provide a method for generating an electronic cam curve on the one hand, and an electronic cam curve generating system on the other hand, so as to better generate an electronic cam curve.
本发明实施例中提出的一种电子凸轮曲线生成方法,包括:预先确定多条线段以及位于线段之间的离散型值点;将所述多条线段中的至少一条线段中的每条线段转换为多个离散型值点,且对所述多个离散型值点进行插值时能够得到所述线段;对所有离散型值点进行插值得到线段间的曲线,并最终形成电子凸轮曲线。A method for generating an electronic cam curve proposed in an embodiment of the present invention includes: predetermining a plurality of line segments and discrete value points located between the line segments; converting each line segment in at least one line segment of the plurality of line segments is a plurality of discrete value points, and the line segment can be obtained by interpolating the plurality of discrete value points; the curve between the line segments is obtained by interpolating all the discrete value points, and finally an electronic cam curve is formed.
在一个实施方式中,所述至少一条线段包括:至少一条直线线段;所述将多条线段中的至少一条线段中的每条线段转换为多个离散型值点包括:将所述多条线段中的至少一条直线线段中的每条直线线段转换为四个离散型值点,所述四个离散型值点包括:对应所述直线线段起始端点位置的第一点,位于所述直线线段上且与所述第一点满足设定的接近要求的第二点,对应所述直线线段结束端点位置的第三点,位于所述直线线段上且与所述第三点满足设定的接近要求的第四点。In one embodiment, the at least one line segment includes: at least one straight line segment; and the converting each line segment in the at least one line segment of the plurality of line segments into a plurality of discrete value points includes: converting the plurality of line segments Each straight line segment in at least one straight line segment is converted into four discrete value points, and the four discrete value points include: a first point corresponding to the starting point position of the straight line segment, located in the straight line segment The second point that meets the set proximity requirement with the first point, the third point corresponding to the end point of the straight line segment, is located on the straight line segment and meets the set proximity to the third point The fourth point requested.
在一个实施方式中,所述设定的接近要求为间隔一个数值最小分辨率。In one embodiment, the set proximity requirement is an interval of a numerical minimum resolution.
在一个实施方式中,所述至少一条线段包括至少一条曲线线段;所述将多条线段中的至少一条线段中的每条线段转换为多个离散型值点包括:为所述多条线段中的至少一条曲线线段中的每条曲线线段根据剩余的点资源分配该曲线线段可用的点资源;然后按照所述曲线线段的表达式将所述曲线线段转换为均布在所述曲线线段上的满足可用点资源的多个离散型值点。In one embodiment, the at least one line segment includes at least one curve line segment; and the converting each line segment of the at least one line segment of the plurality of line segments into a plurality of discrete value points includes: for the plurality of line segments Each curve segment in the at least one curve segment is allocated the point resources available to the curve segment according to the remaining point resources; then the curve segment is converted into uniformly distributed on the curve segment according to the expression of the curve segment Multiple discrete value points that satisfy the available point resources.
在一个实施方式中,进一步包括:判断预先确定的所述多条线段的数量N是否超过一设定阈值T;其中,N和T均为正整数;如果是,则所述至少一条线段为:至少M条线段,其中M=N-T。In one embodiment, it further includes: judging whether the predetermined number N of the plurality of line segments exceeds a preset threshold value T; wherein, N and T are both positive integers; if so, the at least one line segment is: At least M line segments, where M=N-T.
在一个实施方式中,所述设定阈值T为50。In one embodiment, the set threshold value T is 50.
本发明实施例中提出的一种电子凸轮曲线生成系统,包括:预规划模块,用于预先确定多条线段以及位于线段之间的离散型值点;线段替换模块,用于将所述多条线段中的至少一条线段中的每条线段转换为多个离散型值点,且对所述多个离散型值点进行插值时能够得到所述线段;曲线生成模块,用于对所有离散型值点进行插值得到线段间的曲线,并最终形成电子凸轮曲线。An electronic cam curve generation system proposed in the embodiment of the present invention includes: a pre-planning module for pre-determining a plurality of line segments and discrete value points located between the line segments; a line-segment replacement module for converting the plurality of line segments Each line segment in at least one line segment in the line segment is converted into a plurality of discrete value points, and the line segment can be obtained when the plurality of discrete value points are interpolated; the curve generation module is used for all discrete value points. The points are interpolated to obtain the curve between the line segments, and finally the electronic cam curve is formed.
在一个实施方式中,所述至少一条线段包括:至少一条直线线段;所述线段替换模块将所述多条线段中的至少一条直线线段中的每条直线线段转换为四个离散型值点,所述四个离散型值点包括:对应所述直线线段起始端点位置的第一点,位于所述直线线段上且与所述第一点满足设定的接近要求的第二点,对应所述直线线段结束端点位置的第三点,位于所述直线线段上且与所述第三点满足设定的接近要求的第四点。In one embodiment, the at least one line segment includes: at least one straight line segment; the line segment replacement module converts each straight line segment of the at least one straight line segment in the plurality of line segments into four discrete value points, The four discrete value points include: a first point corresponding to the position of the starting point of the straight line segment, a second point located on the straight line segment and meeting the set proximity requirement with the first point, corresponding to the The third point at the end point position of the straight line segment is the fourth point located on the straight line segment and meeting the set proximity requirement with the third point.
在一个实施方式中,所述设定的接近要求为间隔一个数值最小分辨率。In one embodiment, the set proximity requirement is an interval of a numerical minimum resolution.
在一个实施方式中,所述至少一条线段包括至少一条曲线线段;所述线段替换模块为所述多条线段中的至少一条曲线线段中的每条曲线线段根据剩余的点资源分配该曲线线段可用的点资源;然后按照所述曲线线段的表达式将所述曲线线段转换为均布在所述曲线线段上的满足可用点资源的多个离散型值点。In one embodiment, the at least one line segment includes at least one curved line segment; the line segment replacement module allocates the available curved line segment for each of the at least one curved line segment in the plurality of line segments according to the remaining point resources Then, according to the expression of the curve line segment, the curve line segment is converted into a plurality of discrete value points that satisfy the available point resources and are uniformly distributed on the curve line segment.
在一个实施方式中,进一步包括:判断模块,用于判断预先确定的所述多条线段的数量N是否超过一设定阈值T;如果是,则指示所述线段替换模块执行线段替换操作;其中,N和T均为正整数;所述线段替换模块将所述多条线段中的至少M条线段中的每条线段转换为多个离散型值点;其中M=N-T。In one embodiment, it further includes: a judging module for judging whether the predetermined number N of the plurality of line segments exceeds a set threshold value T; if so, instructing the line segment replacement module to perform a line segment replacement operation; wherein , N and T are both positive integers; the line segment replacement module converts each line segment of at least M line segments in the plurality of line segments into a plurality of discrete value points; where M=N-T.
在一个实施方式中,所述设定阈值T为50。In one embodiment, the set threshold value T is 50.
本发明实施例中提出的又一种电子凸轮曲线生成系统,包括:至少一个存储器和至少一个处理器,其中:所述至少一个存储器用于存储计算机程序;所述至少一个处理器用于调用所述至少一个存储器中存储的计算机程序,执行如上任一实施方式所述的电子凸轮曲线生成方法。Another electronic cam curve generation system proposed in the embodiment of the present invention includes: at least one memory and at least one processor, wherein: the at least one memory is used to store a computer program; the at least one processor is used to call the A computer program stored in at least one memory executes the method for generating an electronic cam curve according to any one of the above embodiments.
本发明实施例中提出的计算机可读存储介质,其上存储有计算机程序;所述计算机程序能够被一处理器执行并实现如上任一实施方式所述的电子凸轮曲线生成方法The computer-readable storage medium proposed in the embodiment of the present invention stores a computer program thereon; the computer program can be executed by a processor and realizes the method for generating an electronic cam curve according to any one of the above embodiments
从上述方案中可以看出,本发明实施例中,通过将用于生成电子凸轮曲线的预先确定多条线段中的部分线段中的每条线段转换为通过插值计算能得到该线段的离散型值点,可以充分利用现有资源,并能够实现较多线段的电子凸轮曲线生成。It can be seen from the above solution that, in the embodiment of the present invention, each line segment in the partial line segments of the predetermined plurality of line segments used for generating the electronic cam curve is converted into a discrete value that can be obtained by interpolation calculation. point, can make full use of existing resources, and can realize the generation of electronic cam curve with more line segments.
其中,针对直线线段可转换为四个离散型值点,需要的点数较少,且能插值得到该直线线段。Among them, the straight line segment can be converted into four discrete value points, the number of points required is less, and the straight line segment can be obtained by interpolation.
附图说明Description of drawings
下面将通过参照附图详细描述本发明的优选实施例,使本领域的普通技术人员更清楚本发明的上述及其它特征和优点,附图中:The above-mentioned and other features and advantages of the present invention will be more apparent to those of ordinary skill in the art by describing the preferred embodiments of the present invention in detail below with reference to the accompanying drawings, in which:
图1为本发明实施例中电子凸轮曲线生成方法的示例性流程图。FIG. 1 is an exemplary flowchart of a method for generating an electronic cam curve in an embodiment of the present invention.
图2A为本发明一个例子中的一条电子凸轮曲线的示意图。FIG. 2A is a schematic diagram of an electronic cam curve in an example of the present invention.
图2B为本发明一个例子中对图2A所示电子凸轮曲线中的第二线段进行离散型值点转换的示意图。FIG. 2B is a schematic diagram of discrete value point conversion performed on the second line segment in the electronic cam curve shown in FIG. 2A in an example of the present invention.
图3为本发明实施例中的一种电子凸轮曲线生成系统的示例性结构图。FIG. 3 is an exemplary structural diagram of an electronic cam curve generation system in an embodiment of the present invention.
图4为本发明实施例中的另一种电子凸轮曲线生成系统的示例性结构图。FIG. 4 is an exemplary structural diagram of another electronic cam curve generation system in an embodiment of the present invention.
其中,附图标记如下:Among them, the reference numerals are as follows:
具体实施方式Detailed ways
本发明实施例中,考虑到现有技术中的电子凸轮曲线生成方法支持10000个离散型值点,而这10000个通常不会达到应用上限,为了实现更多线段的电子凸轮曲线,可考虑充分利用现有资源,将某些线段利用离散型值点表示,并确保对表示该线段的离散型值点进行插值计算时能得到与所述线段一致的线段。In the embodiment of the present invention, considering that the electronic cam curve generation method in the prior art supports 10,000 discrete value points, and these 10,000 points usually do not reach the upper limit of the application, in order to realize the electronic cam curve of more line segments, it can be fully considered Using existing resources, some line segments are represented by discrete value points, and it is ensured that a line segment consistent with the line segment can be obtained when the discrete value point representing the line segment is interpolated.
为使本发明的目的、技术方案和效果有更加清楚的理解,现对照附图说明本发明的具体实施方式,在各图中相同的标号表示结构相同或结构相似但功能相同的部件。In order to have a clearer understanding of the purpose, technical solutions and effects of the present invention, the specific embodiments of the present invention will now be described with reference to the accompanying drawings. The same reference numerals in each figure represent components with the same structure or similar structure but the same function.
在本文中,“示例性”、“示意性”表示“充当实例、例子或说明”,不应将在本文中被描述为“示例性”、“示意性”的任何图示、实施方式解释为一种更优选的或更具优点的技术方案。As used herein, "exemplary" and "schematic" mean "serving as an example, instance, or illustration", and any illustration or implementation described herein as "exemplary" or "schematic" should not be construed as A more preferred or more advantageous technical solution.
为使图面简洁,各图中只示意性地表示出了与本发明相关的部分,它们并不代表其作为产品的实际结构。In order to keep the drawings concise, the drawings only schematically show the parts related to the present invention, and they do not represent its actual structure as a product.
在本文中,“一个”不仅表示“仅此一个”,也可以表示“多于一个”的情形。在本文中,“第一”、“第二”等仅用于彼此的区分,而非表示它们的重要程度及顺序等。As used herein, "one" not only means "only one", but also "more than one". In this document, "first", "second", etc. are only used to distinguish each other, rather than indicating their importance and order.
图1为本发明实施例中电子凸轮曲线生成方法的示例性流程图。如图1所示,该方法可包括如下步骤:FIG. 1 is an exemplary flowchart of a method for generating an electronic cam curve in an embodiment of the present invention. As shown in Figure 1, the method may include the following steps:
步骤101,预先确定多条线段以及位于线段之间的离散型值点。Step 101: Predetermine a plurality of line segments and discrete value points located between the line segments.
本步骤中的确定线段及离散型值点的过程可与现有方法一致。The process of determining line segments and discrete value points in this step can be consistent with existing methods.
步骤102,将所述多条线段中的至少一条线段中的每条线段转换为多个离散型值点,且对所述多个离散型值点进行插值时能够得到所述线段。Step 102: Convert each line segment in at least one line segment of the plurality of line segments into a plurality of discrete value points, and the line segment can be obtained by interpolating the plurality of discrete value points.
图2A中示出了一个例子中的一条电子凸轮曲线,其中,横坐标为主轴(Leadibg,L)取值x,纵坐标为从轴(Following,F)取值f(x)。如图2A所示,该电子凸轮曲线上具有三条线段,第一线段21、第二线段22和第三线段23和通过对离散型值点进行插值得到的线段之间的两条过渡线Tr1和Tr2。本实施例中,以线段为直线线段的情况为例。其中,第一线段21的起始点(Strat,S)为(0.000000,0.000000),结束点(End,E)为(50.000000,0.000000);第二线段22的起始点为(90.000000,50.000000),结束点为(190.000000,300.000000);第三线段23的起始点为(250.000000,0.000000),结束点为(360.000000,0.000000)。第一线段21和第二线段22之间插值得到的过渡线Tr1的起始点为(50.000000,0.000000),结束点为(90.000000,50.000000);第二线段22和第三线段23之间插值得到的过渡线Tr2的起始点为(190.000000,300.000000),结束点为(250.000000,0.000000)。An example of an electronic cam curve is shown in FIG. 2A , wherein the abscissa is the main axis (Leadibg, L) which takes the value x, and the ordinate is the slave axis (Following, F) which takes the value f(x). As shown in FIG. 2A , the electronic cam curve has three line segments, the
图2B中示出了一个例子中对图2A所示电子凸轮曲线中的第二线段22进行离散型值点转换的示意图。本实施例中,针对第二线段22所对应的直线线段,图2B中将其转换为四个离散型值点表示(由于有两个点距离较近,因此对其进行了局部放大)。其中,所述四个离散型值点包括:对应所述直线线段起始端点位置的第一点S1(90.000000,50.000000),位于所述直线线段上且与所述第一点间隔一个数值最小分辨率(如浮点数据类型的最小分辨率)的第二点S2(90.000010,50.000025),对应所述直线线段结束端点位置的第三点S3(190.000000,300.000000),位于所述直线线段上且与所述第三点间隔一个数值最小分辨率的第四点S4(189.9999990,299.999975)。即本实施例中使得第一点和第二点无限接近或接近程度满足一设定的接近要求,第三点和第四点无限接近或接近程度满足一设定的接近要求。例如,设定的接近要求可以是上述的间隔一个数值最小分辨率,或者也可以是间隔两个数值的最小分辨率(即数值的最小分辨率的2倍)等。本实施例中,由于第一点S1和第二点S2特别近,因此二者之间经插值得到的第一过渡线T1几乎是一条直线,斜率=Δy/Δx=0.000025/0.000010=2.5;同理,第四点S4和第三点S3之间经插值得到的第二过渡线T2也几乎是一条直线,且斜率=Δy/Δx=0.000025/0.000010=2.5;由于第一过渡线T1和第二过渡线T2的斜率相同,因此,第二点S1和第四点S4之间的第三过渡线T3也将保持为斜率等于2.5的直线,这样通过对四个离散型值点进行插值便可得到原始第二线段22,实现了与多个线段一样的效果。FIG. 2B shows a schematic diagram of discrete value point conversion performed on the
另外,本实施例中,对于一些已知公式的非直线线段同样可对其进行离散型值点替换。例如正余弦曲线、多项式曲线等已知满足y=f(x)(n0≤x≤n1)公式的曲线线段;在对其进行离散型值点替换时,可根据系统剩余的点资源为该曲线线段分配可用的点资源例如为Si个点,然后按照所述曲线线段的表达式将所述曲线线段转换为均布在所述曲线线段上的满足可用点资源的多个离散型值点,如Si个离散型值点或Si-W个离散型值点,其中Si和W均为正整数。In addition, in this embodiment, discrete value point substitution can also be performed on non-straight line segments of some known formulas. For example, sine and cosine curves, polynomial curves, etc. are known to satisfy the y=f(x) (n0≤x≤n1) formula; when replacing them with discrete value points, the curve can be selected according to the remaining point resources of the system. The point resources available for line segment allocation are, for example, Si points, and then the curve line segment is converted into a plurality of discrete value points uniformly distributed on the curve line segment and satisfying the available point resources according to the expression of the curve line segment, such as Si discrete-valued points or Si-W discrete-valued points, where both Si and W are positive integers.
例如,假设需要对一条曲线线段进行离散型值点替换,且假设离散型值点剩余资源为S个点,则可将主轴位置值x按照从n0到n1等分为S个值,按照y=f(x)(n0≤x≤n1)计算出来S个点对应的y值,计算的S个(x,y)主从位置点即可作为离散型值点用来替换原来的曲线。此方法在离散资源点资源充足的情况下,点越多越好,曲线的替换还原度越高。当然,若需要对R条曲线进行离散型值点替换,则可将剩余的S个点按照各曲线的区间大小进行分配,此处不对其进行限定。For example, assuming that a curve segment needs to be replaced by discrete value points, and assuming that the remaining resources of discrete value points are S points, the main axis position value x can be divided into S values from n0 to n1 equally, according to y = f(x) (n0≤x≤n1) calculates the y value corresponding to the S points, and the calculated S (x, y) master-slave position points can be used as discrete value points to replace the original curve. In this method, in the case of sufficient discrete resource point resources, the more points the better, the higher the degree of replacement and restoration of the curve. Of course, if the R curves need to be replaced with discrete value points, the remaining S points can be allocated according to the interval size of each curve, which is not limited here.
本实施例中,具体实现时,可进一步判断预先确定的所述多条线段的数量N是否超过一设定阈值T;如果超过,则所述至少一条线段可以为至少M条线段,其中M=N-T。在一个例子中,设定阈值T可以为50。In this embodiment, during specific implementation, it can be further determined whether the predetermined number N of the plurality of line segments exceeds a set threshold T; if it exceeds, the at least one line segment can be at least M line segments, where M= N-T. In one example, the set threshold T may be 50.
当然,在其他实施方式中,当所述多条线段的数量N不超过设定阈值T时,本申请也不排除可对其中的部分线段采用离散型值点进行替代。Of course, in other embodiments, when the number N of the multiple line segments does not exceed the set threshold T, the present application does not exclude that some of the line segments may be replaced by discrete value points.
步骤103,对所有离散型值点进行插值得到线段间的曲线,并最终形成电子凸轮曲线。Step 103: Interpolate all discrete value points to obtain a curve between line segments, and finally form an electronic cam curve.
以上对本发明实施例中的电子凸轮曲线生成方法进行了详细描述,下面再对发明实施例中的电子凸轮曲线生成系统进行详细描述。本发明实施例中的电子凸轮曲线生成系统可用于实施本发明实施例中的电子凸轮曲线生成方法,对于本发明系统实施例中未详细披露的细节可参见本发明方法实施例中的相应描述。The method for generating an electronic cam curve in the embodiment of the present invention is described in detail above, and the system for generating an electronic cam curve in the embodiment of the present invention is described in detail below. The electronic cam curve generation system in the embodiment of the present invention can be used to implement the electronic cam curve generation method in the embodiment of the present invention. For details not disclosed in detail in the system embodiment of the present invention, please refer to the corresponding description in the method embodiment of the present invention.
图3为本发明实施例中的电子凸轮曲线生成系统的示例性结构图。如图3所示,该系统可包括:预规划模块301、线段替换模块302和曲线生成模块303。FIG. 3 is an exemplary structural diagram of an electronic cam curve generation system in an embodiment of the present invention. As shown in FIG. 3 , the system may include: a
其中,预规划模块301用于预先确定多条线段以及位于线段之间的离散型值点。The
线段替换模块302用于将所述多条线段中的至少一条线段中的每条线段转换为多个离散型值点,且对所述多个离散型值点进行插值时能够得到所述线段。The line
曲线生成模块303用于对所有离散型值点进行插值得到线段间的曲线,并最终形成电子凸轮曲线。The
具体实现时,所述至少一条线段可包括至少一条直线线段;则线段替换模块302可将所述多条线段中的至少一条直线线段中的每条直线线段转换为四个离散型值点,所述四个离散型值点包括:对应所述直线线段起始端点位置的第一点,位于所述直线线段上且与所述第一点满足设定的接近要求的第二点,对应所述直线线段结束端点位置的第三点,位于所述直线线段上且与所述第三点满足设定的接近要求的第四点。在一个实施方式中,所述设定的接近要求为间隔一个数值最小分辨率。In specific implementation, the at least one line segment may include at least one straight line segment; then the line
此外,所述至少一条线段可包括至少一条曲线线段;则线段替换模块302可为所述多条线段中的至少一条曲线线段中的每条曲线线段根据剩余的点资源分配该曲线线段可用的点资源;然后按照所述曲线线段的表达式将所述曲线线段转换为均布在所述曲线线段上的满足可用点资源的多个离散型值点。In addition, the at least one line segment may include at least one curve line segment; then the line
另外,本实施例中还可包括如图3中的虚线部分所示,进一步包括:判断模块304,用于判断预先确定的所述多条线段的数量N是否超过一设定阈值T;如果是,则指示线段替换模块302执行线段替换操作;其中,N和T均为正整数。相应地,线段替换模块302可将所述多条线段中的至少M条线段中的每条线段转换为多个离散型值点;其中M=N-T。在一个实施方式中,所述设定阈值T为50。In addition, this embodiment may further include, as shown in the dotted line in FIG. 3 , further including: a
图4为本发明实施例中又一种电子凸轮曲线生成系统的结构示意图,如图4所示,该系统可包括:至少一个存储器41和至少一个处理器42。此外,还可以包括一些其它组件,例如通信端口等。这些组件通过总线43进行通信。FIG. 4 is a schematic structural diagram of another electronic cam curve generation system in an embodiment of the present invention. As shown in FIG. 4 , the system may include: at least one
其中,至少一个存储器41用于存储计算机程序。在一个实施方式中,该计算机程序可以理解为包括图3所示的电子凸轮曲线生成系统的各个模块。此外,至少一个存储器41还可存储操作系统等。操作系统包括但不限于:Android操作系统、Symbian操作系统、Windows操作系统、Linux操作系统等等。Among them, at least one
至少一个处理器42用于调用至少一个存储器41中存储的计算机程序,执行本发明实施例中所述的电子凸轮曲线生成方法。处理器42可以为CPU,处理单元/模块,ASIC,逻辑模块或可编程门阵列等。其可通过所述通信端口进行数据的接收和发送。At least one
需要说明的是,上述各流程和各结构图中不是所有的步骤和模块都是必须的,可以根据实际的需要忽略某些步骤或模块。各步骤的执行顺序不是固定的,可以根据需要进行调整。各模块的划分仅仅是为了便于描述采用的功能上的划分,实际实现时,一个模块可以分由多个模块实现,多个模块的功能也可以由同一个模块实现,这些模块可以位于同一个设备中,也可以位于不同的设备中。It should be noted that not all steps and modules in the above-mentioned processes and structural diagrams are necessary, and some steps or modules may be omitted according to actual needs. The execution order of each step is not fixed and can be adjusted as required. The division of each module is only to facilitate the description of the functional division used. In actual implementation, a module can be implemented by multiple modules, and the functions of multiple modules can also be implemented by the same module. These modules can be located in the same device. , or in a different device.
可以理解,上述各实施方式中的硬件模块可以以机械方式或电子方式实现。例如,一个硬件模块可以包括专门设计的永久性电路或逻辑器件(如专用处理器,如FPGA或ASIC)用于完成特定的操作。硬件模块也可以包括由软件临时配置的可编程逻辑器件或电路(如包括通用处理器或其它可编程处理器)用于执行特定操作。至于具体采用机械方式,或是采用专用的永久性电路,或是采用临时配置的电路(如由软件进行配置)来实现硬件模块,可以根据成本和时间上的考虑来决定。It can be understood that the hardware modules in the above embodiments may be implemented in a mechanical manner or an electronic manner. For example, a hardware module may include specially designed permanent circuits or logic devices (eg, special purpose processors, such as FPGAs or ASICs) for performing specific operations. Hardware modules may also include programmable logic devices or circuits (eg, including general-purpose processors or other programmable processors) temporarily configured by software for performing particular operations. As for the specific use of a mechanical method, or a dedicated permanent circuit, or a temporarily configured circuit (for example, configured by software) to realize the hardware module, it can be decided according to cost and time considerations.
此外,本发明实施例中还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序能够被一处理器执行并实现本发明实施例中所述的电子凸轮曲线生成方法。具体地,可以提供配有存储介质的系统或者装置,在该存储介质上存储着实现上述实施例中任一实施方式的功能的软件程序代码,且使该系统或者装置的计算机(或CPU或MPU)读出并执行存储在存储介质中的程序代码。此外,还可以通过基于程序代码的指令使计算机上操作的操作系统等来完成部分或者全部的实际操作。还可以将从存储介质读出的程序代码写到插入计算机内的扩展板中所设置的存储器中或者写到与计算机相连接的扩展单元中设置的存储器中,随后基于程序代码的指令使安装在扩展板或者扩展单元上的CPU等来执行部分和全部实际操作,从而实现上述实施方式中任一实施方式的功能。用于提供程序代码的存储介质实施方式包括软盘、硬盘、磁光盘、光盘(如CD-ROM、CD-R、CD-RW、DVD-ROM、DVD-RAM、DVD-RW、DVD+RW)、磁带、非易失性存储卡和ROM。可选择地,可以由通信网络从服务器计算机上下载程序代码。In addition, the embodiments of the present invention also provide a computer-readable storage medium on which a computer program is stored, and the computer program can be executed by a processor to implement the method for generating an electronic cam curve described in the embodiments of the present invention. Specifically, it is possible to provide a system or device equipped with a storage medium on which software program codes for realizing the functions of any one of the above-described embodiments are stored, and make the computer (or CPU or MPU of the system or device) ) to read and execute the program code stored in the storage medium. In addition, a part or all of the actual operation can also be completed by an operating system or the like operating on the computer based on the instructions of the program code. The program code read from the storage medium can also be written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion unit connected to the computer, and then the instructions based on the program code make the device installed in the computer. The CPU on the expansion board or the expansion unit or the like performs part and all of the actual operations, so as to realize the functions of any one of the above-mentioned embodiments. Embodiments of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (eg, CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), Magnetic tapes, non-volatile memory cards and ROMs. Alternatively, the program code may be downloaded from a server computer over a communications network.
从上述方案中可以看出,本发明实施例中,通过将用于生成电子凸轮曲线的预先确定多条线段中的部分线段中的每条线段转换为通过插值计算能得到该线段的离散型值点,可以充分利用现有资源,并能够实现较多线段的电子凸轮曲线生成。It can be seen from the above solution that, in the embodiment of the present invention, each line segment in the partial line segments of the predetermined plurality of line segments used for generating the electronic cam curve is converted into a discrete value that can be obtained by interpolation calculation. point, can make full use of existing resources, and can realize the generation of electronic cam curve with more line segments.
其中,针对直线线段可转换为四个离散型值点,需要的点数较少,且能插值得到该直线线段。Among them, the straight line segment can be converted into four discrete value points, the number of points required is less, and the straight line segment can be obtained by interpolation.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of the present invention. within the scope of protection.
Claims (14)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210374713.9A CN114815736A (en) | 2022-04-11 | 2022-04-11 | Electronic cam curve generation method, system and computer readable storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210374713.9A CN114815736A (en) | 2022-04-11 | 2022-04-11 | Electronic cam curve generation method, system and computer readable storage medium |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN114815736A true CN114815736A (en) | 2022-07-29 |
Family
ID=82534502
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210374713.9A Pending CN114815736A (en) | 2022-04-11 | 2022-04-11 | Electronic cam curve generation method, system and computer readable storage medium |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114815736A (en) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115185229A (en) * | 2022-06-13 | 2022-10-14 | 西门子(中国)有限公司 | Determination method and device of electronic cam curve, control method and system, and equipment |
| CN115685871A (en) * | 2022-10-31 | 2023-02-03 | 深圳市汇川技术股份有限公司 | Control method, cam table generating device and readable storage medium |
| CN117315083A (en) * | 2023-11-27 | 2023-12-29 | 深圳市杰美康机电有限公司 | Electronic cam motion curve generation method and device |
Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101844324A (en) * | 2010-05-11 | 2010-09-29 | 常州工学院 | Method for preventing surfaces of disc cams from generating gear marks |
| US20140114446A1 (en) * | 2012-10-18 | 2014-04-24 | Delta Electro-Optics (Wujiang) Ltd. | Multi-driver control method and apparatus thereof |
| CN105425725A (en) * | 2015-12-09 | 2016-03-23 | 华中科技大学 | Curve fitting method for discrete cutter path |
| CN106202593A (en) * | 2015-05-05 | 2016-12-07 | 北京大豪科技股份有限公司 | The generation method of equidistant curve |
| CN108427779A (en) * | 2017-02-15 | 2018-08-21 | 湖北科峰传动设备有限公司 | The optimum design method of cam and its curve, wave producer and harmonic wave speed reducing machine |
| CN109571473A (en) * | 2018-12-03 | 2019-04-05 | 武汉工程大学 | A kind of small line segment track method for fairing that error is controllable |
| CN109799778A (en) * | 2019-01-17 | 2019-05-24 | 深圳市显控科技股份有限公司 | A kind of electronic cam curve generation method and relevant apparatus |
| CN110823238A (en) * | 2019-11-05 | 2020-02-21 | 湖南大学 | Improved cubic spline interpolation curve path point fitting method |
| CN111971240A (en) * | 2018-04-17 | 2020-11-20 | 三菱电机株式会社 | Method for generating cam curve, device for generating cam curve, control device, conveying device, printing device, cutting device, and bag making machine |
| CN112150633A (en) * | 2020-09-09 | 2020-12-29 | 雅客智慧(北京)科技有限公司 | Method and device for generating curve on three-dimensional grid surface |
| CN113468465A (en) * | 2020-03-30 | 2021-10-01 | 沈机(上海)智能系统研发设计有限公司 | Method and system for generating electronic cam curve, computer storage medium and terminal |
| CN114063618A (en) * | 2021-11-15 | 2022-02-18 | 绍兴市上虞区武汉理工大学高等研究院 | Method and system for generating route points of smooth curved path considering vehicle shape constraints |
-
2022
- 2022-04-11 CN CN202210374713.9A patent/CN114815736A/en active Pending
Patent Citations (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101844324A (en) * | 2010-05-11 | 2010-09-29 | 常州工学院 | Method for preventing surfaces of disc cams from generating gear marks |
| US20140114446A1 (en) * | 2012-10-18 | 2014-04-24 | Delta Electro-Optics (Wujiang) Ltd. | Multi-driver control method and apparatus thereof |
| CN106202593A (en) * | 2015-05-05 | 2016-12-07 | 北京大豪科技股份有限公司 | The generation method of equidistant curve |
| CN105425725A (en) * | 2015-12-09 | 2016-03-23 | 华中科技大学 | Curve fitting method for discrete cutter path |
| CN108427779A (en) * | 2017-02-15 | 2018-08-21 | 湖北科峰传动设备有限公司 | The optimum design method of cam and its curve, wave producer and harmonic wave speed reducing machine |
| CN111971240A (en) * | 2018-04-17 | 2020-11-20 | 三菱电机株式会社 | Method for generating cam curve, device for generating cam curve, control device, conveying device, printing device, cutting device, and bag making machine |
| CN109571473A (en) * | 2018-12-03 | 2019-04-05 | 武汉工程大学 | A kind of small line segment track method for fairing that error is controllable |
| CN109799778A (en) * | 2019-01-17 | 2019-05-24 | 深圳市显控科技股份有限公司 | A kind of electronic cam curve generation method and relevant apparatus |
| CN110823238A (en) * | 2019-11-05 | 2020-02-21 | 湖南大学 | Improved cubic spline interpolation curve path point fitting method |
| CN113468465A (en) * | 2020-03-30 | 2021-10-01 | 沈机(上海)智能系统研发设计有限公司 | Method and system for generating electronic cam curve, computer storage medium and terminal |
| CN112150633A (en) * | 2020-09-09 | 2020-12-29 | 雅客智慧(北京)科技有限公司 | Method and device for generating curve on three-dimensional grid surface |
| CN114063618A (en) * | 2021-11-15 | 2022-02-18 | 绍兴市上虞区武汉理工大学高等研究院 | Method and system for generating route points of smooth curved path considering vehicle shape constraints |
Non-Patent Citations (3)
| Title |
|---|
| 宋晓梅: "贴标机CADM系统的涉及与实现", 计算机辅助工程, 31 July 1996 (1996-07-31), pages 62 - 67 * |
| 张志湧: "matlab教程", vol. 1, 31 March 2019, 北京航空航天大学出版社, pages: 231 * |
| 彭婷: "基于 NURBS 曲线的轮胎胎面缠绕仿真系统设计", 中国优秀硕士学位论文全文数据库 工程科技I辑, 15 March 2022 (2022-03-15), pages 20 * |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115185229A (en) * | 2022-06-13 | 2022-10-14 | 西门子(中国)有限公司 | Determination method and device of electronic cam curve, control method and system, and equipment |
| CN115685871A (en) * | 2022-10-31 | 2023-02-03 | 深圳市汇川技术股份有限公司 | Control method, cam table generating device and readable storage medium |
| CN117315083A (en) * | 2023-11-27 | 2023-12-29 | 深圳市杰美康机电有限公司 | Electronic cam motion curve generation method and device |
| CN117315083B (en) * | 2023-11-27 | 2024-02-23 | 深圳市杰美康机电有限公司 | Electronic cam motion curve generation method and device |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN114815736A (en) | Electronic cam curve generation method, system and computer readable storage medium | |
| CN102420736B (en) | For the method transmitting data | |
| CN107645407B (en) | A method and device for adapting QoS | |
| CN113094309A (en) | Data bit width conversion method and device | |
| CN118550857B (en) | Data transmission method, device, electronic device and storage medium | |
| US20160330283A1 (en) | Data Storage Method and Network Interface Card | |
| JP2010263328A (en) | Image processing apparatus and image processing method | |
| CN111158905A (en) | Method and apparatus for adjusting resources | |
| US3680051A (en) | Apparatus for maintaining character synchronization in a data communication system | |
| CN114968862B (en) | Graphics processor management method, apparatus and storage medium | |
| CN111625180B (en) | Data writing method and device and storage medium | |
| CN116150067A (en) | A bandwidth adjustment method, device, electronic equipment and storage medium | |
| CN102739531B (en) | Flow shaping method and traffic shaping device | |
| CN111026694B (en) | Data receiving method, apparatus, image forming apparatus, system, and electronic apparatus | |
| CN113453371B (en) | Method, base station, and computer storage medium for wireless communication | |
| CN117422024A (en) | Data bit width conversion method, device, computer equipment and medium | |
| CN118432971A (en) | Data processing method, system, computer device and storage medium | |
| CN114402675A (en) | Resource occupation position determining method and device, terminal equipment and storage medium | |
| EP3065351A1 (en) | Method and device for issuing flow entry | |
| CN111444129B (en) | MDB data transmission method and terminal device | |
| CN109271538A (en) | A kind of picture storage method and relevant device | |
| CN115567183B (en) | M sequence generation method and device | |
| CN120407471B (en) | Data transmission methods, apparatus, systems and storage media | |
| CN110568905A (en) | A hard disk backplane, signal processing method and medium | |
| CN111950242B (en) | Method, system, equipment and storage medium for generating centralized international logistics face sheets |
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 |