Synchronize a move with blend radius and digital_out

Hi,
I’m currently using a UR10 that I want to pass through waypoints . I don’t want the robot to stop between points, so I use a blend radius. At the same time I must activate a digital output at each point for 0.1 seconds. The problem is when I activate the digital output, the robot pauses at waypoints which I don’t want. Can anyone help me resolve this problem?
Here is the code I am using :

def prog():
    
    blend_radius=0.01
    # waypoint  1
    p1 = [1.57, -1.57, 1.8, 1.5, 1.5, 0.0]
    
    movej(p1, a=1.0, v=1, r=blend_radius)
    set_standard_digital_out(1, True)
    sleep(0.1)
    set_standard_digital_out(1, False)

    # waypoint  2
    p2 = [1.57, -1.57, 2, 1.5, 1.5, 0.0]
    
    movej(p2, a=1.0, v=1, r=blend_radius)
    set_standard_digital_out(1, True)
    sleep(0.1)
    set_standard_digital_out(1, False)
     # waypoint  3
    p3 = [1.57, -1.57, 2.2, 1.5, 1.5, 0.0]
    
    movej(p3, a=1.0, v=1, r=blend_radius)
    set_standard_digital_out(1, True)
    sleep(0.1)
    set_standard_digital_out(1, False)

     # waypoint  4
    p_final = [1.57, -1.57, 2.5, 1.5, 1.5, 0.0]
    
    movej(p_final, a=1.0, v=1, r=blend_radius)
    set_standard_digital_out(1, True)
    sleep(0.1)
    set_standard_digital_out(1, False)

    sync()

end

prog()

Hi @sinmeminesc,
probably you could just use thread in this way:

Hi @Robpod,
thanks for your idea. I’ve already tried that. It didn’t work because the robot always takes breaks at waypoints. I just tried it again and the robot still pauses at waypoints.

thread blink():

set_standard_digital_out(1, True)
sleep(0.002)
set_standard_digital_out(1, False)
   
end


blend_radius=0.01
# Point de passage 1
p1 = [1.57, -1.57, 1.8, 1.5, 1.5, 0.0]

movej(p1, a=1.0, v=1, r=blend_radius)
run blink()
# Point de passage 2
p2 = [1.57, -1.57, 2, 1.5, 1.5, 0.0]
run blink()

movej(p2, a=1.0, v=1, r=blend_radius)
run blink()

p3 = [1.57, -1.57, 2.2, 1.5, 1.5, 0.0]
a
movej(p3, a=1.0, v=1, r=blend_radius)
run blink()

# Point final
p_final = [1.57, -1.57, 2.5, 1.5, 1.5, 0.0]

movej(p_final, a=1.0, v=1, r=blend_radius)
run blink()
movej(p1, a=1.0, v=1, r=blend_radius)
run blink()

What’s your robot and Polyscope version? As far as I remember, some older CB software versions had issues with not allowing any type of action between waypoints with blends.

Alternatively, you can try setting a variable instead. I’m not sure if it’ll make if it’ll make a difference for you, but I think I’ve used that approach earlier.
Then have a thread run continuously checking for the variable becoming true, then set and reset the output and then reset the variable. :slight_smile:

1 Like

Hi,
It’s a UR10e, the URsoftware version is 5.12.4.1101661
thank you for your idea, I will try it.

This is a different approach based on waypoint distance, but could be very sensible to blending radius length:

DISTANCE_THRESHOLD = 0.005
checking = True

thread check_distance():
    while checking:
        pose = get_actual_tcp_pose()
        waypoint = get_target_waypoint()
        if point_dist(pose, waypoint) < DISTANCE_THRESHOLD:
            set_standard_digital_out(1, True)
            sleep(0.2)
            set_standard_digital_out(1, False)
            sleep(0.2)
        end
        sync()
    end
end

blend_radius=0.001
movej([1.57, -1.57, 1.8, 1.5, 1.5, 0.0], a=1.0, v=1)

id = run check_distance()

