Breadcrumbs

DRL Component

Mandatory WCI Action

This is an essential feature related to WCI.

  • Tool → Run/Stop

  • This is the default setting, and the details of Run/Stop function vary according to the selected WCI.

image2021-8-19_21-13-17.png

Global Variable

1. Select Global Variable to be used in Skill.

image2021-8-19_21-14-38.png


2. Select Global Variable to be used in Skill.

  • Re-select when modifying Global Variable.

image2021-8-19_21-14-58.png


3. Select Global Variable to be used in Skill.

  • Re-select when modifying Global Variable.

image2021-8-19_21-15-11.png


Global Function

1. Select Global Function to be used in Skill.

  • Re-select when modifying Global Function.

image2021-8-19_21-15-49.png

2. Connect user input to the selected Global Function.

  • Reconnect when modifying Global Function.

  • When connecting Global Function input value in User Function, all Global Function input values can be entered as None.

    image2021-8-19_20-18-50.png

image2021-8-19_21-18-1.png


3. Connect user input to the selected Global Function.

image2021-8-19_21-18-17.png


4. Connect user input to the selected Global Function.

image2021-8-19_21-18-42.png


User Function

1. Write Main function of Sample_Gluing Skill.

image2021-8-19_20-25-55.png

2. Write Main function of Sample_Gluing Skill.

  • Connect user input

image2021-8-19_20-26-28.png

image2021-8-19_20-26-53.png

3. Write Main function of Sample_Gluing Skill.

  • Connect user input

image2021-8-19_21-19-10.png

Python
# Sample Gluing Skill 
def Sample_Gluing(ref_Pos, ref_Vel, ref_Acc, ref_Time, ref_Radius, ref_Mod, ref_Ractive, ref_Frame, tool_wait_Time, TCP_Setting_Flag, TCP_Name, App_Setting_Flag, app_Dist, app_Vel, app_Acc, AppRet_Motion_v2, MoveFn_v2, CaloffsetPos_v2):
    global prev_ref_Frame, prev_tool_wait_Time
    # Initial setting
    if TCP_Setting_Flag == True:
        set_tcp(TCP_Name)
    app_Acc = app_Acc*1000
    app_Time = ref_Time
    app_Radius = ref_Radius
    sync_Mode = "sync"
    mType = "movel"
    ref_Apptype = None 
    ref_Sol = None
    if App_Setting_Flag == False:
        app_Dist = [0, 0, 0] 
        app_Vel = ref_Vel
        app_Acc = ref_Acc
    # EndTask Setting
    prev_ref_Frame = ref_Frame
    prev_tool_wait_Time = tool_wait_Time
    # Approach Motion Setting
    if App_Setting_Flag == True: 
        AppRet_Motion_v2(app_Dist, ref_Pos, app_Vel, app_Acc, app_Time, app_Radius, ref_Frame, ref_Mod, ref_Ractive, CaloffsetPos_v2, MoveFn_v2)
    # Pick Motion
    MoveFn_v2(mType, ref_Pos, ref_Vel, ref_Acc, ref_Time, ref_Radius, ref_Frame, ref_Mod, ref_Ractive, ref_Apptype, ref_Sol, sync_Mode)
    Run() 
    wait(tool_wait_Time)



Write and modify Skill (Skill Setting)

Select Save Skill → Confirm.

  • Skill list can be checked as follows.

image2021-8-19_20-31-38.png

Existing Skill can be copied and modified.

  • Select existing Skill: Copy(Duplicate) & Edit → Sample_EndTask Skill

image2021-8-19_21-19-23.png

Modify UI Component

1. In Sample EndTask, delete all UI Components related to unused Reference Pose and Tool Setting.


2. Change Approach Motion Setting to Retract Motion Setting.

image2021-8-19_21-19-33.png


3. Add the following UI Component (Retract Motion Setting).

  • Distance: Enter Array using Line Edit → Set Value Type as Custom to enter the value of your choice.Ex) [x, y, z]: Enter each in the unit of mm.

image2021-8-19_21-19-40.png

  • Velocity: Enter value using Line Edit

  • Acceleration: Enter value using Line Edit (The unit is m/s2, but when using it in a Skill function, make sure to use it by changing to the unit of mm/s2)

image2021-8-19_21-19-50.png


4. Write Main function of Sample_EndTask.

Python
# Sample EndTask Skill 
def Sample_EndTask(Ret_Setting_Flag, ret_Dist, ret_Vel, ret_Acc, AppRet_Motion_v2, MoveFn_v2, CaloffsetPos_v2):
global prev_ref_Frame, prev_tool_wait_Time
# Initial setting
ret_Acc = ret_Acc*1000
ref_Mod = DR_MV_MOD_ABS
ref_Ractive = DR_MV_RA_DUPLICATE
ret_Time = 0
ret_Radius = 0
if Ret_Setting_Flag == False:
ret_Dist = [0, 0, 0] 
ret_Vel = 0
ret_Acc = 0
# Task End
Stop() 
wait(prev_tool_wait_Time)
stop_Pos, stop_sol = get_current_posx(prev_ref_Frame)
# Retract Motion Setting
if Ret_Setting_Flag == True: 
AppRet_Motion_v2(ret_Dist, stop_Pos, ret_Vel, ret_Acc, ret_Time, ret_Radius, prev_ref_Frame, ref_Mod, ref_Ractive, CaloffsetPos_v2, MoveFn_v2)


Write and modify Skill (Skill Setting)

Select Save Skill → Confirm.

  • Skill list can be checked as follows.

image2021-8-19_20-36-35.png