ApossC SDK  V01.15
Functions
SDK_Kinematics_Setup.mh File Reference

Declaration of the kinematics setup function. More...

Go to the source code of this file.

Functions

long sdkSetupDeltaKinematics (long axis_0, long axis_1, long axis_2, long prms_A, long prms_B, long prms_C, long prms_D, long prms_minMotAng, long prms_maxMotAng)
 Setup a Delta multi-axis kinematics model. More...
 
long sdkSetupCartesian2dKinematics (long axis_0, long axis_1)
 Setup a 2-dimensional cartesian multi-axis kinematics model. More...
 
long sdkSetupCartesian3dKinematics (long axis_0, long axis_1, long axis_2)
 Setup a 3-dimensional cartesian multi-axis kinematics model. More...
 
long sdkSetupHBotCoreXYKinematics (long axis_0, long axis_1)
 Setup a HBot or CoreXY multi-axis kinematics model. More...
 
long sdkSetupScara2dKinematics (long axis_0, long axis_1, long prms_A, long prms_B, long prms_orient)
 Setup a Scara 2d multi-axis kinematics model. More...
 
long sdkSetupScara3dKinematics (long axis_0, long axis_1, long axis_2, long prms_A, long prms_B, long prms_orient)
 Setup a Scara 3d multi-axis kinematics model. More...
 
long sdkSetupDualScara2dKinematics (long axis_0, long axis_1, long prms_A, long prms_B, long prms_C, long prms_D, long prms_distance)
 Setup a Dual Scara 2d multi-axis kinematics model. More...
 
long sdkSetupDualScara3dKinematics (long axis_0, long axis_1, long axis_2, long prms_A, long prms_B, long prms_C, long prms_D, long prms_distance)
 Setup a Dual Scara 3d multi-axis kinematics model. More...
 
transform sdkSetupWorkCoordKinematics (transform workToMachine, double originTranslate_X, double originTranslate_Y, double originTranslate_Z, double rotation_XY, double scale)
 Setup the working coordinates for a kinematics System. More...
 

Detailed Description

Declaration of the kinematics setup function.

Revision
235

Definition in file SDK_Kinematics_Setup.mh.

Function Documentation

◆ sdkSetupCartesian2dKinematics()

long sdkSetupCartesian2dKinematics ( long  axis_0,
long  axis_1 
)

Setup a 2-dimensional cartesian multi-axis kinematics model.

This function sets up a 2-dimensional cartesian kinematic. More information can be found in the ApossIDE Help.

Parameters
axis_0X Axis
axis_1Y Axis
Returns
value: Kinematics handle used to reference this group of axes.
value > 0 Process successful
value = 0 Process is active
value < 0 Error

Definition at line 68 of file SDK_Kinematics_Setup.mc.

69 {
70  long axes[2], handle;
71  double prms[1];
72 
73  axes[0] = axis_0; // Define X axis
74  axes[1] = axis_1; // Define Y axis
75 
76  prms[0] = 2; // Set 2-dimensional system
77 
78  handle = KinematicsSetup("Cartesian", axes, prms); // Get the kinematics handler
79 
80  return(handle);
81 }

◆ sdkSetupCartesian3dKinematics()

long sdkSetupCartesian3dKinematics ( long  axis_0,
long  axis_1,
long  axis_2 
)

Setup a 3-dimensional cartesian multi-axis kinematics model.

This function sets up a 3-dimensional cartesian kinematic. More information can be found in the ApossIDE Help.

Parameters
axis_0X Axis
axis_1Y Axis
axis_2Z Axis
Returns
value: Kinematics handle used to reference this group of axes.
value > 0 Process successful
value = 0 Process is active
value < 0 Error

Definition at line 95 of file SDK_Kinematics_Setup.mc.

