<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://softmc.servotronix.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Itay</id>
		<title>SoftMC-Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://softmc.servotronix.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Itay"/>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/wiki/Special:Contributions/Itay"/>
		<updated>2026-05-14T21:21:26Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Dynamic_Models&amp;diff=133290</id>
		<title>Dynamic Models</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Dynamic_Models&amp;diff=133290"/>
				<updated>2019-09-11T05:34:11Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gives an overview over all implemented dynamic models.&lt;br /&gt;
&lt;br /&gt;
'''General considerations'''&lt;br /&gt;
* Friction is handled on axis basis. The parameters for friction are set for each axis separately.&lt;br /&gt;
* Torque (Force) is always expressed in '''[Nm]''' ([N])&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotational Axes ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 - simple rotary axis ===&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 2 - horizontal crank-arm axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Crank-Arm Axis.png|Horizontal crank-arm axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 3 - vertical crank-arm axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Crank-Arm Axis.png|Vertical crank-arm axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot A&amp;lt;/math&amp;gt;&lt;br /&gt;
|Mass (without payload) * Gravity * Distance to center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity * Distance to Payload&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc - (M \cdot g \cdot A + M_{payload} \cdot g \cdot L) \cdot \sin(pos)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Linear Axes ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 - horizontal axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Axis.png|Horizontal linear axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 2 - vertical or tilted axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Axis.png|Vertical linear axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Constant force due to gravity.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity coefficient used to consider payload mass. ('''g = 9.80665''')&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc + M \cdot g \cdot \cos(\alpha) + M_{payload} \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 3 - vertical axis with a spring ===&lt;br /&gt;
[[File:Axystems;Motion_Dynamics_-_Vertical_Axis_with_spring.png|Vertical linear axis with a spring|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.  [kg]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt;&lt;br /&gt;
|The stiffness constant of the spring.  [kg/s^2]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;K \cdot X_{0}&amp;lt;/math&amp;gt;&lt;br /&gt;
|The stiffness constant times the relaxation position of the spring.  [kg*m/s^2]&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot (acc + g) + K\cdot (X-X_{0})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Traverse Arm Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:Inverse dynamic model for Traverse Arm kinematics - Definitions.png|Traverse Arm robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M_1 + M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scara Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:scara.PNG|scara robot|thumb]]&lt;br /&gt;
For non-coupled SCARA robots (axis 3 and 4 are not coupled). &amp;lt;br /&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot M_2 + I_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 2 ===&lt;br /&gt;
For coupled SCARA robots (axis 3 and 4 are coupled) and for concentric payloads (concentric with axis 4). &amp;lt;br /&amp;gt;&lt;br /&gt;
Note: &amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt; includes both the masses of link 3 and link 4&amp;lt;br /&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot (M_2+M_3) + I_1 + J_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + L_2^2 \cdot M_3 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2 + L_1 \cdot L_2 \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;J_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The payload parameters are:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|payloadMass&lt;br /&gt;
|The mass of the payload&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|payloadInertia&lt;br /&gt;
|The Inertia of the payload relative to its center of mass&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 3 ===&lt;br /&gt;
For coupled SCARA robots (axis 3 and 4 are coupled) and for non-concentric payloads (non-concentric with axis 4). &amp;lt;br /&amp;gt;&lt;br /&gt;
The dynamic parameters are the same as model 2. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The payload parameters are:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|payloadMass&lt;br /&gt;
|The mass of the payload&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|payloadInertia&lt;br /&gt;
|The Inertia of the payload relative to its center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|payloadLx&lt;br /&gt;
|The distance to the center of mass from the 4th axis in the x direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When using identification with this model, all of the payload parameters can be found. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 4 ===&lt;br /&gt;
&lt;br /&gt;
Same as Dynamic Model 3.&amp;lt;br/&amp;gt; This model is used in identification process in order to identify the '''payloadMass''' parameter only, by moving only joint&amp;amp;nbsp;number 3.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 5 ===&lt;br /&gt;
&lt;br /&gt;
Same as Dynamic Model 3.&amp;lt;br/&amp;gt; This model is used in identification process in order to identify the '''payloadInertia''' and '''payloadLx''' parameters, by moving only joint number 4 and very small movements in joints 1 and 2.&lt;br /&gt;
&lt;br /&gt;
== Delta Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:Control;Rod forces model for Delta kinematics - Introduction.png|Delta robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L_{AB} \cdot M_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
| kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;/sec&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_P&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;M_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{T\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TO}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TP}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;C_r&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;Fr_{max}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;R_{ext}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Puma Robots ==&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:puma.PNG|Puma robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
:* &amp;lt;math&amp;gt; g &amp;lt;/math&amp;gt; - Gravity constant&lt;br /&gt;
:* &amp;lt;math&amp;gt; m_{i} &amp;lt;/math&amp;gt; - Mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
:* &amp;lt;math&amp;gt; a_{i} &amp;lt;/math&amp;gt; - length of the common normal between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; d_{i} &amp;lt;/math&amp;gt; - offset along z axis between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; l_{i} &amp;lt;/math&amp;gt; - The distance from the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; joint to the center of mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{1} = I_{1,zz}+m_{1}*l_{1,y}^2 +m_{2}*d_{2}^2+(m_{4}+m_{5}+m_{6})*a_{3}^2+m_{2}*l_{2,z}^2+&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt; &amp;lt;math&amp;gt;(m_{3}+m_{4}+m_{5}+m_{6})*(d_{2}+d_{3})^2+I_{2,xx}+I_{3,yy}+2*m_{2}*d_{2}*l_{2,z}+m_{2}*l_{2,y}^2+m_{3}*l_{3,z}^2+2*m_{3}*(d_{2}+d_{3})*l_{3,z}+I_{4,zz}+I_{4,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{2} = I_{2,zz}+m_{2}*(l_{2,x}^2+l_{2,y}^2)+(m_{3}+m_{4}+m_{5}+m_{6}*a_{2}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{3} = -I_{2,xx}+I_{2,yy}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}^2+m_{2}*l_{2,x}^2-m_{2}*l_{2,y}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{4} = m_{2}*l_{2,x}*(d_{2}+l_{2,z})+m_{3}*a_{2}*l_{3,z}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{5} = -m_{3}*a_{2}*l_{3,y}+(m_{4}+m_{5}+m_{6})*a_{2}*d_{4}+m_{4}*a_{2}*l_{4,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{6} = I_{3,zz}+m_{3}*l_{3,y}^2+m_{4}*a_{3}^2+m_{4}*(d_{4}+l_{4,z})^2+I_{4,yy}+m_{5}*a_{3}^2+m_{5}*d_{4}^2+I_{5,zz}+m_{6}*a_{3}^2+m_{6}*d_{4}^2+m_{6}*l_{6,z}^2+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{7} = m_{3}*l_{3,y}^2+I_{3,xx}-I_{3,yy}+m_{4}*l_{4,z}^2+2*m_{4}*d_{4}*l_{4,z}+(m_{4}+m_{5}+m_{6})*(d_{4}^2-a_{3}^2)+I_{4,yy}-I_{4,yy}+I_{5,zz}-I_{5,yy}+m_{6}*l_{6,z}^2-I_{6,zz}+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{8} = -m_{4}*(d_{2}+d_{3})*(d_{4}+l_{4,z})-(m_{3}+m_{6})*(d_{2}+d_{3})*d_{4}+m_{3}*l_{3,y}*l_{3,z}+m_{3}*(d_{2}+d_{3})*l_{3,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{9} = m_{2}*l_{2,y}*(d_{2}+l_{2,z})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{10} = 2*m_{4}*a_{5}*l_{4,z}+2*(m_{4}+m_{5}+m_{6})*a_{3}*d_{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{11} = -2*m_{2}*l_{2,x}*l_{2,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{12} = (m_{4}+m_{5}+m_{6})*a_{2}*a_{3}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{13} = (m_{4}+m_{5}+m_{6})*a_{3}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{14} = I_{4,zz}+I_{5,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{15} = m_{6}*d_{4}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{16} = m_{6}*a_{2}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{17} = I_{5,zz}+I_{6,xx}+m_{6}*l_{6,z}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{18} = m_{6}*(d_{2}+d_{3})*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{19} = I_{4,yy}-I_{4,xx}+I_{5,zz}-i_{5,yy}+m_{6}*l_{6,z}^2+I_{6,xx}-I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{20} = I_{5,yy}-I_{5,xx}-m_{6}*l_{6,z}^2+I_{6,zz}-I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{21} = I_{4,xx}-I_{4,yy}+I_{5,xx}-I_{5,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{22} = m_{6}*a_{3}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{23} = I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 2 - Gravity ===&lt;br /&gt;
This dynamic model is for cases where the robot moves very slowly.&amp;lt;br /&amp;gt;&lt;br /&gt;
In such cases, the accelerations and velocities of the joints of the robot have little effect on the joints torques. The joints torques are mainly affected by gravity and friction. &amp;lt;br /&amp;gt;&lt;br /&gt;
This model includes only the gravity and friction part of the PUMA robot dynamic model.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{2}l_{2}+a_{2}(m_{3}+m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+a_{3}(m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+m_{4}(l_{4}+d_{4}(m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;gl_{56}(m_{5}+m_{6})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Galileo Spherical Robots (GSR) ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
&lt;br /&gt;
[[File:GSR-SETUP.JPG|Galileo robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|m&amp;lt;sub&amp;gt;P&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Payload mass [kg]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|m&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Balance mass  [kg]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|T&amp;lt;sub&amp;gt;P&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Payload mass center distance from the flange [mm]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|T&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Balance mass center distance from the (0,0) [mm]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|I&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Inertia of the payload around roll [kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Motion Dynamics]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Dynamic_Models&amp;diff=133289</id>
		<title>Dynamic Models</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Dynamic_Models&amp;diff=133289"/>
				<updated>2019-09-11T05:33:26Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gives an overview over all implemented dynamic models.&lt;br /&gt;
&lt;br /&gt;
'''General considerations'''&lt;br /&gt;
* Friction is handled on axis basis. The parameters for friction are set for each axis separately.&lt;br /&gt;
* Torque (Force) is always expressed in '''[Nm]''' ([N])&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotational Axes ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 - simple rotary axis ===&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 2 - horizontal crank-arm axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Crank-Arm Axis.png|Horizontal crank-arm axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 3 - vertical crank-arm axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Crank-Arm Axis.png|Vertical crank-arm axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot A&amp;lt;/math&amp;gt;&lt;br /&gt;
|Mass (without payload) * Gravity * Distance to center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity * Distance to Payload&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc - (M \cdot g \cdot A + M_{payload} \cdot g \cdot L) \cdot \sin(pos)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Linear Axes ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 - horizontal axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Axis.png|Horizontal linear axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 2 - vertical or tilted axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Axis.png|Vertical linear axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Constant force due to gravity.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity coefficient used to consider payload mass. ('''g = 9.80665''')&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc + M \cdot g \cdot \cos(\alpha) + M_{payload} \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 3 - vertical axis with a spring ===&lt;br /&gt;
[[File:Axystems;Motion_Dynamics_-_Vertical_Axis_with_spring.png|Vertical linear axis with a spring|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.  [kg]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt;&lt;br /&gt;
|The stiffness constant of the spring.  [kg/s^2]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;K \cdot X_{0}&amp;lt;/math&amp;gt;&lt;br /&gt;
|The stiffness constant times the relaxation position of the spring.  [kg*m/s^2]&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot (acc + g) + K\cdot (X-X_{0})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Traverse Arm Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:Inverse dynamic model for Traverse Arm kinematics - Definitions.png|Traverse Arm robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M_1 + M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scara Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:scara.PNG|scara robot|thumb]]&lt;br /&gt;
For non-coupled SCARA robots (axis 3 and 4 are not coupled). &amp;lt;br /&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot M_2 + I_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 2 ===&lt;br /&gt;
For coupled SCARA robots (axis 3 and 4 are coupled) and for concentric payloads (concentric with axis 4). &amp;lt;br /&amp;gt;&lt;br /&gt;
Note: &amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt; includes both the masses of link 3 and link 4&amp;lt;br /&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot (M_2+M_3) + I_1 + J_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + L_2^2 \cdot M_3 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2 + L_1 \cdot L_2 \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;J_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The payload parameters are:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|payloadMass&lt;br /&gt;
|The mass of the payload&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|payloadInertia&lt;br /&gt;
|The Inertia of the payload relative to its center of mass&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 3 ===&lt;br /&gt;
For coupled SCARA robots (axis 3 and 4 are coupled) and for non-concentric payloads (non-concentric with axis 4). &amp;lt;br /&amp;gt;&lt;br /&gt;
The dynamic parameters are the same as model 2. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The payload parameters are:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|payloadMass&lt;br /&gt;
|The mass of the payload&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|payloadInertia&lt;br /&gt;
|The Inertia of the payload relative to its center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|payloadLx&lt;br /&gt;
|The distance to the center of mass from the 4th axis in the x direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When using identification with this model, all of the payload parameters can be found. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 4 ===&lt;br /&gt;
&lt;br /&gt;
Same as Dynamic Model 3.&amp;lt;br/&amp;gt; This model is used in identification process in order to identify the '''payloadMass''' parameter only, by moving only joint&amp;amp;nbsp;number 3.&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 5 ===&lt;br /&gt;
Same as Dynamic Model 3. &amp;lt;br /&amp;gt;&lt;br /&gt;
This model is used in identification process in order to identify the payloadInertia and payloadLx parameters, by moving only joint number 4 and very small movements in joints 1 and 2. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Delta Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:Control;Rod forces model for Delta kinematics - Introduction.png|Delta robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L_{AB} \cdot M_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
| kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;/sec&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_P&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;M_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{T\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TO}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TP}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;C_r&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;Fr_{max}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;R_{ext}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Puma Robots ==&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:puma.PNG|Puma robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
:* &amp;lt;math&amp;gt; g &amp;lt;/math&amp;gt; - Gravity constant&lt;br /&gt;
:* &amp;lt;math&amp;gt; m_{i} &amp;lt;/math&amp;gt; - Mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
:* &amp;lt;math&amp;gt; a_{i} &amp;lt;/math&amp;gt; - length of the common normal between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; d_{i} &amp;lt;/math&amp;gt; - offset along z axis between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; l_{i} &amp;lt;/math&amp;gt; - The distance from the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; joint to the center of mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{1} = I_{1,zz}+m_{1}*l_{1,y}^2 +m_{2}*d_{2}^2+(m_{4}+m_{5}+m_{6})*a_{3}^2+m_{2}*l_{2,z}^2+&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt; &amp;lt;math&amp;gt;(m_{3}+m_{4}+m_{5}+m_{6})*(d_{2}+d_{3})^2+I_{2,xx}+I_{3,yy}+2*m_{2}*d_{2}*l_{2,z}+m_{2}*l_{2,y}^2+m_{3}*l_{3,z}^2+2*m_{3}*(d_{2}+d_{3})*l_{3,z}+I_{4,zz}+I_{4,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{2} = I_{2,zz}+m_{2}*(l_{2,x}^2+l_{2,y}^2)+(m_{3}+m_{4}+m_{5}+m_{6}*a_{2}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{3} = -I_{2,xx}+I_{2,yy}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}^2+m_{2}*l_{2,x}^2-m_{2}*l_{2,y}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{4} = m_{2}*l_{2,x}*(d_{2}+l_{2,z})+m_{3}*a_{2}*l_{3,z}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{5} = -m_{3}*a_{2}*l_{3,y}+(m_{4}+m_{5}+m_{6})*a_{2}*d_{4}+m_{4}*a_{2}*l_{4,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{6} = I_{3,zz}+m_{3}*l_{3,y}^2+m_{4}*a_{3}^2+m_{4}*(d_{4}+l_{4,z})^2+I_{4,yy}+m_{5}*a_{3}^2+m_{5}*d_{4}^2+I_{5,zz}+m_{6}*a_{3}^2+m_{6}*d_{4}^2+m_{6}*l_{6,z}^2+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{7} = m_{3}*l_{3,y}^2+I_{3,xx}-I_{3,yy}+m_{4}*l_{4,z}^2+2*m_{4}*d_{4}*l_{4,z}+(m_{4}+m_{5}+m_{6})*(d_{4}^2-a_{3}^2)+I_{4,yy}-I_{4,yy}+I_{5,zz}-I_{5,yy}+m_{6}*l_{6,z}^2-I_{6,zz}+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{8} = -m_{4}*(d_{2}+d_{3})*(d_{4}+l_{4,z})-(m_{3}+m_{6})*(d_{2}+d_{3})*d_{4}+m_{3}*l_{3,y}*l_{3,z}+m_{3}*(d_{2}+d_{3})*l_{3,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{9} = m_{2}*l_{2,y}*(d_{2}+l_{2,z})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{10} = 2*m_{4}*a_{5}*l_{4,z}+2*(m_{4}+m_{5}+m_{6})*a_{3}*d_{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{11} = -2*m_{2}*l_{2,x}*l_{2,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{12} = (m_{4}+m_{5}+m_{6})*a_{2}*a_{3}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{13} = (m_{4}+m_{5}+m_{6})*a_{3}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{14} = I_{4,zz}+I_{5,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{15} = m_{6}*d_{4}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{16} = m_{6}*a_{2}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{17} = I_{5,zz}+I_{6,xx}+m_{6}*l_{6,z}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{18} = m_{6}*(d_{2}+d_{3})*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{19} = I_{4,yy}-I_{4,xx}+I_{5,zz}-i_{5,yy}+m_{6}*l_{6,z}^2+I_{6,xx}-I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{20} = I_{5,yy}-I_{5,xx}-m_{6}*l_{6,z}^2+I_{6,zz}-I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{21} = I_{4,xx}-I_{4,yy}+I_{5,xx}-I_{5,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{22} = m_{6}*a_{3}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{23} = I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 2 - Gravity ===&lt;br /&gt;
This dynamic model is for cases where the robot moves very slowly.&amp;lt;br /&amp;gt;&lt;br /&gt;
In such cases, the accelerations and velocities of the joints of the robot have little effect on the joints torques. The joints torques are mainly affected by gravity and friction. &amp;lt;br /&amp;gt;&lt;br /&gt;
This model includes only the gravity and friction part of the PUMA robot dynamic model.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{2}l_{2}+a_{2}(m_{3}+m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+a_{3}(m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+m_{4}(l_{4}+d_{4}(m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;gl_{56}(m_{5}+m_{6})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Galileo Spherical Robots (GSR) ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
&lt;br /&gt;
[[File:GSR-SETUP.JPG|Galileo robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|m&amp;lt;sub&amp;gt;P&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Payload mass [kg]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|m&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Balance mass  [kg]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|T&amp;lt;sub&amp;gt;P&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Payload mass center distance from the flange [mm]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|T&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Balance mass center distance from the (0,0) [mm]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|I&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Inertia of the payload around roll [kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Motion Dynamics]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Dynamic_Models&amp;diff=133288</id>
		<title>Dynamic Models</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Dynamic_Models&amp;diff=133288"/>
				<updated>2019-09-11T05:19:57Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gives an overview over all implemented dynamic models.&lt;br /&gt;
&lt;br /&gt;
'''General considerations'''&lt;br /&gt;
* Friction is handled on axis basis. The parameters for friction are set for each axis separately.&lt;br /&gt;
* Torque (Force) is always expressed in '''[Nm]''' ([N])&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotational Axes ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 - simple rotary axis ===&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 2 - horizontal crank-arm axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Crank-Arm Axis.png|Horizontal crank-arm axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 3 - vertical crank-arm axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Crank-Arm Axis.png|Vertical crank-arm axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot A&amp;lt;/math&amp;gt;&lt;br /&gt;
|Mass (without payload) * Gravity * Distance to center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity * Distance to Payload&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc - (M \cdot g \cdot A + M_{payload} \cdot g \cdot L) \cdot \sin(pos)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Linear Axes ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 - horizontal axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Axis.png|Horizontal linear axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 2 - vertical or tilted axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Axis.png|Vertical linear axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Constant force due to gravity.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity coefficient used to consider payload mass. ('''g = 9.80665''')&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc + M \cdot g \cdot \cos(\alpha) + M_{payload} \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 3 - vertical axis with a spring ===&lt;br /&gt;
[[File:Axystems;Motion_Dynamics_-_Vertical_Axis_with_spring.png|Vertical linear axis with a spring|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.  [kg]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt;&lt;br /&gt;
|The stiffness constant of the spring.  [kg/s^2]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;K \cdot X_{0}&amp;lt;/math&amp;gt;&lt;br /&gt;
|The stiffness constant times the relaxation position of the spring.  [kg*m/s^2]&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot (acc + g) + K\cdot (X-X_{0})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Traverse Arm Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:Inverse dynamic model for Traverse Arm kinematics - Definitions.png|Traverse Arm robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M_1 + M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scara Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:scara.PNG|scara robot|thumb]]&lt;br /&gt;
For non-coupled SCARA robots (axis 3 and 4 are not coupled). &amp;lt;br /&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot M_2 + I_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 2 ===&lt;br /&gt;
For coupled SCARA robots (axis 3 and 4 are coupled) and for concentric payloads (concentric with axis 4). &amp;lt;br /&amp;gt;&lt;br /&gt;
Note: &amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt; includes both the masses of link 3 and link 4&amp;lt;br /&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot (M_2+M_3) + I_1 + J_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + L_2^2 \cdot M_3 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2 + L_1 \cdot L_2 \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;J_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The payload parameters are:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|payloadMass&lt;br /&gt;
|The mass of the payload&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|payloadInertia&lt;br /&gt;
|The Inertia of the payload relative to its center of mass&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 3 ===&lt;br /&gt;
For coupled SCARA robots (axis 3 and 4 are coupled) and for non-concentric payloads (non-concentric with axis 4). &amp;lt;br /&amp;gt;&lt;br /&gt;
The dynamic parameters are the same as model 2. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The payload parameters are:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|payloadMass&lt;br /&gt;
|The mass of the payload&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|payloadInertia&lt;br /&gt;
|The Inertia of the payload relative to its center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|payloadLx&lt;br /&gt;
|The distance to the center of mass from the 4th axis in the x direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When using identification with this model, all of the payload parameters can be found. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 4 ===&lt;br /&gt;
&lt;br /&gt;
Same as Dynamic Model 3.&amp;lt;br/&amp;gt; This model is used in identification process in order to identify the payloadMass parameter only, by moving only joint&amp;amp;nbsp;number 3.&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 5 ===&lt;br /&gt;
Same as Dynamic Model 3. &amp;lt;br /&amp;gt;&lt;br /&gt;
This model is used in identification process in order to identify the payloadInertia and payloadLx parameters, by moving only joint number 4 and very small movements in joints 1 and 2. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Delta Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:Control;Rod forces model for Delta kinematics - Introduction.png|Delta robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L_{AB} \cdot M_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
| kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;/sec&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_P&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;M_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{T\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TO}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TP}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;C_r&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;Fr_{max}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;R_{ext}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Puma Robots ==&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:puma.PNG|Puma robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
:* &amp;lt;math&amp;gt; g &amp;lt;/math&amp;gt; - Gravity constant&lt;br /&gt;
:* &amp;lt;math&amp;gt; m_{i} &amp;lt;/math&amp;gt; - Mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
:* &amp;lt;math&amp;gt; a_{i} &amp;lt;/math&amp;gt; - length of the common normal between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; d_{i} &amp;lt;/math&amp;gt; - offset along z axis between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; l_{i} &amp;lt;/math&amp;gt; - The distance from the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; joint to the center of mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{1} = I_{1,zz}+m_{1}*l_{1,y}^2 +m_{2}*d_{2}^2+(m_{4}+m_{5}+m_{6})*a_{3}^2+m_{2}*l_{2,z}^2+&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt; &amp;lt;math&amp;gt;(m_{3}+m_{4}+m_{5}+m_{6})*(d_{2}+d_{3})^2+I_{2,xx}+I_{3,yy}+2*m_{2}*d_{2}*l_{2,z}+m_{2}*l_{2,y}^2+m_{3}*l_{3,z}^2+2*m_{3}*(d_{2}+d_{3})*l_{3,z}+I_{4,zz}+I_{4,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{2} = I_{2,zz}+m_{2}*(l_{2,x}^2+l_{2,y}^2)+(m_{3}+m_{4}+m_{5}+m_{6}*a_{2}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{3} = -I_{2,xx}+I_{2,yy}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}^2+m_{2}*l_{2,x}^2-m_{2}*l_{2,y}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{4} = m_{2}*l_{2,x}*(d_{2}+l_{2,z})+m_{3}*a_{2}*l_{3,z}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{5} = -m_{3}*a_{2}*l_{3,y}+(m_{4}+m_{5}+m_{6})*a_{2}*d_{4}+m_{4}*a_{2}*l_{4,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{6} = I_{3,zz}+m_{3}*l_{3,y}^2+m_{4}*a_{3}^2+m_{4}*(d_{4}+l_{4,z})^2+I_{4,yy}+m_{5}*a_{3}^2+m_{5}*d_{4}^2+I_{5,zz}+m_{6}*a_{3}^2+m_{6}*d_{4}^2+m_{6}*l_{6,z}^2+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{7} = m_{3}*l_{3,y}^2+I_{3,xx}-I_{3,yy}+m_{4}*l_{4,z}^2+2*m_{4}*d_{4}*l_{4,z}+(m_{4}+m_{5}+m_{6})*(d_{4}^2-a_{3}^2)+I_{4,yy}-I_{4,yy}+I_{5,zz}-I_{5,yy}+m_{6}*l_{6,z}^2-I_{6,zz}+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{8} = -m_{4}*(d_{2}+d_{3})*(d_{4}+l_{4,z})-(m_{3}+m_{6})*(d_{2}+d_{3})*d_{4}+m_{3}*l_{3,y}*l_{3,z}+m_{3}*(d_{2}+d_{3})*l_{3,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{9} = m_{2}*l_{2,y}*(d_{2}+l_{2,z})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{10} = 2*m_{4}*a_{5}*l_{4,z}+2*(m_{4}+m_{5}+m_{6})*a_{3}*d_{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{11} = -2*m_{2}*l_{2,x}*l_{2,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{12} = (m_{4}+m_{5}+m_{6})*a_{2}*a_{3}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{13} = (m_{4}+m_{5}+m_{6})*a_{3}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{14} = I_{4,zz}+I_{5,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{15} = m_{6}*d_{4}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{16} = m_{6}*a_{2}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{17} = I_{5,zz}+I_{6,xx}+m_{6}*l_{6,z}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{18} = m_{6}*(d_{2}+d_{3})*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{19} = I_{4,yy}-I_{4,xx}+I_{5,zz}-i_{5,yy}+m_{6}*l_{6,z}^2+I_{6,xx}-I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{20} = I_{5,yy}-I_{5,xx}-m_{6}*l_{6,z}^2+I_{6,zz}-I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{21} = I_{4,xx}-I_{4,yy}+I_{5,xx}-I_{5,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{22} = m_{6}*a_{3}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{23} = I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 2 - Gravity ===&lt;br /&gt;
This dynamic model is for cases where the robot moves very slowly.&amp;lt;br /&amp;gt;&lt;br /&gt;
In such cases, the accelerations and velocities of the joints of the robot have little effect on the joints torques. The joints torques are mainly affected by gravity and friction. &amp;lt;br /&amp;gt;&lt;br /&gt;
This model includes only the gravity and friction part of the PUMA robot dynamic model.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{2}l_{2}+a_{2}(m_{3}+m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+a_{3}(m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+m_{4}(l_{4}+d_{4}(m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;gl_{56}(m_{5}+m_{6})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Galileo Spherical Robots (GSR) ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
&lt;br /&gt;
[[File:GSR-SETUP.JPG|Galileo robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|m&amp;lt;sub&amp;gt;P&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Payload mass [kg]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|m&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Balance mass  [kg]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|T&amp;lt;sub&amp;gt;P&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Payload mass center distance from the flange [mm]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|T&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Balance mass center distance from the (0,0) [mm]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|I&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Inertia of the payload around roll [kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Motion Dynamics]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Dynamic_Models&amp;diff=133287</id>
		<title>Dynamic Models</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Dynamic_Models&amp;diff=133287"/>
				<updated>2019-09-10T08:22:20Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page gives an overview over all implemented dynamic models.&lt;br /&gt;
&lt;br /&gt;
'''General considerations'''&lt;br /&gt;
* Friction is handled on axis basis. The parameters for friction are set for each axis separately.&lt;br /&gt;
* Torque (Force) is always expressed in '''[Nm]''' ([N])&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Rotational Axes ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 - simple rotary axis ===&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 2 - horizontal crank-arm axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Crank-Arm Axis.png|Horizontal crank-arm axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 3 - vertical crank-arm axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Crank-Arm Axis.png|Vertical crank-arm axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot A&amp;lt;/math&amp;gt;&lt;br /&gt;
|Mass (without payload) * Gravity * Distance to center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity * Distance to Payload&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc - (M \cdot g \cdot A + M_{payload} \cdot g \cdot L) \cdot \sin(pos)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Linear Axes ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 - horizontal axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Axis.png|Horizontal linear axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 2 - vertical or tilted axis ===&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Axis.png|Vertical linear axis|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Constant force due to gravity.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity coefficient used to consider payload mass. ('''g = 9.80665''')&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc + M \cdot g \cdot \cos(\alpha) + M_{payload} \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
=== Dynamic Model 3 - vertical axis with a spring ===&lt;br /&gt;
[[File:Axystems;Motion_Dynamics_-_Vertical_Axis_with_spring.png|Vertical linear axis with a spring|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.  [kg]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;K&amp;lt;/math&amp;gt;&lt;br /&gt;
|The stiffness constant of the spring.  [kg/s^2]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;K \cdot X_{0}&amp;lt;/math&amp;gt;&lt;br /&gt;
|The stiffness constant times the relaxation position of the spring.  [kg*m/s^2]&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot (acc + g) + K\cdot (X-X_{0})&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Traverse Arm Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:Inverse dynamic model for Traverse Arm kinematics - Definitions.png|Traverse Arm robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M_1 + M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Scara Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:scara.PNG|scara robot|thumb]]&lt;br /&gt;
For non-coupled SCARA robots (axis 3 and 4 are not coupled). &amp;lt;br /&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot M_2 + I_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 2 ===&lt;br /&gt;
For coupled SCARA robots (axis 3 and 4 are coupled) and for concentric payloads (concentric with axis 4). &amp;lt;br /&amp;gt;&lt;br /&gt;
Note: &amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt; includes both the masses of link 3 and link 4&amp;lt;br /&amp;gt;&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot (M_2+M_3) + I_1 + J_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + L_2^2 \cdot M_3 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2 + L_1 \cdot L_2 \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;J_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The payload parameters are:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|payloadMass&lt;br /&gt;
|The mass of the payload&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|payloadInertia&lt;br /&gt;
|The Inertia of the payload relative to its center of mass&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 3 ===&lt;br /&gt;
For coupled SCARA robots (axis 3 and 4 are coupled) and for non-concentric payloads (non-concentric with axis 4). &amp;lt;br /&amp;gt;&lt;br /&gt;
The dynamic parameters are the same as model 2. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The payload parameters are:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|payloadMass&lt;br /&gt;
|The mass of the payload&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|payloadInertia&lt;br /&gt;
|The Inertia of the payload relative to its center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|payloadLx&lt;br /&gt;
|The distance to the center of mass from the 4th axis in the x direction&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
When using identification with this model, all of the payload parameters can be found. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 4 ===&lt;br /&gt;
&lt;br /&gt;
Same as Dynamic Model 3.&amp;lt;br/&amp;gt; This model is used in identification process in order to identify the payloadMass parameter only, by moving only joints number 3 and 4.&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 5 ===&lt;br /&gt;
Same as Dynamic Model 3. &amp;lt;br /&amp;gt;&lt;br /&gt;
This model is used in identification process in order to identify the payloadInertia and payloadLx parameters, by moving only joint number 4 and very small movements in joints 1 and 2. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Delta Robots ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:Control;Rod forces model for Delta kinematics - Introduction.png|Delta robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L_{AB} \cdot M_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
| kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;/sec&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_P&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;M_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{T\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TO}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TP}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;C_r&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;Fr_{max}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;R_{ext}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Puma Robots ==&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
[[File:puma.PNG|Puma robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
:* &amp;lt;math&amp;gt; g &amp;lt;/math&amp;gt; - Gravity constant&lt;br /&gt;
:* &amp;lt;math&amp;gt; m_{i} &amp;lt;/math&amp;gt; - Mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
:* &amp;lt;math&amp;gt; a_{i} &amp;lt;/math&amp;gt; - length of the common normal between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; d_{i} &amp;lt;/math&amp;gt; - offset along z axis between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; l_{i} &amp;lt;/math&amp;gt; - The distance from the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; joint to the center of mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{1} = I_{1,zz}+m_{1}*l_{1,y}^2 +m_{2}*d_{2}^2+(m_{4}+m_{5}+m_{6})*a_{3}^2+m_{2}*l_{2,z}^2+&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt; &amp;lt;math&amp;gt;(m_{3}+m_{4}+m_{5}+m_{6})*(d_{2}+d_{3})^2+I_{2,xx}+I_{3,yy}+2*m_{2}*d_{2}*l_{2,z}+m_{2}*l_{2,y}^2+m_{3}*l_{3,z}^2+2*m_{3}*(d_{2}+d_{3})*l_{3,z}+I_{4,zz}+I_{4,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{2} = I_{2,zz}+m_{2}*(l_{2,x}^2+l_{2,y}^2)+(m_{3}+m_{4}+m_{5}+m_{6}*a_{2}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{3} = -I_{2,xx}+I_{2,yy}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}^2+m_{2}*l_{2,x}^2-m_{2}*l_{2,y}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{4} = m_{2}*l_{2,x}*(d_{2}+l_{2,z})+m_{3}*a_{2}*l_{3,z}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{5} = -m_{3}*a_{2}*l_{3,y}+(m_{4}+m_{5}+m_{6})*a_{2}*d_{4}+m_{4}*a_{2}*l_{4,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{6} = I_{3,zz}+m_{3}*l_{3,y}^2+m_{4}*a_{3}^2+m_{4}*(d_{4}+l_{4,z})^2+I_{4,yy}+m_{5}*a_{3}^2+m_{5}*d_{4}^2+I_{5,zz}+m_{6}*a_{3}^2+m_{6}*d_{4}^2+m_{6}*l_{6,z}^2+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{7} = m_{3}*l_{3,y}^2+I_{3,xx}-I_{3,yy}+m_{4}*l_{4,z}^2+2*m_{4}*d_{4}*l_{4,z}+(m_{4}+m_{5}+m_{6})*(d_{4}^2-a_{3}^2)+I_{4,yy}-I_{4,yy}+I_{5,zz}-I_{5,yy}+m_{6}*l_{6,z}^2-I_{6,zz}+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{8} = -m_{4}*(d_{2}+d_{3})*(d_{4}+l_{4,z})-(m_{3}+m_{6})*(d_{2}+d_{3})*d_{4}+m_{3}*l_{3,y}*l_{3,z}+m_{3}*(d_{2}+d_{3})*l_{3,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{9} = m_{2}*l_{2,y}*(d_{2}+l_{2,z})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{10} = 2*m_{4}*a_{5}*l_{4,z}+2*(m_{4}+m_{5}+m_{6})*a_{3}*d_{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{11} = -2*m_{2}*l_{2,x}*l_{2,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{12} = (m_{4}+m_{5}+m_{6})*a_{2}*a_{3}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{13} = (m_{4}+m_{5}+m_{6})*a_{3}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{14} = I_{4,zz}+I_{5,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{15} = m_{6}*d_{4}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{16} = m_{6}*a_{2}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{17} = I_{5,zz}+I_{6,xx}+m_{6}*l_{6,z}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{18} = m_{6}*(d_{2}+d_{3})*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{19} = I_{4,yy}-I_{4,xx}+I_{5,zz}-i_{5,yy}+m_{6}*l_{6,z}^2+I_{6,xx}-I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{20} = I_{5,yy}-I_{5,xx}-m_{6}*l_{6,z}^2+I_{6,zz}-I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{21} = I_{4,xx}-I_{4,yy}+I_{5,xx}-I_{5,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{22} = m_{6}*a_{3}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{23} = I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 2 - Gravity ===&lt;br /&gt;
This dynamic model is for cases where the robot moves very slowly.&amp;lt;br /&amp;gt;&lt;br /&gt;
In such cases, the accelerations and velocities of the joints of the robot have little effect on the joints torques. The joints torques are mainly affected by gravity and friction. &amp;lt;br /&amp;gt;&lt;br /&gt;
This model includes only the gravity and friction part of the PUMA robot dynamic model.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{2}l_{2}+a_{2}(m_{3}+m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+a_{3}(m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+m_{4}(l_{4}+d_{4}(m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;gl_{56}(m_{5}+m_{6})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Galileo Spherical Robots (GSR) ==&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Model 1 ===&lt;br /&gt;
&lt;br /&gt;
[[File:GSR-SETUP.JPG|Galileo robot|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|m&amp;lt;sub&amp;gt;P&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Payload mass [kg]&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|m&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Balance mass  [kg]&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|T&amp;lt;sub&amp;gt;P&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Payload mass center distance from the flange [mm]&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|T&amp;lt;sub&amp;gt;B&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Balance mass center distance from the (0,0) [mm]&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|I&amp;lt;sub&amp;gt;R&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Inertia of the payload around roll [kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Motion Dynamics]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MediaWiki:Sidebar&amp;diff=132777</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MediaWiki:Sidebar&amp;diff=132777"/>
				<updated>2018-08-26T07:34:57Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* softMC&lt;br /&gt;
** Welcome|Welcome&lt;br /&gt;
** Overview|Overview&lt;br /&gt;
** Category:MC-Basic:Commands|Commands/Properties&lt;br /&gt;
** Communication|Communication&lt;br /&gt;
** Motion_Control|Motion Control&lt;br /&gt;
** Program_Examples|Program Examples&lt;br /&gt;
** Motion_Project_Examples|Project Examples&lt;br /&gt;
** Wiring|Wiring&lt;br /&gt;
** Supported Devices by softMC|Supported Devices&lt;br /&gt;
&lt;br /&gt;
* Tools&lt;br /&gt;
** softTP Teach Pendant|softTP&lt;br /&gt;
** softMI HMI Human Machine Interface|softMI&lt;br /&gt;
**Control Studio|ControlStudio&lt;br /&gt;
**KMAPI|KMAPI&lt;br /&gt;
** Modbus Configurator|Modbus Configurator&lt;br /&gt;
** softMC Configurator|softMC Configurator&lt;br /&gt;
** RoboDK|RoboDK&lt;br /&gt;
* IEC 61131 CODESYS&lt;br /&gt;
** IEC 61131 Introduction|IEC 61131 Introduction&lt;br /&gt;
** Operating CODESYS with softMC Guide Line|CODESYS with softMC&lt;br /&gt;
** Project Examples|Project Examples&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MediaWiki:Sidebar&amp;diff=132776</id>
		<title>MediaWiki:Sidebar</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MediaWiki:Sidebar&amp;diff=132776"/>
				<updated>2018-08-26T07:34:28Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: add RoboDK to the sidebar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* softMC&lt;br /&gt;
** Welcome|Welcome&lt;br /&gt;
** Overview|Overview&lt;br /&gt;
** Category:MC-Basic:Commands|Commands/Properties&lt;br /&gt;
** Communication|Communication&lt;br /&gt;
** Motion_Control|Motion Control&lt;br /&gt;
** Program_Examples|Program Examples&lt;br /&gt;
** Motion_Project_Examples|Project Examples&lt;br /&gt;
** Wiring|Wiring&lt;br /&gt;
** Supported Devices by softMC|Supported Devices&lt;br /&gt;
&lt;br /&gt;
* Tools&lt;br /&gt;
** softTP Teach Pendant|softTP&lt;br /&gt;
** softMI HMI Human Machine Interface|softMI&lt;br /&gt;
**Control Studio|ControlStudio&lt;br /&gt;
**KMAPI|KMAPI&lt;br /&gt;
** Modbus Configurator|Modbus Configurator&lt;br /&gt;
** softMC Configurator|softMC Configurator&lt;br /&gt;
** RoboDK&lt;br /&gt;
* IEC 61131 CODESYS&lt;br /&gt;
** IEC 61131 Introduction|IEC 61131 Introduction&lt;br /&gt;
** Operating CODESYS with softMC Guide Line|CODESYS with softMC&lt;br /&gt;
** Project Examples|Project Examples&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Inverse_Dynamic_Model&amp;diff=132773</id>
		<title>Inverse Dynamic Model</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Inverse_Dynamic_Model&amp;diff=132773"/>
				<updated>2018-08-22T14:49:15Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Rotary motors with lead screws / pulleys / or different type of mechanism used to translate turning motion into linear motion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Inverse_Dynamic_Model}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset:#ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; &amp;quot;&amp;gt;&lt;br /&gt;
[[Image:TOP2.png|50px|link=#top]] &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Introduction - what is it good for and how does it work=&lt;br /&gt;
&lt;br /&gt;
The inverse dynamic model (IDM) feature is used to compensate friction and dynamic effects for motion elements, otherwise leading to positioning errors and suboptimal settling and tracking behavior.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The motivation of the IDM feature is to use additional knowledge about the motion than just the position – i.e. velocity and torque – to offset the command values of the torque controller in order to make them react faster and thereby reduce the final positioning error and improve the settling behavior.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The term ''inverse dynamic model'' (often named computed torque control) means that the softMC takes a cartesian motion of a motion element and not only computes the joint position for the next Cartesian setpoint, but also the joint torque required for the motion. In order to be able to do that, it needs a dynamic model – i.e., a model of the masses and inertias – of the motion element. The joint velocity and torque are then sent to the drives as additional torque command data (see Figure 1).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In most cases, the user doesn’t have the parameters of the dynamic model. In such cases, those parameters can be estimated using the softMC identification process. The softMC allows to perform measurements and estimate the dynamic model parameters of some common robot models. The identification process is performed as follows: while the robot is commanded to perform a certain movement, the movement parameters and internal motors torques are recorded. Then, the dynamic model parameters of the robot are extracted based on the robot model and the measurements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:DM_1.png|center|650px|frame|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 1 - A schematic drawing of the control system and the feedforward part of the Taddcmd''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=Torque Units=&lt;br /&gt;
The MKS system of units defines the torque unit as [Nm] (Newton*meter). When dealing with motors, the torque is usually modeled as proportional to the current in the motors. Therefore, the torque can be defined with different units in each system. This section describes the torque units for each system and how they relate to each other. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The softMC reads the motor's torque through the drives, but not in [Nm] units. Therefore, the softMC contains an axis property called TorqueFactor (TFac) which divides the motor's torque parameter in order to convert it to desirable units. The result of this operation is stored in an axis property called [[MC-Basic:element.TORQUEFEEDBACK| TorqueFeedback]].&lt;br /&gt;
&lt;br /&gt;
==CDHD Drive setup==&lt;br /&gt;
The CDHD drives have the following parameters to define the motor's current properties:&lt;br /&gt;
* '''MICONT''' – in units of Ampere [A], but being read in units of milli-Ampere [mA], defines the motor continuous current. This is the maximum allowed value for long operation cycles.&lt;br /&gt;
* '''MIPEAK''' – in units of Ampere [A], but being read in units of milli-Ampere [mA], defines the motor peak current. This is the maximum allowed value for very short operation cycles.&lt;br /&gt;
* '''MKT''' – for rotary motors, being read in units of [Nm/A], defines the torque constant, i.e. how much torque the motor gives per Ampere unit.&lt;br /&gt;
* '''MKF''' – for linear motors, being read in units of [N/A], defines the force constant, i.e. how much force the motor gives per Ampere unit.&lt;br /&gt;
* '''I''' – being read in units of milli-MICONT [0.001*MICONT]. It indicates the actual value of the current. It corresponds to the current in the motor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The TorqueFeedback property is calculated as follows: &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt; TFb = \frac{Current Actual Value}{Tfac}\ &amp;lt;/math&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, the TorqueFactor property should be set appropriately in order to convert the TorqueFeedback value to units of [Nm]: &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt; TFac = \frac{1000000}{MKT*MICONT}\ &amp;lt;/math&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The 1 million is in order to compensate for the MICONT being in units of [mA] and the Current Actual Value being in units of [0.001*MICONT]. Defining the TorqueFactor this way will convert the Current Actual Value to unit of [Nm] (and the value is assigned to TorqueFeedback). After setting Tfac, all values of torque (Tfb,TCmd,Tmax, TorqueThreshold, Te) will always be in units of [Nm] ([N] for linear axes). An example for this calculation in MC-Basic is presented in Figure 2.&lt;br /&gt;
&lt;br /&gt;
==EtherCAT and CANopen standart (DS402)==&lt;br /&gt;
The EtherCAT standard defines the following parameters which are equivalent to the above parameters:&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot; &lt;br /&gt;
!CDHD parameter &lt;br /&gt;
!EtherCAT parameter&lt;br /&gt;
!EtherCat index&lt;br /&gt;
|- &lt;br /&gt;
|MICONT &lt;br /&gt;
|Motor Rated Current&lt;br /&gt;
|0x6075&lt;br /&gt;
|-&lt;br /&gt;
|MIPEAK&lt;br /&gt;
|Motor Peak Current&lt;br /&gt;
|0x2036&lt;br /&gt;
|-&lt;br /&gt;
|MKT&lt;br /&gt;
|Torque Constant&lt;br /&gt;
|0x2039&lt;br /&gt;
|-&lt;br /&gt;
|MKF&lt;br /&gt;
|Torque Constant for Linear Motors&lt;br /&gt;
|0x2038&lt;br /&gt;
|-&lt;br /&gt;
|I&lt;br /&gt;
|Current Actual Value&lt;br /&gt;
|0x6078&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==softMC torque related properties==&lt;br /&gt;
&lt;br /&gt;
The softMC has the following torque related properties:&lt;br /&gt;
&lt;br /&gt;
* '''''&amp;lt;axis&amp;gt;''.TorqueMax'''&amp;lt;br&amp;gt; &lt;br /&gt;
* '''''&amp;lt;axis&amp;gt;''.TorqueThreshold'''&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
These parameters are used to define the limit of the '''TADDCOMMAND''' value.&amp;lt;br&amp;gt;&lt;br /&gt;
The difference between those parameters is that '''TorqueMax''' is taken into account when the motion is being planned and '''TorqueThreshold''' limits the torque feedback. &amp;lt;br&amp;gt;&lt;br /&gt;
For example, if the planned motion exceeds TorqueMax, then an error will be thrown before the motion has started. However, if the planned motion is O.K, and the axis/robot started the motion, if the torque feedback crosses the TorqueThreshold, the robot motion will be stopped and an error will be thrown. &amp;lt;br&amp;gt;&lt;br /&gt;
One can set these parameters to some user desired value, or to a value matching the drive MICONT or MIPEAK values. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
For example, setting the TorqueThreshold to a value that matches '''MICONT''': &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt; &amp;lt;axis&amp;gt;.TorqueThreshold = \frac{1000}{TFac}\ &amp;lt;/math&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Setting the TorqueThreshold to a value that matches '''MIPEAK''': &lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt; TorqueThreshold=\frac{1000*MIPEAK}{TFac*MICONT}\ &amp;lt;/math&amp;gt; &amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''''&amp;lt;axis&amp;gt;''.AdditiveTorqueDelay''' - The calculated additive torque command is based on ''pcmd'' and ''vcmd''. Since there is a delay between the commands and the actual position and velocity of the axis, the same delay should be presented to the additive torque. The '''AdditiveTorqueDelay''' is used for this purpose. This property is in units of cycle time and it accepts positive integer values. The '''AdditiveTorqueDelay''' works as follows: the calculated additive torque command for a certain time would be sent to the drives only “AdditiveTorqueDelay” steps later. The default value of this property is 3.&lt;br /&gt;
&lt;br /&gt;
==How to include gear ratio==&lt;br /&gt;
&lt;br /&gt;
Usually, the motors are connected to the joints through a gear system. The gear system affects the torque loads the motors carry and therefore the torque factors should be compensated appropriately. After this compensation, the TorqueFactor parameter transforms the Current Actual Value parameter from current inside the motors ([mMICONT] units) to the torques the joints are carrying (in [Nm] units).&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt; TFac = \frac{1000000}{MKT*MICONT*GR}\ &amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where GR stands for Gear Ratio. Figure 3 shows an example of a gear ratio.&lt;br /&gt;
&lt;br /&gt;
[[file:DM 2.png|80px|frame|left|&amp;lt;big&amp;gt;&amp;lt;center&amp;gt; ''figure 2 - Setting the torque factor(TFac) property for all axes in MC-Basic for WtherCAT drive''&amp;lt;/center&amp;gt;&amp;lt;/big&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:DM 3.png|150px|frame|left|&amp;lt;big&amp;gt;&amp;lt;center&amp;gt; ''figure 3 - An example of a gear mechanism with a ratio of 1:2''&amp;lt;/center&amp;gt;&amp;lt;/big&amp;gt;]]&lt;br /&gt;
==Linear Axes==&lt;br /&gt;
All of the above refers to rotary axes. Linear axes, in contrast to rotary axes, carry force and not torque. These forces are measured in units of Newton [N]. Therefore, some modifications should be made when dealing with Linear axes. Basically, there are two types of linear axes - Rotary motors with lead screws/pulleys/others, and Linear Motors. &lt;br /&gt;
&lt;br /&gt;
===Rotary motors with lead screws / pulleys / or different type of mechanism used to translate turning motion into linear motion===&lt;br /&gt;
This type is treated the same as the regular rotary axes with a single modification. The mechanism used to translate turning motion into linear motion transforms the torque load, carried by the motor, to a force load on the linear axis. Therefore, the TorqueFactor should be multiplied by another factor. This parameter should contain the ratio between the amount of linear motion made per one rotation of the rotary motor (after the gear). For a lead screw, it would be the Screw Lead [mm/rev]. For a pulley, it would be the radius of the pulley multiplied by 2π [mm/rev]. The TorqueFactor would be: &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt; TFac = \frac{1000000*SL}{MKT*MICONT*GR*\pi} &amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where '''SL''' stands for Screw Lead or an equivalent parameter. figure 4 shows an example of a lead-screw lead. &amp;lt;br&amp;gt;&lt;br /&gt;
'''NOTE:''' '''SL''' is in units of [m/rev] -&amp;gt; meters per revolution. &amp;lt;br&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
[[file: DM_4.png|center|300px|frame|&amp;lt;big&amp;gt;&amp;lt;center&amp;gt;''figure 4 - An example of a lead-screw (top) and a lead-screw lead (bottom)'' &amp;lt;/center&amp;gt;&amp;lt;/big&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
===Linear Motors===&lt;br /&gt;
This type is treated the same as the regular rotary axes, but the '''MKT''' is switched with the '''MKF''' property, which is in units of [N/A] and there is no gear, therefore the TorqueFactor would be: &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt; TFac = \frac{1000000}{MKF*MICONT}\ &amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Operation Mode and PDOs===&lt;br /&gt;
The operation mode of the drives while using the dynamic model should be '''cyclic synchronous position'''. The dynamic model is used to compute the required torque (or current) for each motor, however the results are never precise. The additive torque command is used only as a feed forward signal as mentioned in section 3. &amp;lt;br&amp;gt;&lt;br /&gt;
Here is the list of additional PDOs (additional to the ‘cyclic synchronous position’ PDOs) that are necessary to use the dynamic model: &amp;lt;br&amp;gt; &lt;br /&gt;
{| class = &amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot; &lt;br /&gt;
!PDO index&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|RX: 0x60B2&lt;br /&gt;
|Torque Offset – the additive torque signal&lt;br /&gt;
|-&lt;br /&gt;
|TX 0x6078&lt;br /&gt;
|Current Actual Value – the torque feedback signal&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=How to perform the dynamic model parameters identification=&lt;br /&gt;
==Data acquisition==&lt;br /&gt;
The process of identification is done by moving the robot while recording the movement parameters and internal motors torques. Then, the recorded data is used to extract the dynamic model parameters based on the robot model and the measurements. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A good-quality data is important for obtaining good identification results. A high-quality data contains data points that are scattered over the movement space of the robot with varying velocities and accelerations. The scattered data yields a better fit of the parameters for a wide range of movements of the robot, allowing to predict the additive torque command with good accuracy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The recommended type of movement is using the sinewave command. This command moves each joint of the robot in a specified amplitude and frequency. In order to receive a good scattered data, the amplitude of each joint should be close to its full position range and the frequency of each joint should be different from the other joints. The frequency of each joint determined the correlation of movement between the joints. If two or more joints have the same frequency, they will always be in the same phase together and this will result in a non-scattered data. Furthermore, if the frequency of some joint is a multiplication of the frequency of another joint, the same motion will be repeated after a few cycles (more precisely, the factor of multiplication) of the faster joint. Actually, the motion will be repeated after a few cycles for any rational frequency values. However, in order to obtain good result, it is recommended to obtain data for at least three cycles for each joint. Therefore, as long as the motion does not repeat itself in this recorded time, the frequency selections is just fine. Here are some examples for a three joints robot:&lt;br /&gt;
&lt;br /&gt;
{| class = &amp;quot;wikitable&amp;quot; |style:align-text=&amp;quot;center&amp;quot;&lt;br /&gt;
!J&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; &lt;br /&gt;
!J&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&lt;br /&gt;
!J&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;&lt;br /&gt;
!comment&lt;br /&gt;
!Quality&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|2&lt;br /&gt;
|1.2&lt;br /&gt;
|j&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; and j&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; will repeat after 1 cycle o j&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt; and 2 cycles of j&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Bad&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|1.2&lt;br /&gt;
|1.2&lt;br /&gt;
|j&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; and j&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; will repeat after 3 cycles of j&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; and 2 cycles of j&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Medium&lt;br /&gt;
|-&lt;br /&gt;
|1.1&lt;br /&gt;
|1.3&lt;br /&gt;
|1.5&lt;br /&gt;
|j&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, j&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; and j&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt; will repeat after 11 cycles of j&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;, 13 cycles of j&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt; and 15 cycles of j&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;&lt;br /&gt;
|Good&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first example is not a good choice of frequencies, the second example is fine, and the last example is a good choice of parameters. Graphs showing these combinations of sinewaves are presented in Figure 5. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, the velocities of the joints are also important. The peak velocity during the motion should be close to the maximum velocity of each joint. In high velocities, the acceleration and velocity objects of the dynamic model are significant, thus allowing more accurate identification process. The peak velocities of the joints can be managed by the amplitude and frequency of the movement. It is more convenient to first define the amplitude of each joint, then set some arbitrary frequencies, for example {1.1,1.3,1.5}, and multiply the frequencies vector by a scalar factor: factor*{1.1,1.3,1.5}. '''By changing the factor, one can control the velocities of the joints.''' &lt;br /&gt;
&lt;br /&gt;
[[file: DM_5.png|700px|center|frame|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 5 – Graphs of different combinations of sinewaves corresponding to Table 2. In each graph, the location where the sinewaves start repeating themselves (as mentioned in Table 2) is pointed out with an orange circle (the last graph has no repetitions)''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
==Example of an identification task==&lt;br /&gt;
&lt;br /&gt;
Figure 6 shows a schematic graph of the identification procedure. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example of a program that executes the identification process, this program is for a delta robot:&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
1.  program&lt;br /&gt;
2.      dim startPoint as generic joint&lt;br /&gt;
3.      dim sineTarget as generic joint&lt;br /&gt;
4.      dim SWfreq as generic joint&lt;br /&gt;
5. &lt;br /&gt;
6.      startPoint = {-30,-30,-30,-200}&lt;br /&gt;
7.      sineTarget = {70,70,70,200}&lt;br /&gt;
8.      SWfreq = 0.3*{1,1.27,1.43,1.13} &lt;br /&gt;
9.	&lt;br /&gt;
10.     with robot	&lt;br /&gt;
11.         attach&lt;br /&gt;
11.	    En = 0&lt;br /&gt;
12.	    while En&lt;br /&gt;
13.	        sleep 100&lt;br /&gt;
14.	    end while&lt;br /&gt;
15.	    DynamicModel = 1&lt;br /&gt;
16.	    En = 1&lt;br /&gt;
17.	    while not En&lt;br /&gt;
18.	        sleep 100&lt;br /&gt;
19.	    end while&lt;br /&gt;
20. &lt;br /&gt;
21.	    Move startPoint Abs = 1&lt;br /&gt;
22.	    while IsMoving &lt;br /&gt;
23.	        sleep 100&lt;br /&gt;
24.	    end while&lt;br /&gt;
25.&lt;br /&gt;
26.	    SineWave sineTarget SineWaveFreq = SWfreq&lt;br /&gt;
27.	    sleep 2000&lt;br /&gt;
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz&lt;br /&gt;
29.	    IdentificationStart IdentFilterFreq = 80 &lt;br /&gt;
30.	' the time of the identification, you can change time.		           &lt;br /&gt;
31.	    sleep 20000 &lt;br /&gt;
32.	    IdentificationFinish&lt;br /&gt;
33. &lt;br /&gt;
34.	    stop&lt;br /&gt;
35.	    while IsMoving &lt;br /&gt;
36.	        sleep 100&lt;br /&gt;
37.	    end while&lt;br /&gt;
38.	    proceed&lt;br /&gt;
39.	    En = 0&lt;br /&gt;
40.&lt;br /&gt;
41.	    detach&lt;br /&gt;
42.     end with&lt;br /&gt;
43. end program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
Here is an explanation of the program shown: &amp;lt;br&amp;gt; &lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Line&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|Defines the starting position of each joint of the system&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|Defines the ending position&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|Defines the frequency of the sinewave of each joint (note that the frequencies are multiplied by a factor of 0.3). Overall, these are the joints location in time:&amp;lt;br&amp;gt; &lt;br /&gt;
{{{!}} class = &amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Joints&lt;br /&gt;
!Location in time &amp;lt;sub&amp;gt;[deg]&amp;lt;/sub&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}J&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&lt;br /&gt;
{{!}}&amp;lt;math&amp;gt; 20+50*sin(0.3*t) &amp;lt;/math&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}J&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;&lt;br /&gt;
{{!}}&amp;lt;math&amp;gt; 20+50*sin(0.381*t) &amp;lt;/math&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}J&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;&lt;br /&gt;
{{!}}&amp;lt;math&amp;gt; 20+50*sin(0.429*t)&amp;lt;/math&amp;gt;&lt;br /&gt;
{{!}}-&lt;br /&gt;
{{!}}J&amp;lt;sub&amp;gt;4&amp;lt;/sub&amp;gt;&lt;br /&gt;
{{!}}&amp;lt;math&amp;gt; 200*sin(0.339)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{!}}}&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|Defines the appropriate dynamic model of the robot, this will be discussed later on. '''Note, this parameter can be modified only when the robot is disabled'''. &lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|Moves the robot to the starting position&lt;br /&gt;
|-&lt;br /&gt;
|26&lt;br /&gt;
|Starts the sinewave movement with the target – sineTarget and freque  ncy – SWfreq&lt;br /&gt;
|-&lt;br /&gt;
|29&lt;br /&gt;
|starts the recording of the data with the IdentificationStart command. At this line, one can also set a low pass filter over the collected data (over pfb and tfb) with a cutoff frequency set to IdentFilterFreq. The cutoff frequency must be larger than the largest sinewave frequency. One can try several cutoff frequencies and compare between the raw and filtered data, then choose the one that filters most of the noise without changing the real data. Please look for the identification wiki page for more information regarding the parameters that could be set for IdentificationStart command&lt;br /&gt;
|-&lt;br /&gt;
|31&lt;br /&gt;
|sets a sleeping time – the recording time&lt;br /&gt;
|-&lt;br /&gt;
|32&lt;br /&gt;
|stops the recording and apply the dynamic model parameters identification&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file: DM_6.png|600px|thumb|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 6 - Schematic graph showing the identification process''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
At the end of this task, a files named IDNT&amp;lt;group num&amp;gt;.PRG and IDNT&amp;lt;group num&amp;gt;.REC will be created in the MC folder. &amp;lt;br&amp;gt;&lt;br /&gt;
The PRG file contains the identified parameters and the REC file contains the recorded data used for the identification. &amp;lt;br&amp;gt;&lt;br /&gt;
The following subsections explain how to apply the identification for different robot models.&lt;br /&gt;
&lt;br /&gt;
==Identification process for different robot models==&lt;br /&gt;
===Single axis model===&lt;br /&gt;
There are two types of single axis joints, linear and rotary. Each of these types has several different dynamic models as can be viewed in the Dynamic Models wiki page (and in section 5.4). Here are the different models in short:&lt;br /&gt;
====Linear axis====&lt;br /&gt;
The linear axis type has 2 dynamic model types: &amp;lt;br&amp;gt;&lt;br /&gt;
# Horizontal axis&lt;br /&gt;
# Tilted axis – an axis with angle α relative to the vertical axis, ranging between 0 and 90 degrees (figure 7). When α = 0 the axis is vertical, and when α = 90 the axis is horizontal (the α parameter is found by the identification (i.e. it is not a user input). [[file: DM_8.png|200px|right|thumb|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''figure 7 - tilted linear axis''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
====Rotary axis====&lt;br /&gt;
The rotary axis type has 3 dynamic model types: &amp;lt;br&amp;gt; &lt;br /&gt;
# Simple rotary axis -  which its center of mass is located on the rotation axis.&lt;br /&gt;
# Horizontal crank-arm axis (figure 8 left).&lt;br /&gt;
# Vertical crank-arm axis (figure 8 right).&lt;br /&gt;
&lt;br /&gt;
[[file:DM_9.png|400px|thumb|right|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''figure 8 - (left) Horizontal crank-arm axis, (right) vertical crank-arm axis''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example for an identification task that will work for all types mentioned above:&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
1.  program&lt;br /&gt;
2.      dim startPoint as generic joint&lt;br /&gt;
3.      dim sineTarget as generic joint&lt;br /&gt;
4.      dim SWfreq as generic joint&lt;br /&gt;
5. &lt;br /&gt;
6.      startPoint = -350&lt;br /&gt;
7.      sineTarget = 350&lt;br /&gt;
8.      SWfreq = 1.5 &lt;br /&gt;
9.	&lt;br /&gt;
10.     with axis	&lt;br /&gt;
11.         attach&lt;br /&gt;
11.	    En = 0&lt;br /&gt;
12.	    while En&lt;br /&gt;
13.	        sleep 100&lt;br /&gt;
14.	    end while&lt;br /&gt;
15.	    DynamicModel = 2&lt;br /&gt;
16.	    En = 1&lt;br /&gt;
17.	    while not En&lt;br /&gt;
18.	        sleep 100&lt;br /&gt;
19.	    end while&lt;br /&gt;
20. &lt;br /&gt;
21.	    Move startPoint Abs = 1&lt;br /&gt;
22.	    while IsMoving &lt;br /&gt;
23.	        sleep 100&lt;br /&gt;
24.	    end while&lt;br /&gt;
25.&lt;br /&gt;
26.	    SineWave sineTarget SineWaveFreq = SWfreq Abs = 1&lt;br /&gt;
27.	    sleep 2000&lt;br /&gt;
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz&lt;br /&gt;
29.	    IdentificationStart IdentFilterFreq = 80 &lt;br /&gt;
30.	' the time of the identification, you can change time.		           &lt;br /&gt;
31.	    sleep 20000 	&lt;br /&gt;
32.	    IdentificationFinish&lt;br /&gt;
33. &lt;br /&gt;
34.	    stop&lt;br /&gt;
35.	    while IsMoving &lt;br /&gt;
36.	        sleep 100&lt;br /&gt;
37.	    end while&lt;br /&gt;
38.	    proceed&lt;br /&gt;
39.	    En = 0&lt;br /&gt;
40.&lt;br /&gt;
41.	    detach&lt;br /&gt;
42.     end with&lt;br /&gt;
43. end program&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To reuse this code, remember to use frequency and amplitude values that are suited for the application, and also use the suitable dynamic model type. &lt;br /&gt;
&lt;br /&gt;
===SCARA robot===&lt;br /&gt;
The SARA robot has two kinematic models, one with 3 axes (XYZ) and the other with four axes (XYZR). &amp;lt;br&amp;gt;&lt;br /&gt;
However, there is only one type of dynamic model which fits both of these kinematics models. &lt;br /&gt;
Example for an identification task that will work for 3 axes SCARA:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
1.  program&lt;br /&gt;
2.      dim startPoint as generic joint&lt;br /&gt;
3.      dim sineTarget as generic joint&lt;br /&gt;
4.      dim SWfreq as generic joint&lt;br /&gt;
5. &lt;br /&gt;
6.      startPoint = {-160,-160,0}&lt;br /&gt;
7.      sineTarget = {160,160,150}&lt;br /&gt;
8.      SWfreq = 0.3*{1,1.27,1.43} &lt;br /&gt;
9.	&lt;br /&gt;
10.     with SCARA	&lt;br /&gt;
11.         attach&lt;br /&gt;
11.	    En = 0&lt;br /&gt;
12.	    while En&lt;br /&gt;
13.	        sleep 100&lt;br /&gt;
14.	    end while&lt;br /&gt;
15.	    DynamicModel = 1&lt;br /&gt;
16.	    En = 1&lt;br /&gt;
17.	    while not En&lt;br /&gt;
18.	        sleep 100&lt;br /&gt;
19.	    end while&lt;br /&gt;
20. &lt;br /&gt;
21.	    Move startPoint Abs = 1&lt;br /&gt;
22.	    while IsMoving &lt;br /&gt;
23.	        sleep 100&lt;br /&gt;
24.	    end while&lt;br /&gt;
25.&lt;br /&gt;
26.	    SineWave sineTarget SineWaveFreq = SWfreq&lt;br /&gt;
27.	    sleep 2000&lt;br /&gt;
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz&lt;br /&gt;
29.	    IdentificationStart IdentFilterFreq = 80 &lt;br /&gt;
30.	' the time of the identification, you can change time.		           &lt;br /&gt;
31.	    sleep 20000 &lt;br /&gt;
32.	    IdentificationFinish&lt;br /&gt;
33. &lt;br /&gt;
34.	    stop&lt;br /&gt;
35.	    while IsMoving &lt;br /&gt;
36.	        sleep 100&lt;br /&gt;
37.	    end while&lt;br /&gt;
38.	    proceed&lt;br /&gt;
39.	    En = 0&lt;br /&gt;
40.&lt;br /&gt;
41.	    detach&lt;br /&gt;
42.     end with&lt;br /&gt;
43. end program&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example for an identification task that will work for 4 axes SCARA:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
1.  program&lt;br /&gt;
2.      dim startPoint as generic joint&lt;br /&gt;
3.      dim sineTarget as generic joint&lt;br /&gt;
4.      dim SWfreq as generic joint&lt;br /&gt;
5. &lt;br /&gt;
6.      startPoint = {-160,-160,0,-350}&lt;br /&gt;
7.      sineTarget = {160,160,150,350}&lt;br /&gt;
8.      SWfreq = 0.3*{1,1.27,1.43,1.13} &lt;br /&gt;
9.	&lt;br /&gt;
10.     with SCARA	&lt;br /&gt;
11.         attach&lt;br /&gt;
11.	    En = 0&lt;br /&gt;
12.	    while En&lt;br /&gt;
13.	        sleep 100&lt;br /&gt;
14.	    end while&lt;br /&gt;
15.	    DynamicModel = 1&lt;br /&gt;
16.	    En = 1&lt;br /&gt;
17.	    while not En&lt;br /&gt;
18.	        sleep 100&lt;br /&gt;
19.	    end while&lt;br /&gt;
20. &lt;br /&gt;
21.	    Move startPoint Abs = 1&lt;br /&gt;
22.	    while IsMoving &lt;br /&gt;
23.	        sleep 100&lt;br /&gt;
24.	    end while&lt;br /&gt;
25.&lt;br /&gt;
26.	    SineWave sineTarget SineWaveFreq = SWfreq&lt;br /&gt;
27.	    sleep 2000&lt;br /&gt;
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz&lt;br /&gt;
29.	    IdentificationStart IdentFilterFreq = 80 &lt;br /&gt;
30.	' the time of the identification, you can change time.		           &lt;br /&gt;
31.	    sleep 20000 &lt;br /&gt;
32.	    IdentificationFinish&lt;br /&gt;
33. &lt;br /&gt;
34.	    stop&lt;br /&gt;
35.	    while IsMoving &lt;br /&gt;
36.	        sleep 100&lt;br /&gt;
37.	    end while&lt;br /&gt;
38.	    proceed&lt;br /&gt;
39.	    En = 0&lt;br /&gt;
40.&lt;br /&gt;
41.	    detach&lt;br /&gt;
42.     end with&lt;br /&gt;
43. end program&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To reuse this code, remember to use frequency and amplitude values that are suited for the application. &amp;lt;br&amp;gt;&lt;br /&gt;
Some SCARA robots have coupled joints, usually the 3rd and 4th joints. Currently, the dynamic model of the SCARA robot does not take the coupling into account. Therefore, there may be large errors for coupled joints&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===DELTA robot===&lt;br /&gt;
The Delta robot has two kinematic models, one with 3 axes (XYZ) and the other with four axes (XYZR).&amp;lt;br&amp;gt; &lt;br /&gt;
However, there is only one type of dynamic model which fits both of these kinematics models. &lt;br /&gt;
Example for an identification task that will work for 3 axes Delta: &lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
1.  program&lt;br /&gt;
2.      dim startPoint as generic joint&lt;br /&gt;
3.      dim sineTarget as generic joint&lt;br /&gt;
4.      dim SWfreq as generic joint&lt;br /&gt;
5. &lt;br /&gt;
6.      startPoint = {-30,-30,-30}&lt;br /&gt;
7.      sineTarget = {70,70,70}&lt;br /&gt;
8.      SWfreq = 0.3*{1,1.27,1.43} &lt;br /&gt;
9.	&lt;br /&gt;
10.     with DELTA	&lt;br /&gt;
11.         attach&lt;br /&gt;
11.	    En = 0&lt;br /&gt;
12.	    while En&lt;br /&gt;
13.	        sleep 100&lt;br /&gt;
14.	    end while&lt;br /&gt;
15.	    DynamicModel = 1&lt;br /&gt;
16.	    En = 1&lt;br /&gt;
17.	    while not En&lt;br /&gt;
18.	        sleep 100&lt;br /&gt;
19.	    end while&lt;br /&gt;
20. &lt;br /&gt;
21.	    Move startPoint Abs = 1&lt;br /&gt;
22.	    while IsMoving &lt;br /&gt;
23.	        sleep 100&lt;br /&gt;
24.	    end while&lt;br /&gt;
25.&lt;br /&gt;
26.	    SineWave sineTarget SineWaveFreq = SWfreq&lt;br /&gt;
27.	    sleep 2000&lt;br /&gt;
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz&lt;br /&gt;
29.	    IdentificationStart IdentFilterFreq = 80 &lt;br /&gt;
30.	' the time of the identification, you can change time.		           &lt;br /&gt;
31.	    sleep 20000 &lt;br /&gt;
32.	    IdentificationFinish&lt;br /&gt;
33. &lt;br /&gt;
34.	    stop&lt;br /&gt;
35.	    while IsMoving &lt;br /&gt;
36.	        sleep 100&lt;br /&gt;
37.	    end while&lt;br /&gt;
38.	    proceed&lt;br /&gt;
39.	    En = 0&lt;br /&gt;
40.&lt;br /&gt;
41.	    detach&lt;br /&gt;
42.     end with&lt;br /&gt;
43. end program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example for an identification task that will work for 4 axes Delta:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
1.  program&lt;br /&gt;
2.      dim startPoint as generic joint&lt;br /&gt;
3.      dim sineTarget as generic joint&lt;br /&gt;
4.      dim SWfreq as generic joint&lt;br /&gt;
5. &lt;br /&gt;
6.      startPoint = {-30,-30,-30,-350}&lt;br /&gt;
7.      sineTarget = {70,70,70,350}&lt;br /&gt;
8.      SWfreq = 0.3*{1,1.27,1.43,1.13} &lt;br /&gt;
9.	&lt;br /&gt;
10.     with DELTA	&lt;br /&gt;
11.         attach&lt;br /&gt;
11.	    En = 0&lt;br /&gt;
12.	    while En&lt;br /&gt;
13.	        sleep 100&lt;br /&gt;
14.	    end while&lt;br /&gt;
15.	    DynamicModel = 1&lt;br /&gt;
16.	    En = 1&lt;br /&gt;
17.	    while not En&lt;br /&gt;
18.	        sleep 100&lt;br /&gt;
19.	    end while&lt;br /&gt;
20. &lt;br /&gt;
21.	    Move startPoint Abs = 1&lt;br /&gt;
22.	    while IsMoving &lt;br /&gt;
23.	        sleep 100&lt;br /&gt;
24.	    end while&lt;br /&gt;
25.&lt;br /&gt;
26.	    SineWave sineTarget SineWaveFreq = SWfreq&lt;br /&gt;
27.	    sleep 2000&lt;br /&gt;
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz&lt;br /&gt;
29.	    IdentificationStart IdentFilterFreq = 80 &lt;br /&gt;
30.	' the time of the identification, you can change time.		           &lt;br /&gt;
31.	    sleep 20000 &lt;br /&gt;
32.	    IdentificationFinish&lt;br /&gt;
33. &lt;br /&gt;
34.	    stop&lt;br /&gt;
35.	    while IsMoving &lt;br /&gt;
36.	        sleep 100&lt;br /&gt;
37.	    end while&lt;br /&gt;
38.	    proceed&lt;br /&gt;
39.	    En = 0&lt;br /&gt;
40.&lt;br /&gt;
41.	    detach&lt;br /&gt;
42.     end with&lt;br /&gt;
43. end program&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To reuse this code, remember to use frequency and amplitude values that are suited for the application.&lt;br /&gt;
&lt;br /&gt;
===PUMA robot===&lt;br /&gt;
The PUMA robot has only one kinematic model but it has two different dynamic models. &amp;lt;br&amp;gt;&lt;br /&gt;
The first dynamic model is a regular model like the other robots.&amp;lt;br&amp;gt; &lt;br /&gt;
The second model is a semi-static model, meaning it will work only for slow movements and static positions. This model takes into account only the gravity and friction forces / torques. &lt;br /&gt;
====Full regular model====&lt;br /&gt;
This model identification rules are just like the previous models. &amp;lt;br&amp;gt;&lt;br /&gt;
Example for an identification task that will work for PUMA:&lt;br /&gt;
&amp;lt;syntaxhighlight lang='Vb'&amp;gt;&lt;br /&gt;
1.  program&lt;br /&gt;
2.      dim startPoint as generic joint&lt;br /&gt;
3.      dim sineTarget as generic joint&lt;br /&gt;
4.      dim SWfreq as generic joint&lt;br /&gt;
5. &lt;br /&gt;
6.      startPoint = {-100,-170,100,-60,-60,-100}&lt;br /&gt;
7.      sineTarget = {100,-40,235,60,60,100}&lt;br /&gt;
8.      SWfreq = 0.15*{1.56,1,1.31,1.47,1.21,1.17}&lt;br /&gt;
9.	&lt;br /&gt;
10.     with PUMA	&lt;br /&gt;
11.         attach&lt;br /&gt;
11.	    En = 0&lt;br /&gt;
12.	    while En&lt;br /&gt;
13.	        sleep 100&lt;br /&gt;
14.	    end while&lt;br /&gt;
15.	    DynamicModel = 1&lt;br /&gt;
16.	    En = 1&lt;br /&gt;
17.	    while not En&lt;br /&gt;
18.	        sleep 100&lt;br /&gt;
19.	    end while&lt;br /&gt;
20. &lt;br /&gt;
21.	    Move startPoint Abs = 1&lt;br /&gt;
22.	    while IsMoving &lt;br /&gt;
23.	        sleep 100&lt;br /&gt;
24.	    end while&lt;br /&gt;
25.&lt;br /&gt;
26.	    SineWave sineTarget SineWaveFreq = SWfreq&lt;br /&gt;
27.	    sleep 2000&lt;br /&gt;
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz&lt;br /&gt;
29.	    IdentificationStart IdentFilterFreq = 80 &lt;br /&gt;
30.	' the time of the identification, you can change time.		           &lt;br /&gt;
31.	    sleep 20000 &lt;br /&gt;
32.	    IdentificationFinish&lt;br /&gt;
33. &lt;br /&gt;
34.	    stop&lt;br /&gt;
35.	    while IsMoving &lt;br /&gt;
36.	        sleep 100&lt;br /&gt;
37.	    end while&lt;br /&gt;
38.	    proceed&lt;br /&gt;
39.	    En = 0&lt;br /&gt;
40.&lt;br /&gt;
41.	    detach&lt;br /&gt;
42.     end with&lt;br /&gt;
43. end program&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To reuse this code, remember to use frequency and amplitude values that are suited for the application.&lt;br /&gt;
&lt;br /&gt;
====Semi-static model====&lt;br /&gt;
The semi-static model identification is a little bit different from all of the examples so far. This model takes into account only gravity and friction forces, in other words it neglects dynamic forces. Therefore, the measurement should include negligible dynamic forces, and this is possible by moving slow.&amp;lt;br&amp;gt;&lt;br /&gt;
This identification process is longer than the usual identification progress, it takes approximately 2-3 minutes. In addition, it is advised to perform less than 3 cycles, 1 cycle should be enough.&amp;lt;br&amp;gt;&lt;br /&gt;
Also, similar to the previous examples, the semi-static model threshold the velocity of the data points. But unlike the previous examples, here there are two thresholds, one for avoiding very low velocities avoiding numeric errors) and the other for avoiding high velocities (avoiding significant dynamic forces).&lt;br /&gt;
Example for such an identification process:&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
1.  program&lt;br /&gt;
2.      dim startPoint as generic joint&lt;br /&gt;
3.      dim sineTarget as generic joint&lt;br /&gt;
4.      dim SWfreq as generic joint&lt;br /&gt;
5. &lt;br /&gt;
6.      startPoint = {-100,-170,100,-60,-60,-100}&lt;br /&gt;
7.      sineTarget = {100,-40,235,60,60,100}&lt;br /&gt;
8.      SWfreq = 0.02*{1.56,1,1.31,1.47,1.21,1.17}&lt;br /&gt;
9.	&lt;br /&gt;
10.     with PUMA	&lt;br /&gt;
11.         attach&lt;br /&gt;
11.	    En = 0&lt;br /&gt;
12.	    while En&lt;br /&gt;
13.	        sleep 100&lt;br /&gt;
14.	    end while&lt;br /&gt;
15.	    DynamicModel = 1&lt;br /&gt;
16.	    En = 1&lt;br /&gt;
17.	    while not En&lt;br /&gt;
18.	        sleep 100&lt;br /&gt;
19.	    end while&lt;br /&gt;
20. &lt;br /&gt;
21.	    Move startPoint Abs = 1&lt;br /&gt;
22.	    while IsMoving &lt;br /&gt;
23.	        sleep 100&lt;br /&gt;
24.	    end while&lt;br /&gt;
25.&lt;br /&gt;
26.	    SineWave sineTarget SineWaveFreq = SWfreq&lt;br /&gt;
27.	    sleep 2000&lt;br /&gt;
28.	' IdentFilterFreq is a Low pass filter.Frequency should be below 125 Hz&lt;br /&gt;
29.	    IdentificationStart IdentFilterFreq = 80 &lt;br /&gt;
30.	' the time of the identification, you can change time.		           &lt;br /&gt;
31.	    sleep 20000 &lt;br /&gt;
32.	    IdentificationFinish&lt;br /&gt;
33. &lt;br /&gt;
34.	    stop&lt;br /&gt;
35.	    while IsMoving &lt;br /&gt;
36.	        sleep 100&lt;br /&gt;
37.	    end while&lt;br /&gt;
38.	    proceed&lt;br /&gt;
39.	    En = 0&lt;br /&gt;
40.&lt;br /&gt;
41.	    detach&lt;br /&gt;
42.     end with&lt;br /&gt;
43. end program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note the significant low frequencies which cause slow movement.&lt;br /&gt;
&lt;br /&gt;
[[file:DM_17.png|1100px|center|thumb|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 9 – An example of the path made by a puma robot during the identification process'' &amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
==The Dynamic Models Parameters==&lt;br /&gt;
This section lists the dynamic parameters for each type of dynamic model.&lt;br /&gt;
===Rotary Axis===&lt;br /&gt;
====Dynamic Model 1 – simple rotary axis====&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
====Dynamic Model 2 - horizontal crank-arm axis ====&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
==== Dynamic Model 3 - vertical crank-arm axis ====&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total moment of inertia around the rotation axis of the moved part&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;L^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|Square of length of crank arm (axis to payload)&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot A&amp;lt;/math&amp;gt;&lt;br /&gt;
|Mass (without payload) * Gravity * Distance to center of mass&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity * Distance to Payload&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (I + I_{payload} + L^2 \cdot M_{payload}) \cdot acc - (M \cdot g \cdot A + M_{payload} \cdot g \cdot L) \cdot \sin(pos)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Linear Axis===&lt;br /&gt;
&lt;br /&gt;
==== Dynamic Model 1 - horizontal axis ====&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Horizontal Axis.png|''Figure 10 - Horizontal linear axis''|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear: both&amp;quot; /&amp;gt;&lt;br /&gt;
==== Dynamic Model 2 - vertical or tilted axis ====&lt;br /&gt;
[[File:Axystems;Motion Dynamics - Vertical Axis.png|''Figure 11 - Vertical linear axis''|thumb]]&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;&lt;br /&gt;
|Total mass of the moved part.&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;M \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Constant force due to gravity.&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
|Gravity coefficient used to consider payload mass. ('''g = 9.80665''')&lt;br /&gt;
|}&lt;br /&gt;
;Model equation&lt;br /&gt;
: &amp;lt;math&amp;gt;T = (M + M_{payload}) \cdot acc + M \cdot g \cdot \cos(\alpha) + M_{payload} \cdot g \cdot \cos(\alpha)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SCARA robot===&lt;br /&gt;
&lt;br /&gt;
==== Dynamic Model 1 ====&lt;br /&gt;
[[File:scara.PNG|''Figure 12 - scara robot''|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1^2 \cdot M_2 + I_1&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;A_2^2 \cdot M_2 + I_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;J_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;L_1 \cdot A_2 \cdot M_2&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot M_3&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;J_4&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===DELTA robot===&lt;br /&gt;
&lt;br /&gt;
==== Dynamic Model 1 ====&lt;br /&gt;
[[File:Control;Rod forces model for Delta kinematics - Introduction.png|''Figure 13 - Delta robot''|thumb]]&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g \cdot L_{AB} \cdot M_{AB}&amp;lt;/math&amp;gt;&lt;br /&gt;
| kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;/sec&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;M_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{BC}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;M_P&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;M_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_T&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;\Theta_{T\phi}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TO}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;L_{TP}&amp;lt;/math&amp;gt;&lt;br /&gt;
| m&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;C_r&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;Fr_{max}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;R_{ext}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===PUMA robot===&lt;br /&gt;
==== Dynamic Model 1 ====&lt;br /&gt;
[[File:puma.PNG|''Figure 14 - Puma robot''|thumb]]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
:* &amp;lt;math&amp;gt; g &amp;lt;/math&amp;gt; - Gravity constant&lt;br /&gt;
:* &amp;lt;math&amp;gt; m_{i} &amp;lt;/math&amp;gt; - Mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
:* &amp;lt;math&amp;gt; a_{i} &amp;lt;/math&amp;gt; - length of the common normal between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; d_{i} &amp;lt;/math&amp;gt; - offset along z axis between the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; and i&amp;lt;sup&amp;gt;th+1&amp;lt;/sup&amp;gt; joints  &lt;br /&gt;
:* &amp;lt;math&amp;gt; l_{i} &amp;lt;/math&amp;gt; - The distance from the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; joint to the center of mass of the i&amp;lt;sup&amp;gt;th&amp;lt;/sup&amp;gt; link&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{1} = I_{1,zz}+m_{1}*l_{1,y}^2 +m_{2}*d_{2}^2+(m_{4}+m_{5}+m_{6})*a_{3}^2+m_{2}*l_{2,z}^2+&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt; &amp;lt;math&amp;gt;(m_{3}+m_{4}+m_{5}+m_{6})*(d_{2}+d_{3})^2+I_{2,xx}+I_{3,yy}+2*m_{2}*d_{2}*l_{2,z}+m_{2}*l_{2,y}^2+m_{3}*l_{3,z}^2+2*m_{3}*(d_{2}+d_{3})*l_{3,z}+I_{4,zz}+I_{4,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{2} = I_{2,zz}+m_{2}*(l_{2,x}^2+l_{2,y}^2)+(m_{3}+m_{4}+m_{5}+m_{6}*a_{2}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{3} = -I_{2,xx}+I_{2,yy}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}^2+m_{2}*l_{2,x}^2-m_{2}*l_{2,y}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{4} = m_{2}*l_{2,x}*(d_{2}+l_{2,z})+m_{3}*a_{2}*l_{3,z}+(m_{3}+m_{4}+m_{5}+m_{6})*a_{2}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|5&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{5} = -m_{3}*a_{2}*l_{3,y}+(m_{4}+m_{5}+m_{6})*a_{2}*d_{4}+m_{4}*a_{2}*l_{4,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|6&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{6} = I_{3,zz}+m_{3}*l_{3,y}^2+m_{4}*a_{3}^2+m_{4}*(d_{4}+l_{4,z})^2+I_{4,yy}+m_{5}*a_{3}^2+m_{5}*d_{4}^2+I_{5,zz}+m_{6}*a_{3}^2+m_{6}*d_{4}^2+m_{6}*l_{6,z}^2+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|7&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{7} = m_{3}*l_{3,y}^2+I_{3,xx}-I_{3,yy}+m_{4}*l_{4,z}^2+2*m_{4}*d_{4}*l_{4,z}+(m_{4}+m_{5}+m_{6})*(d_{4}^2-a_{3}^2)+I_{4,yy}-I_{4,yy}+I_{5,zz}-I_{5,yy}+m_{6}*l_{6,z}^2-I_{6,zz}+I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|8&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{8} = -m_{4}*(d_{2}+d_{3})*(d_{4}+l_{4,z})-(m_{3}+m_{6})*(d_{2}+d_{3})*d_{4}+m_{3}*l_{3,y}*l_{3,z}+m_{3}*(d_{2}+d_{3})*l_{3,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|9&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{9} = m_{2}*l_{2,y}*(d_{2}+l_{2,z})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|10&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{10} = 2*m_{4}*a_{5}*l_{4,z}+2*(m_{4}+m_{5}+m_{6})*a_{3}*d_{4}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|11&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{11} = -2*m_{2}*l_{2,x}*l_{2,y}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|12&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{12} = (m_{4}+m_{5}+m_{6})*a_{2}*a_{3}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|13&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{13} = (m_{4}+m_{5}+m_{6})*a_{3}*(d_{2}+d_{3})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|14&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{14} = I_{4,zz}+I_{5,yy}+I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|15&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{15} = m_{6}*d_{4}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|16&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{16} = m_{6}*a_{2}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|17&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{17} = I_{5,zz}+I_{6,xx}+m_{6}*l_{6,z}^2&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|18&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{18} = m_{6}*(d_{2}+d_{3})*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|19&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{19} = I_{4,yy}-I_{4,xx}+I_{5,zz}-i_{5,yy}+m_{6}*l_{6,z}^2+I_{6,xx}-I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|20&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{20} = I_{5,yy}-I_{5,xx}-m_{6}*l_{6,z}^2+I_{6,zz}-I_{6,xx}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|21&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{21} = I_{4,xx}-I_{4,yy}+I_{5,xx}-I_{5,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|22&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{22} = m_{6}*a_{3}*l_{6,z}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|-&lt;br /&gt;
|23&lt;br /&gt;
|&amp;lt;math&amp;gt;I_{23} = I_{6,zz}&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg/m^2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Dynamic Model 2 - Gravity ====&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; width=&amp;quot;80%&amp;quot;&lt;br /&gt;
!width=&amp;quot;100&amp;quot;|Number&lt;br /&gt;
!width=&amp;quot;250&amp;quot;|Parameter&lt;br /&gt;
!Comments&lt;br /&gt;
|-&lt;br /&gt;
|1&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{2}l_{2}+a_{2}(m_{3}+m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|2&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+a_{3}(m_{4}+m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|3&lt;br /&gt;
|&amp;lt;math&amp;gt;g(m_{3}l_{3,y}+m_{4}(l_{4}+d_{4}(m_{5}+m_{6}))&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
|-&lt;br /&gt;
|4&lt;br /&gt;
|&amp;lt;math&amp;gt;gl_{56}(m_{5}+m_{6})&amp;lt;/math&amp;gt;&lt;br /&gt;
|kg*m^2/s^2&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Identification with a Payload==&lt;br /&gt;
The IdentificationStart command has a boolean parameter called ‘IdentPayload’. If this parameter is set to false, the identification process is performed regularly. If this parameter is set to true, the identification process identifies only the payload mass or inertia.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to identify the payload, one must follow these steps:&lt;br /&gt;
# Perform an identification process without the payload.&lt;br /&gt;
# Set the dynamic model parameters (by running the identification PRG file).&lt;br /&gt;
# Set ‘IdentPayload’ to true and perform an identification process with the payload.&lt;br /&gt;
&lt;br /&gt;
{{Note| After performing an identification process with the payload and setting ‘IdentPayload’ to true, the identification PRG file will contain the dynamic model parameters form step 1, and the payload parameters from step 3}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note| This procedure is valid to all dynamic models except dynamic model 1 of the PUMA robot.}}&lt;br /&gt;
&lt;br /&gt;
=Explanation of the identification output file=&lt;br /&gt;
Example of an identification output PRG file. The file is generated at the end of the identification process, and is named: IDNT&amp;lt;group num&amp;gt;.PRG: &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
1. 'Dynamic parameter identification for PUMA succeeded!&lt;br /&gt;
2. 'Identification date and time: 29/03/17 08:17:08&lt;br /&gt;
3. 'Max relative torque error: axis 1 = 13.86 %; axis 2 = 8.70 %; axis 3 = 7.79 %; axis 4 = 17.87 %; axis 5 = 23.87 %; axis 6 = 43.85 %; (maximal allowed = 50.00 %)&lt;br /&gt;
4. 'Mean relative torque error: axis 1 = 3.18 %; axis 2 = 1.71 %; axis 3 = 1.88 %; axis 4 = 3.59 %; axis 5 = 5.88 %; axis 6 = 12.41 %;&lt;br /&gt;
5. 'Signal filter cutoff frequency = 20.000 Hz&lt;br /&gt;
6. 'Signal data length = 49876 samples (raw record length = 50000 samples)&lt;br /&gt;
7. 'Moving data length: axis 1 = 35998 samples (threshold = 0.038770 rad/s); axis 2 = 35405 samples (threshold = 0.031481 rad/s); axis 3 = 36032 samples (threshold = 0.039294 rad/s); axis 4 = 36785 samples (threshold = 0.041069 rad/s); axis 5 = 34931 samples (threshold = 0.038757 rad/s); axis 6 = 29759 samples (threshold = 0.062830 rad/s); &lt;br /&gt;
&lt;br /&gt;
8.  PROGRAM CONTINUE&lt;br /&gt;
9.  ATTACH PUMA&lt;br /&gt;
&lt;br /&gt;
10. PUMA.DynamicParameter[1] = 8.759309007e+01&lt;br /&gt;
11. PUMA.DynamicParameter[2] = 1.021832253e+01&lt;br /&gt;
12. PUMA.DynamicParameter[3] = 3.042091725e+01&lt;br /&gt;
13. PUMA.DynamicParameter[4] = 1.560383089e+00&lt;br /&gt;
14. PUMA.DynamicParameter[5] = 0.000000000e+00&lt;br /&gt;
15. PUMA.DynamicParameter[6] = 0.000000000e+00&lt;br /&gt;
&lt;br /&gt;
16. A1.ViscousFriction = -1.547427791e+02&lt;br /&gt;
17. A1.CoulombFriction = -2.018153298e+01&lt;br /&gt;
&lt;br /&gt;
18. A2.ViscousFriction = -1.603287029e+02&lt;br /&gt;
19. A2.CoulombFriction = -4.658045702e+01&lt;br /&gt;
&lt;br /&gt;
20. A3.ViscousFriction = -1.085257604e+02&lt;br /&gt;
21. A3.CoulombFriction = -1.961987594e+01&lt;br /&gt;
&lt;br /&gt;
22. A4.ViscousFriction = -1.142833743e+01&lt;br /&gt;
23. A4.CoulombFriction = -9.124446870e+00&lt;br /&gt;
&lt;br /&gt;
24. A5.ViscousFriction = -2.468491129e+01&lt;br /&gt;
25. A5.CoulombFriction = -3.713111266e+00&lt;br /&gt;
&lt;br /&gt;
26. A6.ViscousFriction = -2.173025205e+00&lt;br /&gt;
27. A6.CoulombFriction = -9.724658207e-01&lt;br /&gt;
&lt;br /&gt;
29. PUMA.DynamicModel = 2&lt;br /&gt;
&lt;br /&gt;
30. DETACH PUMA&lt;br /&gt;
31. TERMINATE PROGRAM&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 1-7 give information about the identification process. Line 1 reports if the identification was successful or not.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt; &lt;br /&gt;
2. 'Identification date and time: 29/03/17 08:17:08&lt;br /&gt;
3. 'Max relative torque error: axis 1 = 13.86 %; axis 2 = 8.70 %; axis 3 = 7.79 %; axis 4 = 17.87 %; axis 5 = 23.87 %; axis 6 = 43.85 %; (maximal allowed = 50.00 %)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Line 2 reports the date and time the identification was made.&amp;lt;br&amp;gt;&lt;br /&gt;
Line 3 reports the recorded max relative torque error. The torque error is taken as the TorqueAdditiveCommand (Taddcmd) minus the measured TorqueFeedback. The Taddcmd for this calculation is taken as the Taddcmd that would have been calculated with the identified dynamic parameters as if this movement was performed. In other words, the error is the difference between the real data and the fitted model. The relative torque error is calculated as the torque error divided by the max measured TorqueFeedback (each joint and its max TorqueFeedback value). The max relative torque error, is the maximum value of the relative value for each joint. The formula for the max relative torque error is: &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt; &amp;lt;math&amp;gt; max relative torque error  =max(\frac{TaddCMD-Tfb}{max(Tfb)}\ &amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If this value is larger than 50% for one of the joints than the identification is regarded as failed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
4. 'Mean relative torque error: axis 1 = 3.18 %; axis 2 = 1.71 %; axis 3 = 1.88 %; axis 4 = 3.59 %; axis 5 = 5.88 %; axis 6 = 12.41 %;&lt;br /&gt;
5. 'Signal filter cutoff frequency = 20.000 Hz&lt;br /&gt;
6. 'Signal data length = 49876 samples (raw record length = 50000 samples)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Line 4 reports the mean relative torque error, the mean of the relative torque error over all of the recorded time is taken and displayed for each joint.&amp;lt;br&amp;gt; &lt;br /&gt;
Line 5 reports the cutoff frequency that was used for the low pass filter.&amp;lt;br&amp;gt; &lt;br /&gt;
Line 6 reports how many data points were recorded. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
7. 'Moving data length: axis 1 = 35998 samples (threshold = 0.038770 rad/s); axis 2 = 35405 samples (threshold = 0.031481 rad/s); axis 3 = 36032 samples (threshold = 0.039294 rad/s);&lt;br /&gt;
'axis 4 = 36785 samples (threshold = 0.041069 rad/s); axis 5 = 34931 samples (threshold = 0.038757 rad/s); axis 6 = 29759 samples (threshold = 0.062830 rad/s); &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Line 7 reports how many data points from each joint were taken for the model fitting. Some data points are discarded if the velocity of the joint in these point is below some threshold (the threshold for each joint is also reported in this line). This is done because the data points with low velocities are causing numerical errors to the model fitting. Therefore, all of the relative errors explained above are calculated only for those points which are taken into account for the model fitting.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt; &lt;br /&gt;
10. PUMA.DynamicParameter[1] = 8.759309007e+01&lt;br /&gt;
11. PUMA.DynamicParameter[2] = 1.021832253e+01&lt;br /&gt;
12. PUMA.DynamicParameter[3] = 3.042091725e+01&lt;br /&gt;
13. PUMA.DynamicParameter[4] = 1.560383089e+00&lt;br /&gt;
14. PUMA.DynamicParameter[5] = 0.000000000e+00&lt;br /&gt;
15. PUMA.DynamicParameter[6] = 0.000000000e+00&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 10-15 (for this file) sets the fitted dynamic model parameters.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
16. A1.ViscousFriction = -1.547427791e+02&lt;br /&gt;
17. A1.CoulombFriction = -2.018153298e+01&lt;br /&gt;
18. A2.ViscousFriction = -1.603287029e+02&lt;br /&gt;
19. A2.CoulombFriction = -4.658045702e+01&lt;br /&gt;
20. A3.ViscousFriction = -1.085257604e+02&lt;br /&gt;
21. A3.CoulombFriction = -1.961987594e+01&lt;br /&gt;
22. A4.ViscousFriction = -1.142833743e+01&lt;br /&gt;
23. A4.CoulombFriction = -9.124446870e+00&lt;br /&gt;
24. A5.ViscousFriction = -2.468491129e+01&lt;br /&gt;
25. A5.CoulombFriction = -3.713111266e+00&lt;br /&gt;
26. A6.ViscousFriction = -2.173025205e+00&lt;br /&gt;
27. A6.CoulombFriction = -9.724658207e-01&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lines 16-27 (for this file) sets the fitted friction parameters. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang='VB'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
29. PUMA.DynamicModel = 2&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Line 29 (for this file) sets the dynamic model that was used for this identification process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Success condition==&lt;br /&gt;
The success condition is based on the relative torque error. Each axis should have a max relative torque error value below 50% in order for the identification to be considered as successful. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The torque error is taken as the TorqueAdditiveCommand (Taddcmd) minus the measured TorqueFeedback. The Taddcmd for this calculation is taken as the Taddcmd that would have been calculated with the identified dynamic parameters as if this movement was performed. In other words, the error is the difference between the real data and the fitted model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The relative torque error is calculated as the torque error divided by the max measured TorqueFeedback (each joint and its max TorqueFeedback value). The max relative torque error, is the maximum value of the relative value for each joint. If this value is larger than 50% for one of the joints than the identification is regarded as failed. Line 4 reports the mean relative torque error, the mean of the relative torque error over all of the recorded time is taken and displayed for each joint. Please note that the relative torque error is evaluated only for the points that stand in a minimum velocity limitation.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The max relative torque error may vary between the different joint. Typically, small joints (with small motors) have larger relative error. This is because the applied torque for these motors is small and the noise in measurement is in the same order of magnitude of the applied torque.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''For example:''' Let’s assume that for a certain point j1.TorqueFeedback = 80 and the  j1.TorqueAdditiveCommand = 100. For this point, the j1.TorqueError = 20. Let’s assume that the maximum j1.TorqueFeedback during the recording was 160, then the relative torque error for this point would be: j1.TorqueError/max(j1.TorqueFeedback) = 20/160 = 0.125 = 12.5%&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
Robot models which are supported for dynamic model, have at least one type of dynamic model. These models can be found in the wiki page Dynamic Models. Each model is based on some parameters which are composed of the mass, length and inertia of the different parts of the robot. These are the parameters that are being evaluated with the help of the identification process. The parameters are saved as robot.DynamicParameter[i], where robot is the robot name and i is the number of the parameter as stated in the Dynamic Models page. Each model may have different number of parameters. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the dynamic parameter, appear the viscous friction and coulomb friction parameters: axis.ViscousFriction, axis.CoulombFriction . Each joint of the robot has these two parameters which define its friction coefficients.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In addition to these parameters, the user should consider to set the maximum allowed value  for the additive torque command. This could be set with the property TorqueThreshold, e.g. a1.TorqueThreshold = 200. If the Taddcmd exceeds this value, than the softMC reports an error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Including the identification output file in setup==&lt;br /&gt;
In order for the dynamic model to take effect you should simply run the IDNT&amp;lt;group num&amp;gt;.PRG file while the robot is disabled (en = 0). Note that this should come after the robot setup. In order to automatically load the dynamic model configuration during the system initialization and robot setup, simply add the line:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Load IDNT&amp;lt;group num&amp;gt;.PRG&lt;br /&gt;
To the end of your AUTOEXEC.PRG or STARTPRG.PRG file, '''after''' the robot setup.&lt;br /&gt;
&lt;br /&gt;
=Explanation of the identification process recording file=&lt;br /&gt;
Another file that is generated at the end of the identification process is the data recording file. This file is named: IDNT&amp;lt;group num&amp;gt;.REC. This file contains all of the relevant data that was used by the identification process. Here are the parameters which are displayed for each joint:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
* tfbRaw – The raw recorded data of the TorqueFeedback (tfb) property.&lt;br /&gt;
* pfbRaw – The raw recorded data of the PositionFeedback (pfb) property.&lt;br /&gt;
* tfb – The filtered recorded data of the TorqueFeedback (tfb) property.&lt;br /&gt;
* pfb – The filtered recorded data of the PositionFeedback (pfb) property.&lt;br /&gt;
* vfb – The filtered recorded data of the VelocityFeedback (vfb) property.&lt;br /&gt;
* afb – The filtered recorded data of the AccelerationFeedback (afb) property.&lt;br /&gt;
* tcmd – The torque command generated by the fitted model. The found dynamic parameters and the collected data are used to calculate this property. In regular mode, this property will actually be TorqueAdditiveCommand (Taddcmd).&lt;br /&gt;
* te – The TorqueError (te) calculated by the difference of the tcmd and tfb data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This file can be used for better debugging and troubleshooting, as well as for better understanding the identification process. At figure 15 you can find example of an identification output REC file: &lt;br /&gt;
&lt;br /&gt;
[[file: DM_19.png|1000px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 15 - An example of an identification output REC file of a semi-static PUMA model''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=Demonstration of tracking improvements (settling, position error)=&lt;br /&gt;
==SCARA Robot==&lt;br /&gt;
An experiment was made for a 4 axes scara robot with and without dynamic model. The robot was commanded to move 600[mm] in a straight line with linear velocity of 900[mm/s]. The cartesian velocity of the robot and the ISSETTLED property were recorded during this motion (figure 16 and 17, the ISSETTLED property is scaled by 3000). &amp;lt;br&amp;gt;&lt;br /&gt;
The ISSETTLED property indicates whether the actual element position is within the specified settling range. The settling range is defined by the PESETTLE property and is further qualified by the TIMESETTLE property. When the motion profiler has completed, the absolute value of the position error (Target Position – Actual Position) is compared to the PESETTLE property. When the result is less than or equal to this property for the time given by TIMESETTLE, the ISSETTLED flag is set. For this example, the PESETTLE was taken as 0.001. &lt;br /&gt;
Therefore, one could expect that a shorter settling time indicates on better performance. &amp;lt;br&amp;gt;&lt;br /&gt;
Figures 16 and 17 display the recorded data from the experiment. The results are that the settling time for this motion without dynamic model is 300 ms, and the settling time with dynamic model is 260 ms – ~86.7% of the original settling time. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[file:DM_20.png|850px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 15 - An example of settling time improvement for SCARA robot. This graph is for the case without dynamic model, the settling time is 300[ms]''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:DM_21.png|850px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 16 - An example of settling time improvement for Delta robot. This graph is for the case with dynamic model, the settling time is reduced to 260[ms]''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
==DELTA Robot==&lt;br /&gt;
An experiment was made for a 3 axes delta robot with and without dynamic model. The robot was commanded to move 550[mm] in a straight line with linear velocity of 3000[mm/s]. The cartesian velocity of the robot and the ISSETTLED property were recorded during this motion (figure 17 and 18, the ISSETTLED property is scaled by 3000). &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The ISSETTLED property indicates whether the actual element position is within the specified settling range. The settling range is defined by the PESETTLE property and is further qualified by the TIMESETTLE property. When the motion profiler has completed, the absolute value of the position error (Target Position – Actual Position) is compared to the PESETTLE property. When the result is less than or equal to this property for the time given by TIMESETTLE, the ISSETTLED flag is set. For this example, the PESETTLE was taken as 0.05.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Therefore, one could expect that a shorter settling time indicates on better performance. &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Figures 17 and 18 display the recorded data from the experiment. The results are that the settling time for this motion without dynamic model is 268 ms, and the settling time with dynamic model is 44 ms – ~16.5% of the original settling time. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:DM_22.png|850px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 17 - An example of settling time improvement for Delta robot. This graph is for the case without dynamic model, the settling time is 268[ms]''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:DM_23.png|850px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 18 - An example of settling time improvement for Delta robot. This graph is for the case with dynamic model, the settling time is reduced to 44[ms]''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
==PUMA Robot==&lt;br /&gt;
An experiment was made with and without dynamic model. Axis 3 was commanded to oscillate with the SineWave command while axis 2 was commanded to stay at 0.&amp;lt;br&amp;gt;&lt;br /&gt;
Figure 19 shows axis 2 position error for the cases with (top) and without (bottom) dynamic model. The peak to peak amplitude for the cases with and without dynamic model are ~0.6e-3 and ~1e-3 correspondingly. It means that using the dynamic model reduced ~40% of the error for this example.&lt;br /&gt;
&lt;br /&gt;
[[file:DM_24.png|850px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 19 - An example of tracking improvement for PUMA robot. Top - case with dynamic model 0.627e-3 peak to peak amplitude, Bottom - case without dynamic model 1.04e-3 peak to peak amplitude''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=Collision detection=&lt;br /&gt;
The dynamic model allows to enable a more delicate collision detection feature. Without the dynamic model, the softMC can detect a collision by thresholding the position error of the robot or joints. However, when using the dynamic model of the robot, a collision can be detected by thresholding the torque error. The torque error reacts quicker than the position error, hence enabling a more delicate collision detection.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to activate the thresholding over the torque error for a certain joint, set the property TorqueErrorEnable (Teen) to 1, e.g. a1.Teen = 1. One more property to set is the TorqueErrorMax (Temax), e.g. a1.Temax = 10. This property set the maximum allowed torque error which above it softMC reports an error. Note that the Temax property may vary between joints, usually the bigger the joint’s motor the bigger Temax that the user should allow. Also note that as the dynamic model identification results get more accurate, the Temax can be decreased as the torque error gets smaller.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One last property to consider is the TorqueErrorFilter property. If the torque feedback is noisy, the Temax value can be exceed due to noise which causes false collision triggering. Filtering this noise helps to achieve better collision detection procedure. This property gets values in the range of 0.0 to 1.0. The filter is a very simple averaging filter, it performs as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;lt;math&amp;gt;TE=TEF*TE_{current} +(1-TEF)*TE_{previous}&amp;lt;/math&amp;gt;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
when TE is the TorqueError property, and TEF is the TorqueErrorFilter property.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that usually the largest error occurs in the beginning, ending or direction changing of the movement. Therefore, the magnitude of the errors in these cases determine what the Temax value will be. Nevertheless, these cases are also characterized with very low velocities. Hence, it is possible to write an application that monitors the torque error and joint velocities, and ignore the cases when the velocity is small, or perhaps increase the Temax just for these cases. As a result, the collision detection feature can become very sensitive&lt;br /&gt;
&lt;br /&gt;
=Review of the possible reasons for an identification failure=&lt;br /&gt;
This section reviews some possible reasons that may cause poor results or a failure of the identification process. The next section reviews how to identify these reasons.&lt;br /&gt;
==Movement is too slow==&lt;br /&gt;
The dynamic identification model requires that the robot joints will move in a high velocity, as mentioned in section 3. When the joints move at a low velocity, the developed torque in the joints opposes mainly the joints friction and gravity torques, and the acceleration and inertia terms are relatively small. Therefore, the dynamic model parameters identification will perform poorly. Furthermore, the identification process ignores data that is under certain minimal velocity, so moving slowly can also cause for lack of data.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That being said, in such a case, the output PRG identification file may report that the identification process was successful and the resulting max relative errors can be small. However, later, when attempting to move at higher velocities than the velocities used during the identification process, the additive torque command predictions will most likely perform poorly.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Figure 20 shows an example for an identification output REC file for a 3 axes delta robot where the motion was slow during the identification. It is noticeable that the data is very noisy. The reason for that is that the movement is slow, hence the developed torques are small and the relative noise is large&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:DM_25.png|900px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 20 - An example of a slow identification output REC file for a 3 axes delta robot''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Figure 21 shows the torque error for the same delta robot and the same motion. The top figure is the result of the motion using the retrieved parameters from a slow identification process and the bottom figure is the result of the motion using the retrieved parameters from a good identification process. One can see that the torque errors increase dramatically for the case with slow identification process&lt;br /&gt;
&lt;br /&gt;
[[file:DM_26.png|900px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 21 – top – the torque error for the 3 axes of the delta robot using the retrieved dynamic parameters from a slow identification process. Botoom – the torque error for the 3 axes of the delta robot using the retrieved dynamic parameters from a slow identification process.''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
==Movement is too fast==&lt;br /&gt;
This problem is less likely to happen, but still, it can cause poor results or a failure of the identification process.&amp;lt;br&amp;gt;&lt;br /&gt;
If the robot joints are brought to their limits, the motor torque can reach to a saturation value. The current dynamic model does not take saturation into account, therefore, if saturation occurred, it will cause poor identification results&lt;br /&gt;
&lt;br /&gt;
==Movement duration is too short==&lt;br /&gt;
The identification is based on the collected data that is recorded during the robot movement. If there is not enough data, the identification may overfit the data and will predict accurately just for the region of the collected data.  In such case the identification may be reported as successful, hence the user has to judge if the collected data is sufficient. A rule of thumb is that each joint should complete at least 3 cycles.&lt;br /&gt;
&lt;br /&gt;
==Movement region is too small==&lt;br /&gt;
The identification is based on the collected data that is recorded during the robot movement. If the data is not scattered over the entire work area of the robot, the identification may overfit the data and will predict accurately just for the region of the collected data.&amp;lt;br&amp;gt;&lt;br /&gt;
In such case the identification may be reported as successful, hence the user has to judge if the collected data is sufficient. A rule of thumb is that each joint should reach position values closely to its negative and positive position limits.&lt;br /&gt;
&lt;br /&gt;
==TorqueFactor properties are not configured well==&lt;br /&gt;
The dynamic model of each robot is based on the MKS system of units defines, hence the torque feedback values should be in units of [Nm]. If the TorqueFactor properties are not configured well than the torque feedback will not have suitable values and the model equations will be wrong.&amp;lt;br&amp;gt; &lt;br /&gt;
In such a case, the identification process will perform poorly and the identified model parameters will not be correct.&lt;br /&gt;
&lt;br /&gt;
==Wrong type of DynamicModel property==&lt;br /&gt;
Some kinematic models are assigned with more than one type of dynamic model. These different models are in order to deal with different configurations. For example, a linear axis may be horizontal, vertical, or tilted in a certain angle, each of those configurations has a different dynamic model and different DynamicModel property value.&amp;lt;br&amp;gt; &lt;br /&gt;
If a wrong DynamicModel value is set, the identification process will perform poorly.&lt;br /&gt;
&lt;br /&gt;
=How to assess what is the failure reason based on the output files=&lt;br /&gt;
This section reviews some possible failure results of the generated identification files and the identification process. The failures may be the failure of the identification process, or successful identification process with poor performance results.&lt;br /&gt;
&lt;br /&gt;
==Identification process failure==&lt;br /&gt;
An identification failure is the case where one of the joints results with a max relative error larger than 50%. Here are some reasons that may cause this result:&amp;lt;br&amp;gt;&lt;br /&gt;
* One or more of the joints moved too slow. This can be identified in the output PRG file in lines 6 and 7. Line 6 reports how many data points were collected for each joint. Line 7 reports how many points are with a velocity larger than the velocity threshold. If the data points number after thresholding for one or more of the joints is significantly smaller than the total number of collected points, then it means that this joint moved too slow.&amp;lt;br&amp;gt;&lt;br /&gt;
* One or more of the joints reached saturation. This can be identified in the output REC file. Open the output REC file and observe only the following properties of the joint in subject: tfb, tcmd and te. Saturation can be identified by seeing that the tfb reaches a sudden plateau while the tdcmd continues regularly.&lt;br /&gt;
* Large noise for small joints. For some systems, the noise can be in the same order of magnitude of the mean operation currents. In such cases, the relative torque error may be very big although the net torque error is small. In such cases it is recommended to use the resultant dynamic parameters as received in the output PRG file even though the identification failed (taking into account that there aren’t any more problems). In order to indicate that this is the problem, open the output REC file and observe only the following properties of the joint in subject: tfb, tcmd and te. Then it is possible to observe if the large error occurs due to noise. Figure 22 shows an example of noise in the same order of magnitude of the mean operation currents and figure 23 shows an example of relative small noise magnitude&lt;br /&gt;
&lt;br /&gt;
[[file:DM_27.png|800px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 22 - An example of a large relative noise magnitude. &amp;lt;br&amp;gt;Legend: Yellow – TFb, Orange – TCmd, Turquoise - TE''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[file:DM_28.png|800px|thumb|center|&amp;lt;center&amp;gt;&amp;lt;big&amp;gt;''Figure 23 - An example of small relative noise magnitude. &amp;lt;br&amp;gt; Legend: Red – TFb, Orange – TCmd, Green – TE''&amp;lt;/big&amp;gt;&amp;lt;/center&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
==Identification process success but poor real time prediction results==&lt;br /&gt;
&lt;br /&gt;
An identification process can be reported as successful but perform poorly in real time. For some reason, the model was able to fit the data well enough, but the model is not good enough for other movements during regular operation. This usually happens because the robot did not cover major parts of its working space during identification process.  Here are some reasons that may cause this result:&amp;lt;br&amp;gt;&lt;br /&gt;
* The amplitude of one or more of the joints is not big enough and does not cover the range of movement of the joint. This could be viewed in the output REC file, or simply rechecking that the commanded amplitude is large enough.&lt;br /&gt;
* The identification process duration was too short (relative to the joints velocity). It can be identified by looking at the output REC file. Look at each joint’s pfb property. If one or more of the joints doesn’t complete at least 3 cycles, increasing the identification duration time (or the joints velocity) should help.&lt;br /&gt;
* The chosen frequencies are overlapping or don’t allow enough diversity of locations. It can be identified by looking at the output REC file. Look at all joints pfb properties together. If two or more joints seems to oscillate together, or overlap after small amount of cycles, or oscillate very similarly, try to change the frequencies of the problematic joints.&lt;br /&gt;
&lt;br /&gt;
=Test specifications=&lt;br /&gt;
This section describes how to test the dynamic model feature and check that it works properly. The test procedures are comprised of recording specific properties while performing some kind of a robot motion. The minimum required properties to record are Tfb, Taddcmd, Te. Testing can be divided into two types: one is checking that the torques predictions accuracy is reasonably small for all types of movements; and the other is checking that the robot performance (e.g. settling time, vibration, etc.) improves with the dynamic model activated.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Testing the accuracy is equivalent to testing the torque error. In order to test the torque error, simply generate a task that generates some variation of movements and record the required properties while it’s running. Alternatively, if the robot application task is already known, one can use this task in order to perform this testing. Simply run the task while recording the Tfb, Taddcmd and Te properties. Then, observe the recording (especially Te property) and decide if the achieved accuracy if satisfactory or not.&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132772</id>
		<title>How to setup Position Error Delay</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132772"/>
				<updated>2018-08-22T05:34:08Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Expected Values For Different Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to SetUp Position Error Delay =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note/Warning| If working with CDHD Servotronix family of drives over EtherCAT  pay attention that  in order to get position proper error values it is extremely important to '''switch off''' the CDHD's smoothing feature by setting '''MOVESMOOTHMODE''' to '''0'''. The CDHD's position smoothing is obsolete in applications with SoftMC as the SoftMC already smoothenizes its output (PCMD values).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== First Step ==&lt;br /&gt;
&lt;br /&gt;
* set [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 1 (minimum value)&lt;br /&gt;
* set high value in PeMax&lt;br /&gt;
* Run the axis back and forth and record PE and VCMD as :&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_VCMD.PNG |800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Command Velocity recordings&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PE_PEDEL1.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Position Error recordings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compute [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] as PE/VCMD, in this case it will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.94/57.74*1000 = 16.2 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Taking into account the used value of [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] (1) and the sampling time of 4ms we get the new [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] value of 5, e.i. '''PEDEL = 1 + 4 = 5'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| in case of a simulated axis the same procedure will work, typically results will show round cycle of 1.&lt;br /&gt;
eg, &amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.4 / 100.0 * 1000.0 = 4 ms = 1 bus cycle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Second Step ==&lt;br /&gt;
&lt;br /&gt;
Change the [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]](5) to the integer value estimated before and run the test again:&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again estimate the error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.18/57.74*1000 = 0.317 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note/Important|This means the non-integer communication delay of the drive is '''317 micro-seconds'''.}}&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is in units of one sample  equal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
317/4000 = 0.078&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Final ==&lt;br /&gt;
&lt;br /&gt;
So setting '''[[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 5.078''' we get:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5078.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example File ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''PDLtune.prg'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
common shared Ax as generic Axis&lt;br /&gt;
&lt;br /&gt;
program&lt;br /&gt;
	&lt;br /&gt;
	dim i as long&lt;br /&gt;
&lt;br /&gt;
	Ax = A1&lt;br /&gt;
	with Ax&lt;br /&gt;
		Attach	&lt;br /&gt;
			Pedel = 1 ' first run&lt;br /&gt;
			Pedel = 1 + round(1.68 / 100.0 * 1000.0 / (bus[0].cycleTime/1000)) ' 2nd run. extracted from recordings&lt;br /&gt;
			Pedel = Pedel + 0.075 / 100.0 * 1000.0 / (bus[0].cycleTime/1000) ' 3rd run. extracted from recordings&lt;br /&gt;
			PeMax = 10&lt;br /&gt;
			En=1&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
			call waitMotion&lt;br /&gt;
			Record ax_PE.rec 100000 Gap=1 RecData = Ax.Pe, Ax.Vcmd&lt;br /&gt;
			RecordOn&lt;br /&gt;
				Sleep 100&lt;br /&gt;
				for i = 1 to 3&lt;br /&gt;
					Move 100 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
					Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
				next&lt;br /&gt;
			RecordClose		&lt;br /&gt;
			En=FALSE&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			PeMax = 0.1&lt;br /&gt;
		Detach&lt;br /&gt;
	end with&lt;br /&gt;
	&lt;br /&gt;
terminate program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub waitMotion&lt;br /&gt;
	while Ax.IsMoving&lt;br /&gt;
		Sleep 1&lt;br /&gt;
	end while&lt;br /&gt;
end sub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Expected Values For Different Devices =&lt;br /&gt;
{{Note| These values are approximations to the values expected to be obtained with the script provided, and the values may vary depending on the system settings used.}}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Drivel Model'''&lt;br /&gt;
|'''PEDEL'''  &amp;lt;br&amp;gt;&amp;lt;sub&amp;gt;[Motion-Bus cycle times]&amp;lt;/sub&amp;gt;&lt;br /&gt;
|'''Derive Version'''&lt;br /&gt;
|-&lt;br /&gt;
|CDHD CAN&lt;br /&gt;
|5.23&lt;br /&gt;
|1.41.17&lt;br /&gt;
|-&lt;br /&gt;
|CDHD ETH&lt;br /&gt;
|4.11&lt;br /&gt;
|1.41.17&lt;br /&gt;
|-&lt;br /&gt;
|CDHD2 ETH&lt;br /&gt;
|4.404&lt;br /&gt;
|2.15.3a9.2.22&lt;br /&gt;
|-&lt;br /&gt;
|DDHD CAN&lt;br /&gt;
|5.06&lt;br /&gt;
|1.41.16L0.0.58BOCHU&lt;br /&gt;
|-&lt;br /&gt;
|stepIM CAN&lt;br /&gt;
|4.37&lt;br /&gt;
|23: 0.0.3.38&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132771</id>
		<title>How to setup Position Error Delay</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132771"/>
				<updated>2018-08-22T05:33:31Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Expected Values For Different Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to SetUp Position Error Delay =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note/Warning| If working with CDHD Servotronix family of drives over EtherCAT  pay attention that  in order to get position proper error values it is extremely important to '''switch off''' the CDHD's smoothing feature by setting '''MOVESMOOTHMODE''' to '''0'''. The CDHD's position smoothing is obsolete in applications with SoftMC as the SoftMC already smoothenizes its output (PCMD values).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== First Step ==&lt;br /&gt;
&lt;br /&gt;
* set [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 1 (minimum value)&lt;br /&gt;
* set high value in PeMax&lt;br /&gt;
* Run the axis back and forth and record PE and VCMD as :&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_VCMD.PNG |800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Command Velocity recordings&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PE_PEDEL1.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Position Error recordings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compute [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] as PE/VCMD, in this case it will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.94/57.74*1000 = 16.2 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Taking into account the used value of [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] (1) and the sampling time of 4ms we get the new [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] value of 5, e.i. '''PEDEL = 1 + 4 = 5'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| in case of a simulated axis the same procedure will work, typically results will show round cycle of 1.&lt;br /&gt;
eg, &amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.4 / 100.0 * 1000.0 = 4 ms = 1 bus cycle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Second Step ==&lt;br /&gt;
&lt;br /&gt;
Change the [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]](5) to the integer value estimated before and run the test again:&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again estimate the error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.18/57.74*1000 = 0.317 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note/Important|This means the non-integer communication delay of the drive is '''317 micro-seconds'''.}}&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is in units of one sample  equal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
317/4000 = 0.078&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Final ==&lt;br /&gt;
&lt;br /&gt;
So setting '''[[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 5.078''' we get:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5078.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example File ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''PDLtune.prg'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
common shared Ax as generic Axis&lt;br /&gt;
&lt;br /&gt;
program&lt;br /&gt;
	&lt;br /&gt;
	dim i as long&lt;br /&gt;
&lt;br /&gt;
	Ax = A1&lt;br /&gt;
	with Ax&lt;br /&gt;
		Attach	&lt;br /&gt;
			Pedel = 1 ' first run&lt;br /&gt;
			Pedel = 1 + round(1.68 / 100.0 * 1000.0 / (bus[0].cycleTime/1000)) ' 2nd run. extracted from recordings&lt;br /&gt;
			Pedel = Pedel + 0.075 / 100.0 * 1000.0 / (bus[0].cycleTime/1000) ' 3rd run. extracted from recordings&lt;br /&gt;
			PeMax = 10&lt;br /&gt;
			En=1&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
			call waitMotion&lt;br /&gt;
			Record ax_PE.rec 100000 Gap=1 RecData = Ax.Pe, Ax.Vcmd&lt;br /&gt;
			RecordOn&lt;br /&gt;
				Sleep 100&lt;br /&gt;
				for i = 1 to 3&lt;br /&gt;
					Move 100 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
					Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
				next&lt;br /&gt;
			RecordClose		&lt;br /&gt;
			En=FALSE&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			PeMax = 0.1&lt;br /&gt;
		Detach&lt;br /&gt;
	end with&lt;br /&gt;
	&lt;br /&gt;
terminate program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub waitMotion&lt;br /&gt;
	while Ax.IsMoving&lt;br /&gt;
		Sleep 1&lt;br /&gt;
	end while&lt;br /&gt;
end sub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Expected Values For Different Devices =&lt;br /&gt;
{{Note| These values are approximations to the values expected to be obtained with the script provided, and the values may vary depending on the system settings used.}}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Drivel Model'''&lt;br /&gt;
|'''PEDEL'''  &amp;lt;br&amp;gt;&amp;lt;sub&amp;gt;[Motion-Bus cycle times]&amp;lt;/sub&amp;gt;&lt;br /&gt;
|'''Derive Version'''&lt;br /&gt;
|-&lt;br /&gt;
|CDHD CAN&lt;br /&gt;
|5.23&lt;br /&gt;
|1.41.18&lt;br /&gt;
|-&lt;br /&gt;
|CDHD ETH&lt;br /&gt;
|4.11&lt;br /&gt;
|1.41.17&lt;br /&gt;
|-&lt;br /&gt;
|CDHD2 ETH&lt;br /&gt;
|4.404&lt;br /&gt;
|2.15.3a9.2.22&lt;br /&gt;
|-&lt;br /&gt;
|DDHD CAN&lt;br /&gt;
|5.06&lt;br /&gt;
|1.41.16L0.0.58BOCHU&lt;br /&gt;
|-&lt;br /&gt;
|stepIM CAN&lt;br /&gt;
|4.37&lt;br /&gt;
|23: 0.0.3.38&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132770</id>
		<title>How to setup Position Error Delay</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132770"/>
				<updated>2018-08-21T14:26:23Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Expected Values For Different Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to SetUp Position Error Delay =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note/Warning| If working with CDHD Servotronix family of drives over EtherCAT  pay attention that  in order to get position proper error values it is extremely important to '''switch off''' the CDHD's smoothing feature by setting '''MOVESMOOTHMODE''' to '''0'''. The CDHD's position smoothing is obsolete in applications with SoftMC as the SoftMC already smoothenizes its output (PCMD values).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== First Step ==&lt;br /&gt;
&lt;br /&gt;
* set [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 1 (minimum value)&lt;br /&gt;
* set high value in PeMax&lt;br /&gt;
* Run the axis back and forth and record PE and VCMD as :&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_VCMD.PNG |800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Command Velocity recordings&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PE_PEDEL1.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Position Error recordings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compute [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] as PE/VCMD, in this case it will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.94/57.74*1000 = 16.2 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Taking into account the used value of [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] (1) and the sampling time of 4ms we get the new [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] value of 5, e.i. '''PEDEL = 1 + 4 = 5'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| in case of a simulated axis the same procedure will work, typically results will show round cycle of 1.&lt;br /&gt;
eg, &amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.4 / 100.0 * 1000.0 = 4 ms = 1 bus cycle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Second Step ==&lt;br /&gt;
&lt;br /&gt;
Change the [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]](5) to the integer value estimated before and run the test again:&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again estimate the error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.18/57.74*1000 = 0.317 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note/Important|This means the non-integer communication delay of the drive is '''317 micro-seconds'''.}}&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is in units of one sample  equal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
317/4000 = 0.078&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Final ==&lt;br /&gt;
&lt;br /&gt;
So setting '''[[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 5.078''' we get:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5078.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example File ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''PDLtune.prg'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
common shared Ax as generic Axis&lt;br /&gt;
&lt;br /&gt;
program&lt;br /&gt;
	&lt;br /&gt;
	dim i as long&lt;br /&gt;
&lt;br /&gt;
	Ax = A1&lt;br /&gt;
	with Ax&lt;br /&gt;
		Attach	&lt;br /&gt;
			Pedel = 1 ' first run&lt;br /&gt;
			Pedel = 1 + round(1.68 / 100.0 * 1000.0 / (bus[0].cycleTime/1000)) ' 2nd run. extracted from recordings&lt;br /&gt;
			Pedel = Pedel + 0.075 / 100.0 * 1000.0 / (bus[0].cycleTime/1000) ' 3rd run. extracted from recordings&lt;br /&gt;
			PeMax = 10&lt;br /&gt;
			En=1&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
			call waitMotion&lt;br /&gt;
			Record ax_PE.rec 100000 Gap=1 RecData = Ax.Pe, Ax.Vcmd&lt;br /&gt;
			RecordOn&lt;br /&gt;
				Sleep 100&lt;br /&gt;
				for i = 1 to 3&lt;br /&gt;
					Move 100 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
					Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
				next&lt;br /&gt;
			RecordClose		&lt;br /&gt;
			En=FALSE&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			PeMax = 0.1&lt;br /&gt;
		Detach&lt;br /&gt;
	end with&lt;br /&gt;
	&lt;br /&gt;
terminate program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub waitMotion&lt;br /&gt;
	while Ax.IsMoving&lt;br /&gt;
		Sleep 1&lt;br /&gt;
	end while&lt;br /&gt;
end sub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Expected Values For Different Devices =&lt;br /&gt;
{{Note| These values are approximations to the values expected to be obtained with the script provided, and the values may vary depending on the system settings used.}}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Drivel Model'''&lt;br /&gt;
|'''PEDEL'''  &amp;lt;br&amp;gt;&amp;lt;sub&amp;gt;[Motion-Bus cycle times]&amp;lt;/sub&amp;gt;&lt;br /&gt;
|'''Derive Version'''&lt;br /&gt;
|-&lt;br /&gt;
|CDHD CAN&lt;br /&gt;
|5.23&lt;br /&gt;
|1.41.18&lt;br /&gt;
|-&lt;br /&gt;
|CDHD ETH&lt;br /&gt;
|4.11&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|CDHD2 ETH&lt;br /&gt;
|4.404&lt;br /&gt;
|2.15.3a9.2.22&lt;br /&gt;
|-&lt;br /&gt;
|DDHD CAN&lt;br /&gt;
|5.06&lt;br /&gt;
|1.41.16L0.0.58BOCHU&lt;br /&gt;
|-&lt;br /&gt;
|stepIM CAN&lt;br /&gt;
|4.37&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132769</id>
		<title>How to setup Position Error Delay</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132769"/>
				<updated>2018-08-21T13:34:09Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Expected Values For Different Devices */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to SetUp Position Error Delay =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note/Warning| If working with CDHD Servotronix family of drives over EtherCAT  pay attention that  in order to get position proper error values it is extremely important to '''switch off''' the CDHD's smoothing feature by setting '''MOVESMOOTHMODE''' to '''0'''. The CDHD's position smoothing is obsolete in applications with SoftMC as the SoftMC already smoothenizes its output (PCMD values).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== First Step ==&lt;br /&gt;
&lt;br /&gt;
* set [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 1 (minimum value)&lt;br /&gt;
* set high value in PeMax&lt;br /&gt;
* Run the axis back and forth and record PE and VCMD as :&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_VCMD.PNG |800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Command Velocity recordings&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PE_PEDEL1.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Position Error recordings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compute [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] as PE/VCMD, in this case it will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.94/57.74*1000 = 16.2 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Taking into account the used value of [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] (1) and the sampling time of 4ms we get the new [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] value of 5, e.i. '''PEDEL = 1 + 4 = 5'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| in case of a simulated axis the same procedure will work, typically results will show round cycle of 1.&lt;br /&gt;
eg, &amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.4 / 100.0 * 1000.0 = 4 ms = 1 bus cycle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Second Step ==&lt;br /&gt;
&lt;br /&gt;
Change the [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]](5) to the integer value estimated before and run the test again:&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again estimate the error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.18/57.74*1000 = 0.317 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note/Important|This means the non-integer communication delay of the drive is '''317 micro-seconds'''.}}&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is in units of one sample  equal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
317/4000 = 0.078&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Final ==&lt;br /&gt;
&lt;br /&gt;
So setting '''[[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 5.078''' we get:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5078.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example File ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''PDLtune.prg'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
common shared Ax as generic Axis&lt;br /&gt;
&lt;br /&gt;
program&lt;br /&gt;
	&lt;br /&gt;
	dim i as long&lt;br /&gt;
&lt;br /&gt;
	Ax = A1&lt;br /&gt;
	with Ax&lt;br /&gt;
		Attach	&lt;br /&gt;
			Pedel = 1 ' first run&lt;br /&gt;
			Pedel = 1 + round(1.68 / 100.0 * 1000.0 / (bus[0].cycleTime/1000)) ' 2nd run. extracted from recordings&lt;br /&gt;
			Pedel = Pedel + 0.075 / 100.0 * 1000.0 / (bus[0].cycleTime/1000) ' 3rd run. extracted from recordings&lt;br /&gt;
			PeMax = 10&lt;br /&gt;
			En=1&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
			call waitMotion&lt;br /&gt;
			Record ax_PE.rec 100000 Gap=1 RecData = Ax.Pe, Ax.Vcmd&lt;br /&gt;
			RecordOn&lt;br /&gt;
				Sleep 100&lt;br /&gt;
				for i = 1 to 3&lt;br /&gt;
					Move 100 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
					Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
				next&lt;br /&gt;
			RecordClose		&lt;br /&gt;
			En=FALSE&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			PeMax = 0.1&lt;br /&gt;
		Detach&lt;br /&gt;
	end with&lt;br /&gt;
	&lt;br /&gt;
terminate program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub waitMotion&lt;br /&gt;
	while Ax.IsMoving&lt;br /&gt;
		Sleep 1&lt;br /&gt;
	end while&lt;br /&gt;
end sub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Expected Values For Different Devices =&lt;br /&gt;
{{Note| These values are approximations to the values expected to be obtained with the script provided, and the values may vary depending on the system settings used.}}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Drivel Model'''&lt;br /&gt;
|'''PEDEL'''  &amp;lt;br&amp;gt;&amp;lt;sub&amp;gt;[Motion-Bus cycle times]&amp;lt;/sub&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|CDHD CAN&lt;br /&gt;
|5.23&lt;br /&gt;
|-&lt;br /&gt;
|CDHD ETH&lt;br /&gt;
|4.11&lt;br /&gt;
|-&lt;br /&gt;
|CDHD2 ETH&lt;br /&gt;
| 4.404&lt;br /&gt;
|-&lt;br /&gt;
|DDHD CAN&lt;br /&gt;
|4.06&lt;br /&gt;
|-&lt;br /&gt;
|stepIM CAN&lt;br /&gt;
|4.37&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132768</id>
		<title>How to setup Position Error Delay</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=How_to_setup_Position_Error_Delay&amp;diff=132768"/>
				<updated>2018-08-21T12:08:02Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: expected value table&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= How to SetUp Position Error Delay =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note/Warning| If working with CDHD Servotronix family of drives over EtherCAT  pay attention that  in order to get position proper error values it is extremely important to '''switch off''' the CDHD's smoothing feature by setting '''MOVESMOOTHMODE''' to '''0'''. The CDHD's position smoothing is obsolete in applications with SoftMC as the SoftMC already smoothenizes its output (PCMD values).}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== First Step ==&lt;br /&gt;
&lt;br /&gt;
* set [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 1 (minimum value)&lt;br /&gt;
* set high value in PeMax&lt;br /&gt;
* Run the axis back and forth and record PE and VCMD as :&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_VCMD.PNG |800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Command Velocity recordings&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:PE_PEDEL1.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
Position Error recordings&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Compute [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] as PE/VCMD, in this case it will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.94/57.74*1000 = 16.2 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Taking into account the used value of [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] (1) and the sampling time of 4ms we get the new [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] value of 5, e.i. '''PEDEL = 1 + 4 = 5'''&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note| in case of a simulated axis the same procedure will work, typically results will show round cycle of 1.&lt;br /&gt;
eg, &amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.4 / 100.0 * 1000.0 = 4 ms = 1 bus cycle&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Second Step ==&lt;br /&gt;
&lt;br /&gt;
Change the [[MC-Basic:element.POSITIONERRORDELAY|PEDEL]](5) to the integer value estimated before and run the test again:&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
again estimate the error:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
PE/VCMD = 0.18/57.74*1000 = 0.317 ms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note/Important|This means the non-integer communication delay of the drive is '''317 micro-seconds'''.}}&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which is in units of one sample  equal:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
317/4000 = 0.078&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Final ==&lt;br /&gt;
&lt;br /&gt;
So setting '''[[MC-Basic:element.POSITIONERRORDELAY|PEDEL]] to 5.078''' we get:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:PE_PEDEL5078.PNG|800px]]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example File ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''PDLtune.prg'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'&lt;br /&gt;
common shared Ax as generic Axis&lt;br /&gt;
&lt;br /&gt;
program&lt;br /&gt;
	&lt;br /&gt;
	dim i as long&lt;br /&gt;
&lt;br /&gt;
	Ax = A1&lt;br /&gt;
	with Ax&lt;br /&gt;
		Attach	&lt;br /&gt;
			Pedel = 1 ' first run&lt;br /&gt;
			Pedel = 1 + round(1.68 / 100.0 * 1000.0 / (bus[0].cycleTime/1000)) ' 2nd run. extracted from recordings&lt;br /&gt;
			Pedel = Pedel + 0.075 / 100.0 * 1000.0 / (bus[0].cycleTime/1000) ' 3rd run. extracted from recordings&lt;br /&gt;
			PeMax = 10&lt;br /&gt;
			En=1&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
			call waitMotion&lt;br /&gt;
			Record ax_PE.rec 100000 Gap=1 RecData = Ax.Pe, Ax.Vcmd&lt;br /&gt;
			RecordOn&lt;br /&gt;
				Sleep 100&lt;br /&gt;
				for i = 1 to 3&lt;br /&gt;
					Move 100 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
					Move 0 Vcruise=100 Abs=TRUE&lt;br /&gt;
					call waitMotion&lt;br /&gt;
					Sleep 100&lt;br /&gt;
				next&lt;br /&gt;
			RecordClose		&lt;br /&gt;
			En=FALSE&lt;br /&gt;
			Sleep 100&lt;br /&gt;
			PeMax = 0.1&lt;br /&gt;
		Detach&lt;br /&gt;
	end with&lt;br /&gt;
	&lt;br /&gt;
terminate program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sub waitMotion&lt;br /&gt;
	while Ax.IsMoving&lt;br /&gt;
		Sleep 1&lt;br /&gt;
	end while&lt;br /&gt;
end sub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Expected Values For Different Devices =&lt;br /&gt;
{{Note| These values are approximations to the values expected to be obtained with the script provided, and the values may vary depending on the system settings used.}}&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Drivel Model'''&lt;br /&gt;
|'''PEDEL'''  &amp;lt;br&amp;gt;&amp;lt;sub&amp;gt;[Motion-Bus cycle times]&amp;lt;/sub&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|CDHD CAN&lt;br /&gt;
|5.23&lt;br /&gt;
|-&lt;br /&gt;
|CDHD ETH&lt;br /&gt;
|5.078&lt;br /&gt;
|-&lt;br /&gt;
|CDHD2 ETH&lt;br /&gt;
| 4.404&lt;br /&gt;
|-&lt;br /&gt;
|DDHD CAN&lt;br /&gt;
|4.06&lt;br /&gt;
|-&lt;br /&gt;
|stepIM CAN&lt;br /&gt;
|4.37&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_..._AS_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8/zh-hans&amp;diff=132767</id>
		<title>MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8/zh-hans</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_..._AS_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8/zh-hans&amp;diff=132767"/>
				<updated>2018-08-20T09:06:29Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* 参见 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_SHARED_..._AS_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8}}&lt;br /&gt;
== 缩写 ==&lt;br /&gt;
&lt;br /&gt;
== 格式 ==&lt;br /&gt;
Common Shared ''&amp;lt;variable&amp;gt;'' As Long &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Double &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; String &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; String of UTF8&lt;br /&gt;
&lt;br /&gt;
== 适用版本 ==&lt;br /&gt;
所有版本，自版本4.5.10起可用UTF-8字符串的声明。&lt;br /&gt;
&lt;br /&gt;
== 描述 ==&lt;br /&gt;
此命令用于定义系统变量。 系统变量在配置文件（CONFIG.PRG）或终端中定义。 这些变量具有系统范围的可见性。 这意味着它们可以在终端和任务中使用。 所有的任务都可以使用这些变量，变量可以用于协调任务之间的活动。&lt;br /&gt;
&lt;br /&gt;
被定义的变量可以是标量或数组。 阵列可以定义为最多10个维度。 字符串变量的长度只受可用内存空间的限制。&lt;br /&gt;
&lt;br /&gt;
变量可能是三种类型之一。 Long类型表示变量为32位有符号整数，Double表示为双精度浮点，字符串表示字符串由ASCII-8字符组成，字符串为UTF8，表示字符串以UTF- 8为规则。&lt;br /&gt;
&lt;br /&gt;
== 类型 ==&lt;br /&gt;
Long, Double, or String&lt;br /&gt;
&lt;br /&gt;
== 取值范围 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 单位 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 默认 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 使用范围 ==&lt;br /&gt;
Configuration  Terminal or Task ( 在Program … End Program block之前 )&lt;br /&gt;
从4.5.17版起，全局（common shared）声明也可以从库上下文中获得。&lt;br /&gt;
&lt;br /&gt;
== 限制 ==&lt;br /&gt;
只写. 在配置文件中使用时，声明必须位于Program关键字之前。&lt;br /&gt;
&lt;br /&gt;
== 例子 ==&lt;br /&gt;
Common Shared Var1 as long                   ‘整形变量&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Shared Var2 as double                  ‘双精度的变量&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Shared Var3 as string                  ‘字符串变量&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Shared MyArray[4][5] as long               ‘整形数组&lt;br /&gt;
&lt;br /&gt;
== 参见 ==&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:VARLIST|VARLIST]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_..._AS_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8&amp;diff=132766</id>
		<title>MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_..._AS_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8&amp;diff=132766"/>
				<updated>2018-08-20T09:06:07Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_SHARED_..._AS_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8}}&lt;br /&gt;
{{MC-Basic&lt;br /&gt;
|SHORT FORM=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SYNTAX=&lt;br /&gt;
Common Shared ''&amp;lt;variable&amp;gt;'' As Long &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Double &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; String &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; String of UTF8&lt;br /&gt;
&lt;br /&gt;
|AVAILABILITY=&lt;br /&gt;
All versions. Declaration of UTF-8 strings is available since Version 4.5.10.&lt;br /&gt;
&lt;br /&gt;
|DESCRIPTION=&lt;br /&gt;
This command is used to define a system variable. System variables are defined either in the configuration file (CONFIG.PRG) or from the terminal. These variables have system-wide visibility. This means they may be used at the terminal and in tasks. All tasks may use the variables and the variables may be used to coordinate activities among tasks.&lt;br /&gt;
&lt;br /&gt;
A variable being defined may be scalar or array. An array may be defined with up to 10 dimensions. The length of a string variable is only limited by the amount of free memory space.&lt;br /&gt;
&lt;br /&gt;
Variables may be one of three types. A Long type indicates that the variable is a 32-bit signed integer, Double indicates that it is double precision floating point, String indicates that the string is composed of ASCII-8 characters and String of UTF8 indicates that the string is encoded according UTF-8 rules.&lt;br /&gt;
&lt;br /&gt;
|TYPE=&lt;br /&gt;
Long, Double, or String&lt;br /&gt;
&lt;br /&gt;
|RANGE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|UNITS=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|DEFAULT=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SCOPE=&lt;br /&gt;
Configuration  Terminal or Task ( before Program … End Program block )&lt;br /&gt;
&lt;br /&gt;
Since Version 4.5.17 the global (common shared ) declaration is also  possible from the Library context.&lt;br /&gt;
&lt;br /&gt;
|LIMITATIONS=&lt;br /&gt;
Write only. When used in the Configuration file, the declaration must come before the Program keyword.&lt;br /&gt;
&lt;br /&gt;
|EXAMPLE=&lt;br /&gt;
Common Shared Var1 as long                                 ‘Integer variable&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Shared Var2 as double                             ‘Double precision variable&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Shared Var3 as string                                ‘String variable&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Shared MyArray[4][5] as long                  ‘Integer array&lt;br /&gt;
&lt;br /&gt;
|SEE ALSO=&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:VARLIST|VARLIST]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_AXIS/zh-hans&amp;diff=132765</id>
		<title>MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS/zh-hans</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_AXIS/zh-hans&amp;diff=132765"/>
				<updated>2018-08-20T09:05:11Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* 参见 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_AXIS}}&lt;br /&gt;
== 缩写 ==&lt;br /&gt;
&lt;br /&gt;
== 格式 ==&lt;br /&gt;
Common Shared&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;Dim Shared&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;Dim ''&amp;lt;axis_name&amp;gt;''As Generic Axis {[ ]…}&lt;br /&gt;
&lt;br /&gt;
== 适用版本 ==&lt;br /&gt;
所有版本&lt;br /&gt;
&lt;br /&gt;
== 描述 == &lt;br /&gt;
通用轴是一种设计用于作为参考（容器）类型的变量，（或者是暂时的或永久的）到另一个轴（实际或通用）。&lt;br /&gt;
&lt;br /&gt;
通用轴可以在所有作用域中定义，即在配置文件中，也可以在终端（全局轴）中，或任务内，静态轴之间以及Program …End Program段（本地轴）内定义。&lt;br /&gt;
&lt;br /&gt;
通用轴也可以定义为子程序和函数的“副参考”参数，以及函数的返回值。 通用轴可以是标量或数组。 阵列最多可以有10个维度。 通用轴在分配有“实际”轴之前没有任何意义（见下面的示例）。&lt;br /&gt;
&lt;br /&gt;
== 类型 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 取值范围 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 单位 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 默认 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 使用范围 ==&lt;br /&gt;
Configuration, Task or Terminal&amp;lt;br&amp;gt;&lt;br /&gt;
从4.5.17版起，全局（common shared）声明也可以从库上下文中获得。&lt;br /&gt;
&lt;br /&gt;
== 限制 ==&lt;br /&gt;
只写&lt;br /&gt;
&lt;br /&gt;
== 例子 ==&lt;br /&gt;
--&amp;gt;?axislist&lt;br /&gt;
&lt;br /&gt;
A1,A2,A3,A4&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;Common Shared GenAxis1  As Generic Axis&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;Common Shared GenAxesArray [5][5] Generic Axis&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;GenAxis1 = A2 ‘ assign real axis to generic axis&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;GenAxesArray [2][3] = A4 ‘ assign real axis to generic axis&lt;br /&gt;
&lt;br /&gt;
move GenAxis1 100&lt;br /&gt;
&lt;br /&gt;
== 参见 ==&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP]]&lt;br /&gt;
* [[MC-Basic:GENERIC AXIS DEFINITION|GENERIC AXIS DEFINITION]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_AXIS&amp;diff=132764</id>
		<title>MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_AXIS&amp;diff=132764"/>
				<updated>2018-08-20T09:04:38Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: fixed broken links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_AXIS}}&lt;br /&gt;
{{MC-Basic&lt;br /&gt;
|SHORT FORM=&lt;br /&gt;
&lt;br /&gt;
|SYNTAX=&lt;br /&gt;
Common Shared&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;Dim Shared&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;Dim ''&amp;lt;axis_name&amp;gt;''As Generic Axis {[ ]…}&lt;br /&gt;
&lt;br /&gt;
|AVAILABILITY=&lt;br /&gt;
All versions&lt;br /&gt;
&lt;br /&gt;
|DESCRIPTION=&lt;br /&gt;
A generic axis is a type of variable designed to serve as a reference (container) - either temporal or permanent - to another axis (real or generic). &lt;br /&gt;
&lt;br /&gt;
Generic axes can be defined in all scopes, i.e., either in configuration file and from terminal (global axes), or within tasks, before (static axes) and within the Program …End Program block (local axes). &lt;br /&gt;
&lt;br /&gt;
Generic axes can also be defined as “by-reference” parameters of subroutines and functions, as well as returned-values of functions. A generic axis may be a scalar or an array. An array may have up to 10 dimensions. Generic axis has no meaning until assigned with “real” axis (see below example).&lt;br /&gt;
&lt;br /&gt;
|TYPE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|RANGE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|UNITS=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|DEFAULT=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SCOPE=&lt;br /&gt;
Configuration, Task or Terminal&lt;br /&gt;
&lt;br /&gt;
Since Version 4.5.17 the global (common shared) declaration is also possible from the Library context.&lt;br /&gt;
&lt;br /&gt;
|LIMITATIONS=&lt;br /&gt;
Write only.&lt;br /&gt;
&lt;br /&gt;
|EXAMPLE=&lt;br /&gt;
--&amp;gt;?axislist&lt;br /&gt;
&lt;br /&gt;
A1,A2,A3,A4&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;Common Shared GenAxis1  As Generic Axis&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;Common Shared GenAxesArray [5][5] Generic Axis&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;GenAxis1 = A2 ‘ assign real axis to generic axis&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;GenAxesArray [2][3] = A4 ‘ assign real axis to generic axis&lt;br /&gt;
&lt;br /&gt;
move GenAxis1 100&lt;br /&gt;
&lt;br /&gt;
|SEE ALSO=&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP]]&lt;br /&gt;
* [[MC-Basic:GENERIC AXIS DEFINITION|GENERIC AXIS DEFINITION]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_TYPE/zh-hans&amp;diff=132763</id>
		<title>MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS TYPE/zh-hans</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_TYPE/zh-hans&amp;diff=132763"/>
				<updated>2018-08-20T09:03:47Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* 参见 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_TYPE}}&lt;br /&gt;
== 缩写 ==&lt;br /&gt;
&lt;br /&gt;
== 格式 ==&lt;br /&gt;
COMMON SHARED&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;DIM SHARED&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;DIM ''&amp;lt;structure_name&amp;gt;'' AS ''&amp;lt;structure type&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
对于结构数组:&lt;br /&gt;
&lt;br /&gt;
COMMON SHARED&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;DIM SHARED&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;DIM ''&amp;lt;structure_name&amp;gt;''[ ]＃ AS ''&amp;lt;structure type&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
== 适用版本 ==&lt;br /&gt;
所有版本&lt;br /&gt;
&lt;br /&gt;
== 描述 ==&lt;br /&gt;
因为结构是新的数据类型，所以必须先在配置文件中定义。 只有这样，新数据类型结构的名称才能用于声明一个结构变量。&lt;br /&gt;
&lt;br /&gt;
结构变量可以在所有范围内定义，即在配置文件和终端（全局变量）中，或在任务之前（静态变量）和程序块（局部变量）内定义。 结构也可以定义为子程序和函数的参数，以及函数的返回值。 结构变量可以是标量或数组。 数组最多可以有10个维度。&lt;br /&gt;
&lt;br /&gt;
用于分配单个元素的结构语法:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;structure_name&amp;gt;-&amp;gt;&amp;lt;structure element name&amp;gt; =&amp;lt;expression&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
查询单个元素的结构语法 :&lt;br /&gt;
&lt;br /&gt;
?'' &amp;lt;structure_name&amp;gt;-&amp;gt;&amp;lt;structure element name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
== 类型 ==&lt;br /&gt;
&amp;lt;Structure type&amp;gt; 是声明的结构类型&lt;br /&gt;
&lt;br /&gt;
== 使用范围 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 单位 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 默认 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 使用范围 ==&lt;br /&gt;
Configuration or Terminal&lt;br /&gt;
&lt;br /&gt;
从4.5.17版起，全局（common shared）声明也可以从库上下文中获得。&lt;br /&gt;
&lt;br /&gt;
== 限制 ==&lt;br /&gt;
只写。结构类型必须在配置文件中预先定义。&lt;br /&gt;
&lt;br /&gt;
== 例子 ==&lt;br /&gt;
In config file -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type X&lt;br /&gt;
&lt;br /&gt;
L1 as Long&lt;br /&gt;
&lt;br /&gt;
Length as Long&lt;br /&gt;
&lt;br /&gt;
End Type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In application file -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dim shared S1 as X&lt;br /&gt;
&lt;br /&gt;
Program&lt;br /&gt;
&lt;br /&gt;
S1-&amp;gt;Length =2&lt;br /&gt;
&lt;br /&gt;
?S1-&amp;gt;Length&lt;br /&gt;
&lt;br /&gt;
End program&lt;br /&gt;
&lt;br /&gt;
== 参见 ==&lt;br /&gt;
* [[MC-Basic:STRUCTURE TYPE DEFINITION|STRUCTURE TYPE DEFINITION]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS JOINT OF ...|COMMON SHARED or DIM SHARED or DIM ... AS JOINT OF ...]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS LOCATION OF ...|COMMON SHARED or DIM SHARED or DIM ... AS LOCATION OF ...]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED or DIM SHARED or DIM ... AS TYPE]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_GROUP/zh-hans&amp;diff=132762</id>
		<title>MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP/zh-hans</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_GROUP/zh-hans&amp;diff=132762"/>
				<updated>2018-08-20T09:02:40Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* 参见 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_GROUP}}&lt;br /&gt;
== 缩写 ==&lt;br /&gt;
&lt;br /&gt;
== 格式 ==&lt;br /&gt;
Common Shared &amp;lt;''group''&amp;gt;As Generic Group {[ ]…}&lt;br /&gt;
&lt;br /&gt;
== 适用版本 ==&lt;br /&gt;
所有版本&lt;br /&gt;
&lt;br /&gt;
== 描述 ==&lt;br /&gt;
通用组是一种旨在作为暂时或永久的引用（容器）（另一个组（实际或通用））类型的变量，。 可以在所有作用域中定义通用组，即在配置文件和终端（全局组）中，或在任务之前（静态组）之前和Program …End Program （本地组）中定义通用组。 通用组还可以定义为子程序和函数的“副参考”参数，以及函数的返回值。 通用组可以是标量或数组，阵列最多可以有10个维度。 在分配“真实”组之前，通用组才有意义（见下面的示例）。&lt;br /&gt;
&lt;br /&gt;
== 类型 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 取值范围 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 单位 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 默认 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 使用范围 ==&lt;br /&gt;
Configuration, Task or Terminal.&amp;lt;br&amp;gt;&lt;br /&gt;
从4.5.17版起，全局（common shared）声明也可以从库上下文中获得。&lt;br /&gt;
&lt;br /&gt;
== 限制 ==&lt;br /&gt;
只写&lt;br /&gt;
&lt;br /&gt;
== 例子 ==&lt;br /&gt;
Common Shared XYTable as group AxisName=X_axis AxisName=Y_axis&lt;br /&gt;
&lt;br /&gt;
Common Shared Scara as group axnm = a1 axnm = a2 axnm = a3 axnm = a4&lt;br /&gt;
&lt;br /&gt;
Common Shared GenGroup1  As Generic Group&lt;br /&gt;
&lt;br /&gt;
Common Shared GenGroupArray [5][5] Generic Group&lt;br /&gt;
&lt;br /&gt;
GenGroup1 = Scara&lt;br /&gt;
&lt;br /&gt;
GenGroupArray [5][5] = XYTable&lt;br /&gt;
&lt;br /&gt;
== 参见 ==&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS]]&lt;br /&gt;
* [[MC-Basic:GENERIC GROUP DEFINITION|GENERIC GROUP DEFINITION]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_or_DIM_SHARED_or_DIM_..._AS_CONST_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8_or_JOINT_OF_or_LOCATION_OF/zh-hans&amp;diff=132761</id>
		<title>MC-Basic:COMMON or DIM SHARED or DIM ... AS CONST LONG or DOUBLE or STRING or STRING OF UTF8 or JOINT OF or LOCATION OF/zh-hans</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_or_DIM_SHARED_or_DIM_..._AS_CONST_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8_or_JOINT_OF_or_LOCATION_OF/zh-hans&amp;diff=132761"/>
				<updated>2018-08-20T09:01:37Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* 参见 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_or_DIM_SHARED_or_DIM_..._AS_CONST_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8_or_JOINT_OF_or_LOCATION_OF}}&lt;br /&gt;
== 缩写 ==&lt;br /&gt;
&lt;br /&gt;
== 格式 ==&lt;br /&gt;
Common Shared &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Dim Shared &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Dim ''&amp;lt;const_name&amp;gt;''As Const Long &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Double &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; String &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; String of UTF8 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  Joint &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Location = ''&amp;lt;const_value&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
== 适用版本 ==&lt;br /&gt;
所有版本&amp;lt;br&amp;gt;&lt;br /&gt;
从版本4.5.10起声明UTF-8字符串是用的&lt;br /&gt;
&lt;br /&gt;
== 描述 ==&lt;br /&gt;
这些命令用于定义各种范围中的用户常量。&lt;br /&gt;
&lt;br /&gt;
'''System'''常量通过配置文件中的 '''Common Shared'''命令（程序块之前），用户任务（程序块之前）和终端进行定义。&lt;br /&gt;
&lt;br /&gt;
'''Task'''常量是通过用户任务中的 '''Dim Shared''' 定义的（程序块之前）。&lt;br /&gt;
&lt;br /&gt;
'''Local''' 常量通过程序，子程序和功能块中用户任务中的'''Dim''' 命令进行定义。&lt;br /&gt;
&lt;br /&gt;
与点变量不同，点常量不与特定机器人类型相关联，因为它们实际上是仅由坐标数定义的向量&lt;br /&gt;
&lt;br /&gt;
== 类型 ==&lt;br /&gt;
Long, Double, String, Joint or Location&lt;br /&gt;
&lt;br /&gt;
== 取值范围 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 单位 ==&lt;br /&gt;
关节和位置常量：用户定义位置单位&lt;br /&gt;
&lt;br /&gt;
== 默认 ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 使用范围 ==&lt;br /&gt;
Configuration, Task or Terminal&lt;br /&gt;
&lt;br /&gt;
从4.5.17版起，全局（common shared）声明也可以从库上下文中获得。&lt;br /&gt;
&lt;br /&gt;
== 限制 ==&lt;br /&gt;
* 不支持数组和子程序或函数定义（参数和返回值）。&lt;br /&gt;
* 用户常量必须在声明中给出值&lt;br /&gt;
* 用户常量只能在声明语句中写入。 之后，他们变成只读。&lt;br /&gt;
* 用户常量不能通过“by-reference”传递给子程序和函数。 他们必须始终被“by value”传递。&lt;br /&gt;
&lt;br /&gt;
== 例子 ==&lt;br /&gt;
‘SCARA robot Declaration :&lt;br /&gt;
&lt;br /&gt;
common shared scara as group axnm=a1 axnm=a2 axnm=a3 axnm=a4  model = 4     &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Shared LConst as Const Long = 100&lt;br /&gt;
&lt;br /&gt;
Dim Shared SConst as Const String  = “Task1.Prg”&lt;br /&gt;
&lt;br /&gt;
Program&lt;br /&gt;
&lt;br /&gt;
Dim  JConst as Const Joint of XYZR    = {0.0, 0.0, 0.0}&lt;br /&gt;
&lt;br /&gt;
Dim  LocConst as Const Location of XYZR     = #{0.0, 0.0, 0.0}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End Program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== 参见 ==&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS JOINT OF ...|COMMON SHARED or DIM SHARED or DIM ... AS JOINT OF ...]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS LOCATION OF ...|COMMON SHARED or DIM SHARED or DIM ... AS LOCATION OF ...]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON or DIM SHARED or DIM ... AS CONST LONG or DOUBLE or STRING or STRING OF UTF8 or JOINT OF or LOCATION OF]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_or_DIM_SHARED_or_DIM_..._AS_CONST_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8_or_JOINT_OF_or_LOCATION_OF&amp;diff=132760</id>
		<title>MC-Basic:COMMON or DIM SHARED or DIM ... AS CONST LONG or DOUBLE or STRING or STRING OF UTF8 or JOINT OF or LOCATION OF</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_or_DIM_SHARED_or_DIM_..._AS_CONST_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8_or_JOINT_OF_or_LOCATION_OF&amp;diff=132760"/>
				<updated>2018-08-20T09:01:03Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: fixed broken links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_or_DIM_SHARED_or_DIM_..._AS_CONST_LONG_or_DOUBLE_or_STRING_or_STRING_OF_UTF8_or_JOINT_OF_or_LOCATION_OF}}&lt;br /&gt;
{{MC-Basic&lt;br /&gt;
|SHORT FORM=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SYNTAX=&lt;br /&gt;
Common Shared &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Dim Shared &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Dim ''&amp;lt;const_name&amp;gt;''As Const Long &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Double &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; String &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; String of UTF8 &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;  Joint &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; Location = ''&amp;lt;const_value&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
|AVAILABILITY=&lt;br /&gt;
All versions.&amp;lt;br&amp;gt;&lt;br /&gt;
Declaration of UTF-8 strings is available since Version 4.5.10.&lt;br /&gt;
&lt;br /&gt;
|DESCRIPTION=&lt;br /&gt;
These commands are used to define user constants in various scopes.&lt;br /&gt;
&lt;br /&gt;
'''System''' constants are defined through the '''Common Shared''' command in configuration file (before program block), user tasks (before program block) and terminal. &lt;br /&gt;
&lt;br /&gt;
'''Task''' constants are defined through '''Dim Shared''' in user tasks (before program block). &lt;br /&gt;
&lt;br /&gt;
'''Local''' constants are defined through '''Dim''' command in user tasks within program, subroutine and function blocks.&lt;br /&gt;
&lt;br /&gt;
Unlike point variables, point constants are not linked to specific robot types, since they are actually vectors, defined only by the number of coordinates.&lt;br /&gt;
&lt;br /&gt;
|TYPE=&lt;br /&gt;
Long, Double, String, Joint or Location&lt;br /&gt;
&lt;br /&gt;
|RANGE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|UNITS=&lt;br /&gt;
Joint and Location constants: user defined position units.&lt;br /&gt;
&lt;br /&gt;
|DEFAULT=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SCOPE=&lt;br /&gt;
Configuration, Task or Terminal&lt;br /&gt;
&lt;br /&gt;
Since Version 4.5.17 the global (common shared) declaration is also possible from the Library context.&lt;br /&gt;
&lt;br /&gt;
|LIMITATIONS=&lt;br /&gt;
*Arrays and subroutine or function definitions (parameters and return values) are not supported.&lt;br /&gt;
*User constants must be given a value during declaration.&lt;br /&gt;
*User constants are writable only during declaration statement. Afterwards, they become read only.&lt;br /&gt;
*User constants cannot be passed “by-reference” to subroutines and functions. They must always be passed “by value”.&lt;br /&gt;
&lt;br /&gt;
|EXAMPLE=&lt;br /&gt;
‘SCARA robot Declaration :&lt;br /&gt;
&lt;br /&gt;
common shared scara as group axnm=a1 axnm=a2 axnm=a3 axnm=a4  model = 4     &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Common Shared LConst as Const Long = 100&lt;br /&gt;
&lt;br /&gt;
Dim Shared SConst as Const String  = “Task1.Prg”&lt;br /&gt;
&lt;br /&gt;
Program&lt;br /&gt;
&lt;br /&gt;
Dim  JConst as Const Joint of XYZR    = {0.0, 0.0, 0.0}&lt;br /&gt;
&lt;br /&gt;
Dim  LocConst as Const Location of XYZR     = #{0.0, 0.0, 0.0}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;code&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
End Program&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SEE ALSO=&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS JOINT OF ...|COMMON SHARED or DIM SHARED or DIM ... AS JOINT OF ...]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS LOCATION OF ...|COMMON SHARED or DIM SHARED or DIM ... AS LOCATION OF ...]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON or DIM SHARED or DIM ... AS CONST LONG or DOUBLE or STRING or STRING OF UTF8 or JOINT OF or LOCATION OF]]&lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_TYPE&amp;diff=132759</id>
		<title>MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS TYPE</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_TYPE&amp;diff=132759"/>
				<updated>2018-08-20T08:59:33Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: fixed broken links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_TYPE}}&lt;br /&gt;
{{MC-Basic&lt;br /&gt;
|SHORT FORM=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SYNTAX=&lt;br /&gt;
COMMON SHARED&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;DIM SHARED&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;DIM ''&amp;lt;structure_name&amp;gt;'' AS ''&amp;lt;structure type&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
For arrays of structures:&lt;br /&gt;
&lt;br /&gt;
COMMON SHARED&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;DIM SHARED&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;DIM ''&amp;lt;structure_name&amp;gt;''[ ]… AS ''&amp;lt;structure type&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
|AVAILABILITY=&lt;br /&gt;
All versions&lt;br /&gt;
&lt;br /&gt;
|DESCRIPTION=&lt;br /&gt;
Because a structure is a new data type, it must first be defined in configuration file. Only then the name of the new data type structure can be used to declare a structure variable.&lt;br /&gt;
&lt;br /&gt;
Structure variables can be defined in all scopes, i.e., either in configuration file and from terminal (global variables), or within tasks, before (static variables) and within the Program block (local variables). Structures can also be defined as parameters of subroutines and functions, as well as returned-values of functions.  A structure variable may be a scalar or an array. An array may have up to 10 dimensions.&lt;br /&gt;
&lt;br /&gt;
Syntax for assigning a single element of a structure:&lt;br /&gt;
&lt;br /&gt;
''&amp;lt;structure_name&amp;gt;-&amp;gt;&amp;lt;structure element name&amp;gt; =&amp;lt;expression&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
Query single element of a structure syntax :&lt;br /&gt;
&lt;br /&gt;
?'' &amp;lt;structure_name&amp;gt;-&amp;gt;&amp;lt;structure element name&amp;gt;''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|TYPE=&lt;br /&gt;
&amp;lt;Structure type&amp;gt; is the declared structure type&lt;br /&gt;
&lt;br /&gt;
|RANGE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|UNITS=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|DEFAULT=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SCOPE=&lt;br /&gt;
Configuration or Terminal&lt;br /&gt;
&lt;br /&gt;
Since Version 4.5.17 the global (common shared ) declaration is possible from the Library or Task contexts also .&lt;br /&gt;
&lt;br /&gt;
|LIMITATIONS=&lt;br /&gt;
Write only. Structure type must be pre-defined in configuration file.&lt;br /&gt;
&lt;br /&gt;
|EXAMPLE=&lt;br /&gt;
In config file -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type X&lt;br /&gt;
&lt;br /&gt;
L1 as Long&lt;br /&gt;
&lt;br /&gt;
Length as Long&lt;br /&gt;
&lt;br /&gt;
End Type&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In application file -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Dim shared S1 as X&lt;br /&gt;
&lt;br /&gt;
Program&lt;br /&gt;
&lt;br /&gt;
S1-&amp;gt;Length =2&lt;br /&gt;
&lt;br /&gt;
?S1-&amp;gt;Length&lt;br /&gt;
&lt;br /&gt;
End program&lt;br /&gt;
&lt;br /&gt;
|SEE ALSO=&lt;br /&gt;
* [[MC-Basic:STRUCTURE TYPE DEFINITION|STRUCTURE TYPE DEFINITION]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS JOINT OF ...|COMMON SHARED or DIM SHARED or DIM ... AS JOINT OF ...]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS LOCATION OF ...|COMMON SHARED or DIM SHARED or DIM ... AS LOCATION OF ...]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED or DIM SHARED or DIM ... AS TYPE]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_GROUP&amp;diff=132758</id>
		<title>MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_GROUP&amp;diff=132758"/>
				<updated>2018-08-14T06:43:38Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_GROUP}}&lt;br /&gt;
{{MC-Basic&lt;br /&gt;
|SHORT FORM=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SYNTAX=&lt;br /&gt;
Common Shared &amp;lt;''group''&amp;gt;As Generic Group {[ ]…}&lt;br /&gt;
&lt;br /&gt;
|AVAILABILITY=&lt;br /&gt;
All versions&lt;br /&gt;
&lt;br /&gt;
|DESCRIPTION=&lt;br /&gt;
A generic group is a type of variable, designed to serve as a reference (container) - either temporal or permanent - to another group (real or generic). Generic groups can be defined in all scopes, i.e., either in configuration file and from terminal (global groups), or within tasks, before (static groups) and within the Program …End Program block (local groups). Generic groups can also be defined as “by-reference” parameters of subroutines and functions, as well as returned-values of functions.  A generic group may be a scalar or an array. An array may have up to 10 dimensions. Generic grop has no meaning until assigned with “real” group (see below example).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|TYPE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|RANGE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|UNITS=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|DEFAULT=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SCOPE=&lt;br /&gt;
Configuration, Task or Terminal.&lt;br /&gt;
&lt;br /&gt;
Since Version 4.5.17 the global (common shared ) declaration is also  possible from the Library context.&lt;br /&gt;
&lt;br /&gt;
|LIMITATIONS=&lt;br /&gt;
Write only.&lt;br /&gt;
&lt;br /&gt;
|EXAMPLE=&lt;br /&gt;
Common Shared XYTable as group AxisName=X_axis AxisName=Y_axis&lt;br /&gt;
&lt;br /&gt;
Common Shared Scara as group axnm = a1 axnm = a2 axnm = a3 axnm = a4&lt;br /&gt;
&lt;br /&gt;
Common Shared GenGroup1  As Generic Group&lt;br /&gt;
&lt;br /&gt;
Common Shared GenGroupArray [5][5] Generic Group&lt;br /&gt;
&lt;br /&gt;
GenGroup1 = Scara&lt;br /&gt;
&lt;br /&gt;
GenGroupArray [5][5] = XYTable&lt;br /&gt;
&lt;br /&gt;
|SEE ALSO=&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8|DIM ... AS LONG or DOUBLE or STRING or STRING OF UTF8]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS]]&lt;br /&gt;
* [[MC-Basic:GENERIC GROUP DEFINITION|GENERIC GROUP DEFINITION]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_GROUP&amp;diff=132757</id>
		<title>MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:COMMON_SHARED_or_DIM_SHARED_or_DIM_..._AS_GENERIC_GROUP&amp;diff=132757"/>
				<updated>2018-08-13T12:53:25Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
{{MC-Basic&lt;br /&gt;
|SHORT FORM=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SYNTAX=&lt;br /&gt;
Common Shared &amp;lt;''group''&amp;gt;As Generic Group {[ ]…}&lt;br /&gt;
&lt;br /&gt;
|AVAILABILITY=&lt;br /&gt;
All versions&lt;br /&gt;
&lt;br /&gt;
|DESCRIPTION=&lt;br /&gt;
A generic group is a type of variable, designed to serve as a reference (container) - either temporal or permanent - to another group (real or generic). Generic groups can be defined in all scopes, i.e., either in configuration file and from terminal (global groups), or within tasks, before (static groups) and within the Program …End Program block (local groups). Generic groups can also be defined as “by-reference” parameters of subroutines and functions, as well as returned-values of functions.  A generic group may be a scalar or an array. An array may have up to 10 dimensions. Generic grop has no meaning until assigned with “real” group (see below example).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|TYPE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|RANGE=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|UNITS=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|DEFAULT=&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|SCOPE=&lt;br /&gt;
Configuration, Task or Terminal.&lt;br /&gt;
&lt;br /&gt;
Since Version 4.5.17 the global (common shared ) declaration is also  possible from the Library context.&lt;br /&gt;
&lt;br /&gt;
|LIMITATIONS=&lt;br /&gt;
Write only.&lt;br /&gt;
&lt;br /&gt;
|EXAMPLE=&lt;br /&gt;
Common Shared XYTable as group AxisName=X_axis AxisName=Y_axis&lt;br /&gt;
&lt;br /&gt;
Common Shared Scara as group axnm = a1 axnm = a2 axnm = a3 axnm = a4&lt;br /&gt;
&lt;br /&gt;
Common Shared GenGroup1  As Generic Group&lt;br /&gt;
&lt;br /&gt;
Common Shared GenGroupArray [5][5] Generic Group&lt;br /&gt;
&lt;br /&gt;
GenGroup1 = Scara&lt;br /&gt;
&lt;br /&gt;
GenGroupArray [5][5] = XYTable&lt;br /&gt;
&lt;br /&gt;
|SEE ALSO=&lt;br /&gt;
* [[MC-Basic:COMMON SHARED ... AS LONG or DOUBLE or STRING or STRING OF UTF8|COMMON SHARED ... AS LONG or DOUBLE or STRING]]&lt;br /&gt;
* [[MC-Basic:DIM SHARED ... AS LONG or DOUBLE or STRING|DIM SHARED ... AS LONG or DOUBLE or STRING]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING|DIM ... AS LONG or DOUBLE or STRING]]&lt;br /&gt;
* [[MC-Basic:DIM ... AS LONG or DOUBLE or STRING|DIM ... AS LONG or DOUBLE or STRING]]&lt;br /&gt;
* [[MC-Basic:COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC AXIS]]&lt;br /&gt;
* [[MC-Basic:GENERIC GROUP DEFINITION|GENERIC GROUP DEFINITION]]&lt;br /&gt;
&lt;br /&gt;
[[Category:MC-Basic:Declarations|COMMON SHARED or DIM SHARED or DIM ... AS GENERIC GROUP]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Default_IP&amp;diff=132755</id>
		<title>Default IP</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Default_IP&amp;diff=132755"/>
				<updated>2018-08-12T10:58:51Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: Created page with &amp;quot;=Introduction= The IP address of the softMC can be defined in any of three ways. # Static IP address – factory-defined # DHCP – assigned by DHCP server # Manual IP address...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
The IP address of the softMC can be defined in any of three ways.&lt;br /&gt;
# Static IP address – factory-defined&lt;br /&gt;
# DHCP – assigned by DHCP server&lt;br /&gt;
# Manual IP address – assigned using ControlStudio&lt;br /&gt;
&lt;br /&gt;
=Default IP Address=&lt;br /&gt;
The softMC is factory-configured with a static default IP address '''90.0.0.1'''&lt;br /&gt;
&lt;br /&gt;
=DHCP – assigned by DHCP server=&lt;br /&gt;
Check with the IT manager at your site, and make sure the softMC will be able to connect to your site’s LAN, and will be able to obtain an IP address from a DHCP server. &amp;lt;br&amp;gt; &lt;br /&gt;
In this case softMC will obtain &amp;quot;Automatic&amp;quot; IP address according to your network setting. &lt;br /&gt;
&lt;br /&gt;
=Manual IP address=&lt;br /&gt;
For this procedure please refer to [[Control Studio#IP Configurator|ControlStudio IP configurator]] tool.&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=MC-Basic:element.POSITIONERRORDELAY&amp;diff=132753</id>
		<title>MC-Basic:element.POSITIONERRORDELAY</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=MC-Basic:element.POSITIONERRORDELAY&amp;diff=132753"/>
				<updated>2018-08-08T06:11:19Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|MC-Basic:element.POSITIONERRORDELAY}}&lt;br /&gt;
{{MC-Basic&lt;br /&gt;
|SHORT FORM=&lt;br /&gt;
&amp;lt;''axis''&amp;gt;.PEDel&lt;br /&gt;
&lt;br /&gt;
|SYNTAX=&lt;br /&gt;
&amp;lt;''axis''&amp;gt;.PositionErrorDelay = &amp;lt;''value''&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
?&amp;lt;''axis''&amp;gt;.PositionErrorDelay&lt;br /&gt;
&lt;br /&gt;
|AVAILABILITY=&lt;br /&gt;
All versions&lt;br /&gt;
&lt;br /&gt;
|DESCRIPTION=&lt;br /&gt;
This property returns the delay, as a number of AnyBus cycles, between a position command and the position feedback for the calculation of the position error.&lt;br /&gt;
&lt;br /&gt;
Typically this delay includes:&lt;br /&gt;
&lt;br /&gt;
* At least one motion bus sample for sending the command position to the drive.&lt;br /&gt;
* Time used for motion preparation (micro-interpolation), typically it is one sample but could be less depends on the drive manufacturer.&lt;br /&gt;
* At least one sample for sending the feedback position from the drive.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
If using micro interpolation on the drive, this delay may change from 2 cycles (no micro interpolation) to 3 (with micro interpolation).&lt;br /&gt;
&lt;br /&gt;
This properly must be explicitly changed when switching the micro interpolation mode on the drives. Otherwise, an erroneous position error is calculated.&lt;br /&gt;
&lt;br /&gt;
Depending on drive manufacturer and type of the motion bus the sending and receiving delays can vary.&lt;br /&gt;
&lt;br /&gt;
{{Note| It is important to note that the timing of internal feedback sampling inside the drive is not taken into account In all of the calculation we assume that position feedback is taken at the start of the motion bus sample, although it might be not true.}}&lt;br /&gt;
&lt;br /&gt;
|TYPE=&lt;br /&gt;
Double (was Long in previous fw versions)&lt;br /&gt;
&lt;br /&gt;
|RANGE=&lt;br /&gt;
1 to 32&lt;br /&gt;
&lt;br /&gt;
|UNITS=&lt;br /&gt;
Motion-Bus cycle times&lt;br /&gt;
&lt;br /&gt;
|DEFAULT=&lt;br /&gt;
2 (Assuming no microinterpolation)&lt;br /&gt;
&lt;br /&gt;
|SCOPE=&lt;br /&gt;
Task or Terminal&lt;br /&gt;
&lt;br /&gt;
|LIMITATIONS=&lt;br /&gt;
To set the value within a task, the element must be attached to that task (using the ATTACH command) and disabled (''element''.ENABLE = 0)&lt;br /&gt;
&lt;br /&gt;
|EXAMPLE=&lt;br /&gt;
'''Axis''' &amp;lt;br&amp;gt; &lt;br /&gt;
''A1''.PEDel = 3&lt;br /&gt;
&lt;br /&gt;
'''Group''' &amp;lt;br&amp;gt; &lt;br /&gt;
''G1''.PEdel =3&lt;br /&gt;
&lt;br /&gt;
|SEE ALSO=&lt;br /&gt;
* [[MC-Basic:SERCOS.CYCLETIME|SERCOS.CYCLETIME]]&lt;br /&gt;
* [[SimulatedAxes| Simulated Axes]]&lt;br /&gt;
* [[AXY:Position Error Delay Compensation Algorithm| Position Error Delay Compensation Algorithm]]&lt;br /&gt;
* [[SimulatedAxes#Simulated_Axes | Simulated Axes ]]&lt;br /&gt;
* [[MC-Basic:element.POSITIONCOMMANDHISTORY| POSITIONCOMMANDHISTORY]]&lt;br /&gt;
* [[How_to_setup_Position_Error_Delay|How to setup Position Error Delay]]&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Supported_Devices_by_softMC&amp;diff=132713</id>
		<title>Supported Devices by softMC</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Supported_Devices_by_softMC&amp;diff=132713"/>
				<updated>2018-06-07T05:42:11Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Input/Output */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
Following present supported devices that where validate with the softMC in our lab, but is not limited. many other devices as well can operate with the softMC.&lt;br /&gt;
&lt;br /&gt;
== Input/Output == &lt;br /&gt;
Following table present Input/output module that where validate with the softMC &amp;lt;br/&amp;gt; &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Manufacture || ! scope=&amp;quot;col&amp;quot;| PN ||! scope=&amp;quot;col&amp;quot;| Description ||! scope=&amp;quot;col&amp;quot;| Vendor  ||! scope=&amp;quot;col&amp;quot;| FieldBUS &lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EK1100 ||EtherCAT Coupler  ||0x2 || EtherCAT &lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL1008 ||8-channel digital input terminal 24 V DC, 3 ms ||0x2 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL1088 ||8-channel digital input terminal 24 V DC, negative switching ||0x2 || EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL2008 ||8-channel digital output terminal 24 V DC, 0.5 A ||0x2 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL1809 ||EtherCAT Terminal 16-channel digital, input 24 V DC ||0x2 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL2809 ||EtherCAT Terminal 16-channel digital output 24 V DC, 0.5 A ||0x2 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL3356 ||1-channel precise load cell analysis (resistor bridge), 16 bit ||0x2 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL2088   ||8-channel digital output terminal 24 V DC, negative switching ||0x2 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL3064 ||Analog Input Terminal; 4 and 8 channel, 12 bit, 0 V ... +10 V, single-ended inputs ||0x2 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Beckhoff ||EL2809 ||16-chanel digital output ||0x2 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|esd ||ECX-DIO8 ||EtherCAT® Digital I/O-Module 8 digital I/Os ||0x17 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Weidmuller ||UR20-FBC-EC  ||Remote I/O coupler ||0x00000230 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Weidmuller ||UR20-16DI-N ||I/O module ||0x00000230 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|WAGO ||FC 750 ||module ||0x00000021 || EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|PHOENIX ||BK EC ||Bus coupler - AXL F BK EC || 0x84 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|PHOENIX ||AXL F DI8/1 DO8/1 1H ||I/O module || 0x84 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|PHOENIX ||AXL F AI4 U 1H ||I/O module || 0x84 || EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|PHOENIX || AXL F AI8 1F ||I/O module || 0x84 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|PHOENIX ||AXL F DO 16/1 1H ||I/O module ||0x84 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|PHOENIX ||AXL F DI 16/1 1H ||I/O module ||0x84 || EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|PHOENIX ||AXL F AO4 1H ||I/O module ||0x84 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|PHOENIX ||AXL AI 8-ME ||I/O module ||0x84 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Empower||EIM 9100 ||EtherCAT coupler ||0x1A ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Empower||EIM 1016||16 Digital inputs ||0x1A ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Empower||EIM 1116||16 Digital inputs ||0x1A ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Empower||EIM 2116||16 Digital outputs ||0x1A ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Empower||EIM 3118||8 Analog inputs ||0x1A ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Empower||EIM 4118||8 Analog outputs ||0x1A ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Empower||EIM 5312||PWM module ||0x1A ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Empower||EIM 5322 ||PWM module ||0x1A ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|FESTO||CTEU-EC 572556||EtherCAT bus node ||0x00000026 ||EtherCAT&lt;br /&gt;
|-&lt;br /&gt;
|Optoforce||HEX-70-XE ||Force Sensor ||0x5D4||EtherCAT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Cards == &lt;br /&gt;
Following table present Cards that where validate with the softMC &amp;lt;br/&amp;gt; &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Manufacture || ! scope=&amp;quot;col&amp;quot;| PN ||! scope=&amp;quot;col&amp;quot;| Description ||! scope=&amp;quot;col&amp;quot;| Vendor  ||! scope=&amp;quot;col&amp;quot;| FieldBUS &lt;br /&gt;
|-&lt;br /&gt;
|hilscher||CIFX 50-RE ||Communication Interface PCI Real-Time-Ethernet  || || EtherCAT &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== HMI == &lt;br /&gt;
Following table present HMI that where validate with the softMC &amp;lt;br/&amp;gt; &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! scope=&amp;quot;col&amp;quot;|Manufacture || ! scope=&amp;quot;col&amp;quot;| PN ||! scope=&amp;quot;col&amp;quot;| Description ||! scope=&amp;quot;col&amp;quot;| Vendor  ||! scope=&amp;quot;col&amp;quot;| FieldBUS &lt;br /&gt;
|-&lt;br /&gt;
|Exor||+ESMA07MU301 ||7 eSMART07M&amp;quot; TFT 16:9 wide color display  || || Modbus TCP/IP &lt;br /&gt;
|-&lt;br /&gt;
|M2i||XTOP07TW-LD-E ||7&amp;quot; 800x480 TFT color display  || || Modbus TCP/IP&lt;br /&gt;
|-&lt;br /&gt;
|Samkon||SK-xxxAS ||5&amp;quot; 7.2&amp;quot; 10.2&amp;quot; with Ethernet || || Modbus TCP/IP&lt;br /&gt;
|-&lt;br /&gt;
|Kinco||MT4x3xT&amp;amp;TE ||4.3&amp;quot; 7&amp;quot; 10&amp;quot; with Ethernet || || Modbus TCP/IP&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Welcome&amp;diff=132712</id>
		<title>Welcome</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Welcome&amp;diff=132712"/>
				<updated>2018-06-06T07:26:27Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Welcome}}&lt;br /&gt;
&lt;br /&gt;
= softMC - Multi-axis motion control =&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;text-align: center ;&amp;quot;width: 10px;&amp;quot; &amp;quot;align=&amp;quot;center&amp;quot;&lt;br /&gt;
|[[File:SERmoc HiRes.jpg|center|100px]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:703.PNG| center|100px]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:MC-Exx-702-0000_1.jpg|center|150px]]&lt;br /&gt;
|-&lt;br /&gt;
|'''softMC 3 - Compact Motion controller''' &amp;lt;br&amp;gt; The smallest motion controller in its performance class, supports 1 to 6 axes of synchronized, coordinated motion with EtherCAT or CANopen communication ||style=&amp;quot;width: 7em;&amp;quot;| &lt;br /&gt;
|'''softMC 703 - Multi Axis Motion Controller''' &amp;lt;br&amp;gt; Compact multi-axis control software and hardware package, that supports 1 to 64 axes with EtherCAT communication, for a variety of automation and robotics applications||style=&amp;quot;width: 7em;&amp;quot;|&lt;br /&gt;
|'''softMC 702 - Multi Axis Motion Controller''' &amp;lt;br&amp;gt; Multi-axis motion control software and hardware package, that supports 1 to 64 axes with EtherCAT and CANopen communication, for a variety of automation and robotics applications||style=&amp;quot;width: 30em;&amp;quot;| &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Multi axis motion control software and hardware package, offering extensive programming capabilities that have been successfully implemented in a variety of automation and robotic applications. softMC is designed to seamlessly integrate with Servotronix’s servo and stepper drive-motor systems to provide a complete motion solution in a cost effective package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Open, modular, and modern machine control environment'''&lt;br /&gt;
* '''Linux operating system with real-time extensions'''&lt;br /&gt;
* '''Ethernet machine interface'''&lt;br /&gt;
* '''Support for EtherCAT® and CANopen® motion buses'''&lt;br /&gt;
* '''Controls up to 64 interpolated axes'''&lt;br /&gt;
* '''Extensive capabilities for both standard and non-standard robotic kinematics'''&lt;br /&gt;
* '''Rich programming language that allows complete flexibility to create motion programs, with support for pre-emptive multi-tasking and asynchronous event response'''&lt;br /&gt;
* '''Support IEC 61131 PLCopen wwith CODESYS'''&lt;br /&gt;
* '''Customized software solution can be embedded into the customer‘s hardware'''&lt;br /&gt;
&lt;br /&gt;
= Highlight of Recent Changes/Additions (3 months) =&lt;br /&gt;
 &amp;lt;!-- Mirko owner --&amp;gt;&lt;br /&gt;
* [[Getting_Started_with_MC-Basic_and_ControlStudio|Getting Started with MC-Basic and ControlStudio - '''new''']]&lt;br /&gt;
* [[:Category:MC-Basic:Commands | Lot of commands/properties now available in Chinese!]]&lt;br /&gt;
* [[MC-Basic:WITHGLOBAL | WITHGLOBAL - '''new''']]&lt;br /&gt;
* [[Work_Space_Limits | Workspace limits - '''new''']]&lt;br /&gt;
* [[Program_Examples:force_sensor | Program_Examples:force_sensor - '''new''']]&lt;br /&gt;
* [[Program Examples: PIPEMODE library and motion commands| Program_Examples: PIPEMODE_library_and_motion_commands- '''new''']]&lt;br /&gt;
* [[MC-Basic:element.STOPTYPE| Explanation of different StopType's given ]]&lt;br /&gt;
* [[MC-Basic:element.PROFILERTYPE| Explanation of different motion profiles given ]]&lt;br /&gt;
* [[Motion_Project_Example:_Cartesian_Robot | Full example for a cartesian robot (configurator + Control Studio]]&lt;br /&gt;
* [[Motion_Project_Example:_Single_Axis_With_CDHD|  Single Axis With CDHD project - complete example (configurator + Control Studio]]&lt;br /&gt;
* [[Modbus_Communication_API | Modbus - MB Requred files '''updated''']]&lt;br /&gt;
* [[Inverse_Dynamic_Model | Inverse_Dynamic_Model- '''new''' ]]&lt;br /&gt;
* [[Motion_Project_Example:_Scara_Robot_simulated | Motion_Project_Example:_Scara_Robot_simulated - '''new''']]&lt;br /&gt;
* [[WorkSpace_areas | Work-Space areas - '''new''']]&lt;br /&gt;
* [[Program_Examples:_WorkSpace_areas | Work-Space areas '''example - new''']]&lt;br /&gt;
&lt;br /&gt;
=Contact=&lt;br /&gt;
==Global Headquarters==&lt;br /&gt;
Servotronix Motion Control Ltd. 21C Yagia Kapayim Street, P.O.B. 3919 Petach Tikva 49130, Israel&amp;lt;br/&amp;gt; &lt;br /&gt;
Tel: +97239273800 &amp;lt;br/&amp;gt;&lt;br /&gt;
Fax: +97239228075 &amp;lt;br/&amp;gt;&lt;br /&gt;
info@servotronix.com &amp;lt;br/&amp;gt;&lt;br /&gt;
Website: www.servotronix.com &amp;lt;br/&amp;gt;&lt;br /&gt;
Technical support: tech.support@servotronix.com&lt;br /&gt;
&lt;br /&gt;
== China ==&lt;br /&gt;
Servotronix Motion Technology Development (Shenzhen) Ltd. &amp;lt;br/&amp;gt;&lt;br /&gt;
Room 202, Building A1, Kexing Science Park, No.15 Keyuan Road, Nanshan District, Shenzhen 518057, China&amp;lt;br/&amp;gt; &lt;br /&gt;
Tel: +8675586626603 &amp;lt;br/&amp;gt;&lt;br /&gt;
Fax: +8675586626665 &amp;lt;br/&amp;gt;&lt;br /&gt;
info_china@servotronix.com &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Europe==&lt;br /&gt;
Servotronix GmbH Dülkener Straße 5 D-41334 Nettetal, Germany &amp;lt;br/&amp;gt;&lt;br /&gt;
Tel: +4921531398586&lt;br /&gt;
&lt;br /&gt;
==Korea==&lt;br /&gt;
Servotronix Motion Control Korea&amp;lt;br&amp;gt;&lt;br /&gt;
IS BIZ Tower #1315, 57-1 Heungan-daero 427beon-gil&amp;lt;br&amp;gt;&lt;br /&gt;
Dongan-gu,Anyang-si,Gyeonggi-do (14059) South Korea&amp;lt;br&amp;gt;&lt;br /&gt;
whangsoon.joo@servotronix.com&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Welcome&amp;diff=132711</id>
		<title>Welcome</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Welcome&amp;diff=132711"/>
				<updated>2018-06-06T05:47:53Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* softMC - Multi-axis motion control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&lt;br /&gt;
= softMC - Multi-axis motion control =&lt;br /&gt;
&lt;br /&gt;
{|style=&amp;quot;text-align: center ;&amp;quot;width: 10px;&amp;quot; &amp;quot;align=&amp;quot;center&amp;quot;&lt;br /&gt;
|[[File:SERmoc HiRes.jpg|center|100px]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:703.PNG| center|100px]]&lt;br /&gt;
|&lt;br /&gt;
|[[File:MC-Exx-702-0000_1.jpg|center|100px]]&lt;br /&gt;
|-&lt;br /&gt;
|'''softMC 3 - Compact Motion controller''' &amp;lt;br&amp;gt; The smallest motion controller in its performance class, supports 1 to 6 axes of synchronized, coordinated motion with EtherCAT or CANopen communication ||style=&amp;quot;width: 7em;&amp;quot;| &lt;br /&gt;
|'''softMC 703 - Multi Axis Motion Controller''' &amp;lt;br&amp;gt; Compact multi-axis control software and hardware package, that supports 1 to 64 axes with EtherCAT communication, for a variety of automation and robotics applications||style=&amp;quot;width: 7em;&amp;quot;|&lt;br /&gt;
|'''softMC 702 - Multi Axis Motion Controller''' &amp;lt;br&amp;gt; Multi-axis motion control software and hardware package, that supports 1 to 64 axes with EtherCAT and CANopen communication, for a variety of automation and robotics applications||style=&amp;quot;width: 60em;&amp;quot;| &lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
Multi axis motion control software and hardware package, offering extensive programming capabilities that have been successfully implemented in a variety of automation and robotic applications. softMC is designed to seamlessly integrate with Servotronix’s servo and stepper drive-motor systems to provide a complete motion solution in a cost effective package.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Open, modular, and modern machine control environment'''&lt;br /&gt;
* '''Linux operating system with real-time extensions'''&lt;br /&gt;
* '''Ethernet machine interface'''&lt;br /&gt;
* '''Support for EtherCAT® and CANopen® motion buses'''&lt;br /&gt;
* '''Controls up to 64 interpolated axes'''&lt;br /&gt;
* '''Extensive capabilities for both standard and non-standard robotic kinematics'''&lt;br /&gt;
* '''Rich programming language that allows complete flexibility to create motion programs, with support for pre-emptive multi-tasking and asynchronous event response'''&lt;br /&gt;
* '''Support IEC 61131 PLCopen wwith CODESYS'''&lt;br /&gt;
* '''Customized software solution can be embedded into the customer‘s hardware'''&lt;br /&gt;
&lt;br /&gt;
= Highlight of Recent Changes/Additions (3 months) =&lt;br /&gt;
 &amp;lt;!-- Mirko owner --&amp;gt;&lt;br /&gt;
* [[Getting_Started_with_MC-Basic_and_ControlStudio|Getting Started with MC-Basic and ControlStudio - '''new''']]&lt;br /&gt;
* [[:Category:MC-Basic:Commands | Lot of commands/properties now available in Chinese!]]&lt;br /&gt;
* [[MC-Basic:WITHGLOBAL | WITHGLOBAL - '''new''']]&lt;br /&gt;
* [[Work_Space_Limits | Workspace limits - '''new''']]&lt;br /&gt;
* [[Program_Examples:force_sensor | Program_Examples:force_sensor - '''new''']]&lt;br /&gt;
* [[Program Examples: PIPEMODE library and motion commands| Program_Examples: PIPEMODE_library_and_motion_commands- '''new''']]&lt;br /&gt;
* [[MC-Basic:element.STOPTYPE| Explanation of different StopType's given ]]&lt;br /&gt;
* [[MC-Basic:element.PROFILERTYPE| Explanation of different motion profiles given ]]&lt;br /&gt;
* [[Motion_Project_Example:_Cartesian_Robot | Full example for a cartesian robot (configurator + Control Studio]]&lt;br /&gt;
* [[Motion_Project_Example:_Single_Axis_With_CDHD|  Single Axis With CDHD project - complete example (configurator + Control Studio]]&lt;br /&gt;
* [[Modbus_Communication_API | Modbus - MB Requred files '''updated''']]&lt;br /&gt;
* [[Inverse_Dynamic_Model | Inverse_Dynamic_Model- '''new''' ]]&lt;br /&gt;
* [[Motion_Project_Example:_Scara_Robot_simulated | Motion_Project_Example:_Scara_Robot_simulated - '''new''']]&lt;br /&gt;
* [[WorkSpace_areas | Work-Space areas - '''new''']]&lt;br /&gt;
* [[Program_Examples:_WorkSpace_areas | Work-Space areas '''example - new''']]&lt;br /&gt;
&lt;br /&gt;
=Contact=&lt;br /&gt;
==Global Headquarters==&lt;br /&gt;
Servotronix Motion Control Ltd. 21C Yagia Kapayim Street, P.O.B. 3919 Petach Tikva 49130, Israel&amp;lt;br/&amp;gt; &lt;br /&gt;
Tel: +97239273800 &amp;lt;br/&amp;gt;&lt;br /&gt;
Fax: +97239228075 &amp;lt;br/&amp;gt;&lt;br /&gt;
info@servotronix.com &amp;lt;br/&amp;gt;&lt;br /&gt;
Website: www.servotronix.com &amp;lt;br/&amp;gt;&lt;br /&gt;
Technical support: tech.support@servotronix.com&lt;br /&gt;
&lt;br /&gt;
== China ==&lt;br /&gt;
Servotronix Motion Technology Development (Shenzhen) Ltd. &amp;lt;br/&amp;gt;&lt;br /&gt;
Room 202, Building A1, Kexing Science Park, No.15 Keyuan Road, Nanshan District, Shenzhen 518057, China&amp;lt;br/&amp;gt; &lt;br /&gt;
Tel: +8675586626603 &amp;lt;br/&amp;gt;&lt;br /&gt;
Fax: +8675586626665 &amp;lt;br/&amp;gt;&lt;br /&gt;
info_china@servotronix.com &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Europe==&lt;br /&gt;
Servotronix GmbH Dülkener Straße 5 D-41334 Nettetal, Germany &amp;lt;br/&amp;gt;&lt;br /&gt;
Tel: +4921531398586&lt;br /&gt;
&lt;br /&gt;
==Korea==&lt;br /&gt;
Servotronix Motion Control Korea&amp;lt;br&amp;gt;&lt;br /&gt;
IS BIZ Tower #1315, 57-1 Heungan-daero 427beon-gil&amp;lt;br&amp;gt;&lt;br /&gt;
Dongan-gu,Anyang-si,Gyeonggi-do (14059) South Korea&amp;lt;br&amp;gt;&lt;br /&gt;
whangsoon.joo@servotronix.com&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=File:scara.zip&amp;diff=132679</id>
		<title>File:scara.zip</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=File:scara.zip&amp;diff=132679"/>
				<updated>2018-05-16T07:15:37Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: Itay uploaded a new version of &amp;amp;quot;File:scara.zip&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132677</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132677"/>
				<updated>2018-05-13T07:59:56Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|Program_Examples:_WorkSpace_areas}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset:#ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; &amp;quot;&amp;gt;&lt;br /&gt;
[[Image:TOP2.png|50px|link=#top]] &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;br /&gt;
{{Note|For more information about WorkSpace area definitions, and what the XML file contains please refer to [[WorkSpace areas]] page.}}&lt;br /&gt;
=Steps=&lt;br /&gt;
==Step 1==&lt;br /&gt;
Make sure that the relevant XML file is within your project folder. &amp;lt;br&amp;gt; &lt;br /&gt;
The XML file should be in this structure: &lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;2&amp;quot; name = &amp;quot;First_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;-50&amp;quot; y=&amp;quot;350&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;1&amp;quot; x=&amp;quot;100&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;3&amp;quot; name = &amp;quot;Second_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;-50&amp;quot; y=&amp;quot;-450&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;1&amp;quot; x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Step 2==&lt;br /&gt;
After XML created and located at project folder, send the following commands from CS terminal: &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;syntaxhighlight lang=freebasic&amp;gt;&lt;br /&gt;
--&amp;gt; SEND SCARAEX.XML        ' Need to get &amp;quot;done&amp;quot; message back&lt;br /&gt;
--&amp;gt; Reset all&lt;br /&gt;
--&amp;gt; load STARTPRG.PRG&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Now your system is ready to use WorkSpaces setting as you create in the XML file.'''&lt;br /&gt;
&lt;br /&gt;
==Step 3==&lt;br /&gt;
Create task for your robot, under WorkSpaces limitations, for example: &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=freebasic&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dim shared  lFlag  as long&lt;br /&gt;
&lt;br /&gt;
program&lt;br /&gt;
&lt;br /&gt;
	dim 		lLoadXMLSeting 			        as long &lt;br /&gt;
	dim 		lRobotID 				as long = scara1.ElementID&lt;br /&gt;
	dim 		NumWSPC					as long &lt;br /&gt;
	dim 		lTemp					as long&lt;br /&gt;
	dim 		lSecTemp				as long&lt;br /&gt;
	dim 		locTempExLocation 		        as generic location&lt;br /&gt;
	dim 		locTempEnLocation		        as generic location&lt;br /&gt;
	dim 		locExCurr				as location of XYZR	&lt;br /&gt;
	dim 		locEnCurr				as location of XYZR	&lt;br /&gt;
&lt;br /&gt;
	withglobal scara1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		print RobotSetup&lt;br /&gt;
		attach&lt;br /&gt;
		pemax = 10&lt;br /&gt;
		&lt;br /&gt;
		lLoadXMLSeting = WSPC_PARSE_XML(lRobotID, &amp;quot;SCARAEX.XML&amp;quot;)&lt;br /&gt;
		NumWSPC = WSPC_GET_NUM(lRobotID)&lt;br /&gt;
	&lt;br /&gt;
		if NOT lLoadXMLSeting then&lt;br /&gt;
			print &amp;quot;WorkSpace definitions completed&amp;quot;&lt;br /&gt;
		end if 			'if there is an error - MC will throw it's message &lt;br /&gt;
		&lt;br /&gt;
		print str$(NumWSPC) + &amp;quot; WSPC defined&amp;quot;&lt;br /&gt;
		&lt;br /&gt;
		lTemp = WSPC_ACTIVATE_ALL(lRobotID)&lt;br /&gt;
		if NOT lTemp then&lt;br /&gt;
			print &amp;quot;All WSPC are activate&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			print &amp;quot;Failed to activate all WSPC&amp;quot;&lt;br /&gt;
		end if&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 1, 2, locTempExLocation)&lt;br /&gt;
		print EntrySet(lRobotID, 2, 1, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 2, 3, locTempExLocation)		&lt;br /&gt;
		print EntrySet(lRobotID, 3, 2, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 3, 1, locTempExLocation)		&lt;br /&gt;
		print EntrySet(lRobotID, 1, 3, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		try&lt;br /&gt;
			moves #{450, 300, 0,0}&lt;br /&gt;
		catch else&lt;br /&gt;
			print &amp;quot;Can't reach a point that is not defined within WorkSpace&amp;quot;&lt;br /&gt;
		end try &lt;br /&gt;
		&lt;br /&gt;
		&lt;br /&gt;
		sleep 10&lt;br /&gt;
		lTemp = WSPC_DEACTIVATE_ALL(lRobotID)&lt;br /&gt;
		if NOT lTemp then&lt;br /&gt;
			print &amp;quot;All WSPC deactivate&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			print &amp;quot;Failed to deactivate all WSPC&amp;quot;&lt;br /&gt;
		end if		&lt;br /&gt;
						&lt;br /&gt;
		detach&lt;br /&gt;
	&lt;br /&gt;
end program &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function ExitSet (byval lRobotID as long, byval WSPCFrom as long, byval WSPCTo as long, exit_loc as generic location) as string&lt;br /&gt;
	dim lTemp as long&lt;br /&gt;
	&lt;br /&gt;
	lTemp = WSPC_FIND_EXIT(lRobotID, WSPCFrom, WSPCTo, exit_loc)&lt;br /&gt;
	if NOT lTemp then&lt;br /&gt;
		ExitSet =  &amp;quot;exit point location setup succeeded&amp;quot;&lt;br /&gt;
		lFlag = 1 &lt;br /&gt;
	else&lt;br /&gt;
		ExitSet = &amp;quot;exit point location setup failed&amp;quot;&lt;br /&gt;
		lFlag = 0&lt;br /&gt;
	end if	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function EntrySet (byval lRobotID as long, byval WSPCTo as long, byval WSPCFrom as long, entry_loc as generic location) as string&lt;br /&gt;
	dim lTemp as long &lt;br /&gt;
	&lt;br /&gt;
	lTemp = WSPC_FIND_ENTRY(lRobotID, WSPCTo, WSPCFrom, entry_loc)&lt;br /&gt;
	if NOT lTemp then&lt;br /&gt;
		entrySet =  &amp;quot;entry point location setup succeeded&amp;quot;&lt;br /&gt;
		lFlag = 1 &lt;br /&gt;
	else&lt;br /&gt;
		entrySet = &amp;quot;entry point location setup failed&amp;quot;&lt;br /&gt;
		lFlag = 0&lt;br /&gt;
	end if	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function RobotMovesFromWSPCto(byval lMotFlag as long, exit_Loc as generic location, entry_Loc as generic location) as string&lt;br /&gt;
	try&lt;br /&gt;
		if lMotFlag then&lt;br /&gt;
			En = 1&lt;br /&gt;
			moves exit_Loc vcruise = 5&lt;br /&gt;
			while IsMoving &amp;lt;&amp;gt;0 &lt;br /&gt;
				sleep 1&lt;br /&gt;
			end while&lt;br /&gt;
				&lt;br /&gt;
			moves entry_Loc vcruise = 5&lt;br /&gt;
			while IsMoving &amp;lt;&amp;gt;0 &lt;br /&gt;
					sleep 1&lt;br /&gt;
			end while&lt;br /&gt;
			en = 0&lt;br /&gt;
			RobotMovesFromWSPCto = &amp;quot;movement completed&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			RobotMovesFromWSPCto = &amp;quot;can't execute movement&amp;quot;&lt;br /&gt;
		end if&lt;br /&gt;
		&lt;br /&gt;
	catch else&lt;br /&gt;
		RobotMovesFromWSPCto = &amp;quot;can't execute movement&amp;quot;&lt;br /&gt;
	end try&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
function CurrectLoc(old_Loc as generic location, new_Loc as generic location) as long&lt;br /&gt;
	dim i as long&lt;br /&gt;
	&lt;br /&gt;
	for i = 1 to 3&lt;br /&gt;
		new_Loc{i} = old_loc{i}&lt;br /&gt;
	next&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function RobotSetup as string&lt;br /&gt;
	dim i as long&lt;br /&gt;
	dim genAxis as generic axis&lt;br /&gt;
		for i = 1 to 4 &lt;br /&gt;
		genAxis = SystemAxis(i)&lt;br /&gt;
		attach genAxis&lt;br /&gt;
		genAxis.pemax = 10&lt;br /&gt;
		genAxis.en = 1&lt;br /&gt;
		move genAxis 0 abs = 1 vcruise = 50&lt;br /&gt;
		while genAxis.ismoving&amp;lt;&amp;gt; 0&lt;br /&gt;
			sleep 1&lt;br /&gt;
		end while&lt;br /&gt;
		genAxis.en = 0&lt;br /&gt;
		detach genAxis&lt;br /&gt;
		&lt;br /&gt;
	next&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	RobotSetup = &amp;quot;Setup Done&amp;quot; 	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132676</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132676"/>
				<updated>2018-05-13T07:57:06Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;br /&gt;
{{Note|For more information about WorkSpace area definitions, and what the XML file contains please refer to [[WorkSpace areas]] page.}}&lt;br /&gt;
=Steps=&lt;br /&gt;
==Step 1==&lt;br /&gt;
Make sure that the relevant XML file is within your project folder. &amp;lt;br&amp;gt; &lt;br /&gt;
The XML file should be in this structure: &lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;2&amp;quot; name = &amp;quot;First_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;-50&amp;quot; y=&amp;quot;350&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;1&amp;quot; x=&amp;quot;100&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;3&amp;quot; name = &amp;quot;Second_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;-50&amp;quot; y=&amp;quot;-450&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;1&amp;quot; x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Step 2==&lt;br /&gt;
After XML created and located at project folder, send the following commands from CS terminal: &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;syntaxhighlight lang=freebasic&amp;gt;&lt;br /&gt;
--&amp;gt; SEND SCARAEX.XML        ' Need to get &amp;quot;done&amp;quot; message back&lt;br /&gt;
--&amp;gt; Reset all&lt;br /&gt;
--&amp;gt; load STARTPRG.PRG&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Now your system is ready to use WorkSpaces setting as you create in the XML file.'''&lt;br /&gt;
&lt;br /&gt;
==Step 3==&lt;br /&gt;
Create task for your robot, under WorkSpaces limitations, for example: &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=freebasic&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dim shared  lFlag  as long&lt;br /&gt;
&lt;br /&gt;
program&lt;br /&gt;
&lt;br /&gt;
	dim 		lLoadXMLSeting 			        as long &lt;br /&gt;
	dim 		lRobotID 				as long = scara1.ElementID&lt;br /&gt;
	dim 		NumWSPC					as long &lt;br /&gt;
	dim 		lTemp					as long&lt;br /&gt;
	dim 		lSecTemp				as long&lt;br /&gt;
	dim 		locTempExLocation 		        as generic location&lt;br /&gt;
	dim 		locTempEnLocation		        as generic location&lt;br /&gt;
	dim 		locExCurr				as location of XYZR	&lt;br /&gt;
	dim 		locEnCurr				as location of XYZR	&lt;br /&gt;
&lt;br /&gt;
	withglobal scara1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		print RobotSetup&lt;br /&gt;
		attach&lt;br /&gt;
		pemax = 10&lt;br /&gt;
		&lt;br /&gt;
		lLoadXMLSeting = WSPC_PARSE_XML(lRobotID, &amp;quot;SCARAEX.XML&amp;quot;)&lt;br /&gt;
		NumWSPC = WSPC_GET_NUM(lRobotID)&lt;br /&gt;
	&lt;br /&gt;
		if NOT lLoadXMLSeting then&lt;br /&gt;
			print &amp;quot;WorkSpace definitions completed&amp;quot;&lt;br /&gt;
		end if 			'if there is an error - MC will throw it's message &lt;br /&gt;
		&lt;br /&gt;
		print str$(NumWSPC) + &amp;quot; WSPC defined&amp;quot;&lt;br /&gt;
		&lt;br /&gt;
		lTemp = WSPC_ACTIVATE_ALL(lRobotID)&lt;br /&gt;
		if NOT lTemp then&lt;br /&gt;
			print &amp;quot;All WSPC are activate&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			print &amp;quot;Failed to activate all WSPC&amp;quot;&lt;br /&gt;
		end if&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 1, 2, locTempExLocation)&lt;br /&gt;
		print EntrySet(lRobotID, 2, 1, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 2, 3, locTempExLocation)		&lt;br /&gt;
		print EntrySet(lRobotID, 3, 2, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 3, 1, locTempExLocation)		&lt;br /&gt;
		print EntrySet(lRobotID, 1, 3, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		try&lt;br /&gt;
			moves #{450, 300, 0,0}&lt;br /&gt;
		catch else&lt;br /&gt;
			print &amp;quot;Can't reach a point that is not defined within WorkSpace&amp;quot;&lt;br /&gt;
		end try &lt;br /&gt;
		&lt;br /&gt;
		&lt;br /&gt;
		sleep 10&lt;br /&gt;
		lTemp = WSPC_DEACTIVATE_ALL(lRobotID)&lt;br /&gt;
		if NOT lTemp then&lt;br /&gt;
			print &amp;quot;All WSPC deactivate&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			print &amp;quot;Failed to deactivate all WSPC&amp;quot;&lt;br /&gt;
		end if		&lt;br /&gt;
						&lt;br /&gt;
		detach&lt;br /&gt;
	&lt;br /&gt;
end program &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function ExitSet (byval lRobotID as long, byval WSPCFrom as long, byval WSPCTo as long, exit_loc as generic location) as string&lt;br /&gt;
	dim lTemp as long&lt;br /&gt;
	&lt;br /&gt;
	lTemp = WSPC_FIND_EXIT(lRobotID, WSPCFrom, WSPCTo, exit_loc)&lt;br /&gt;
	if NOT lTemp then&lt;br /&gt;
		ExitSet =  &amp;quot;exit point location setup succeeded&amp;quot;&lt;br /&gt;
		lFlag = 1 &lt;br /&gt;
	else&lt;br /&gt;
		ExitSet = &amp;quot;exit point location setup failed&amp;quot;&lt;br /&gt;
		lFlag = 0&lt;br /&gt;
	end if	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function EntrySet (byval lRobotID as long, byval WSPCTo as long, byval WSPCFrom as long, entry_loc as generic location) as string&lt;br /&gt;
	dim lTemp as long &lt;br /&gt;
	&lt;br /&gt;
	lTemp = WSPC_FIND_ENTRY(lRobotID, WSPCTo, WSPCFrom, entry_loc)&lt;br /&gt;
	if NOT lTemp then&lt;br /&gt;
		entrySet =  &amp;quot;entry point location setup succeeded&amp;quot;&lt;br /&gt;
		lFlag = 1 &lt;br /&gt;
	else&lt;br /&gt;
		entrySet = &amp;quot;entry point location setup failed&amp;quot;&lt;br /&gt;
		lFlag = 0&lt;br /&gt;
	end if	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function RobotMovesFromWSPCto(byval lMotFlag as long, exit_Loc as generic location, entry_Loc as generic location) as string&lt;br /&gt;
	try&lt;br /&gt;
		if lMotFlag then&lt;br /&gt;
			En = 1&lt;br /&gt;
			moves exit_Loc vcruise = 5&lt;br /&gt;
			while IsMoving &amp;lt;&amp;gt;0 &lt;br /&gt;
				sleep 1&lt;br /&gt;
			end while&lt;br /&gt;
				&lt;br /&gt;
			moves entry_Loc vcruise = 5&lt;br /&gt;
			while IsMoving &amp;lt;&amp;gt;0 &lt;br /&gt;
					sleep 1&lt;br /&gt;
			end while&lt;br /&gt;
			en = 0&lt;br /&gt;
			RobotMovesFromWSPCto = &amp;quot;movement completed&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			RobotMovesFromWSPCto = &amp;quot;can't execute movement&amp;quot;&lt;br /&gt;
		end if&lt;br /&gt;
		&lt;br /&gt;
	catch else&lt;br /&gt;
		RobotMovesFromWSPCto = &amp;quot;can't execute movement&amp;quot;&lt;br /&gt;
	end try&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
function CurrectLoc(old_Loc as generic location, new_Loc as generic location) as long&lt;br /&gt;
	dim i as long&lt;br /&gt;
	&lt;br /&gt;
	for i = 1 to 3&lt;br /&gt;
		new_Loc{i} = old_loc{i}&lt;br /&gt;
	next&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function RobotSetup as string&lt;br /&gt;
	dim i as long&lt;br /&gt;
	dim genAxis as generic axis&lt;br /&gt;
		for i = 1 to 4 &lt;br /&gt;
		genAxis = SystemAxis(i)&lt;br /&gt;
		attach genAxis&lt;br /&gt;
		genAxis.pemax = 10&lt;br /&gt;
		genAxis.en = 1&lt;br /&gt;
		move genAxis 0 abs = 1 vcruise = 50&lt;br /&gt;
		while genAxis.ismoving&amp;lt;&amp;gt; 0&lt;br /&gt;
			sleep 1&lt;br /&gt;
		end while&lt;br /&gt;
		genAxis.en = 0&lt;br /&gt;
		detach genAxis&lt;br /&gt;
		&lt;br /&gt;
	next&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	RobotSetup = &amp;quot;Setup Done&amp;quot; 	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132675</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132675"/>
				<updated>2018-05-13T07:56:16Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Steps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;br /&gt;
=Steps=&lt;br /&gt;
==Step 1==&lt;br /&gt;
Make sure that the relevant XML file is within your project folder. &amp;lt;br&amp;gt; &lt;br /&gt;
For more information about WorkSpace area definitions, and what the XML file contains please refer to [[WorkSpace areas]] page. &amp;lt;br&amp;gt;&lt;br /&gt;
The XML file should be in this structure: &lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;2&amp;quot; name = &amp;quot;First_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;-50&amp;quot; y=&amp;quot;350&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;1&amp;quot; x=&amp;quot;100&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;3&amp;quot; name = &amp;quot;Second_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;-50&amp;quot; y=&amp;quot;-450&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;1&amp;quot; x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==Step 2==&lt;br /&gt;
After XML created and located at project folder, send the following commands from CS terminal: &amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;syntaxhighlight lang=freebasic&amp;gt;&lt;br /&gt;
--&amp;gt; SEND SCARAEX.XML        ' Need to get &amp;quot;done&amp;quot; message back&lt;br /&gt;
--&amp;gt; Reset all&lt;br /&gt;
--&amp;gt; load STARTPRG.PRG&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Now your system is ready to use WorkSpaces setting as you create in the XML file.'''&lt;br /&gt;
&lt;br /&gt;
==Step 3==&lt;br /&gt;
Create task for your robot, under WorkSpaces limitations, for example: &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=freebasic&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
dim shared  lFlag  as long&lt;br /&gt;
&lt;br /&gt;
program&lt;br /&gt;
&lt;br /&gt;
	dim 		lLoadXMLSeting 			        as long &lt;br /&gt;
	dim 		lRobotID 				as long = scara1.ElementID&lt;br /&gt;
	dim 		NumWSPC					as long &lt;br /&gt;
	dim 		lTemp					as long&lt;br /&gt;
	dim 		lSecTemp				as long&lt;br /&gt;
	dim 		locTempExLocation 		        as generic location&lt;br /&gt;
	dim 		locTempEnLocation		        as generic location&lt;br /&gt;
	dim 		locExCurr				as location of XYZR	&lt;br /&gt;
	dim 		locEnCurr				as location of XYZR	&lt;br /&gt;
&lt;br /&gt;
	withglobal scara1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		print RobotSetup&lt;br /&gt;
		attach&lt;br /&gt;
		pemax = 10&lt;br /&gt;
		&lt;br /&gt;
		lLoadXMLSeting = WSPC_PARSE_XML(lRobotID, &amp;quot;SCARAEX.XML&amp;quot;)&lt;br /&gt;
		NumWSPC = WSPC_GET_NUM(lRobotID)&lt;br /&gt;
	&lt;br /&gt;
		if NOT lLoadXMLSeting then&lt;br /&gt;
			print &amp;quot;WorkSpace definitions completed&amp;quot;&lt;br /&gt;
		end if 			'if there is an error - MC will throw it's message &lt;br /&gt;
		&lt;br /&gt;
		print str$(NumWSPC) + &amp;quot; WSPC defined&amp;quot;&lt;br /&gt;
		&lt;br /&gt;
		lTemp = WSPC_ACTIVATE_ALL(lRobotID)&lt;br /&gt;
		if NOT lTemp then&lt;br /&gt;
			print &amp;quot;All WSPC are activate&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			print &amp;quot;Failed to activate all WSPC&amp;quot;&lt;br /&gt;
		end if&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 1, 2, locTempExLocation)&lt;br /&gt;
		print EntrySet(lRobotID, 2, 1, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 2, 3, locTempExLocation)		&lt;br /&gt;
		print EntrySet(lRobotID, 3, 2, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		print ExitSet(lRobotID, 3, 1, locTempExLocation)		&lt;br /&gt;
		print EntrySet(lRobotID, 1, 3, locTempEnLocation)&lt;br /&gt;
		lTemp = CurrectLoc(locTempExLocation, locExCurr)&lt;br /&gt;
		lSecTemp = CurrectLoc(locTempEnLocation, locEnCurr)&lt;br /&gt;
		print RobotMovesFromWSPCto (lFlag, locExCurr, locEnCurr)&lt;br /&gt;
		&lt;br /&gt;
		try&lt;br /&gt;
			moves #{450, 300, 0,0}&lt;br /&gt;
		catch else&lt;br /&gt;
			print &amp;quot;Can't reach a point that is not defined within WorkSpace&amp;quot;&lt;br /&gt;
		end try &lt;br /&gt;
		&lt;br /&gt;
		&lt;br /&gt;
		sleep 10&lt;br /&gt;
		lTemp = WSPC_DEACTIVATE_ALL(lRobotID)&lt;br /&gt;
		if NOT lTemp then&lt;br /&gt;
			print &amp;quot;All WSPC deactivate&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			print &amp;quot;Failed to deactivate all WSPC&amp;quot;&lt;br /&gt;
		end if		&lt;br /&gt;
						&lt;br /&gt;
		detach&lt;br /&gt;
	&lt;br /&gt;
end program &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function ExitSet (byval lRobotID as long, byval WSPCFrom as long, byval WSPCTo as long, exit_loc as generic location) as string&lt;br /&gt;
	dim lTemp as long&lt;br /&gt;
	&lt;br /&gt;
	lTemp = WSPC_FIND_EXIT(lRobotID, WSPCFrom, WSPCTo, exit_loc)&lt;br /&gt;
	if NOT lTemp then&lt;br /&gt;
		ExitSet =  &amp;quot;exit point location setup succeeded&amp;quot;&lt;br /&gt;
		lFlag = 1 &lt;br /&gt;
	else&lt;br /&gt;
		ExitSet = &amp;quot;exit point location setup failed&amp;quot;&lt;br /&gt;
		lFlag = 0&lt;br /&gt;
	end if	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function EntrySet (byval lRobotID as long, byval WSPCTo as long, byval WSPCFrom as long, entry_loc as generic location) as string&lt;br /&gt;
	dim lTemp as long &lt;br /&gt;
	&lt;br /&gt;
	lTemp = WSPC_FIND_ENTRY(lRobotID, WSPCTo, WSPCFrom, entry_loc)&lt;br /&gt;
	if NOT lTemp then&lt;br /&gt;
		entrySet =  &amp;quot;entry point location setup succeeded&amp;quot;&lt;br /&gt;
		lFlag = 1 &lt;br /&gt;
	else&lt;br /&gt;
		entrySet = &amp;quot;entry point location setup failed&amp;quot;&lt;br /&gt;
		lFlag = 0&lt;br /&gt;
	end if	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function RobotMovesFromWSPCto(byval lMotFlag as long, exit_Loc as generic location, entry_Loc as generic location) as string&lt;br /&gt;
	try&lt;br /&gt;
		if lMotFlag then&lt;br /&gt;
			En = 1&lt;br /&gt;
			moves exit_Loc vcruise = 5&lt;br /&gt;
			while IsMoving &amp;lt;&amp;gt;0 &lt;br /&gt;
				sleep 1&lt;br /&gt;
			end while&lt;br /&gt;
				&lt;br /&gt;
			moves entry_Loc vcruise = 5&lt;br /&gt;
			while IsMoving &amp;lt;&amp;gt;0 &lt;br /&gt;
					sleep 1&lt;br /&gt;
			end while&lt;br /&gt;
			en = 0&lt;br /&gt;
			RobotMovesFromWSPCto = &amp;quot;movement completed&amp;quot;&lt;br /&gt;
		else&lt;br /&gt;
			RobotMovesFromWSPCto = &amp;quot;can't execute movement&amp;quot;&lt;br /&gt;
		end if&lt;br /&gt;
		&lt;br /&gt;
	catch else&lt;br /&gt;
		RobotMovesFromWSPCto = &amp;quot;can't execute movement&amp;quot;&lt;br /&gt;
	end try&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
function CurrectLoc(old_Loc as generic location, new_Loc as generic location) as long&lt;br /&gt;
	dim i as long&lt;br /&gt;
	&lt;br /&gt;
	for i = 1 to 3&lt;br /&gt;
		new_Loc{i} = old_loc{i}&lt;br /&gt;
	next&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function RobotSetup as string&lt;br /&gt;
	dim i as long&lt;br /&gt;
	dim genAxis as generic axis&lt;br /&gt;
		for i = 1 to 4 &lt;br /&gt;
		genAxis = SystemAxis(i)&lt;br /&gt;
		attach genAxis&lt;br /&gt;
		genAxis.pemax = 10&lt;br /&gt;
		genAxis.en = 1&lt;br /&gt;
		move genAxis 0 abs = 1 vcruise = 50&lt;br /&gt;
		while genAxis.ismoving&amp;lt;&amp;gt; 0&lt;br /&gt;
			sleep 1&lt;br /&gt;
		end while&lt;br /&gt;
		genAxis.en = 0&lt;br /&gt;
		detach genAxis&lt;br /&gt;
		&lt;br /&gt;
	next&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	RobotSetup = &amp;quot;Setup Done&amp;quot; 	&lt;br /&gt;
&lt;br /&gt;
end function&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132674</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132674"/>
				<updated>2018-05-13T05:53:28Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;br /&gt;
=Steps=&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=WorkSpace_areas&amp;diff=132673</id>
		<title>WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=WorkSpace_areas&amp;diff=132673"/>
				<updated>2018-05-13T05:29:16Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: Created page with &amp;quot;{{Languages}} &amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt; &amp;lt;span style=&amp;quot;color:blu...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages|WorkSpace_areas}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset:#ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; &amp;quot;&amp;gt;&lt;br /&gt;
[[Image:TOP2.png|50px|link=#top]] &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Functions=&lt;br /&gt;
{{Note | '''''RobotId''''' is a long value, which sets using ''&amp;lt;element&amp;gt;.ElementID'' query}}&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;&lt;br /&gt;
|'''Function Name'''&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Return Value'''&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_PARSE_XML(byval RobotId as long, XML file as string) as long &lt;br /&gt;
|Get workSpaces setting as defined by user. &lt;br /&gt;
| 0 - Execution succeeded  &amp;lt;br&amp;gt; MC error number - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_NUM (byval RobotId as long) as long&lt;br /&gt;
|Return how many WorkSpaces defined for each robot.&lt;br /&gt;
|Number of Workspaces - long format&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE_ALL(byval RobotId as long) as long &lt;br /&gt;
|Activate all WorkSpaces which exist in the system.&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE_ALL(byval RobotId as long) as long&lt;br /&gt;
|Deactivate all WorkSpaces which exist in the system.&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE(byval RobotId as long, byval workspace_number as long) as long&lt;br /&gt;
|Activate specific WorkSpace&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE(byval RobotId as long, byval workspace_number as long) as long &lt;br /&gt;
|Dectivate specific WorkSpace&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_INDEX(byval RobotId as long) as long &lt;br /&gt;
|Return WorkSpace indexs which the robot within&lt;br /&gt;
|BIN format - as Workspaces indexs&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_ENTRY(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, entry_loc as generic location) as long&lt;br /&gt;
|Defined entry location according to currnet Workspaces and the linked Workspaces&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_EXIT(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, exit_loc as generic location) as long&lt;br /&gt;
|Defined exit location according to currnet WSPC and the linked WSPC&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Motion_Control&amp;diff=132672</id>
		<title>Motion Control</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Motion_Control&amp;diff=132672"/>
				<updated>2018-05-13T05:28:23Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Group and Robot Motion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset:#ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; &amp;quot;&amp;gt;&lt;br /&gt;
[[Image:TOP2.png|50px|link=#top]] &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==General==&lt;br /&gt;
* [[Basic Motion Elements|Basic Motion Elements]] (axis, groups, general) [[#top]] &lt;br /&gt;
* [[Motion Commands Reference List|Motion Commands and Properties]] (arranged by topic)&lt;br /&gt;
* [[Motion Blending|Motion Blending]]&lt;br /&gt;
* [[Concatenation of Movements|Concatenation of Movements]]&lt;br /&gt;
* [[Time Based Profile (Trapezoidal Acceleration)|Time Based Profile]]&lt;br /&gt;
* [[Feedback Control Loops|Feedback Control Loops]]&lt;br /&gt;
* [[PIPEMODE| PIPEMODE]]&lt;br /&gt;
* [[Limit Switch feature |Limit Switch feature]] &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configurator ==&lt;br /&gt;
You can find softMC configurator manual [[softMC Configurator|here]]&lt;br /&gt;
&lt;br /&gt;
== Single Axis Motion ==&lt;br /&gt;
* [[Single_Axis_Motion|Single Axis Motion Overview]]&lt;br /&gt;
* [[OperationalModes|Operational Modes]]&lt;br /&gt;
* [[Error Compensation|Error Compensation]]&lt;br /&gt;
* [[Master-Slave Connection|Master-Slave Connection]] (camming, gearing)&lt;br /&gt;
** [[Gantry Issues|Gantry]]&lt;br /&gt;
** [[Phaser|Phaser]]&lt;br /&gt;
* [[PLS_Software_Specification|PLS]]&lt;br /&gt;
* [[Endless Axes|Endless Axes]]&lt;br /&gt;
* [[Compensation Table|Compensation Table]]&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Group and Robot Motion==&lt;br /&gt;
* [[Multi-Axis Kinematics|Multi-Axis Kinematics]] (general introduction to multi-axis synchronization)&lt;br /&gt;
* [[Robot Kinematics Models|Robot Kinematic Models]]&lt;br /&gt;
** [[SCARA_robot|SCARA]]&lt;br /&gt;
** [[DELTA_robot|DELTA]]&lt;br /&gt;
** [[TARM_robot|TARM]]&lt;br /&gt;
** [[PUMA_robot|PUMA]]&lt;br /&gt;
** [[Galileo Sphere Robot (GSR) Kinematics|GSR]]&lt;br /&gt;
** [[Palletizing_Robot |Palletizing Robot]]&lt;br /&gt;
** [[Universal_DH | Universal DH]]&lt;br /&gt;
* [[Conveyor Tracking Short|Conveyor Tracking]]&lt;br /&gt;
* [[Motion Dynamics|Motion Dynamics]] &amp;lt;!-- - Computation of joint torques based on dynamic models --&amp;gt;&lt;br /&gt;
* [[Robot_Working_Frames | Working Frames]]&lt;br /&gt;
* [[User_Frame | User Frames]]&lt;br /&gt;
*[[Work Space Limits| WorkSpace Limits]]&lt;br /&gt;
* [[WorkSpace areas|WorkSpace areas]]&lt;br /&gt;
&lt;br /&gt;
==Multiple Element Motion==&lt;br /&gt;
* [[Synchronization|Synchronization]]&lt;br /&gt;
&lt;br /&gt;
==Advanced==&lt;br /&gt;
* [[Inverse Dynamic Model|Inverse Dynamic Model]] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [[FAQ Motion Control|'''FAQs''' - Motion Control]] - Ask the developers a question&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Motion Control]]&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132669</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132669"/>
				<updated>2018-05-10T05:42:19Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* WorkSpace Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset:#ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; &amp;quot;&amp;gt;&lt;br /&gt;
[[Image:TOP2.png|50px|link=#top]] &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Functions=&lt;br /&gt;
{{Note | '''''RobotId''''' is a long value, which sets using ''&amp;lt;element&amp;gt;.ElementID'' query}}&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;&lt;br /&gt;
|'''Function Name'''&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Return Value'''&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_PARSE_XML(byval RobotId as long, XML file as string) as long &lt;br /&gt;
|Get workSpaces setting as defined by user. &lt;br /&gt;
| 0 - Execution succeeded  &amp;lt;br&amp;gt; MC error number - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_NUM (byval RobotId as long) as long&lt;br /&gt;
|Return how many WorkSpaces defined for each robot.&lt;br /&gt;
|Number of Workspaces - long format&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE_ALL(byval RobotId as long) as long &lt;br /&gt;
|Activate all WorkSpaces which exist in the system.&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE_ALL(byval RobotId as long) as long&lt;br /&gt;
|Deactivate all WorkSpaces which exist in the system.&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE(byval RobotId as long, byval workspace_number as long) as long&lt;br /&gt;
|Activate specific WorkSpace&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE(byval RobotId as long, byval workspace_number as long) as long &lt;br /&gt;
|Dectivate specific WorkSpace&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_INDEX(byval RobotId as long) as long &lt;br /&gt;
|Return WorkSpace indexs which the robot within&lt;br /&gt;
|BIN format - as Workspaces indexs&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_ENTRY(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, entry_loc as generic location) as long&lt;br /&gt;
|Defined entry location according to currnet Workspaces and the linked Workspaces&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_EXIT(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, exit_loc as generic location) as long&lt;br /&gt;
|Defined exit location according to currnet WSPC and the linked WSPC&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132668</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132668"/>
				<updated>2018-05-10T05:39:25Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* WorkSpace Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset:#ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; &amp;quot;&amp;gt;&lt;br /&gt;
[[Image:TOP2.png|50px|link=#top]] &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Functions=&lt;br /&gt;
{{Note | '''''RobotId''''' is a long value, which sets using ''&amp;lt;element&amp;gt;.ElementID'' query}}&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;&lt;br /&gt;
|'''Function Name'''&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Return Value'''&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_PARSE_XML(byval RobotId as long, XML file as string) as long &lt;br /&gt;
|Get workSpaces setting has defined by the user. &lt;br /&gt;
| 0 - Execution succeeded  &amp;lt;br&amp;gt; MC error number - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_NUM (byval RobotId as long) as long&lt;br /&gt;
|How many WorkSpaces defined for each robot.&lt;br /&gt;
|Number of Workspaces - long format&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE_ALL(byval RobotId as long) as long &lt;br /&gt;
|Activate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE_ALL(byval RobotId as long) as long&lt;br /&gt;
|Deactivate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE(byval RobotId as long, byval workspace_number as long) as long&lt;br /&gt;
| Activate specific WorkSpace&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE(byval RobotId as long, byval workspace_number as long) as long &lt;br /&gt;
|Dectivate specific WorkSpace&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_INDEX(byval RobotId as long) as long &lt;br /&gt;
|return WorkSpace indexs which the robot within &lt;br /&gt;
|BIN format - as Workspaces indexs&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_ENTRY(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, entry_loc as generic location) as long&lt;br /&gt;
|Defined entry location according to currnet Workspaces and the linked Workspaces&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_EXIT(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, exit_loc as generic location) as long&lt;br /&gt;
|Defined exit location according to currnet WSPC and the linked WSPC&lt;br /&gt;
| 0 - Execution succeeded   &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132667</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132667"/>
				<updated>2018-05-10T05:37:59Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* WorkSpace Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset:#ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; &amp;quot;&amp;gt;&lt;br /&gt;
[[Image:TOP2.png|50px|link=#top]] &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Functions=&lt;br /&gt;
{{Note | '''''RobotId''''' is a long value, which sets using ''&amp;lt;element&amp;gt;.ElementID'' query}}&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;&lt;br /&gt;
|'''Function Name'''&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Return Value'''&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_PARSE_XML(byval RobotId as long, XML file as string) as long &lt;br /&gt;
|Get workSpaces setting has defined by the user. &lt;br /&gt;
| 0 - Execution was successful  &amp;lt;br&amp;gt; MC error number - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_NUM (byval RobotId as long) as long&lt;br /&gt;
|How many WorkSpaces defined for each robot.&lt;br /&gt;
|Number of Workspaces - long format&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE_ALL(byval RobotId as long) as long &lt;br /&gt;
|Activate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE_ALL(byval RobotId as long) as long&lt;br /&gt;
|Deactivate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE(byval RobotId as long, byval workspace_number as long) as long&lt;br /&gt;
| Activate specific WorkSpace&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE(byval RobotId as long, byval workspace_number as long) as long &lt;br /&gt;
|Dectivate specific WorkSpace&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_INDEX(byval RobotId as long) as long &lt;br /&gt;
|return WorkSpace indexs which the robot within &lt;br /&gt;
|BIN format - as Workspaces indexs&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_ENTRY(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, entry_loc as generic location) as long&lt;br /&gt;
|Defined entry location according to currnet Workspaces and the linked Workspaces&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_EXIT(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, exit_loc as generic location) as long&lt;br /&gt;
|Defined exit location according to currnet WSPC and the linked WSPC&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132666</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132666"/>
				<updated>2018-05-09T08:57:38Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Languages}}&lt;br /&gt;
&amp;lt;div id=&amp;quot;BackToTop&amp;quot;  class=&amp;quot;noprint&amp;quot; style=&amp;quot;background-color:; position:fixed; bottom:32px; left:95%; z-index:9999; padding:0; margin:0;&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:blue; font-size:8pt; font-face:verdana,sans-serif; border:0.2em outset:#ceebf7; padding:0.1em; font-weight:bolder; -moz-border-radius:8px; &amp;quot;&amp;gt;&lt;br /&gt;
[[Image:TOP2.png|50px|link=#top]] &amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Functions=&lt;br /&gt;
{{Note | '''RobotId''' is a long value, which sets using ''&amp;lt;element&amp;gt;.ElementID'' query}}&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;&lt;br /&gt;
|'''Function Name'''&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Return Value'''&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_PARSE_XML(byval RobotId as long, XML file as string) as long &lt;br /&gt;
|Get workSpaces setting has defined by the user. &lt;br /&gt;
| 0 - Execution was successful  &amp;lt;br&amp;gt; MC error number - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_NUM (byval RobotId as long) as long&lt;br /&gt;
|How many WorkSpaces defined for each robot.&lt;br /&gt;
|Number of Workspaces - long format&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE_ALL(byval RobotId as long) as long &lt;br /&gt;
|Activate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE_ALL(byval RobotId as long) as long&lt;br /&gt;
|Deactivate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE(byval RobotId as long, byval workspace_number as long) as long&lt;br /&gt;
| Activate specific WorkSpace&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE(byval RobotId as long, byval workspace_number as long) as long &lt;br /&gt;
|Dectivate specific WorkSpace&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_INDEX(byval RobotId as long) as long &lt;br /&gt;
|return WorkSpace indexs which the robot within &lt;br /&gt;
|BIN format - as Workspaces indexs&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_ENTRY(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, entry_loc as generic location) as long&lt;br /&gt;
|Defined entry location according to currnet Workspaces and the linked Workspaces&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_EXIT(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, exit_loc as generic location) as long&lt;br /&gt;
|Defined exit location according to currnet WSPC and the linked WSPC&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132665</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132665"/>
				<updated>2018-05-09T08:57:03Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* WorkSpace Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Functions=&lt;br /&gt;
{{Note | '''RobotId''' is a long value, which sets using ''&amp;lt;element&amp;gt;.ElementID'' query}}&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;&lt;br /&gt;
|'''Function Name'''&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Return Value'''&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_PARSE_XML(byval RobotId as long, XML file as string) as long &lt;br /&gt;
|Get workSpaces setting has defined by the user. &lt;br /&gt;
| 0 - Execution was successful  &amp;lt;br&amp;gt; MC error number - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_NUM (byval RobotId as long) as long&lt;br /&gt;
|How many WorkSpaces defined for each robot.&lt;br /&gt;
|Number of Workspaces - long format&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE_ALL(byval RobotId as long) as long &lt;br /&gt;
|Activate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE_ALL(byval RobotId as long) as long&lt;br /&gt;
|Deactivate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE(byval RobotId as long, byval workspace_number as long) as long&lt;br /&gt;
| Activate specific WorkSpace&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE(byval RobotId as long, byval workspace_number as long) as long &lt;br /&gt;
|Dectivate specific WorkSpace&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_INDEX(byval RobotId as long) as long &lt;br /&gt;
|return WorkSpace indexs which the robot within &lt;br /&gt;
|BIN format - as Workspaces indexs&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_ENTRY(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, entry_loc as generic location) as long&lt;br /&gt;
|Defined entry location according to currnet Workspaces and the linked Workspaces&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_EXIT(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, exit_loc as generic location) as long&lt;br /&gt;
|Defined exit location according to currnet WSPC and the linked WSPC&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132664</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132664"/>
				<updated>2018-05-09T08:55:16Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* WorkSpace Functions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Functions=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;&lt;br /&gt;
|'''Function Name'''&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Return Value'''&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_PARSE_XML(byval RobotId as long, XML file as string) as long &lt;br /&gt;
|Get workSpaces setting has defined by the user. &lt;br /&gt;
| 0 - Execution was successful  &amp;lt;br&amp;gt; MC error number - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_NUM (byval RobotId as long) as long&lt;br /&gt;
|How many WorkSpaces defined for each robot.&lt;br /&gt;
|Number of Workspaces - long format&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE_ALL(byval RobotId as long) as long &lt;br /&gt;
|Activate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE_ALL(byval RobotId as long) as long&lt;br /&gt;
|Deactivate all WorkSpaces exist in the system.&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_ACTIVATE(byval RobotId as long, byval workspace_number as long) as long&lt;br /&gt;
| Activate specific WorkSpace&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_DEACTIVATE(byval RobotId as long, byval workspace_number as long) as long &lt;br /&gt;
|Dectivate specific WorkSpace&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_GET_INDEX(byval RobotId as long) as long &lt;br /&gt;
|return WorkSpace indexs which the robot within &lt;br /&gt;
|BIN format - as Workspaces indexs&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_ENTRY(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, entry_loc as generic location) as long&lt;br /&gt;
|Defined entry location according to currnet Workspaces and the linked Workspaces&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|-&lt;br /&gt;
|WSPC_FIND_EXIT(byval RobotId as long, byval workspace_number as long, byval linked_workspace_number as long, exit_loc as generic location) as long&lt;br /&gt;
|Defined exit location according to currnet WSPC and the linked WSPC&lt;br /&gt;
| 0 - Execution was successful &amp;lt;br&amp;gt; 1 - Execution failed&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132663</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132663"/>
				<updated>2018-05-09T08:37:23Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Functions=&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132662</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132662"/>
				<updated>2018-05-09T08:36:22Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132661</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132661"/>
				<updated>2018-05-09T08:35:12Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
{{Note| For more information about WorkSpace functions please refer to WSPC.LIB file, attached to example files in the example section}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132660</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132660"/>
				<updated>2018-05-09T08:34:49Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
{{Note| For more information about WorkSpace function please refer to WSPC.LIB file, attached to example files in the example section}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132659</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132659"/>
				<updated>2018-05-09T08:33:05Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
=Graphic Movement Examples=&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Example=&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: center&amp;quot;&lt;br /&gt;
|'''Description'''&lt;br /&gt;
|'''Download'''&lt;br /&gt;
|-&lt;br /&gt;
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself.&lt;br /&gt;
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/1/16/scara.zip]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
To run WorkSpace example: &lt;br /&gt;
&lt;br /&gt;
# Upload all project files to MC&lt;br /&gt;
# Via CS terminal send the following – “SEND SCARAEX.XML” – NEED TO GET “done” MESSAGE &lt;br /&gt;
# Via CS terminal: “reset all” -&amp;gt; “load startprg.prg” -&amp;gt; “load WSPCONE.PRG” -&amp;gt; “STAS WSPCONE.PRG”&lt;br /&gt;
# Information message should appear  in the Message Log panal.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
The information you should get from WSPCONE.PRG task refer to:&lt;br /&gt;
* loactions definition&lt;br /&gt;
* Movements status&lt;br /&gt;
* WSPC status &lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=File:scara.zip&amp;diff=132658</id>
		<title>File:scara.zip</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=File:scara.zip&amp;diff=132658"/>
				<updated>2018-05-09T08:30:36Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: -&amp;gt; Creation failed: Unsupported filetype!&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132656</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132656"/>
				<updated>2018-05-09T08:25:39Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Initialization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
==Graphic Movement Examples==&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132655</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132655"/>
				<updated>2018-05-09T08:25:24Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: /* Initialization */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
==Graphic Movement Examples==&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;br /&gt;
To upload Workspace setting user have to use WSPC function - '''WSPC_PARSE_XML(Robot ID number as long, XML Name as string)''' &amp;lt;br&amp;gt; &lt;br /&gt;
The XML structure should contain the following: &amp;lt;br&amp;gt;&lt;br /&gt;
* Workspace id number.&lt;br /&gt;
* WorkSpace vertices: O,W,H,L (all with X,Y,Z coordinates in mm)&lt;br /&gt;
* Accuracy radius: R (in mm)&lt;br /&gt;
* Exit Points to other Workspaces: Ex1#w1, … Exk#wk&lt;br /&gt;
* Entry Points from other WorkSpaces: En1#w1, … Enk#wk&lt;br /&gt;
&amp;lt;br&amp;gt; &amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
In this format: &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang='XML'&amp;gt;&lt;br /&gt;
&amp;lt;workspace_set&amp;gt;&lt;br /&gt;
  &amp;lt;workspace number=&amp;quot;1&amp;quot; name = &amp;quot;ToolCenter_pos&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;origin x=&amp;quot;450&amp;quot; y=&amp;quot;-50&amp;quot; z=&amp;quot;-50&amp;quot; yaw=&amp;quot;0&amp;quot; pitch=&amp;quot;0&amp;quot; roll=&amp;quot;0&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;dimensions x=&amp;quot;100&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;100&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;entry_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;3&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/entry_points&amp;gt;&lt;br /&gt;
    &amp;lt;exit_points&amp;gt;&lt;br /&gt;
      &amp;lt;point ws_num=&amp;quot;2&amp;quot; x=&amp;quot;0&amp;quot; y=&amp;quot;100&amp;quot; z=&amp;quot;50&amp;quot;/&amp;gt;&lt;br /&gt;
    &amp;lt;/exit_points&amp;gt;&lt;br /&gt;
    &amp;lt;tolerance radius=&amp;quot;5&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;/workspace&amp;gt;&lt;br /&gt;
&amp;lt;/workspace_set&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	<entry>
		<id>http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132589</id>
		<title>Program Examples: WorkSpace areas</title>
		<link rel="alternate" type="text/html" href="http://softmc.servotronix.com/index.php?title=Program_Examples:_WorkSpace_areas&amp;diff=132589"/>
				<updated>2018-05-03T10:07:27Z</updated>
		
		<summary type="html">&lt;p&gt;Itay: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
This feature limits robot movements inside defined WorkSpaces areas and at specific paths between them. Each WorkSpaces is modeled by users as a rectangular prism in 3D space with entry and exit points, which defined in '''*.XML''' file. &amp;lt;br&amp;gt; &lt;br /&gt;
Robot is considered to be '''inside''' WorkSpaces if its TCP (Tool Center Point) is within the prism and '''outside''' WorkSpaces if its TCP is outside the prism. &amp;lt;br&amp;gt;&lt;br /&gt;
In case user tries to move the robot outside WorkSpaces using unauthorized path an error will raise and motion won't be started. &amp;lt;br&amp;gt;&lt;br /&gt;
{{Note | Robot segments are not considered}}&lt;br /&gt;
&lt;br /&gt;
=WorkSpace Properties=&lt;br /&gt;
WorkSpaces are cuboids defined by its four vertex points: &lt;br /&gt;
* Origin (O) &lt;br /&gt;
* Width (W)&lt;br /&gt;
* Length (L)&lt;br /&gt;
* Height (H)&lt;br /&gt;
The cuboid can have any orientation in space. The coordinates of the cuboid are given in '''WorkPiece''' coordinates of the robot TCP (including tool). &amp;lt;br&amp;gt; &lt;br /&gt;
Cuboid parameter defines relative to WorkSpace origin: &lt;br /&gt;
* O = #{X,Y,Z,Yaw,Pitch,Roll}  - location &lt;br /&gt;
* L = O:#{0,WSCPL,0,0,0,0} &lt;br /&gt;
* W = O:#{WSCPW,0,0,0,0,0} &lt;br /&gt;
* H = O:#{0,0,WSCPH,0,0,0}&lt;br /&gt;
When '''WSPCL''' = WorkSpace length, '''WSPCW''' = WorkSpace width, '''WSPCH''' = WorkSpace height.&lt;br /&gt;
To sets a proper WorkSpace one need to follow these rules: &lt;br /&gt;
# WorkSpaces are grouped in WorkSpace-sets. There will be maximum 16 WorkSpace defined in one WorkSpace-set when each WorkSpace-set belongs to only one robot.&lt;br /&gt;
# WorkSpace will be indexed by unique numbers 1, 2, 3, ...&lt;br /&gt;
# Only '''active''' WorkSpace is considered.&lt;br /&gt;
# WorkSpace areas won't be able to edit (change) while robot is enabled (powered-on).&lt;br /&gt;
# WorkSpace can be '''activated''' only when the robot is disabled (powered-off).&lt;br /&gt;
# WorkSpace areas won't be active during '''conveyer tracking'''.&lt;br /&gt;
# In the first phase, if there are active WorkSpace lined to a robot joint-interpolated motions (MOVE) will be not allowed!&lt;br /&gt;
# Each WorkSpace area will have a set of '''entry &amp;amp; exit''' points: (En1,En2, …) and (Ex1,Ex2, …) defining exit and entry paths from one workspace to another.&lt;br /&gt;
# Entry and exit points will be '''defined only''' by #{X,Y,Z} relative to the origin (O) of the related working space.&lt;br /&gt;
# Entry and exit points '''must lie on the surface''' of the WorkSpace (not inside the WorkSpace). &lt;br /&gt;
# Entry and exit points will be defined with a '''tolerance radius R''' meaning that if the robot TCP is at distance less then R from the given point it will be considered at this point. The tolerance will be described by half-sphere of radius R – meaning only the half that is inside given WorkSpace is valid.&lt;br /&gt;
# There will be only one exit and one entry path from one given pair of WorkSpaces&lt;br /&gt;
# User can move the robot from one WorkSpace area to another only if:&lt;br /&gt;
## Movement is straight line movement (MOVES, MOVESKD), other interpolation types like: CIRCLE, MOVE, JOG are not allowed.&lt;br /&gt;
## Movement starts from one of the exit points of the WorkSpace area (Exi) to the entry-point (Enj) of another WorkSpace area.&lt;br /&gt;
## No other movement outside WorkSpace area are allowed.&lt;br /&gt;
# To move a robot to a WorkSpace area From random location without using WorkSpace paths, one need to issuing separate axis movements: &amp;lt;br&amp;gt; Move A1 10 &amp;lt;br&amp;gt; Move A2 -40 ....&lt;br /&gt;
# Different robots can have different WorkSpace sets.&lt;br /&gt;
# It will be possible to know for each robot in which WorkSpace-index the robot is currently placed.&lt;br /&gt;
&lt;br /&gt;
==Graphic Movement Examples==&lt;br /&gt;
To understand the movement between WorkSpaces follow the next scenario: [[File:WSPC 1.png|right|450px]]&lt;br /&gt;
* There are three workspace objects: &lt;br /&gt;
** wspc#1 &lt;br /&gt;
** wspc#2 &lt;br /&gt;
** wspc#3 &lt;br /&gt;
* Only the following exit/entry paths between workspaces are allowed: &lt;br /&gt;
** wspc#1.Ex1→ wspc#2.En2 &lt;br /&gt;
** wspc#2.Ex1→ wspc#3.En1 &lt;br /&gt;
**  wspc#3.Ex1→ wspc#1.En1 &lt;br /&gt;
** wspc#3.Ex2→ wspc#2.En1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's allowed for entry and exit paths to cross WorkSpaces and other WorkSpaces areas unlimited number of times: &amp;lt;br&amp;gt;&lt;br /&gt;
[[File:WSPC 2.png|450px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In case two WorkSpaces areas have common intersection, robot will be able to move from one to another without limitations:  &amp;lt;br&amp;gt; &lt;br /&gt;
[[File:WSPC 3.png|250px]]&lt;br /&gt;
&lt;br /&gt;
=Initialization=&lt;br /&gt;
Initialization of one WorkSpace set will be done by reading an '''XML''' file with coordinates and entry/exit points linked to a specific robot. &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Itay</name></author>	</entry>

	</feed>