<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.cpr-robots.com/index.php?action=history&amp;feed=atom&amp;title=Moving_Robots_via_Modbus</id>
	<title>Moving Robots via Modbus - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.cpr-robots.com/index.php?action=history&amp;feed=atom&amp;title=Moving_Robots_via_Modbus"/>
	<link rel="alternate" type="text/html" href="https://wiki.cpr-robots.com/index.php?title=Moving_Robots_via_Modbus&amp;action=history"/>
	<updated>2026-05-02T03:47:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://wiki.cpr-robots.com/index.php?title=Moving_Robots_via_Modbus&amp;diff=808&amp;oldid=prev</id>
		<title>OLT at 11:20, 28 October 2025</title>
		<link rel="alternate" type="text/html" href="https://wiki.cpr-robots.com/index.php?title=Moving_Robots_via_Modbus&amp;diff=808&amp;oldid=prev"/>
		<updated>2025-10-28T11:20:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:20, 28 October 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l67&quot;&gt;Line 67:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 67:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Register 467 (Y) = 200 x 10 = 2000&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Register 467 (Y) = 200 x 10 = 2000&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Register 468 (Z) = -40 x 10 =&amp;gt; 65535 - 400 = 65135&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Register 468 (Z) = -40 x 10 =&amp;gt; 65535 - 400 = 65135&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;     Register 469 (A) = 0 x 10 = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;10&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;     Register 469 (A) = 0 x 10 = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;     Register 470 (B) = 0 x 10 = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;10&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; 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;     Register 470 (B) = 0 x 10 = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;0&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Register 471 (C) = 180 x 10 = 1800&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Register 471 (C) = 180 x 10 = 1800&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Register 472 (conversion type) = 0&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;     Register 472 (conversion type) = 0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>OLT</name></author>
	</entry>
	<entry>
		<id>https://wiki.cpr-robots.com/index.php?title=Moving_Robots_via_Modbus&amp;diff=208&amp;oldid=prev</id>
		<title>OLT: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.cpr-robots.com/index.php?title=Moving_Robots_via_Modbus&amp;diff=208&amp;oldid=prev"/>
		<updated>2025-08-11T10:13:24Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 10:13, 11 August 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>OLT</name></author>
	</entry>
	<entry>
		<id>https://wiki.cpr-robots.com/index.php?title=Moving_Robots_via_Modbus&amp;diff=207&amp;oldid=prev</id>
		<title>cpr&gt;Mab: Link to Modbus main article</title>
		<link rel="alternate" type="text/html" href="https://wiki.cpr-robots.com/index.php?title=Moving_Robots_via_Modbus&amp;diff=207&amp;oldid=prev"/>
		<updated>2024-08-13T13:26:25Z</updated>

		<summary type="html">&lt;p&gt;Link to Modbus main article&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The [[Modbus]] interface provides several ways to move a robot to desired positions.&lt;br /&gt;
&lt;br /&gt;
This article explains what registers and coils need to be set and how position values need to be converted.&lt;br /&gt;
&lt;br /&gt;
= Direct positioning (Move-To) =&lt;br /&gt;
This is a simple approach for moving the robot to a target position. Queueing positions is not supported; if you send another position while the robot is still moving it will stop, then start the next motion.&lt;br /&gt;
&lt;br /&gt;
The following motion types are supported:&lt;br /&gt;
* Linear motion to cartesian position&lt;br /&gt;
* Linear motion relative to the base or tool coordinate system&lt;br /&gt;
* Joint motion&lt;br /&gt;
* Relative joint motion&lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
&lt;br /&gt;
The approach for sending a position and starting a motion is the same for all types:&lt;br /&gt;
# Write the position values to the holding registers&lt;br /&gt;
# Write the motion velocity to holding register 180&lt;br /&gt;
# Write a rising edge (0, then 1) to the coil to start the motion&lt;br /&gt;
&lt;br /&gt;
The register and coil addresses depend on the motion type, you will find them in the user manual.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
In this example we want to move a gantry robot to the following position: X=100mm, Y=200mm, Z=-40mm, A=0°, B=0°, C=180°&lt;br /&gt;
&lt;br /&gt;
The cartesian position needs to be written to holding registers 130-135, the cartesian orientation to holding registers 136-141. To provide enough accuracy for far positions each position value is first multiplied with a unit factor of 100, then split across two 16-bit registers:&lt;br /&gt;
    32-bit value for X: 100mm x 100 = 10000&lt;br /&gt;
    Lower register for X (130) = 10000&lt;br /&gt;
    Upper register for X (131) = 0&lt;br /&gt;