96 {
97  long axes[3], handle;
98  double prms[1];
99 
100  axes[0] = axis_0; // Define X axis
101  axes[1] = axis_1; // Define Y axis
102  axes[2] = axis_2; // Define Z axis
103 
104  prms[0] = 3; // Set 3-dimensional system
105 
106  handle = KinematicsSetup("Cartesian", axes, prms); // Get the kinematics handler
107 
108  return(handle);
109 }

◆ sdkSetupDeltaKinematics()

long sdkSetupDeltaKinematics ( long  axis_0,
long  axis_1,
long  axis_2,
long  prms_A,
long  prms_B,
long  prms_C,
long  prms_D,
long  prms_minMotAng,
long  prms_maxMotAng 
)

Setup a Delta multi-axis kinematics model.

This function sets up a Delta kinematic. The parameters of the mechanics must be known and are transferred to the function. More information can be found in the ApossIDE Help.

Parameters
axis_0Axis module number
axis_1Axis module number
axis_2Axis module number
prms_ADefinition of length A [mm*10](80.0 mm => 800)
prms_BDefinition of length B [mm*10](80.0 mm => 800)
prms_CDefinition of length C [mm*10](80.0 mm => 800)
prms_DDefinition of length D [mm*10](80.0 mm => 800)
prms_minMotAngMinimum motor angle [°]
prms_maxMotAngMaximum motor angle [°]
Returns
value: Kinematics handle used to reference this group of axes.
value > 0 Process successful
value = 0 Process is active
value < 0 Error

Definition at line 36 of file SDK_Kinematics_Setup.mc.

37 {
38  long axes[3], handle;
39  double prms[6];
40 
41  axes[0] = axis_0; // Define axis 0
42  axes[1] = axis_1; // Define axis 1
43  axes[2] = axis_2; // Define axis 2
44 
45  prms[0] = prms_A; // Length A
46  prms[1] = prms_B; // Length B
47  prms[2] = prms_C; // Length C
48  prms[3] = prms_D; // Length D
49 
50  prms[4] = rad(prms_minMotAng); // The arm must not move higher than "prms_minMotAng" (for safety).
51  prms[5] = rad(prms_maxMotAng); // The arm must not move lower than "prms_maxMotAng" (for safety).
52 
53  handle = KinematicsSetup("Delta", axes, prms); // Get the kinematics handler
54 
55  return(handle);
56 }

◆ sdkSetupDualScara2dKinematics()

long sdkSetupDualScara2dKinematics ( long  axis_0,
long  axis_1,
long  prms_A,
long  prms_B,
long  prms_C,
long  prms_D,
long  prms_distance 
)

Setup a Dual Scara 2d multi-axis kinematics model.

This function sets up a Dual Scara 2d kinematic. The parameters of the mechanics must be known and are transferred to the function. More information can be found in the ApossIDE Help.

Parameters
axis_0Axis module number
axis_1Axis module number
prms_AThe length of the left primary arm, in Machine Coordinate System units
prms_BThe length of the left secondary arm, in Machine Coordinate System units
prms_CThe length of the right primary arm, in Machine Coordinate System units
prms_DThe length of the right secondary arm, in Machine Coordinate System units
prms_distanceThe separation distance between axis 1 and axis 2
Returns
value: Kinematics handle used to reference this group of axes.
value > 0 Process successful
value = 0 Process is active
value < 0 Error

Definition at line 218 of file SDK_Kinematics_Setup.mc.

219 {
220  long axes[2], handle;
221  double prms[6];
222 
223  axes[0] = axis_0; // Define axis 0
224  axes[1] = axis_1; // Define axis 1
225 
226  prms[0] = prms_A; // Length A
227  prms[1] = prms_B; // Length B
228  prms[2] = prms_C; // Length C
229  prms[3] = prms_D; // Length D
230  prms[4] = prms_distance;// Separation distance
231  prms[5] = 2; // Set 2-dimensional system
232 
233  handle = KinematicsSetup("DualScara", axes, prms); // Get the kinematics handler
234 
235  return(handle);
236 }

