Difference between revisions of "Error Compensation/zh-hans"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Languages}} == 介绍 == 组允许您将多个轴作为单个机构进行控制。对于组,位置命令和反馈信号不再是单个值,而是具有两个或三个元...")
 
Line 76: Line 76:
 
根据源轴 '''PCMD'''锁定并计算表中的值,并进行线性变换。 “源”轴根据位置确定校正值。 “目标”轴被校正。
 
根据源轴 '''PCMD'''锁定并计算表中的值,并进行线性变换。 “源”轴根据位置确定校正值。 “目标”轴被校正。
  
The table has a “header” which consists of the number of axes in the table followed by the number of compensation points defined for each axis. The table can be created the softMC using '''TARGETDATA''', '''SOURCEDATA''', and '''CREATECOMP''', or can be loaded from a binary file with a .CMP extension.
 
 
该表有一个“标题”,它由表中的轴数组成,后面是为每个轴定义的补偿点数。 该表可以使用'''TARGETDATA''','''SOURCEDATA'''和'''CREATECOMP'''创建softMC,也可以从具有.CMP扩展名的二进制文件加载。
 
该表有一个“标题”,它由表中的轴数组成,后面是为每个轴定义的补偿点数。 该表可以使用'''TARGETDATA''','''SOURCEDATA'''和'''CREATECOMP'''创建softMC,也可以从具有.CMP扩展名的二进制文件加载。
  
 
当“源”轴位置反馈达到表中的第一(即最小)值时,校正将起作用。校正值添加到目标轴,并将表中的值计算为其当前的 '''PCMD '''和 '''PFB'''。
 
当“源”轴位置反馈达到表中的第一(即最小)值时,校正将起作用。校正值添加到目标轴,并将表中的值计算为其当前的 '''PCMD '''和 '''PFB'''。
  
The values in the “source” columns are in absolute units, while the “target” values are in relative units (i.e., the value specified in the table is added to the current position of the axis, whether it is a geared, cammed or a regular axis). A value different from 0 at the beginning of the table causes a jump at the target axes whenever the source axes get to the minimum value specified in the table.
+
“源”列中的值为绝对值单位,“目标”值为相对单位(即,将表中指定的值添加到轴的当前位置,无论它是齿轮,凸轮或常规轴)。 每当源轴达到表中指定的最小值时,与表开始处的值不同的值将导致目标轴上的跳转。
“源”列中的值为绝对值单位,“目标”值为相对单位(即,将表中指定的值添加到轴的当前位置,无论它是齿轮,凸轮或 规则轴)。 每当源轴达到表中指定的最小值时,与表开始处的值不同的值将导致目标轴上的跳转。
 
  
The difference between the corrected position ('''COMPPCMD''') and the actual position feedback determines the position error of the target axes. '''PCMD''' returns the position of the generator before correction.
+
校正位置('''COMPPCMD''')与实际反馈位置之间的差异决定了目标轴的位置误差。 '''PCMD'''返回校正之前发生器的位置。
  
The source PFB (for example, source1.pcmd=1, source2.pcmd=3.2, source3.pcmd=4.5) is searched in the table and linearly transformed from the previous points in the table to give the correction for the target positions.
+
在表中搜索源PFB(例如source1.pcmd = 1,source2.pcmd = 3.2,source3.pcmd = 4.5),并从表中的先前点线性变换以给出目标位置的校正。
  
While the source axis continues its movement along the specified zone, the target axes change their positions according to the table. When one of the sources goes beyond the max value there are no more correction added for any of the axes in the table (correction=0). A jump may occur.
+
当源轴沿着指定的区域继续移动时,目标轴根据该表改变其位置。 当其中一个源超过最大值时,表中的任何轴都不再添加校正(校正= 0)。 可能会发生跳跃。
  
Correction values are assumed very small and will not cause a large jump in the target axis. '''VOSPD''' and '''PEMAX''' are affected by the corrected position. Change these values accordingly to avoid exceeding the maximum values.
+
假定校正值非常小,不会导致目标轴的大跳跃。 '''VOSPD''''''PEMAX'''受到修正后的位置的影响。 相应更改这些值以避免超过最大值。
  
While the compensation table is active, the values of the table cannot be changed. After the table is created, only the “target” values can be change.
+
补偿表处于活动状态时,表的值不能更改。 创建表后,只能更改“目标”值。
  
 
== Access Data ==
 
== Access Data ==

Revision as of 06:19, 15 May 2017

语言: [[::Error Compensation|English]]  • [[::Error Compensation/zh-hans|中文(简体)‎]]

介绍

组允许您将多个轴作为单个机构进行控制。对于组,位置命令和反馈信号不再是单个值,而是具有两个或三个元素的向量。 速度和加速度不再适用于单个电机,而是应用于两个或三个电动机的组合。

一些应用需要高精度的位置,因此需要补偿系统中的机械不准确性。softMC允许您定义一个或多个轴的校正表。根据该轴的位置或其他轴的位置,该表定义给轴的位置命令的校正。 每个运动总线循环都实现了这种校正。 补偿表通常由高精度工具创建,然后由softMC使用来校正小的不准确性。 当目标轴是组的一部分时,校正也可以生效。

规范

补偿表由N轴构成,用于定义补偿。表中的行数将为k1*k2*….*kn,其中k1至kn分别是为轴A1至kn定义的校正点数。“源”位置(源轴位置单位)必须相等间隔且单调增加,而“补偿”(在目标用户位置单位)是添加到“目标”轴的校正。

补偿表3轴目标上的3轴源显示如下。


