<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://www.dynomotion.com/wiki/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://www.dynomotion.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Linear_Table_Correction</id>
		<title>Linear Table Correction - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://www.dynomotion.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Linear_Table_Correction"/>
		<link rel="alternate" type="text/html" href="https://www.dynomotion.com/wiki/index.php?title=Linear_Table_Correction&amp;action=history"/>
		<updated>2026-05-10T23:49:40Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.10</generator>

	<entry>
		<id>https://www.dynomotion.com/wiki/index.php?title=Linear_Table_Correction&amp;diff=690&amp;oldid=prev</id>
		<title>TK: /* Linear Table Correction */</title>
		<link rel="alternate" type="text/html" href="https://www.dynomotion.com/wiki/index.php?title=Linear_Table_Correction&amp;diff=690&amp;oldid=prev"/>
				<updated>2024-06-24T00:19:08Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Linear Table Correction&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 00:19, 24 June 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Linear Table Correction==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==Linear Table Correction==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Besides &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;the &lt;/del&gt;2.5D Geometric Correction capability 1D Linear Table corrections can be applied to each axis independently.  Lead Screw mapping fits into this category where there a nonlinear distortion of the commanded axis position to the true position of the axis.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Besides &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;the [https://dynomotion.com/Help/KMotionCNC/GeoCorrection.htm &lt;/ins&gt;2.5D Geometric Correction capability&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;] &lt;/ins&gt;1D Linear Table corrections can be applied to each axis independently.  Lead Screw mapping fits into this category where there a nonlinear distortion of the commanded axis position to the true position of the axis.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 93:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 93:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is the Excel Spreadsheet used to create the Error Plot from the Linear Table file.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is the Excel Spreadsheet used to create the Error Plot from the Linear Table file.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;file&lt;/del&gt;:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;///&lt;/del&gt;PlotLinearCorrectionTable.xlsx &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Plot Linear Correction Table Excel File&lt;/del&gt;]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Media:PlotLinearCorrectionTable.xlsx|&lt;/ins&gt;PlotLinearCorrectionTable.xlsx&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>TK</name></author>	</entry>

	<entry>
		<id>https://www.dynomotion.com/wiki/index.php?title=Linear_Table_Correction&amp;diff=689&amp;oldid=prev</id>
		<title>TK: Linear Table Correction Description Added</title>
		<link rel="alternate" type="text/html" href="https://www.dynomotion.com/wiki/index.php?title=Linear_Table_Correction&amp;diff=689&amp;oldid=prev"/>
				<updated>2024-06-23T23:43:09Z</updated>
		
		<summary type="html">&lt;p&gt;Linear Table Correction Description Added&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Linear Table Correction==&lt;br /&gt;
Besides the 2.5D Geometric Correction capability 1D Linear Table corrections can be applied to each axis independently.  Lead Screw mapping fits into this category where there a nonlinear distortion of the commanded axis position to the true position of the axis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each or both 2.5D Geo Correction and 1D Linear correction can be applied.  If both are applied then the 2.5D Geo Correction is applied first and then the Actuator positions have 1D Linear corrections applied.  Between Points a linear interpolation is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is shown an example plot of a correction table for an angular A axis.  The table values contain the commanded positions required to position at the theoretical positions.  For example in the plot below to move to angle 0 the axis actually needs to be commanded to 10 degrees.  To move to 90 degrees the axis would need to be commanded to 95 degrees.  Note these values are exaggerated over what they would typically be for a real system for demonstration purposes.  The example is created using a cosine function where the correction is 0 at -80 and +180 degrees and 10 degrees at 0 degrees.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The actual table contains a list of necessary commanded position but the plot below shows the difference between the commanded positions and the theoretical positions to plot errors and to make the errors more visible.&lt;br /&gt;
&lt;br /&gt;
[[File:CosineCorrection_Excel_Plot.png|none|link=]]&lt;br /&gt;
&lt;br /&gt;
Below is a fragment of the text file for a Linear Correction Table.  The first 3 lines define the table range.&lt;br /&gt;
&lt;br /&gt;
Line 1 contains the number of commanded positions.  Note that for N ranges N+1 points must be specified.  The example defined 180 2 degree ranges so 181 points are required.&lt;br /&gt;
&lt;br /&gt;
Line 2 defines the size of each range.  In this case 2 degrees.&lt;br /&gt;
&lt;br /&gt;
Line 3 defines the offset or starting point for the table.  In this example it is assumed the useful machine range is from -180 to +180 degrees.  So the Table offset is -180.  The A axis theoretically goes from -infinity to +infinity so it must be specified what range the table should be applied.  If the machine coordinates operated from 0 to 360 degrees then the offset would be 0. &lt;br /&gt;
&lt;br /&gt;
Line 4 through N+3 defines the actual axis commanded values preceded by the point number.  The points may be specified in any order as long as all point numbers are specified.&lt;br /&gt;
&lt;br /&gt;
[[File:MapFile.png|none|link=]]&lt;br /&gt;
&lt;br /&gt;
The Tool Setup | Tool/Setup Files | Geo File specifies the root of which files are to be used.   The file name itself specified the name of the 2.5D Geo Correction file.  The Linear Table corrections files are derived from this name by appending: '_X', '_Y', '_Z ', '_A', '_B' or '_C' before any suffix.  So assuming a Geo Correction name of C:\Temp\MapFile.txt the Linear Table Names would be&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
C:\Temp\MapFile_X.txt&lt;br /&gt;
&lt;br /&gt;
C:\Temp\MapFile_Y.txt&lt;br /&gt;
&lt;br /&gt;
C:\Temp\MapFile_Z.txt&lt;br /&gt;
&lt;br /&gt;
C:\Temp\MapFile_A.txt&lt;br /&gt;
&lt;br /&gt;
C:\Temp\MapFile_B.txt&lt;br /&gt;
&lt;br /&gt;
C:\Temp\MapFile_C.txt&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br class=&amp;quot;Apple-interchange-newline&amp;quot;&amp;gt;The Software will automatically search for these files and apply corrections for the found files.  The 2.5D Geo Correction file may or may not be present.  But at least one file must be present and valid. &amp;lt;br class=&amp;quot;Apple-interchange-newline&amp;quot;&amp;gt;[[File:GeoFile.png|none|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
With the above Linear Correction in effect and the GCode A Axis commanded to 0 degrees note that the actual commanded axis position is 1000 counts.  This corresponds to a 10 degree offset because the trajectory Planner settings are specified to be 100 count/degree&lt;br /&gt;
&lt;br /&gt;
[[File:A0_Correction10.png|none|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the GCode A Axis commanded to -90 degrees note that the actual commanded axis position is -8500 counts (-85 degrees).  This corresponds to a +5 degree offset&lt;br /&gt;
&lt;br /&gt;
[[File:A-90_Correction5.png|none|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here the GCode A Axis commanded to -180 degrees note that the actual commanded axis position is -18000 counts (-90 degrees).  This corresponds to no offset&lt;br /&gt;
&lt;br /&gt;
[[File:A-180_Correction0.png|none|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Below is an example KFLOP/Kogna C Program that was used to create the MapFile_A.txt file &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;brush:c&amp;quot;&amp;gt;#include &amp;quot;KMotionDef.h&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
// Create Simple Linear Correction file for A axis&lt;br /&gt;
 &lt;br /&gt;
int main(void)&lt;br /&gt;
{&lt;br /&gt;
	int i;&lt;br /&gt;
	double angle, error;&lt;br /&gt;
	&lt;br /&gt;
	// Calibrate Table for A -180 to +180 degrees at 2 degree increments&lt;br /&gt;
    FILE *f=fopen(&amp;quot;C:\\Temp\\MapFile_A.txt&amp;quot;,&amp;quot;wt&amp;quot;);&lt;br /&gt;
    fprintf(f,&amp;quot;181\n&amp;quot;);   // 181 points specify 180 regions&lt;br /&gt;
    fprintf(f,&amp;quot;2.0\n&amp;quot;);   // 2 degree Spacing&lt;br /&gt;
    fprintf(f,&amp;quot;-180\n&amp;quot;);  // Offset - Table begins at -180&lt;br /&gt;
&lt;br /&gt;
	// use dummy correction of cosine function with no error&lt;br /&gt;
	// at -180 and +180 but 10 degrees at center (0 degrees)&lt;br /&gt;
	&lt;br /&gt;
	for (i=0; i&amp;lt;181; i++)&lt;br /&gt;
	{&lt;br /&gt;
		angle = -180.0 + i * 2.0;&lt;br /&gt;
		error = (cos(angle * PI/180.0)+1)/2.0 * 10.0;&lt;br /&gt;
		fprintf(f,&amp;quot;%d,%.11f\n&amp;quot;, i, angle+error);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
    fclose(f);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the Excel Spreadsheet used to create the Error Plot from the Linear Table file.&lt;br /&gt;
&lt;br /&gt;
[file:///PlotLinearCorrectionTable.xlsx Plot Linear Correction Table Excel File]&lt;/div&gt;</summary>
		<author><name>TK</name></author>	</entry>

	</feed>