◆ sdkSetupDualScara3dKinematics()

long sdkSetupDualScara3dKinematics ( long  axis_0,
long  axis_1,
long  axis_2,
long  prms_A,
long  prms_B,
long  prms_C,
long  prms_D,
long  prms_distance 
)

Setup a Dual Scara 3d multi-axis kinematics model.

This function sets up a Dual Scara 3d kinematic. The parameters of the mechanics must be known and are transferred to the function. More information can be found in the ApossIDE Help.

Parameters
axis_0Axis module number
axis_1Axis module number
axis_2Axis module number
prms_AThe length of the left primary arm, in Machine Coordinate System units
prms_BThe length of the left secondary arm, in Machine Coordinate System units
prms_CThe length of the right primary arm, in Machine Coordinate System units
prms_DThe length of the right secondary arm, in Machine Coordinate System units
prms_distanceThe separation distance between axis 1 and axis 2
Returns
value: Kinematics handle used to reference this group of axes.
value > 0 Process successful
value = 0 Process is active
value < 0 Error

Definition at line 255 of file SDK_Kinematics_Setup.mc.

256 {
257  long axes[3], handle;
258  double prms[6];
259 
260  axes[0] = axis_0; // Define axis 0
261  axes[1] = axis_1; // Define axis 1
262  axes[2] = axis_2; // Define axis 2
263 
264  prms[0] = prms_A; // Length A
265  prms[1] = prms_B; // Length B
266  prms[2] = prms_C; // Length C
267  prms[3] = prms_D; // Length D
268  prms[4] = prms_distance;// Separation distance
269  prms[5] = 3; // Set 3-dimensional system
270 
271  handle = KinematicsSetup("DualScara", axes, prms); // Get the kinematics handler
272 
273  return(handle);
274 }

◆ sdkSetupHBotCoreXYKinematics()

long sdkSetupHBotCoreXYKinematics ( long  axis_0,
long  axis_1 
)

Setup a HBot or CoreXY multi-axis kinematics model.

This function sets up a HBot or CoreXY kinematic. More information can be found in the ApossIDE Help.

Parameters
axis_0Axis module number
axis_1Axis module number
Returns
value: Kinematics handle used to reference this group of axes.
value > 0 Process successful
value = 0 Process is active
value < 0 Error

Definition at line 122 of file SDK_Kinematics_Setup.mc.

123 {
124  long axes[2], handle;
125  double prms[1];
126 
127  axes[0] = axis_0; // Define axis 0
128  axes[1] = axis_1; // Define axis 1
129  prms[0] = 0; // Just to prevent a "Referenced but never assigned" warning.
130 
131  handle = KinematicsSetup("Hbot", axes, prms); // Get the kinematics handler
132 
133  return(handle);
134 }

◆ sdkSetupScara2dKinematics()

long sdkSetupScara2dKinematics ( long  axis_0,
long  axis_1,
long  prms_A,
long  prms_B,
long  prms_orient 
)

Setup a Scara 2d multi-axis kinematics model.

This function sets up a Scara 2d kinematic. The parameters of the mechanics must be known and are transferred to the function. More information can be found in the ApossIDE Help.

Parameters
axis_0Axis module number
axis_1Axis module number
prms_AThe length of the primary arm, in Machine Coordinate System units
prms_BThe length of the secondary arm, in Machine Coordinate System units
prms_orientThe orientation of the arms: 1 - Left arm oientation, -1 - Right arm orientation
Returns
value: Kinematics handle used to reference this group of axes.
value > 0 Process successful
value = 0 Process is active
value < 0 Error

Definition at line 150 of file SDK_Kinematics_Setup.mc.

151 {
152  long axes[2], handle;
153  double prms[4];
154 
155  axes[0] = axis_0; // Define axis 0
156  axes[1] = axis_1; // Define axis 1
157 
158  prms[0] = prms_A; // Length A
159  prms[1] = prms_B; // Length B
160  prms[2] = prms_orient; // Orientation of the System "Left" / "Right"
161  prms[3] = 2; // Set 2-dimensional system
162 
163  handle = KinematicsSetup("Scara", axes, prms); // Get the kinematics handler
164 
165  return(handle);
166 }

◆ sdkSetupScara3dKinematics()

long sdkSetupScara3dKinematics ( long  axis_0,
long  axis_1,
long  axis_2,
long  prms_A,
long  prms_B,
long  prms_orient 
)

Setup a Scara 3d multi-axis kinematics model.

This function sets up a Scara 3d kinematic. The parameters of the mechanics must be known and are transferred to the function. More information can be found in the ApossIDE Help.

Parameters
axis_0Axis module number
axis_1Axis module number
axis_2Axis module number
prms_AThe length of the primary arm, in Machine Coordinate System units
prms_BThe length of the secondary arm, in Machine Coordinate System units
prms_orientThe orientation of the arms: 1 - Left arm oientation, -1 - Right arm orientation
Returns
value: Kinematics handle used to reference this group of axes.
value > 0 Process successful
value = 0 Process is active
value < 0 Error

Definition at line 183 of file SDK_Kinematics_Setup.mc.

184 {
185  long axes[3], handle;
186  double prms[4];
187 
188  axes[0] = axis_0; // Define axis 0
189  axes[1] = axis_1; // Define axis 1
190  axes[2] = axis_2; // Define axis 2
191 
192  prms[0] = prms_A; // Length A
193  prms[1] = prms_B; // Length B
194  prms[2] = prms_orient; // Orientation of the System "Left" / "Right"
195  prms[3] = 3; // Set 3-dimensional system
196 
197  handle = KinematicsSetup("Scara", axes, prms); // Get the kinematics handler
198 
199  return(handle);
200 }

◆ sdkSetupWorkCoordKinematics()

transform sdkSetupWorkCoordKinematics ( transform  workToMachine,
double  originTranslate_X,
double  originTranslate_Y,
double  originTranslate_Z,
double  rotation_XY,
double  scale 
)

Setup the working coordinates for a kinematics System.

Set up the Work-to-Machine transformation. This is the transformation from Work (i.e. paper) coordinates to Machine coordinates. There are three parts:

  1. Scaling: For example. The Work coordinate system uses mm's and the Machine coordinate system uses micrometers. So one Work unit (i.e. 1 mm) will be 1000 Machine units (i.e. 1000 micrometers).
  2. Rotation: We would like to define the orientation. For example. The Work coordinate system must be rotated CLOCKWISE by 90 degrees (i.e. -90 degrees counterclockwise) with respect to the Machine coordinate system.
  3. Translation: The origin position of the coordinate system can be set in which there is a shift in relation to the machine coordinate system.
Parameters
workToMachineIn: Transform variable of the coordinate system
originTranslate_XTranslational movement of the coordinate system -> X [in mm depending on the scaling]
originTranslate_YTranslational movement of the coordinate system -> Y [in mm depending on the scaling]
originTranslate_ZTranslational movement of the coordinate system -> Z [in mm depending on the scaling]
rotation_XYRotation around the XY plane [°]
scaleScaling of the system [ ]
Returns
value Transform variable of the coordinate system

Definition at line 300 of file SDK_Kinematics_Setup.mc.

301 {
302  TransIdent(workToMachine);
303  TransScale(workToMachine, scale);
304  TransRotateXY(workToMachine,rotation_XY*PI/180.0);
305  TransTranslate(workToMachine, originTranslate_X, originTranslate_Y, originTranslate_Z);
306 
307  print("Working coordinates are changed");
308  return(workToMachine);
309 }

Data Sheets | Released Software | Software Manuals | Hardware Manuals | Maxon Shop

Maxon Support Center