The Header
3 10 2
“Source” axis location
“Target” axis compensation
1 3.1 4.5
0 0.5 0.9
2 3.1 4.5
0.9 0.51 0.2
------------------------------
----------------------------------
6 3.1 4.5
2.0 0.5 0.9
1 3.2 4.5
0 0.1 0.9
2 3.2 4.5
0.65 0.01 0.9
------------------------------
----------------------------------
6 3.2 4.5
3.0 0.22 0.9
------------------------------
----------------------------------
6 4 4.5
2.0 0.2 0.9
1 3.1 5.0
0 0.1 0.87
------------------------------
----------------------------------
6 4 5.0
1 1 1.2

根据源轴 PCMD锁定并计算表中的值,并进行线性变换。 “源”轴根据位置确定校正值。 “目标”轴被校正。

该表有一个“标题”,它由表中的轴数组成,后面是为每个轴定义的补偿点数。 该表可以使用TARGETDATA,SOURCEDATACREATECOMP创建softMC,也可以从具有.CMP扩展名的二进制文件加载。

当“源”轴位置反馈达到表中的第一(即最小)值时,校正将起作用。校正值添加到目标轴,并将表中的值计算为其当前的 PCMD PFB

“源”列中的值为绝对值单位,“目标”值为相对单位(即,将表中指定的值添加到轴的当前位置,无论它是齿轮,凸轮或常规轴)。 每当源轴达到表中指定的最小值时,与表开始处的值不同的值将导致目标轴上的跳转。

校正位置(COMPPCMD)与实际反馈位置之间的差异决定了目标轴的位置误差。 PCMD返回校正之前发生器的位置。

在表中搜索源PFB(例如source1.pcmd = 1,source2.pcmd = 3.2,source3.pcmd = 4.5),并从表中的先前点线性变换以给出目标位置的校正。

当源轴沿着指定的区域继续移动时,目标轴根据该表改变其位置。 当其中一个源超过最大值时,表中的任何轴都不再添加校正(校正= 0)。 可能会发生跳跃。

假定校正值非常小,不会导致目标轴的大跳跃。 VOSPDPEMAX受到修正后的位置的影响。 相应更改这些值以避免超过最大值。

补偿表处于活动状态时,表的值不能更改。 创建表后,只能更改“目标”值。

Access Data

The compensation table data is arranged in the form of following target data for the points for each individual axis. If there are three axes (A1, A3, A3), there are three (N1, N2, N3) compensation points defined. To calculate the index to access the table with the indexes i, j, k for A1,A2,A3, use:

index = i + j*N1 + k*N1*N2 .

Define

The compensation table is defined as a global variable.

Common shared comp1 as comp
CreateComp Comp1 3 ,4, 8
‘Creates a table with 3*4*8 number of rows and 
'6 number of columns – 3 for the source & 3 for the target.
CompSet Comp1 A1 ,A3, A4 on A2, A6, A5
‘Sources A1 A3 A4 and targets A2 A6 A5 respectively.

The maximum and minimum positions of the table are set for every axis in the compensation table as well as a multiplier:

Comp1.minposition[2] = 1.32
Comp1.maxposition[2] = 4.5' Set the maximum value for the second axis in the table

Load/Save From a File

Another way to create a compensation table is to directly load it from a binary file stored on the Flash disk. The structure of the compensation file is:

Header – <number of axes> <number of points axis1> ….<number of points axisn> (integer 4 bytes)

Source data – <min axis1> <max axis1>…..<min axisn><max axisn> (double 8 bytes)

Target data – target values for axis1,…….target values for axisn. (double 8 bytes)

The file can be created directly from Basic Moves by loading a list of values (arranged as described above) in a .CSV format into the softMC flash as a binary file with the CMP extension (see LOADCOMPDATA and STORECOMPDATA in the MC Reference manual).

Set and Query Values

While the compensation table is not active, you can change a specific target value.

Comp1.targetdata[1][23] = 3
‘ Set a new compensation value of index 23 of Axis1
?Comp1.sourcedata[2][24]
‘ Read the source value index 23 of Axis1

Activate

After defining the correction table turn it ON/OFF with COMPACTIVE. Before activating, a check is performed to insure that the table is valid (the points are evenly spaced and increasing). After validation and enabling the target axis, positions of the target axes are corrected using the value calculated from the compensation table. If a target axis is disabled, the correction takes effect only after the axis is enabled.

NOTE-Info.svgNOTE
A jump may occur when the compensation procedure starts from a point other than the start point of the table. A jump may also occur if the compensation process is disabled before reaching the end of the table.

Query Actual Positions

The actual positions are return by COMPPCMD and COMPPFB. These properties can be operated as the master source for a slave – geared or cammed. PCMD and PFB return the command and feedback positions without compensation.

Multi-Dimensional Correction

In the following example, the correction is performed on several axes. In the described system, there are three axes (X, Y, Z). The X, Y, Z position corrections are determined according to the location of the X, Y, and Z axes.

The table is composed from 4, 9, 3 entries for X, Y, Z axes, respectively.

Common shared comp1 as comp ‘This declares a table in the system.
CreateComp comp1 4 ,9, 3
Comp1.minposition[1] = 0.1 ‘Setting min for the X
Comp1.maxposition[1] = 9 ‘Setting max for the X
Comp1.minposition[2] = 1.1 ‘Setting min for the Y
Comp1.maxposition[2] = 2 ‘Setting max for the Y
Comp1.minposition[3] = 3 ‘Setting min for the Z
Comp1.maxposition[3] = 3.12 ‘Setting max for the Z
CompSet comp1 ax1 ,ax2, ax3 on ax1 ,ax2, ax3 ‘Declare before target data definition
Comp1.TargetData[1][1] = 0.01 ‘Setting the target
Comp1.TargetData[3][3*9*4] = 0.02 ‘Setting the target
Comp1.CompActive=1

From now on, any movement on any of the axes in the table generates compensation.