一种模高指示器的断电追踪方法及系统Power-off tracking method and system for module height indicator
技术领域Technical field
本发明涉及冲压机床领域,特别涉及一种模高指示器的断电追踪方法及系统。The invention relates to the field of stamping machine tools, in particular to a power-off tracking method and system for a mold height indicator.
背景技术Background technique
冲压机床上均设有模高指示器,用于显示装模高度和装模高度限值。模高指示器是通过传动轴采集信号的,传动轴与编码器相连接,故传动轴的角位移可通过编码器的角位移直接换算得出。模高指示器通过传动轴进行信号采样时,首先通过编码器将传动轴的位移角度转换为电信号后,再计算成装模高度。如果机床突然断电,在惯性作用下,其传动轴仍然会旋转一定的角度;另外,在没有电源供应时,如果冲压机床因外部因素震动,也会导致传动轴发生角位移。由于现有的模高指示器无法追踪到断电期间传动轴的位移角度,影响了其采样信号的准确性,导致其显示的装模高度值与实际情况不符。A die height indicator is provided on the stamping machine to display the mold height and the mold height limit. The mold height indicator collects signals through the drive shaft, and the drive shaft is connected to the encoder. Therefore, the angular displacement of the drive shaft can be directly converted by the angular displacement of the encoder. When the module height indicator is used to sample the signal through the transmission shaft, the displacement angle of the transmission shaft is first converted into an electrical signal by the encoder, and then calculated into the mold height. If the machine is suddenly powered off, its drive shaft will still rotate at a certain angle under inertia. In addition, if there is no power supply, if the press machine vibrates due to external factors, it will cause angular displacement of the drive shaft. Since the existing mold height indicator cannot track the displacement angle of the drive shaft during the power failure, the accuracy of the sampled signal is affected, and the displayed mold height value does not match the actual situation.
目前,解决此问题的方法都是重新对模高指示器进行校准。但是校准工艺繁琐,时间较长,严重影响了生产效率。Currently, the solution to this problem is to recalibrate the module height indicator. However, the calibration process is cumbersome and takes a long time, which seriously affects production efficiency.
因而现有技术还有待改进和提高。Therefore, the prior art has yet to be improved and improved.
发明内容Summary of the invention
鉴于上述现有技术的不足之处,本发明的目的在于提供一种模高指示器的断电追踪方法及系统,旨在解决目前模高指示器在发生断电或震动情况下,所显示的装模高度值与实际情况不符的问题。In view of the above-mentioned deficiencies of the prior art, an object of the present invention is to provide a method and system for power-off tracking of a module height indicator, which aims to solve the current display of the module height indicator in the event of power failure or vibration. The problem that the mold height value does not match the actual situation.
为了达到上述目的,本发明采取了以下技术方案:In order to achieve the above object, the present invention adopts the following technical solutions:
一种模高指示器的断电追踪方法,包括如下步骤:A power-off tracking method for a module height indicator includes the following steps:
模高指示器断电前,编码器将传动轴旋转的位移角度转换为电信号后,再输出至运算处理模块,由运算处理模块根据电信号计算出冲压机床的装模高度值;Before the module height indicator is powered off, the encoder converts the displacement angle of the rotation of the transmission shaft into an electrical signal, and then outputs the signal to the arithmetic processing module, and the arithmetic processing module calculates the mold height value of the stamping machine tool according to the electrical signal;
在模高指示器断电瞬间,记录此时编码器的第一停止位置,并将编码器的第一停止位置沿顺时针方向相对于编码器的预设初始位置的第一角位移记作a;At the moment when the module height indicator is powered off, the first stop position of the encoder at this time is recorded, and the first angular displacement of the first stop position of the encoder with respect to the preset initial position of the encoder in the clockwise direction is recorded as a. ;
在模高指示器恢复供电瞬间,记录此时编码器的第二停止位置,并将编码器 的第二停止位置沿顺时针方向相对于编码器的预设初始位置的第二角位移记作b;At the moment when the module height indicator resumes power supply, the second stop position of the encoder is recorded at this time, and the second angular displacement of the second stop position of the encoder with respect to the preset initial position of the encoder in the clockwise direction is recorded as b. ;
根据编码器的第一停止位置和第二停止位置判断编码器在断电期间的角位移方向;Determining an angular displacement direction of the encoder during the power-off according to the first stop position and the second stop position of the encoder;
根据第一角位移、第二角位移和编码器的角位移方向计算出编码器在断电期间的第三角位移c。The third angular displacement c of the encoder during the power down is calculated based on the first angular displacement, the second angular displacement, and the angular displacement direction of the encoder.
所述的模高指示器的断电追踪方法中,所述根据第一角位移、第二角位移和编码器的角位移方向计算出编码器在断电期间的第三角位移c的步骤之后还包括:In the power-off tracking method of the mold height indicator, the step of calculating the third angular displacement c of the encoder during the power-off according to the first angular displacement, the second angular displacement, and the angular displacement direction of the encoder is further include:
根据编码器的角位移方向和第三角位移c以及机床在断电瞬间的装模高度值计算出机床恢复供电的瞬间的装模高度值。According to the angular displacement direction of the encoder and the third angular displacement c and the mold height value of the machine at the moment of power failure, the value of the mold height at the moment when the machine resumes power supply is calculated.
所述的模高指示器的断电追踪方法中,所述根据编码器的第一停止位置和第二停止位置判断编码器在断电期间的角位移方向具体包括:In the power-off tracking method of the module height indicator, the determining the angular displacement direction of the encoder during the power-off according to the first stop position and the second stop position of the encoder specifically includes:
当a<b<a+180°或b<a-180°时,判断编码器顺时针旋转;When a<b<a+180° or b<a-180°, it is judged that the encoder rotates clockwise;
当0<a-b<180°或b>a+180°时,判断编码器逆时针旋转。When 0 < a - b < 180 ° or b > a + 180 °, it is judged that the encoder rotates counterclockwise.
所述的模高指示器的断电追踪方法中,所述根据第一角位移、第二角位移和编码器的角位移方向计算出编码器在断电期间的第三角位移c具体包括:In the power-off tracking method of the module height indicator, the calculating the third angular displacement c of the encoder during the power-off according to the first angular displacement, the second angular displacement, and the angular displacement direction of the encoder specifically includes:
当编码器顺时针旋转且a<b<a+180°时,则计算第三角位移c=b-a;When the encoder rotates clockwise and a<b<a+180°, then the third angular displacement c=b-a is calculated;
当编码器顺时针旋转且b<a-180°时,则计算第三角位移c=b+360°-a;When the encoder rotates clockwise and b < a-180 °, then calculate the third angular displacement c = b + 360 ° - a;
当编码器逆时针旋转且0<a-b<180°时,则计算第三角位移c=a-b;When the encoder rotates counterclockwise and 0 < a-b < 180 °, then calculate a third angular displacement c = a - b;
当编码器逆时针旋转且b>a+180°时,则计算第三角位移c=360°-b+a。When the encoder rotates counterclockwise and b>a+180°, the third angular displacement c=360°-b+a is calculated.
所述的模高指示器的断电追踪方法中,所述编码器为绝对值编码器或增量式编码器。In the power-off tracking method of the module height indicator, the encoder is an absolute encoder or an incremental encoder.
一种模高指示器的断电追踪系统,包括:A power-off tracking system for a module height indicator, comprising:
编码器,用于将旋转的位移角度转换为电信号后,再将电信号输出至运算处理模块;An encoder, configured to convert the rotational displacement angle into an electrical signal, and then output the electrical signal to the arithmetic processing module;
运算处理模块,用于根据根据电信号计算出冲压机床的装模高度值,并在模高指示器断电瞬间,记录此时编码器的第一停止位置,并将编码器的第一停止位置沿顺时针方向相对于编码器的预设初始位置的第一角位移记作a;在模高指示 器恢复供电瞬间,记录此时编码器的第二停止位置,并将编码器的第二停止位置沿顺时针方向相对于编码器的预设初始位置的第二角位移记作b;根据编码器的第一停止位置和第二停止位置判断编码器在断电期间的角位移方向;以及根据第一角位移、第二角位移和编码器的角位移方向计算出编码器在断电期间的第三角位移c。An arithmetic processing module, configured to calculate a mold height value of the punching machine according to the electrical signal, and record the first stop position of the encoder at the moment when the mold height indicator is powered off, and the first stop position of the encoder The first angular displacement in the clockwise direction relative to the preset initial position of the encoder is denoted a; at the instant when the modular height indicator is restored, the second stop position of the encoder at this time is recorded and the second stop of the encoder is stopped a second angular displacement of the position in the clockwise direction relative to the preset initial position of the encoder is denoted by b; determining an angular displacement direction of the encoder during the power-off according to the first stop position and the second stop position of the encoder; The first angular displacement, the second angular displacement, and the angular displacement direction of the encoder calculate a third angular displacement c of the encoder during power down.
所述的模高指示器的断电追踪系统中,所述运算处理模块还用于:In the power-off tracking system of the module height indicator, the operation processing module is further configured to:
根据编码器的角位移方向和第三角位移c以及机床在断电瞬间的装模高度值计算出机床恢复供电的瞬间的装模高度值。According to the angular displacement direction of the encoder and the third angular displacement c and the mold height value of the machine at the moment of power failure, the value of the mold height at the moment when the machine resumes power supply is calculated.
所述的模高指示器的断电追踪系统中,所述运算处理模块包括:In the power-off tracking system of the module height indicator, the operation processing module includes:
第一方向判断模块,用于当a<b<a+180°或b<a-180°时,判断编码器顺时针旋转;a first direction determining module, configured to determine that the encoder rotates clockwise when a<b<a+180° or b<a-180°;
第二方向判断模块,用于当0<a-b<180°或b>a+180°时,判断编码器逆时针旋转。The second direction determining module is configured to determine that the encoder rotates counterclockwise when 0<a-b<180° or b>a+180°.
所述的模高指示器的断电追踪系统中,所述运算处理模块还包括:In the power-off tracking system of the module height indicator, the operation processing module further includes:
第一角位移计算模块,用于当编码器顺时针旋转且a<b<a+180°时,计算第三角位移c=b-a;a first angular displacement calculation module, configured to calculate a third angular displacement c=b-a when the encoder rotates clockwise and a<b<a+180°;
第二角位移计算模块,用于当编码器顺时针旋转且b<a-180°时,计算第三角位移c=b+360°-a;a second angular displacement calculation module, configured to calculate a third angular displacement c=b+360°-a when the encoder rotates clockwise and b<a-180°;
第三角位移计算模块,用于当编码器逆时针旋转且0<a-b<180°时,计算第三角位移c=a-b;a triangular displacement calculation module, configured to calculate a third angular displacement c=a-b when the encoder rotates counterclockwise and 0<a-b<180°;
第四角位移计算模块,用于当编码器逆时针旋转且b>a+180°时,计算第三角位移c=360°-b+a。The fourth angular displacement calculation module is configured to calculate a third angular displacement c=360°-b+a when the encoder rotates counterclockwise and b>a+180°.
所述的模高指示器的断电追踪系统中,所述编码器为绝对值编码器或增量式编码器。In the power-off tracking system of the module height indicator, the encoder is an absolute encoder or an incremental encoder.
相较于现有技术,本发明提供的模高指示器的断电追踪方法及系统中,所述方法包括模高指示器断电前,将传动轴旋转的位移角度转换为电信号后,再输出至运算处理模块,由运算处理模块根据电信号计算出冲压机床的装模高度值;在模高指示器断电瞬间,记录此时编码器的第一停止位置,并将编码器的第一停止位置沿顺时针方向相对于编码器的预设初始位置的第一角位移记作a;在模高指 示器恢复供电瞬间,记录此时编码器的第二停止位置,并将编码器的第二停止位置沿顺时针方向相对于编码器的预设初始位置的第二角位移记作b;根据编码器的第一停止位置和第二停止位置判断编码器在断电期间的角位移方向;根据第一角位移、第二角位移和编码器的角位移方向计算出编码器在断电期间的第三角位移c。本发明通过记录编码器断电前的第一停止位置和编码器断电后的第二停止位置,通过第一停止位置和第二停止位置判断编码器的旋转方向,并再根据旋转方向计算出编码器的角位移,可以追踪到断电期间传动轴的位移角度,进一步消除了断电后传动轴角位移产生的误差,准确、精密地反应出冲压机床的真实装模高度,避免在开机后需要重新校准模高指示器而导致的浪费时间和工作效率不高的问题。Compared with the prior art, in the power-off tracking method and system of the mold height indicator provided by the present invention, the method includes converting the displacement angle of the rotation of the transmission shaft into an electrical signal before the power-off indicator is powered off, and then Output to the arithmetic processing module, the arithmetic processing module calculates the mold height value of the punching machine according to the electrical signal; when the mold height indicator is powered off, records the first stop position of the encoder at this time, and the first of the encoder The first angular displacement of the stop position in the clockwise direction relative to the preset initial position of the encoder is denoted as a; at the instant when the module height indicator is restored, the second stop position of the encoder at this time is recorded, and the encoder is a second angular displacement of the second stop position relative to the preset initial position of the encoder in the clockwise direction is recorded as b; determining an angular displacement direction of the encoder during the power-off according to the first stop position and the second stop position of the encoder; The third angular displacement c of the encoder during the power down is calculated based on the first angular displacement, the second angular displacement, and the angular displacement direction of the encoder. The invention determines the rotation direction of the encoder through the first stop position and the second stop position by recording the first stop position before the encoder is powered off and the second stop position after the encoder is powered off, and then calculating according to the rotation direction. The angular displacement of the encoder can track the displacement angle of the drive shaft during power failure, further eliminating the error caused by the angular displacement of the drive shaft after power failure, accurately and accurately reflecting the true mold height of the punching machine, avoiding the situation after starting the machine. The problem of wasted time and inefficiency caused by the need to recalibrate the die height indicator.
附图说明DRAWINGS
图1为本发明提供的模高指示器的断电追踪方法的流程图。FIG. 1 is a flow chart of a power-off tracking method of a mold height indicator provided by the present invention.
图2为本发明提供的模高指示器的断电追踪方法中,编码器的第一实施例的旋转状态的示意图。FIG. 2 is a schematic diagram showing the rotation state of the first embodiment of the encoder in the power-off tracking method of the mold height indicator provided by the present invention.
图3为本发明提供的模高指示器的断电追踪方法中,编码器的第二实施例的旋转状态的示意图。FIG. 3 is a schematic diagram showing a rotation state of a second embodiment of the encoder in the power-off tracking method of the mold height indicator provided by the present invention.
图4为本发明提供的模高指示器的断电追踪方法中,编码器的第三实施例的旋转状态的示意图。4 is a schematic diagram showing a rotation state of a third embodiment of the encoder in the power-off tracking method of the mold height indicator provided by the present invention.
图5为本发明提供的模高指示器的断电追踪方法中,编码器的第四实施例的旋转状态的示意图。FIG. 5 is a schematic diagram showing a rotation state of a fourth embodiment of the encoder in the power-off tracking method of the mold height indicator provided by the present invention.
图6为本发明提供的模高指示器的断电追踪系统的结构框图。FIG. 6 is a structural block diagram of a power-off tracking system of a mold height indicator provided by the present invention.
具体实施方式Detailed ways
本发明提供一种模高指示器的断电追踪方法及系统,为使本发明的目的、技术方案及效果更加清楚、明确,以下参照附图并举实施例对本发明进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。The present invention provides a power-off tracking method and system for a module height indicator. The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
请参阅图1,本发明提供的模高指示器的断电追踪方法的流程图,包括如下 步骤:Referring to FIG. 1, a flow chart of a power-off tracking method for a module height indicator provided by the present invention includes the following steps:
S100、模高指示器断电前,将传动轴旋转的位移角度转换为电信号后,再输出至运算处理模块,由运算处理模块根据电信号计算出冲压机床的装模高度值。Before the S100 and the module height indicator are powered off, the displacement angle of the rotation of the transmission shaft is converted into an electric signal, and then output to the arithmetic processing module, and the operation processing module calculates the mold height value of the stamping machine tool according to the electric signal.
具体来说,编码器用来将模高指示器的传动轴的运动信息转换为其旋转的角位移,再将旋转的角位移转换为电信号后输出给运算处理模块,运算处理模块根据电信号来计算出冲压机床的装模高度值,电信号即可以反映出传动轴的位移,从而可以进一步计算出冲压机床的装模高度值,进一步来说,所述编码器为绝对值编码器或增量式编码器,优选的实施例中,编码器发出的电信号为数字信号,编码器转动一圈发出的信号为1024个,转动一圈表示冲压机床的装模高度值的变化为0.1mm。Specifically, the encoder is used to convert the motion information of the drive shaft of the mold height indicator into the angular displacement of the rotation, and then convert the angular displacement of the rotation into an electrical signal and output it to the operation processing module, and the operation processing module according to the electrical signal Calculating the mold height value of the stamping machine, the electrical signal can reflect the displacement of the drive shaft, so that the mold height value of the stamping machine can be further calculated. Further, the encoder is an absolute encoder or increment. In the preferred embodiment, the electrical signal from the encoder is a digital signal, and the encoder rotates one revolution to generate 1024 signals. One revolution indicates that the stamping machine has a variation of the mold height value of 0.1 mm.
S200、在模高指示器断电瞬间,记录此时编码器的第一停止位置,并将编码器的第一停止位置沿顺时针方向相对于编码器的预设初始位置的第一角位移记作a。S200: recording, at the moment when the module height indicator is powered off, recording the first stop position of the encoder at this time, and recording the first stop position of the encoder in a clockwise direction with respect to the first angular displacement of the preset initial position of the encoder Make a.
本实施例中,所述模高指示器断电后,由于传动轴的惯性作用,其仍会继续运动,即编码器仍会旋转一定的角度。这种惯性情况下,传动轴的角位移一般少于180度,即编码器的旋转少于半圈,更具体的来说,传动轴的角位移一般少于150度,本发明基于此来实施本发明提供的断电追踪方法。In this embodiment, after the mold height indicator is powered off, due to the inertia of the drive shaft, it will continue to move, that is, the encoder will still rotate at a certain angle. In this inertia case, the angular displacement of the drive shaft is generally less than 180 degrees, that is, the rotation of the encoder is less than half a turn, and more specifically, the angular displacement of the drive shaft is generally less than 150 degrees, and the present invention is based on this The power-off tracking method provided by the present invention.
具体来说,编码器预设有初始位置,即编码器的绝对原点。在模高指示器断电瞬间,将此时编码器的停止位置记作第一停止位置。后续再根据编码器的新的停止位置来计算编码器的旋转角度,通过记录第一停止位置与绝对原点的角位移,以及恢复供电瞬间的编码器的第二停止位置与绝对原点的角位移,从而可以计算出编码器在断电期间的位移角度。In particular, the encoder is pre-configured with an initial position, ie the absolute origin of the encoder. At the moment when the module height indicator is turned off, the stop position of the encoder at this time is recorded as the first stop position. Subsequent calculation of the rotation angle of the encoder according to the new stop position of the encoder, by recording the angular displacement of the first stop position and the absolute origin, and restoring the angular displacement of the second stop position of the encoder and the absolute origin at the moment of power supply, It is thus possible to calculate the angle of displacement of the encoder during a power outage.
S300、在模高指示器恢复供电瞬间,记录此时编码器的第二停止位置,并将编码器的第二停止位置沿顺时针方向相对于编码器的预设初始位置的第二角位移记作b。S300. Recording the second stop position of the encoder at the moment when the module height indicator resumes power supply, and recording the second stop position of the encoder in the clockwise direction with respect to the second angular displacement of the preset initial position of the encoder Make b.
本实施例中,在模高指示器恢复供电瞬间,将此时编码器的停止位置记作第二停止位置,并将其与预设的编码器的初始位置,即绝对原点进行比较,记录第二停止位置与绝对原点的角位移,从而进一步计算出编码器的旋转角度。In this embodiment, when the module height indicator resumes power supply, the stop position of the encoder is recorded as the second stop position at this time, and is compared with the initial position of the preset encoder, that is, the absolute origin, and the record is recorded. The angular displacement of the stop position and the absolute origin further calculates the angle of rotation of the encoder.
具体来说,编码器预设有初始位置,即编码器的绝对原点。在模高指示器断 电瞬间,将此时编码器的停止位置记作第一停止位置;在恢复供电瞬间,将此时编码器的停止位置记作第二停止位置;通过记录第一停止位置与绝对原点的角位移a,以及第二停止位置与绝对原点的角位移b,从而可以计算出编码器在断电期间的位移角度c。In particular, the encoder is pre-configured with an initial position, ie the absolute origin of the encoder. When the module height indicator is powered off, the stop position of the encoder is recorded as the first stop position; at the moment of restoring the power supply, the stop position of the encoder is recorded as the second stop position; by recording the first stop position The angular displacement a with the absolute origin and the angular displacement b of the second stop position with the absolute origin, so that the displacement angle c of the encoder during the power-off can be calculated.
S400、根据编码器的第一停止位置和第二停止位置判断编码器在断电期间的角位移方向;S400. Determine, according to the first stop position and the second stop position of the encoder, an angular displacement direction of the encoder during the power off period;
S500、根据第一角位移、第二角位移和编码器的角位移方向计算出编码器在断电期间的第三角位移c。S500. Calculate a third angular displacement c of the encoder during the power-off according to the first angular displacement, the second angular displacement, and the angular displacement direction of the encoder.
本实施例中,模高指示器根据编码器的第一停止位置和第二停止位置来判断编码器的角位移方向。由于断电后传动轴的惯性旋转量一般不超过180度,即编码器的旋转少于半圈,故可以通过判断第二停止位置是否在第一停止位置顺时针旋转180°后的位置与第一停止位置之间,判断出编码器是否是顺时针旋转,通过判断第二停止位置是否在第一停止位置逆时针旋转180°后的位置与第一停止位置之间,判断出编码器是否是逆时针旋转。进一步根据旋转的方向计算出编码器的旋转角度,其中0≤a<360°,0≤b<360°,0≤c<180。In this embodiment, the mode height indicator determines the angular displacement direction of the encoder according to the first stop position and the second stop position of the encoder. Since the inertial rotation of the drive shaft after power failure is generally not more than 180 degrees, that is, the rotation of the encoder is less than half a turn, it can be determined by determining whether the second stop position is rotated 180° clockwise at the first stop position. Between a stop position, it is determined whether the encoder is rotated clockwise, and whether the encoder is determined by determining whether the second stop position is rotated counterclockwise by 180° between the first stop position and the first stop position Anticlockwise rotation. Further, the rotation angle of the encoder is calculated according to the direction of rotation, where 0≤a<360°, 0≤b<360°, and 0≤c<180.
具体来说,所述步骤S300具体包括:Specifically, the step S300 specifically includes:
当a<b<a+180°或b<a-180°时,判断编码器顺时针旋转;When a<b<a+180° or b<a-180°, it is judged that the encoder rotates clockwise;
当0<a-b<180°或b>a+180°时,判断编码器逆时针旋转。When 0 < a - b < 180 ° or b > a + 180 °, it is judged that the encoder rotates counterclockwise.
所述步骤S400具体包括:The step S400 specifically includes:
当编码器顺时针旋转且a<b<a+180°时,则计算第三角位移c=b-a;When the encoder rotates clockwise and a<b<a+180°, then the third angular displacement c=b-a is calculated;
当编码器顺时针旋转且b<a-180°时,则计算第三角位移c=b+360°-a;When the encoder rotates clockwise and b < a-180 °, then calculate the third angular displacement c = b + 360 ° - a;
当编码器逆时针旋转且0<a-b<180°时,则计算第三角位移c=a-b;When the encoder rotates counterclockwise and 0 < a-b < 180 °, then calculate a third angular displacement c = a - b;
当编码器逆时针旋转且b>a+180°时,则计算第三角位移c=360°-b+a。When the encoder rotates counterclockwise and b>a+180°, the third angular displacement c=360°-b+a is calculated.
为了更好的理解本发明,以下针对图2-图5来对本发明的断电追踪方法进行详细说明:In order to better understand the present invention, the power-off tracking method of the present invention will be described in detail below with reference to FIGS. 2-5.
请参阅图2,在第一实施例中,编码器的第一角位移a在0°到180°之间,第二角位移b在a到a+180°之间,所以第二停止位置在第一停止位置顺时针旋转180°后的位置与第一停止位置之间,可以判断出编码器为顺时针旋转,从而进一步计算出第三角位移c=b-a,即编码器顺时针旋转b-a,再根据编码器的角位移 方向和旋转角度计算出编码器的实时装模高度值。Referring to FIG. 2, in the first embodiment, the first angular displacement a of the encoder is between 0° and 180°, and the second angular displacement b is between a and a+180°, so the second stop position is Between the position where the first stop position is rotated 180° clockwise and the first stop position, it can be determined that the encoder rotates clockwise, thereby further calculating the third angular displacement c=ba, that is, the encoder rotates clockwise, and then The real-time mold height value of the encoder is calculated according to the angular displacement direction and the rotation angle of the encoder.
请参阅图3,在第二实施例中,编码器的第一角位移a在0°到180°之间,第二角位移b在a+180°到360°之间,第二角位移b>a+180°,所以可以第二停止位置在第一停止位置逆时针旋转180°后的位置与第一停止位置之间,所以可以判断出编码器为逆时针旋转,从而进一步计算出第三角位移c=360°-b+a,再根据编码器的旋转方向和角位移角度计算出编码器的实时装模高度值。Referring to FIG. 3, in the second embodiment, the first angular displacement a of the encoder is between 0° and 180°, the second angular displacement b is between a+180° and 360°, and the second angular displacement is b. >a+180°, so the second stop position can be rotated counterclockwise by 180° between the first stop position and the first stop position, so it can be judged that the encoder rotates counterclockwise, thereby further calculating the third angle. The displacement c=360°-b+a, and then calculate the real-time mold height value of the encoder according to the rotation direction and angular displacement angle of the encoder.
请参阅图4,在第三实施例中,编码器的第一角位移a在0°到180°之间,第二角位移b在0°到a之间,其中0<a-b<180°,所以第二停止位置在第一停止位置逆时针旋转180°后的位置与第一停止位置之间,所以可以判断出编码器为逆时针旋转,从而进一步计算出第三角位移c=a-b,再根据编码器的角位移方向和旋转角度计算出编码器的实时装模高度值。Referring to FIG. 4, in the third embodiment, the first angular displacement a of the encoder is between 0° and 180°, and the second angular displacement b is between 0° and a, where 0<ab<180°. Therefore, the second stop position is between the position after the 180° counterclockwise rotation of the first stop position and the first stop position, so it can be determined that the encoder rotates counterclockwise, thereby further calculating the third angular displacement c=ab, and then according to The angular displacement direction and the rotation angle of the encoder calculate the real-time mold height value of the encoder.
请参阅图5,在第四实施例中,编码器的第一角位移a在180°到360°之间,第二角位移b在0°到a-180°之间,故b<a-180°,所以第二停止位置在第一停止位置顺时针旋转180°后的位置与第一停止位置之间,从而可以判断出编码器为顺时针旋转,从而进一步计算出第三角位移c=b+360°-a,再根据编码器的角位移方向和旋转角度计算出编码器的实时装模高度值。Referring to FIG. 5, in the fourth embodiment, the first angular displacement a of the encoder is between 180° and 360°, and the second angular displacement b is between 0° and a-180°, so b<a- 180°, so the second stop position is between the position after the 180° clockwise rotation of the first stop position and the first stop position, so that the encoder can be judged to rotate clockwise, thereby further calculating the third angular displacement c=b +360°-a, and then calculate the real-time mold height of the encoder according to the angular displacement direction and rotation angle of the encoder.
从上述实施例中可以看出,在编码器顺时针旋转或逆时针旋转时,通过将第二角位移与第一角位移进行比较,从而能够判断出编码器的旋转方向,进一步再根据旋转方向计算出编码器的旋转角度,可以追踪到断电期间传动轴的位移角度,然后在恢复供电后根据传动轴的位移角度修正显示的装模高度值,进一步消除断电后传动轴角位移产生的误差,准确、精密地反应出冲压机床的真实装模高度,避免在开机后需要重新校准模高指示器而导致的浪费时间和工作效率不高的问题。It can be seen from the above embodiment that when the encoder rotates clockwise or counterclockwise, by comparing the second angular displacement with the first angular displacement, the rotation direction of the encoder can be determined, and further according to the rotation direction. Calculate the rotation angle of the encoder, track the displacement angle of the drive shaft during power failure, and then correct the displayed mold height value according to the displacement angle of the drive shaft after restoring power supply, further eliminating the angular displacement caused by the drive shaft after power failure. The error accurately and accurately reflects the true mold height of the stamping machine, avoiding the problem of wasted time and low work efficiency caused by the need to recalibrate the mold height indicator after power on.
进一步地实施例中,所述步骤S500之后还包括:In a further embodiment, after the step S500, the method further includes:
根据编码器的角位移方向和第三角位移c以及机床在断电瞬间的装模高度值计算出机床恢复供电的瞬间的实际装模高度值。According to the angular displacement direction of the encoder and the third angular displacement c and the mold height value of the machine tool at the moment of power failure, the actual mold height value at the moment when the machine tool resumes power supply is calculated.
通过将编码器的旋转角度计算成传动轴的角位移信息,再根据编码器的角位移方向,利用冲压机床在断电瞬间的装模高度值加上或减去传动轴的位移量,即可计算出冲压机床恢复供电的瞬间的装模高度值,从而使得模高指示器在断电或 者震动的情况下也能准确的显示准确的装模高度值。By calculating the rotation angle of the encoder as the angular displacement information of the transmission shaft, and according to the angular displacement direction of the encoder, by using the value of the clamping height of the punching machine at the moment of power-off, plus or minus the displacement of the transmission shaft, Calculate the value of the mold height at the moment when the stamping machine resumes power supply, so that the mold height indicator can accurately display the accurate mold height value in case of power failure or vibration.
基于上述模高指示器的断电追踪方法,本发明还相应的提供一种模高指示器的断电追踪系统,请参阅图6,所述系统包括:Based on the power-off tracking method of the above-mentioned module height indicator, the present invention further provides a power-off tracking system of the module height indicator. Referring to FIG. 6, the system includes:
编码器10,用于将旋转的位移角度转换为电信号后,再将电信号输出至运算处理模块;The encoder 10 is configured to convert the rotational displacement angle into an electrical signal, and then output the electrical signal to the arithmetic processing module;
运算处理模块20,用于根据根据电信号计算出冲压机床的装模高度值,并在模高指示器断电瞬间,记录此时编码器的第一停止位置,并将编码器的第一停止位置沿顺时针方向相对于编码器的预设初始位置的第一角位移记作a;在模高指示器恢复供电瞬间,记录此时编码器的第二停止位置,并将编码器的第二停止位置沿顺时针方向相对于编码器的预设初始位置的第二角位移记作b;根据编码器的第一停止位置和第二停止位置判断编码器在断电期间的角位移方向;以及根据第一角位移、第二角位移和编码器的角位移方向计算出编码器在断电期间的第三角位移c。The operation processing module 20 is configured to calculate a mold height value of the punching machine according to the electrical signal, and record the first stop position of the encoder at the moment when the mold height indicator is powered off, and stop the first stop of the encoder The first angular displacement of the position in the clockwise direction relative to the preset initial position of the encoder is denoted a; at the instant when the modular height indicator is restored, the second stop position of the encoder at this time is recorded, and the encoder is second a second angular displacement of the stop position in the clockwise direction relative to the preset initial position of the encoder is denoted by b; determining an angular displacement direction of the encoder during the power-off according to the first stop position and the second stop position of the encoder; The third angular displacement c of the encoder during the power down is calculated based on the first angular displacement, the second angular displacement, and the angular displacement direction of the encoder.
进一步地,所述运算处理模块20还用于根据编码器的旋转方向和第三角位移c以及冲压机床在断电瞬间的装模高度值计算出冲压机床恢复供电的瞬间的装模高度值。Further, the operation processing module 20 is further configured to calculate a mold height value at the moment when the punching machine resumes power supply according to the rotation direction of the encoder and the third angular displacement c and the mold height value of the punching machine at the moment of power failure.
进一步地,所述运算处理模块20包括:Further, the operation processing module 20 includes:
第一方向判断模块,用于当a<b<a+180°或b<a-180°时,判断编码器顺时针旋转;a first direction determining module, configured to determine that the encoder rotates clockwise when a<b<a+180° or b<a-180°;
第二方向判断模块,用于当0<a-b<180°或b>a+180°时,判断编码器逆时针旋转。The second direction determining module is configured to determine that the encoder rotates counterclockwise when 0<a-b<180° or b>a+180°.
进一步地,所述运算处理模块20还包括:Further, the operation processing module 20 further includes:
第一角位移计算模块,用于当编码器顺时针旋转且a<b<a+180°时,计算第三角位移c=b-a;a first angular displacement calculation module, configured to calculate a third angular displacement c=b-a when the encoder rotates clockwise and a<b<a+180°;
第二角位移计算模块,用于当编码器顺时针旋转且b<a-180°时,计算第三角位移c=b+360°-a;a second angular displacement calculation module, configured to calculate a third angular displacement c=b+360°-a when the encoder rotates clockwise and b<a-180°;
第三角位移计算模块,用于当编码器逆时针旋转且0<a-b<180°时,计算第三角位移c=a-b;a triangular displacement calculation module, configured to calculate a third angular displacement c=a-b when the encoder rotates counterclockwise and 0<a-b<180°;
第四角位移计算模块,用于当编码器逆时针旋转且b>a+180°时,计算第三 角位移c=360°-b+a。The fourth angular displacement calculation module is configured to calculate a third angular displacement c=360°-b+a when the encoder rotates counterclockwise and b>a+180°.
具体的,所述编码器为绝对值编码器或增量式编码器。Specifically, the encoder is an absolute encoder or an incremental encoder.
由于上文已对模高指示器的断电追踪方法进行详细描述,在此不再赘述。Since the power-off tracking method of the module height indicator has been described in detail above, it will not be described here.
综上所述,本发明提供的模高指示器的断电追踪方法及系统中,所述方法包括模高指示器断电前,将传动轴旋转的位移角度转换为电信号后,再输出至运算处理模块,由运算处理模块根据电信号计算出冲压机床的装模高度值;在模高指示器断电瞬间,记录此时编码器的第一停止位置,并将编码器的第一停止位置沿顺时针方向相对于编码器的预设初始位置的第一角位移记作a;在模高指示器恢复供电瞬间,记录此时编码器的第二停止位置,并将编码器的第二停止位置沿顺时针方向相对于编码器的预设初始位置的第二角位移记作b;根据编码器的第一停止位置和第二停止位置判断编码器在断电期间的角位移方向;根据第一角位移、第二角位移和编码器的角位移方向计算出编码器在断电期间的第三角位移c。本发明通过记录编码器断电前的第一停止位置和编码器断电后的第二停止位置,通过第一停止位置和第二停止位置判断编码器的旋转方向,并再根据旋转方向计算出编码器的角位移,可以追踪到断电期间传动轴的位移角度,进一步消除了断电后传动轴角位移产生的误差,准确、精密地反应出冲压机床的真实装模高度,避免在开机后需要重新校准模高指示器而导致的浪费时间和工作效率不高的问题。In summary, in the power-off tracking method and system of the module height indicator provided by the present invention, the method includes converting the displacement angle of the rotation of the transmission shaft into an electrical signal before the module height indicator is powered off, and then outputting to The arithmetic processing module calculates the mold height value of the punching machine tool according to the electrical signal by the arithmetic processing module; records the first stop position of the encoder at the moment when the module height indicator is powered off, and sets the first stop position of the encoder The first angular displacement in the clockwise direction relative to the preset initial position of the encoder is denoted a; at the instant when the modular height indicator is restored, the second stop position of the encoder at this time is recorded and the second stop of the encoder is stopped a second angular displacement of the position in the clockwise direction relative to the preset initial position of the encoder is denoted by b; determining an angular displacement direction of the encoder during the power-off according to the first stop position and the second stop position of the encoder; The angular displacement, the second angular displacement, and the angular displacement direction of the encoder calculate the third angular displacement c of the encoder during power down. The invention determines the rotation direction of the encoder through the first stop position and the second stop position by recording the first stop position before the encoder is powered off and the second stop position after the encoder is powered off, and then calculating according to the rotation direction. The angular displacement of the encoder can track the displacement angle of the drive shaft during power failure, further eliminating the error caused by the angular displacement of the drive shaft after power failure, accurately and accurately reflecting the true mold height of the punching machine, avoiding the situation after starting the machine. The problem of wasted time and inefficiency caused by the need to recalibrate the die height indicator.
可以理解的是,对本领域普通技术人员来说,可以根据本发明的技术方案及其发明构思加以等同替换或改变,而所有这些改变或替换都应属于本发明所附的权利要求的保护范围。It is to be understood that those skilled in the art can make equivalent substitutions or changes to the inventions and the inventions of the present invention, and all such changes or substitutions fall within the scope of the appended claims.