3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

app_weld_adj_motion_offset()

Definition

app_weld_adj_motion_offset(offset=[0.0, 0.0])

Features

A function to control Y and Z coordinates in real time when the device's welding seem tracking function is in operation.

Parameters

Parameter Name

Data Type

Default Value

Description

offset

float[2]

0.0, 0.0

offset[0]: Y coordinate's offset

offset[1]: Z coordinate's offset

Return

Value

Description

0

Setting success

Minus value

Setting fail

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data error

DR_Error (DR_ERROR_VALUE)

Invalid parameter value

DR_Error (DR_ERROR_RUNTIME)

C Extension module error

DR_Error (DR_ERROR_STOP)

Program terminated forcibly

Example

Python
def arc_sensing_model(left, right, time):
  
## Edit your own seam tracking algorithm in this function
  
# This example is assumed as below
# 1. Seam tracking algorithm is in welding machine
# 2. Use digital IO communication between robot controller and welding machine
  
    if left == 1:
        set_digital_output(15, ON)
    elif left == 0:
        set_digital_output(15, OFF)
              
    if right == 1:
        set_digital_output(16, ON)
    elif right == 0:
        set_digital_output(16, OFF)
      
    y_offset = 0
    z_offset = 0
    if get_digital_input(9) == OFF:
        y_offset = 10
        z_offset = 0
    if get_digital_input(10) == ON:
        y_offset = -10
        z_offset = 0
    if get_digital_input(11) == ON:
        y_offset = 0
        z_offset = 10
    if get_digital_input(12) == ON:
        y_offset = 0
        z_offset = -10
  
    offset=[y_offset, z_offset]
          
    return offset
  
def seam_tracking():
    Vt, Ct, Ft, velt, Vm, Cm, Off, Dout, status = app_weld_get_welding_cond_analog()
    if status == 99:
        left, right = app_weld_get_extreme_point(time=90)
        offset=arc_sensing_model(left, right, time)
        app_weld_adj_motion_offset(offset)  
          
set_velj(30)
set_accj(60)
set_velx(30)
set_accx(30)
  
movej(posj(0,0,90,0,90,0))
  
app_weld_enable_analog(ch_v_out=[0,0], spec_v_out=[0,0,0,0], ch_f_out =[0,0],
spec_f_out =[0,0,0,0], ch_v_in =[0,0], spec_v_in =[0,0,0,0], ch_c_in =[0,0],
spec_c_in=[0,0,0,0], ch_arc_on=0, ch_gas_on=0, ch_inching_fwd=0, ch_inching_bwd=0, ch_blow_out=0)
  
th_id = thread_run(seam_tracking, loop=True) #Activate Saem Tracking Function      
  
app_weld_set_weld_cond_analog(flag_dry_run=1, v_target=0, f_target=0, vel_target=10, vel_min=0,
vel_max=100, weld_proc_param=[0,0,0,0,0,0,0,0,0])
  
app_weld_weave_cond_zigzag(wv_offset=[-10,0], wv_ang=0, wv_param=[10,1])
# zigzag weaving pattern, offset=0,0 tilt angle=0, weaving width=10(mm), weaving period=0.5(sec)
  
app_weld_adj_welding_cond_analog(flag_reset=1)
movel(posx(619.50, -50, 982.80, 0, -180, 0), app_type=DR_MV_APP_WELD)
  
thread_stop(th_id) #Deactivate Seam Tracking Function
  
app_weld_disable_analog()

Keyword

app_weld / weld / adj_motion / motion_offset / adj_motion_offset