movej([1.57, -1.57, 1.8, 1.5, 1.5, 0.0], a=1.0, v=1, r=blend_radius)
movej([1.57, -1.57, 2, 1.5, 1.5, 0.0], a=1.0, v=1, r=blend_radius)
movej([1.57, -1.57, 2.2, 1.5, 1.5, 0.0], a=1.0, v=1, r=blend_radius)
movej([1.57, -1.57, 2.5, 1.5, 1.5, 0.0], a=1.0, v=1, r=blend_radius)
checking = False


2 Likes

Thank you very much, @Robpod this code works very well to make the blend radius between the waypoints while sending the digital output. As you said it is sensitive to the radius length. It works well for my application.

Now I have another problem, that is I usually send my scripts to the robot by remote control using the urx library.
What I do is that I create a program containing the scripts that I send with urx

But I don’t know why when the program contains a thread the robot doesn’t execute it.

For example the program of @Robpod above works well on the polyscope but when I send it using urx it doesn’t work and when I remove the thread and send it it works.

Does anyone have an idea why this isn’t working?

Maybe my code contains an error, I don’t know.

Here is the threadless code

from urx import Robot
import time


robot_ip = "192.168.72.20"
robot = Robot(robot_ip)


my_prog= f"""

def prog():    

    movej(get_inverse_kin(p[-0.093, 0.5685985614714282, 0.11769332611455181, -2.799911533063397, -2.7458049142055e-15, -1.5915654404712977e-14]), a=4, v=4)
    sync()
    movel((p[-0.093, 0.5704669161963534, 0.11838367598226052, -2.8034624873718363, -2.6351552797487278e-15, -1.54378442666795e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5723352709212786, 0.11906679051847578, -2.807050582047277, -2.6099969896936742e-15, -1.5457602849882616e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5742036256462039, 0.11974259634545883, -2.810674102822378, -2.50116178255516e-15, -1.497828049762108e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5760719803711289, 0.12041102432274411, -2.814331360090818, -2.4762347866987164e-15, -1.49977702795078e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5779403350960541, 0.12107200945180571, -2.818020689327535, -2.3693311688161055e-15, -1.4516849942669288e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5798252168907262, 0.12173123768271853, -2.8217734867353315, -2.425337305762756e-15, -1.5037429897201794e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5817100986853982, 0.12238277026903094, -2.825555601972009, -2.3993814517169744e-15, -1.505758505600601e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5835949804800703, 0.12302655269485968, -2.829365406604861, -2.3731743359069876e-15, -1.507788777355505e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5854798622747424, 0.12366253433801801, -2.8332013003635526, -2.1902771387493757e-15, -1.4091774220435742e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5873647440694144, 0.1242906683703903, -2.8370617117807506, -2.1653747710119818e-15, -1.411097513146249e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5892496258640865, 0.12491091165830673, -2.8409450988635485, -2.1402643089085196e-15, -1.4130290318835277e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5911345076587586, 0.12552322466291801, -2.844849949792718, -2.1149543377595366e-15, -1.414971226306891e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.593035870515848, 0.12613282040619117, -2.8488091855017816, -2.014614190015206e-15, -1.3663354538193336e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5949372333729375, 0.12673427640907178, -2.8527872676811685, -1.9896289277890013e-15, -1.3682434070608373e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.596838596230027, 0.12732756258618766, -2.85678274241008, -1.9644725949717147e-15, -1.3701597020534025e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5987399590871164, 0.12791265215994876, -2.8607941901448704, -1.9391531829927247e-15, -1.3720836579606921e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6006413219442059, 0.12848952155648957, -2.8648202265472014, -1.984555523847453e-15, -1.424904040862203e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6025426848012955, 0.1290581503016114, -2.868859503322676, -1.7482003411034279e-15, -1.2740295500014103e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6044440476583849, 0.12961852091672477, -2.8729107090671153, -1.6553726305042212e-15, -1.2247955008890223e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6063614917152932, 0.1301752529900455, -2.8770069660991946, -1.7001665633954818e-15, -1.2776477503081173e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6082789357722015, 0.13072355973202707, -2.881112792994099, -1.6088338684154635e-15, -1.2282922595804704e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6101963798291098, 0.13126343182729744, -2.885226964058133, -1.51934256858826e-15, -1.1787943096901377e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6121138238860181, 0.1317948626264186, -2.889348295290737, -1.5618673558793095e-15, -1.2318032653797971e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6140312679429264, 0.13231784803735316, -2.8934756452654846, -1.6664257687056005e-15, -1.336359765547403e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6159487119998347, 0.13283238641693143, -2.897607916003156, -1.325206977070283e-15, -1.0809089842934275e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.617866156056743, 0.1333384784623178, -2.9017440538344696, -1.4286088712660513e-15, -1.1855425661301098e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6197836001136512, 0.13383612710247783, -2.9058830502505426, -1.405726240277665e-15, -1.1872336030862567e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6217179486745816, 0.13432961284318254, -2.91006045520246, -1.2022362446994594e-15, -1.0338611585334191e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.623652297235512, 0.13481451805437553, -2.9142388499633314, -1.1820448523820267e-15, -1.0353456225556568e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6255866457964423, 0.13529085197353924, -2.918417343946914, -1.1618005965460569e-15, -1.0368301218288827e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6275209943573726, 0.13575862569807964, -2.9225950967111416, -1.3698088883394325e-15, -1.2459772293217135e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.629455342918303, 0.1362178520719238, -2.9267713187531577, -1.2332859072643465e-15, -1.1437778548740855e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6313896914792333, 0.13666854557211733, -2.9309452722805958, -1.2108677955661123e-15, -1.1454090296711625e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6333240400401637, 0.13711072219542184, -2.935116271957949, -1.1884074308886224e-15, -1.1470390501080432e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.635258388601094, 0.13754439934491233, -2.9392836856270095, -1.1659081820808383e-15, -1.1486676691382454e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6371927371620244, 0.13796959571657483, -2.9434469350000874, -1.1433731612274493e-15, -1.1502946607678043e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.639144100493726, 0.1383899593655627, -2.947642053315877, -1.1206065677647282e-15, -1.1519341067325201e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6410954638254276, 0.1388017341162678, -2.951831920028892, -8.982074557035483e-16, -9.438312275825935e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6430468271571292, 0.13920494245771492, -2.956016112111283, -9.772574106007603e-16, -1.050187887625243e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6449981904888308, 0.1395996077460857, -2.9601942649117126, -1.0521307458441881e-15, -1.1568394922544498e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6469495538205324, 0.13998575408624017, -2.964366072726362, -8.421166252522342e-16, -9.478389505992362e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.648900917152234, 0.1403634062132381, -2.9685312893376925, -8.233799904313788e-16, -9.49170754581958e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6508522804839356, 0.14073258937386024, -2.972689728520636, -8.046252679226885e-16, -9.50500391521051e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6528036438156372, 0.1410933292081302, -2.976841264516431, -7.858531187495902e-16, -9.518278212058772e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6547550071473388, 0.1414456516308354, -2.98098583247366, -6.818346076967842e-16, -8.472471314671738e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6567063704790403, 0.1417895827130487, -2.9851234288568618, -8.313975863427846e-16, -1.0605288838607627e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.658657733810742, 0.14212514856364994, -2.9892541118226665, -8.104829277337995e-16, -1.061996397248303e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6606262082897194, 0.14245520779492854, -2.9934141336458864, -7.104286128004805e-16, -9.571269005026643e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6625946827686972, 0.14277680744446725, -2.9975674303443727, -6.914039778466119e-16, -9.584548931620188e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6645631572476746, 0.14308997369534518, -3.0017142544404494, -5.229464012615097e-16, -7.464961904120721e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6665316317266522, 0.14339473227688354, -3.005854923571522, -5.807060198055578e-16, -8.543153522769905e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6685001062056297, 0.14369110834088014, -3.0099898207164837, -5.637387717367304e-16, -8.554905607287776e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6704685806846074, 0.14397912633784476, -3.014119394389752, -5.467494884939081e-16, -8.566642561589083e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6724370551635848, 0.14425880989323392, -3.0182441588030344, -4.635190721929635e-16, -7.506070116257477e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6744055296425624, 0.1445301816836856, -3.0223646939954993, -4.486091503371837e-16, -7.51631747347705e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6763740041215399, 0.1447932633132545, -3.0264816459321624, -4.956270760314823e-16, -8.601778193713479e-15]), a=4, v=4, t=0, r=0.00099)

    sync()
end


prog()

"""




