Difference between revisions of "Motion Project Examples"

From SoftMC-Wiki
Jump to: navigation, search
Line 11: Line 11:
 
{{Note| At the '''"ZIP"''' folder you will find an '''excel''' file that contain the basic parameters that provided by the robot/motors manufactures. Those parameter were used at the robot setup with softMC Configurator}}   
 
{{Note| At the '''"ZIP"''' folder you will find an '''excel''' file that contain the basic parameters that provided by the robot/motors manufactures. Those parameter were used at the robot setup with softMC Configurator}}   
  
{{Note | In some simulated examples there is an option to run simulated robot through '''RoboDK''' software, you will find relevant instructions in the specific project example page. }}
+
{{Note | In some simulated examples there is an option to run simulated robot through '''RoboDK software''', you will find the instructions bellow. }}
  
  
==How to Run Project Example from ControlStudio==
+
==How To Load Project Example To ControlStudio==
 
# Download project ZIP file to your computer, extract and save it in accessible folder. <br>
 
# Download project ZIP file to your computer, extract and save it in accessible folder. <br>
 
# Open [[Control Studio|ControlStudio]]. From the menu-bar, choose '''File → Open Project...''' and locate the project example file. '''Notice''' that the relevant file is the '''".apj"''' file. <br> [[image: open project.png|700px]] <br>
 
# Open [[Control Studio|ControlStudio]]. From the menu-bar, choose '''File → Open Project...''' and locate the project example file. '''Notice''' that the relevant file is the '''".apj"''' file. <br> [[image: open project.png|700px]] <br>
Line 25: Line 25:
  
  
==How to Run Project Example from softMC Configurator==
+
==How To Open Project Example Properties With softMC Configurator==
# Download project ZIP file to your computer, extract and save it in accessible folder. <br>
+
# After load and run the example to ControlStudio, open softMC Configurator from the menu-bar '''Tools → softMC Configurator'''. <br> [[image: open project5.png|700px]] <br>  
# Open [[Control Studio|ControlStudio]] and '''don't''' connect to the controller. From the menu-bar, choose '''Tools → softMC Configurator'''. You can find more information about softMC Configurator [[softMC Configurator | HERE]] <br> [[image: open project5.png|700px]] <br>
+
# The project setups will open at softMC Configurator window, notice that you use the same system as describe in the example page. <br> [[image: open project10.png|700px]] <br>
# At the '''Main''' window:
+
# You can watch and change properties for axes and robot as you want. '''It's recommended to make project duplicate, as explain bellow, and make changes to the copy.'''  
## Select your network
+
# You can find more information about softMC Configurator [[softMC Configurator | HERE]]
## Scan for softMC's
+
 
