Difference between revisions of "Motion Project Example: Simulated Cartesian Robot"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "The following example show how to set a cartesian robot properties using softMC Configurator and how to make circular movement using it. <br> '''NOTICE''' - You can [[m...")
 
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
The following example show how to set a cartesian robot properties using [[softMC Configurator]] and how to make circular movement using it. <br>  
+
{{Languages|Motion_Project_Example:_Simulated_Cartesian_Robot}}
 
+
The following example show how to set a simulated Cartesian robot properties using [[softMC Configurator]] and how to make circular movement using it. <br>  
 
 
'''NOTICE''' - You can [[media:cartXYZ.zip|download]] the example files, open the project with ControlStudio, and you'll have all the initial files to run this example. The instructions will be listed below.
 
  
 +
=Download Example Files=
 +
{|class="wikitable" style="text-align: center"
 +
|'''Description'''
 +
|'''Download'''
 +
|-
 +
|It's recommended to download the example '''ZIP''' file, extract all the project files, open project with ControlStudio, and run the example by yourself. You will find files description table bellow (4.1). The instructions will be listed below.
 +
|[[image:Download.png|90px|link=http://softmc.servotronix.com/img_auth.php/6/65/cartXYZ_-_sim.zip]]
 +
|}
  
 
=System Setup=
 
=System Setup=
 
In this example we used the following system: <br>
 
In this example we used the following system: <br>
* softMC 7.
+
* softMC 7 (you can also use simulated sofMC).
* Three CDHD drivers connected to three linear motors.
 
* Cartesian robot (XYZ).  
 
 
* Computer with [[Control Studio|ControlStudio]] and [[softMC Configurator]]. <br>
 
* Computer with [[Control Studio|ControlStudio]] and [[softMC Configurator]]. <br>
* [[media:cartXYZ.zip| Example files]] - Programs, setups, properties and more. You can find files description down bellow (4.1)
+
* Example files - Programs, setups, properties and more. You can find files description down bellow (4.1)
Wiring as showen: <br>
 
[[image: cart_1.png| 300px]]
 
  
The motor parameters calculate according to the manufacture formulas as it's appear in the Excel file.
+
The motors parameters calculate according to the manufacture formulas as it's appear in the Excel file, although it's simulated system.  
{{Note|When using other drivers then CDHD, it's important to insert the motor '''pitch''' value, as it provided from the motor manufacture, to the softMC Configurator, to get suitable [[MC-Basic:axis.POSITIONFACTOR|Position Factor]]
 
  
 
=softMC Configurator=
 
=softMC Configurator=
Line 26: Line 27:
 
For more information about how to setup Cartesian robot parameters using softMC Configurator - [[3-Axis Group Setup in EtherCAT Network|look here]] <br>
 
For more information about how to setup Cartesian robot parameters using softMC Configurator - [[3-Axis Group Setup in EtherCAT Network|look here]] <br>
  
=Running The Program=
+
=Running The Program and Simulate With RoboDK=
 
To upload the example setups to your ControlStudio, open the example '''.apj''' file from the Controlstudio.<br>
 
To upload the example setups to your ControlStudio, open the example '''.apj''' file from the Controlstudio.<br>
When all relevant files upload to your controller, use the following code, from ControlStudio-terminal to run the example:  
+
When all relevant files upload to your controller, and you opened and connected the RoboDK file as explain [[Motion Project Examples| HERE]], use the following code, from ControlStudio-terminal to run the example:  
  
 
<syntaxhighlight lang='VB'>
 
<syntaxhighlight lang='VB'>
 
-->reset all
 
-->reset all
 
-->load AUTOEXEC.PRG  'wait until the program will terminate
 
-->load AUTOEXEC.PRG  'wait until the program will terminate
 +
-->load SERVER.PRG    'After this command -> connect RoboDK model - double click on the Python script symbol - and proceed
 
-->load CIRCLE.PRG
 
-->load CIRCLE.PRG
-->Stas CIRCLE.PRG    'when the program ends, your can find motion record file (CIRCLE.REC) at the controller  
+
-->Stas CIRCLE.PRG    'when the program ends, you can find motion record file (CIRCLE.REC) at the controller  
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=Example Files=
 
You can find all the example files attached [[media:cartXYZ.zip|Here]] <br>
 
It's recommended to download the file attached, upload the relevant files to the controller and run the program.
 
  
 
==Files table With Description==
 
==Files table With Description==
Line 68: Line 67:
 
|CIRCLE.PRG
 
|CIRCLE.PRG
 
|Basic circular movement program
 
|Basic circular movement program
 +
|align="center" |'''+'''
 +
|-
 +
|SERVER.PRG
 +
|Communication program between ControlStudio and RoboDK file.
 +
|align="center" |'''+'''
 +
|-
 +
|cartXYZ - sim.rdk
 +
|RoboDK file.
 
|align="center" |'''+'''
 
|align="center" |'''+'''
 
|}
 
|}
Line 119: Line 126:
 
|align="center" |'''+'''
 
|align="center" |'''+'''
 
|-
 
|-
|cartXYZ.apj
+
|cartXYZ - sim.apj
 
|Project file - allowed to load an existing project from ControStudio.  
 
|Project file - allowed to load an existing project from ControStudio.  
 
|align="center" |'''−'''
 
|align="center" |'''−'''
 
|-
 
|-
|cartXYZ.mcfg
+
|cartXYZ - sim.mcfg
 
|Project file - allowed to load an existing project from softMC Configurator.
 
|Project file - allowed to load an existing project from softMC Configurator.
 
|align="center" |'''−'''
 
|align="center" |'''−'''
 
|-
 
|-
|cartXYZ.dat
+
|cartXYZ - sim.dat
 
|rowspan="3" align="center"|General project files
 
|rowspan="3" align="center"|General project files
 
|align="center" |'''−'''
 
|align="center" |'''−'''
 
|-
 
|-
|cartXYZ.asn
+
|cartXYZ - sim.asn
 
|align="center" |'''−'''
 
|align="center" |'''−'''
 
|-
 
|-
|cartXYZ.pse
+
|cartXYZ - sim.pse
 
|align="center" |'''−'''
 
|align="center" |'''−'''
 
|}
 
|}

Latest revision as of 14:44, 27 December 2017

Language: English  • 中文(简体)‎

The following example show how to set a simulated Cartesian robot properties using softMC Configurator and how to make circular movement using it.

Download Example Files

Description Download
It's recommended to download the example ZIP file, extract all the project files, open project with ControlStudio, and run the example by yourself. You will find files description table bellow (4.1). The instructions will be listed below. Download.png

System Setup

In this example we used the following system:

  • softMC 7 (you can also use simulated sofMC).
  • Computer with ControlStudio and softMC Configurator.
  • Example files - Programs, setups, properties and more. You can find files description down bellow (4.1)

The motors parameters calculate according to the manufacture formulas as it's appear in the Excel file, although it's simulated system.

softMC Configurator

To upload the example setups to your sofMC Configurator, open the example .mcfg file from the softMC Configurator.

After creating all project files with softMC Configurator or upload an existing project, you can run your robot from ControlStudio or from the softMC Configurator itself.
In this example we will make a circular movement with MC-Basic program, from ControlStudio terminal.

For more information about how to setup Cartesian robot parameters using softMC Configurator - look here

Running The Program and Simulate With RoboDK

To upload the example setups to your ControlStudio, open the example .apj file from the Controlstudio.
When all relevant files upload to your controller, and you opened and connected the RoboDK file as explain HERE, use the following code, from ControlStudio-terminal to run the example:

-->reset all
-->load AUTOEXEC.PRG   'wait until the program will terminate
-->load SERVER.PRG     'After this command -> connect RoboDK model - double click on the Python script symbol - and proceed
-->load CIRCLE.PRG
-->Stas CIRCLE.PRG     'when the program ends, you can find motion record file (CIRCLE.REC) at the controller


Files table With Description

User Files
File Name Description Upload to Controller
Properties table Excel matrix that contain the information that you need to setup your robot.
Notice which information you need to import from your system.
CONFIG.PRG MC-Basic program that define the basic data so that ControlStudio and sofMC Configurator will work. +
HOMING.PRG Execute homing procedure for each axis. +
AUTOEXEC.PRG Execute startPRG.PRG program and HOMING.PRG program. +
CIRCLE.PRG Basic circular movement program +
SERVER.PRG Communication program between ControlStudio and RoboDK file. +
cartXYZ - sim.rdk RoboDK file. +


softMC Configurator files - DO NOT MAKE ANY CHANGE
File Name Description Upload to Controller
AX_SETUP.PRG Axes parameters setup program +
CANSETUP.PRG CANopen communication parameter setup program +
EC_CDHD.LIB EtherCat communication function and subroutine with CDHD library file +
EC_USER.LIB EtherCat communication function and subroutine library file +
ETHERCAT.LIB EtherCat communication function and subroutine library file +
ECCONFIG.PRG EtherCat configuration program +
EC_SETUP.PRG EtherCat communication setup program +
RobLib.LIB Robot function and subroutine library file +
ROBOT.PRG Robot parameter setup program +
STARTPRG.PRG Program that runs all other softMC Configurator programs +
cartXYZ - sim.apj Project file - allowed to load an existing project from ControStudio.
cartXYZ - sim.mcfg Project file - allowed to load an existing project from softMC Configurator.
cartXYZ - sim.dat General project files
cartXYZ - sim.asn
cartXYZ - sim.pse