&lt;br /&gt;
The upper register is always 0 for positions between 0 and 655mm or 655° (maximum register value 65535). Bigger or negative values need to be split binarily. In this example the Z position is negative:&lt;br /&gt;
    Value for Z: -40mm x 100 = -4000&lt;br /&gt;
    Convert to an unsigned 32 bit number then split it across both registers:&lt;br /&gt;
    Lower register for Z (134): 65535 - 4000 = 61535&lt;br /&gt;
    Upper register for Z (135): 65535 - 0 = 65535&lt;br /&gt;
    Positions smaller than -655mm or -655° will overflow into the upper register and need to be handled accordingly.&lt;br /&gt;
&lt;br /&gt;
The requested velocity must written to holding register 180. For cartesian motions the value is set as a multiple of 0.1mm/s, for joint motions it is a multiple of 0.1% (relative to the maximum velocity), so use factor 10. The actual motion speed also depends on the global override value (holding register 187).&lt;br /&gt;
    In our case we want to move with 120mm/s:&lt;br /&gt;
    Velocity register (180): 120 x 10 = 1200&lt;br /&gt;
&lt;br /&gt;
Cartesian motions are started by creating a rising edge on coil 100.&lt;br /&gt;
    Write a 0 to coil 100, then write a 1.&lt;br /&gt;
    If you prefer you can reset the coil to 0 after writing the 1, this way you will need one write less before triggering the motion.&lt;br /&gt;
&lt;br /&gt;
= Using a robot program via variables =&lt;br /&gt;
This approach is useful for more complex motions and for sending motion parameters to a robot program.&lt;br /&gt;
&lt;br /&gt;
== Approach ==&lt;br /&gt;
# Create and load a robot program that moves to a variable position (Linear-by-Variable or Joint-by-Variable). Set it to run in an infinite loop if you want to move to several positions. [[Moving Robots via CRI#Program variables via CRI|An example program is shown here]].&lt;br /&gt;
# Write the target position to the Modbus variable that you use in your program, e.g. mb_pos_w1&lt;br /&gt;
# Start the program (if it is not running already)&lt;br /&gt;
&lt;br /&gt;
This also works for sending positions to more complex programs.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Creating and uploading the program must be done using CPRog/iRC.&lt;br /&gt;
&lt;br /&gt;
Write the position to the Modbus variable of your choice:&lt;br /&gt;
    Variable mb_pos_w1 is defined be holding registers 456-472. The first 6 registers define the robot joint values, the next 3 the external joints, then 3 registers for the cartesian position, then 3 for the cartesian orientation. The last register defines the conversion type, this is useful for converting between joint and cartesian positions. Read the user manual for more information.&lt;br /&gt;
&lt;br /&gt;
Unlike the Move-To registers only one register per value is used here with a conversion factor of 10. Set the registers accordingly.&lt;br /&gt;
    Example: Linear motion to X=100mm, Y=200mm, Z=-40mm, A=0°, B=0°, C=180°&lt;br /&gt;
    Registers 456 - 465 = 0&lt;br /&gt;
    Register 466 (X) = 100 x 10 = 1000&lt;br /&gt;
    Register 467 (Y) = 200 x 10 = 2000&lt;br /&gt;
    Register 468 (Z) = -40 x 10 =&amp;gt; 65535 - 400 = 65135&lt;br /&gt;
    Register 469 (A) = 0 x 10 = 10&lt;br /&gt;
    Register 470 (B) = 0 x 10 = 10&lt;br /&gt;
    Register 471 (C) = 180 x 10 = 1800&lt;br /&gt;
    Register 472 (conversion type) = 0&lt;br /&gt;
&lt;br /&gt;
Start the program (if it is not running yet).&lt;br /&gt;
    Write a rising edge (0, then 1) to coil 122 (&amp;quot;start program&amp;quot;).&lt;br /&gt;
    Or write 1 to holding register 260 (&amp;quot;program run state&amp;quot;).&lt;br /&gt;
[[Category:TinyCtrl]][[Category:Modbus]]&lt;/div&gt;</summary>
		<author><name>cpr&gt;Mab</name></author>
	</entry>
</feed>