## Select your softMC  
+
==How To simulated Robots Using RoboDK==
## Press '''"Start configuration"''' <br> [[image: open project6.png|700px]] <br>  
+
To simulate relevant examples on RoboDk, you will need the following:
# New window will open. Choose '''"Open Project"''' and then '''"Select a Project"''' <br> [[image: open project7.png|700px]] <br>
+
* RoboDK software. You can download it from [https://robodk.com/download HERE]
# From the example folder, open the '''".mcfg"''' file.  
+
* '''mcEnv.py''' file - Download and extract the file from [[:File: mcEnv.zip| HERE]]. Save this file at your '''roboDK''' folder.
# To create and load all project files to the controller, press the '''"Bulid & Configure"''' button <br> [[image: open project8.png|700px]] <br>
+
* Robot template, that provide with the project.
# Now you can run the example robot from ControlStudio terminal or from '''Motion''' section in the softMC Configurator, at the relevant group/robot. <br>
+
* Working ControlStudio that connect to your softMC.
 +
 
 +
Follow those steps to connect your softMC with the simulated robot using ControlStudio:
 +
# After loading project files as explain before, load '''SERVER.PRG''' program from ControlStudio terminal : <br> <pre>--> load SERVER.PRG </pre> <br>  
 +
# When the program finished, you will get the following message at the '''Message Log''' ("socket 2" it's an example) <br> <pre> socket  2  is set </pre> <br>
 +
# With RoboDK open the robot file, '''RoboDK Station''' file or '''.rdk''' file.
 +
# At the left side, right click on '''Prog1''', the python file, and choose '''Edit Python Script'''. A new window will opened. <br> [[image: open project9.png|700px]] <br>  
 +
# In the Python script you'll need to make sure that the host IP address, is the one that your softMC has. If it's not the same - change and save it, and close the window:<br> [[image: open project11.png|700px]] <br>  
 +
# Execute double click on the Python script symbol, a small yellow arrow should appear on the symbol. You will get the following message at the '''Message Log''' <br> <pre> client is connected </pre> <br>  
 +
# From now until you disconnect from RoboDK file, from your network or other interruptions, you can watch every movement command you will execute in ControlStudio. 
 +
 
  
  

Revision as of 13:25, 10 October 2017

Project Examples Manual

The following examples created to demonstrated simple robots configuration and movement execute by them.
Every example include "ZIP" file that contain all the files you need to run the project by your self. You will find the files list in the projects examples pages.

Notice that there is examples that made for real systems, and examples that made for simulated system.


You can duplicate and modify every project example - you will find instructions bellow.


NOTE-Info.svgNOTE
At the "ZIP" folder you will find an excel file that contain the basic parameters that provided by the robot/motors manufactures. Those parameter were used at the robot setup with softMC Configurator
NOTE-Info.svgNOTE
In some simulated examples there is an option to run simulated robot through RoboDK software, you will find the instructions bellow.


How To Load Project Example To ControlStudio

  1. Download project ZIP file to your computer, extract and save it in accessible folder.
  2. Open ControlStudio. From the menu-bar, choose File → Open Project... and locate the project example file. Notice that the relevant file is the ".apj" file.
    open project.png
  3. To upload the project files to the controller do the following:
    1. At the "File View" window, at the project tree, right click on the project name.
    2. Choose "Add file(s)...", and upload all files from the project folder.
      open project2.png
    3. At the project tree, right click project name, and choose "Copy all files to controller"
      open project3.png
    4. From terminal → send Reset All command, and after execute send Load AUTOEXEC.PRG task.
      open project4.png
  4. The project now ready to run the specific movement example program, according to example files - instructions given in each example page.


How To Open Project Example Properties With softMC Configurator

  1. After load and run the example to ControlStudio, open softMC Configurator from the menu-bar Tools → softMC Configurator.
    open project5.png
  2. The project setups will open at softMC Configurator window, notice that you use the same system as describe in the example page.
    open project10.png
  3. You can watch and change properties for axes and robot as you want. It's recommended to make project duplicate, as explain bellow, and make changes to the copy.
  4. You can find more information about softMC Configurator HERE

How To simulated Robots Using RoboDK

To simulate relevant examples on RoboDk, you will need the following:

  • RoboDK software. You can download it from HERE
  • mcEnv.py file - Download and extract the file from HERE. Save this file at your roboDK folder.
  • Robot template, that provide with the project.
  • Working ControlStudio that connect to your softMC.

Follow those steps to connect your softMC with the simulated robot using ControlStudio:

  1. After loading project files as explain before, load SERVER.PRG program from ControlStudio terminal :
    --> load SERVER.PRG 

  2. When the program finished, you will get the following message at the Message Log ("socket 2" it's an example)
     socket  2  is set 

  3. With RoboDK open the robot file, RoboDK Station file or .rdk file.
  4. At the left side, right click on Prog1, the python file, and choose Edit Python Script. A new window will opened.
    open project9.png
  5. In the Python script you'll need to make sure that the host IP address, is the one that your softMC has. If it's not the same - change and save it, and close the window:
    open project11.png
  6. Execute double click on the Python script symbol, a small yellow arrow should appear on the symbol. You will get the following message at the Message Log
     client is connected 

  7. From now until you disconnect from RoboDK file, from your network or other interruptions, you can watch every movement command you will execute in ControlStudio.



Project Example Duplication

In case you want to use the projects examples setups, or want to create your own setups, you can copy the examples properties, including programs files, library and more, by following the next steps:

  1. From ControlStudio, at the menu-bar, choose File → Save Project as...
  2. Locate project copy at any folder you'll like.
  3. You have now a new robot, with all necessary files, ready for you to take control.

Robot Examples