Robot simulation with additional axis - quick start guide

Robot simulation with additional axis - quick start guide

This document shows how to make the robot simulation with addtional axis movement. This function can be used to move any objects from the layout.



1. Additional axis settings

- Set parameter AXUNUM - number of multi mechanism used (up to 2 mechanisms can be used)
















- Set parameter AXMENO, speed ratio parameters and joint limits:













- Write the parameters to robot controller:


2. Layout

2.1 Add user mechanism

- Add the user mechanism in Layout Tree. Click RBM at robot name (RC1):
















 -Create new user mechanism file (double click on User Mech. or Setttings in Properties menu):


- Edit user mechanism file:


Close Select User Mech. File window and add moving part of the mechanism (add joint):
 

In a properties window You can specify the axis type (rotation or linear), direction (reversed or not) and position. 
- Add new object as a Joint child:


- Add other elements:


- Save the user file:



Select the mechanism file, set position and axis type:

‚Äč

             You can move the axis using an operation panel:




2.2 Add workpiece

Add a workpiece with display condition speification:

2.2.1 User mechanism

Add the workpiece as moving part child. To specify display condition, edit "condition" in the properties window:





















2.2.2 Hand

To display the workpiece on hand you can change tool using Tool command. For example, in tracking operation it could be inmossible, so we want to show example with Robot Parts.

- Add Robot Parts element in Layout Tree:
 

- Add new Robot Parts file



- Add workpiece as last joint child and set position:



- Specify display condition in properties window:


2.2.3 Layout tree

Add element which will be displayed after place operation:



3. Robot program

There are two programs running simultaneously. Slot 1 is used for robot control. Line 5 shows how we can read user mechanism position: 

Slot 1: Robot control program

  1. GetM 1          'Get robot mechanism number
  2. GoSub *Init     'Robot initial parameters
  3. *Loop
  4.     Mov pPick,-50       'Start position
  5.     Wait P_Curr(2).X<10 'Wait for add. axis in position
  6.     M_00#=1              'Signal to add. axis program
  7.     GoSub *Pick         'Pick workpiece
  8.     M_00#=0              'Signal to add. axis program - end of pick operation
  9.     GoSub *Place        'Place workpiece
  10.     If M_Cstp<>1 Then *Loop
  11. End
  12. '
  13. '
  14. '
  15. *Init
  16.     'Set signal number
  17.     CallP "SIGNALS"
  18.     'Start add. axis program
  19.     If M_Run(2)<>1 Then
  20.         XRun 2,"ADDAXIS"
  21.         Wait M_Run(2)=1
  22.     EndIf
  23.     'Servo On
  24.     If M_Svo<>1 Then
  25.         Servo On
  26.         Wait M_Svo=1
  27.     EndIf
  28.     'Reset signals
  29.     M_Out(M_UserMechWorkpiece)=0
  30.     M_Out(M_PlaceWorkpiece)=0
  31.     M_Out(M_PartsWorkpiece)=0
  32.     M_00#=0
  33.     Tool 1    'Set tool
  34.     Ovrd 20
  35.     Mov pHome 'Move to home position
  36.     Ovrd 100
  37. Return
  38. '
  39. *Pick
  40.     Mov pPick,-50
  41.     Mvs pPick
  42.     Dly 0.1
  43.     Tool 2
  44.     M_Out(M_PartsWorkpiece)=1  'Display robot part
  45.     HClose 1
  46.     Dly 0.2
  47.     M_Out(M_UserMechWorkpiece)=0  'Hide workpiece on add. axis
  48.     Mvs pPick,-50
  49. Return
  50. '
  51. *Place
  52.     Mov pPlace,-50
  53.     Mvs pPlace
  54.     Dly 0.1
  55.     Tool 1
  56.     M_Out(M_PlaceWorkpiece)=1 Dly 1    'Display placed workpiece
  57.     HOpen 1
  58.     Dly 0.2
  59.     M_Out(M_PartsWorkpiece)=0          'Hide robot part
  60.     Mvs pPlace,-50
  61. Return

Slot 2: Additional Axis control program

  1. GetM 2
  2. *Loop
  3. Wait M_00#=0     'Wait for pick operation completion
  4. Mov p1
  5. M_Out(M_UserMechWorkpiece)=1   'Display workpiece
  6. Mov p2
  7. Wait M_00#=1     'Wait for start of pick operation
  8. GoTo *Loop
  9. End
SIGNALS:
  1. M_UserMechWorkpiece=10160
  2. M_PlaceWorkpiece=10161
  3. M_PartsWorkpiece=11000
VAR:

  1. Def Inte M_UserMechWorkpiece
  2. Def Inte M_PlaceWorkpiece
  3. Def Inte M_PartsWorkpiece


Attachments:
File name
Description
AddAxisSim.7z
Robot project files