robot.send_program(my_prog)
        
time.sleep(1)


while robot.is_program_running(): 
    print("wait for program")    
    time.sleep(1)
 

here is the code with thread.

from urx import Robot
import time


robot_ip = "192.168.72.20"
robot = Robot(robot_ip)


my_prog= f"""

DISTANCE_THRESHOLD = 0.001
checking = True

thread check_distance():
    while checking:
        pose = get_actual_tcp_pose()
        waypoint = get_target_waypoint()
        if point_dist(pose, waypoint) < DISTANCE_THRESHOLD:
            set_standard_digital_out(1, True)
            sleep(0.2)
            set_standard_digital_out(1, False)
            sleep(0.2)
        end
        sync()
    end
end

id = run check_distance()


def prog():    

    movej(get_inverse_kin(p[-0.093, 0.5685985614714282, 0.11769332611455181, -2.799911533063397, -2.7458049142055e-15, -1.5915654404712977e-14]), a=4, v=4)
    sync()
    movel((p[-0.093, 0.5704669161963534, 0.11838367598226052, -2.8034624873718363, -2.6351552797487278e-15, -1.54378442666795e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5723352709212786, 0.11906679051847578, -2.807050582047277, -2.6099969896936742e-15, -1.5457602849882616e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5742036256462039, 0.11974259634545883, -2.810674102822378, -2.50116178255516e-15, -1.497828049762108e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5760719803711289, 0.12041102432274411, -2.814331360090818, -2.4762347866987164e-15, -1.49977702795078e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5779403350960541, 0.12107200945180571, -2.818020689327535, -2.3693311688161055e-15, -1.4516849942669288e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5798252168907262, 0.12173123768271853, -2.8217734867353315, -2.425337305762756e-15, -1.5037429897201794e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5817100986853982, 0.12238277026903094, -2.825555601972009, -2.3993814517169744e-15, -1.505758505600601e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5835949804800703, 0.12302655269485968, -2.829365406604861, -2.3731743359069876e-15, -1.507788777355505e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5854798622747424, 0.12366253433801801, -2.8332013003635526, -2.1902771387493757e-15, -1.4091774220435742e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5873647440694144, 0.1242906683703903, -2.8370617117807506, -2.1653747710119818e-15, -1.411097513146249e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5892496258640865, 0.12491091165830673, -2.8409450988635485, -2.1402643089085196e-15, -1.4130290318835277e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5911345076587586, 0.12552322466291801, -2.844849949792718, -2.1149543377595366e-15, -1.414971226306891e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.593035870515848, 0.12613282040619117, -2.8488091855017816, -2.014614190015206e-15, -1.3663354538193336e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5949372333729375, 0.12673427640907178, -2.8527872676811685, -1.9896289277890013e-15, -1.3682434070608373e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.596838596230027, 0.12732756258618766, -2.85678274241008, -1.9644725949717147e-15, -1.3701597020534025e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.5987399590871164, 0.12791265215994876, -2.8607941901448704, -1.9391531829927247e-15, -1.3720836579606921e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6006413219442059, 0.12848952155648957, -2.8648202265472014, -1.984555523847453e-15, -1.424904040862203e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6025426848012955, 0.1290581503016114, -2.868859503322676, -1.7482003411034279e-15, -1.2740295500014103e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6044440476583849, 0.12961852091672477, -2.8729107090671153, -1.6553726305042212e-15, -1.2247955008890223e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6063614917152932, 0.1301752529900455, -2.8770069660991946, -1.7001665633954818e-15, -1.2776477503081173e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6082789357722015, 0.13072355973202707, -2.881112792994099, -1.6088338684154635e-15, -1.2282922595804704e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6101963798291098, 0.13126343182729744, -2.885226964058133, -1.51934256858826e-15, -1.1787943096901377e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6121138238860181, 0.1317948626264186, -2.889348295290737, -1.5618673558793095e-15, -1.2318032653797971e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6140312679429264, 0.13231784803735316, -2.8934756452654846, -1.6664257687056005e-15, -1.336359765547403e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6159487119998347, 0.13283238641693143, -2.897607916003156, -1.325206977070283e-15, -1.0809089842934275e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.617866156056743, 0.1333384784623178, -2.9017440538344696, -1.4286088712660513e-15, -1.1855425661301098e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6197836001136512, 0.13383612710247783, -2.9058830502505426, -1.405726240277665e-15, -1.1872336030862567e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6217179486745816, 0.13432961284318254, -2.91006045520246, -1.2022362446994594e-15, -1.0338611585334191e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.623652297235512, 0.13481451805437553, -2.9142388499633314, -1.1820448523820267e-15, -1.0353456225556568e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6255866457964423, 0.13529085197353924, -2.918417343946914, -1.1618005965460569e-15, -1.0368301218288827e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6275209943573726, 0.13575862569807964, -2.9225950967111416, -1.3698088883394325e-15, -1.2459772293217135e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.629455342918303, 0.1362178520719238, -2.9267713187531577, -1.2332859072643465e-15, -1.1437778548740855e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6313896914792333, 0.13666854557211733, -2.9309452722805958, -1.2108677955661123e-15, -1.1454090296711625e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6333240400401637, 0.13711072219542184, -2.935116271957949, -1.1884074308886224e-15, -1.1470390501080432e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.635258388601094, 0.13754439934491233, -2.9392836856270095, -1.1659081820808383e-15, -1.1486676691382454e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6371927371620244, 0.13796959571657483, -2.9434469350000874, -1.1433731612274493e-15, -1.1502946607678043e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.639144100493726, 0.1383899593655627, -2.947642053315877, -1.1206065677647282e-15, -1.1519341067325201e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6410954638254276, 0.1388017341162678, -2.951831920028892, -8.982074557035483e-16, -9.438312275825935e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6430468271571292, 0.13920494245771492, -2.956016112111283, -9.772574106007603e-16, -1.050187887625243e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6449981904888308, 0.1395996077460857, -2.9601942649117126, -1.0521307458441881e-15, -1.1568394922544498e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6469495538205324, 0.13998575408624017, -2.964366072726362, -8.421166252522342e-16, -9.478389505992362e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.648900917152234, 0.1403634062132381, -2.9685312893376925, -8.233799904313788e-16, -9.49170754581958e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6508522804839356, 0.14073258937386024, -2.972689728520636, -8.046252679226885e-16, -9.50500391521051e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6528036438156372, 0.1410933292081302, -2.976841264516431, -7.858531187495902e-16, -9.518278212058772e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6547550071473388, 0.1414456516308354, -2.98098583247366, -6.818346076967842e-16, -8.472471314671738e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6567063704790403, 0.1417895827130487, -2.9851234288568618, -8.313975863427846e-16, -1.0605288838607627e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.658657733810742, 0.14212514856364994, -2.9892541118226665, -8.104829277337995e-16, -1.061996397248303e-14]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6606262082897194, 0.14245520779492854, -2.9934141336458864, -7.104286128004805e-16, -9.571269005026643e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6625946827686972, 0.14277680744446725, -2.9975674303443727, -6.914039778466119e-16, -9.584548931620188e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6645631572476746, 0.14308997369534518, -3.0017142544404494, -5.229464012615097e-16, -7.464961904120721e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6665316317266522, 0.14339473227688354, -3.005854923571522, -5.807060198055578e-16, -8.543153522769905e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6685001062056297, 0.14369110834088014, -3.0099898207164837, -5.637387717367304e-16, -8.554905607287776e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6704685806846074, 0.14397912633784476, -3.014119394389752, -5.467494884939081e-16, -8.566642561589083e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6724370551635848, 0.14425880989323392, -3.0182441588030344, -4.635190721929635e-16, -7.506070116257477e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6744055296425624, 0.1445301816836856, -3.0223646939954993, -4.486091503371837e-16, -7.51631747347705e-15]), a=4, v=4, t=0, r=0.00099)
    movel((p[-0.093, 0.6763740041215399, 0.1447932633132545, -3.0264816459321624, -4.956270760314823e-16, -8.601778193713479e-15]), a=4, v=4, t=0, r=0.00099)

    sync()
end


prog()


checking = False

"""




robot.send_program(my_prog)
        
time.sleep(1)


while robot.is_program_running(): 
    print("wait for program ")    
    time.sleep(1)
 

Hi @sinmeminesc,
i think you should put the thread inside the main program like this:

Thank you very much @Robpod, it works now :smile: