Compensation Table/zh-hans
语言: | [[::Compensation Table|English]] • [[::Compensation Table/zh-hans|中文(简体)]] |
---|
Contents
介绍
组允许您将多个轴作为单个机构进行控制。对于组,位置命令和反馈信号不再是单个值,而是具有两个或三个元素的向量。 速度和加速度不再适用于单个电机,而是应用于两个或三个电动机的组合。
一些应用需要高精度的位置,因此需要补偿系统中的机械不准确性。softMC允许您定义一个或多个轴的校正表。根据该轴的位置或其他轴的位置,该表定义给轴的位置命令的校正。 每个运动总线循环都实现了这种校正。 补偿表通常由高精度工具创建,然后由softMC使用来校正小的不准确性。 当目标轴是组的一部分时,校正也可以生效。
规范
补偿表由N轴构成,用于定义补偿。表中的行数将为:
k1*k2*….*kn
其中 k1 到 kn 分别是为轴A1至An定义的校正点数。“源”位置(源轴位置单位)必须相等间隔且单调增加,而“补偿”(在目标用户位置单位)是添加到“目标”轴的校正。
补偿表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锁定并计算表中的值,并进行线性变换。 源轴根据位置确定校正值。目标轴被校正。
该表有一个标题,其中包括表中的轴数,后面是为每个轴定义的补偿点数。 该表由softMC使用TargetData , SourceData和 CreateComp也可以从具有.CMP扩展名的二进制文件加载。
当“源”轴位置反馈达到表中的第一(即最小)值时,校正将起作用。校正值添加到目标轴,并将表中的值计算为其当前的PCMD和PFB。
“源”列中的值为绝对值单位,“目标”值为相对单位(即,将表中指定的值添加到轴的当前位置,无论它是齿轮,凸轮或常规轴)。 每当源轴达到表中指定的最小值时,与表开始处的值不同的值将导致目标轴上的跳转。
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. 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.
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. 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. 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
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
Definition
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 MC's Flash as a binary file with the CMP extension (refer to LoadCompData and StoreCompData).
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 Table
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 | |
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 the 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.