|
1 | 1 | # Delta Robot Kinematic with TwinCAT & 3D Simulation in OpenGL C#
|
2 | 2 |
|
| 3 | +## Summary |
| 4 | + |
3 | 5 | - In this study, the materials coming from the conveyor line will be taken from the conveyor line by using a delta robot arm and placed in the desired position as required by the process.
|
4 | 6 |
|
5 | 7 | - A software was implemented to perform the 3D simulation of this system. Thus, the real-time movements of the system are followed by the user through this simulation program.
|
6 | 8 |
|
7 |
| -- "OpenGL_Deneme.rar" in this file you can find C# Codes for the simulation also you can find TwinCAT codes in "TC3_deltarobotprojects.rar" file. |
8 | 9 |
|
| 10 | +### Usage |
| 11 | +- **"OpenGL_Deneme.rar"** in this file you can find C# Codes for the simulation also you can find TwinCAT codes in **"TC3_deltarobotprojects.rar"** file. |
9 | 12 |
|
10 |
| -[](https://youtu.be/0gQZ20m5Olw) |
11 | 13 |
|
12 | 14 |
|
| 15 | + |
| 16 | +## Kinematic Analysis Calculation with TwinCAT |
| 17 | + |
| 18 | + |
| 19 | +The kinematic calculations of the delta robot arm to be simulated in the project will be calculated with the function blocks in the TwinCAT3 program. |
| 20 | + |
| 21 | +Thus, the X, Y, Z coordinates that the delta robot arm will move during the operation of the conveyor system developed in the TwinCAT3 program will be obtained as a result of the mathematical operation that is solved within these blocks. |
| 22 | + |
| 23 | +In order to calculate kinematics with TwinCAT, it is necessary to specify the type of system to be used. |
| 24 | + |
| 25 | +The delta robot arm to be used is seen as **"Delta Type 1"** when the documents prepared by Beckhoff company about kinematic motion are examined. |
| 26 | +(You can reach the kinematic transformations booklet prepared by Beckhoff company <a href="https://download.beckhoff.com/download/document/automation/twincat3/TF5110-TF5113_TC3_Kinematic_Transformation_EN.pdf" target="_blank">**here**</a>.) |
| 27 | + |
| 28 | +<img src ="images/deltarobotarm-readme-03.PNG" /> |
| 29 | + |
| 30 | +When the values specified in the figure above (Inner arm length, Outer arm length, etc.) are adapted to the TwinCAT, the system will be ready for kinematic calculations. |
| 31 | + |
| 32 | +The function block **FB_KinConfigGroup** configures axes according to the kinematic transformation. These are axes for the **ACS (joint)** and the **MCS (Cartesian)**. The function block takes the **ACS** and **MCS** axes defined in the stAxesList and configures them in the kinematic group of stKinRefIn. |
| 33 | + |
| 34 | +<img src ="images/deltarobotarm-readme-02.PNG" /> |
| 35 | + |
| 36 | +### Example |
| 37 | + |
| 38 | +```ruby |
| 39 | +VAR |
| 40 | + io_X : AXIS_REF; |
| 41 | + io_Y : AXIS_REF; |
| 42 | + io_Z : AXIS_REF; |
| 43 | + io_M1 : AXIS_REF; |
| 44 | + io_M2 : AXIS_REF; |
| 45 | + io_M3 : AXIS_REF; |
| 46 | + in_stKinToPlc AT %I* : NCTOPLC_NCICHANNEL_REF; |
| 47 | + fbConfigKinGroup : FB_KinConfigGroup; |
| 48 | + stAxesConfig : ST_KinAxes; |
| 49 | + bAllAxesReady : BOOL; |
| 50 | + bExecuteConfigKinGroup: BOOL; |
| 51 | + bUserConfigKinGroup : BOOL; |
| 52 | + bUserCartesianMode : BOOL := TRUE; |
| 53 | + (*true: cartesian mode - false: direct mode (without transformation) *) |
| 54 | +END_VAR |
| 55 | +``` |
13 | 56 |
|
| 57 | +```ruby |
| 58 | + |
| 59 | +(* read the IDs from the cyclic axis interface so the axes can mapped later to the kinematic group |
| 60 | +*) |
| 61 | +stAxesConfig.nAxisIdsAcs[1] := io_M1.NcToPlc.AxisId; |
| 62 | +stAxesConfig.nAxisIdsAcs[2] := io_M2.NcToPlc.AxisId; |
| 63 | +stAxesConfig.nAxisIdsAcs[3] := io_M3.NcToPlc.AxisId; |
| 64 | +stAxesConfig.nAxisIdsMcs[1] := io_X.NcToPlc.AxisId; |
| 65 | +stAxesConfig.nAxisIdsMcs[2] := io_Y.NcToPlc.AxisId; |
| 66 | +stAxesConfig.nAxisIdsMcs[3] := io_Z.NcToPlc.AxisId; |
| 67 | +IF bAllAxesReady AND bUserConfigKinGroup THEN |
| 68 | + bExecuteConfigKinGroup := TRUE; |
| 69 | +ELSE |
| 70 | + bExecuteConfigKinGroup := FALSE; |
| 71 | +END_IF |
| 72 | +fbConfigKinGroup( |
| 73 | + bExecute := bExecuteConfigKinGroup , |
| 74 | + bCartesianMode := bUserCartesianMode , |
| 75 | + stAxesList := stAxesConfig, |
| 76 | + stKinRefIn := in_stKinToPlc ); |
| 77 | + |
| 78 | +``` |
| 79 | + |
| 80 | +## State of Kinematic Group |
| 81 | +<img src ="images/deltarobotarm-readme-04.png" /> |
| 82 | + |
| 83 | +### Enable configuration |
| 84 | +The ACS axes must be enabled through MC_Power, to ensure that the state can reach the value KinStatus_Ready. If the ACS axes are not enabled, enable the axes and then call up FB_KinConfigGroup or FB_KinResetGroup. |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +## Video |
| 92 | + |
| 93 | +[](https://youtu.be/0gQZ20m5Olw) |
0 commit comments