 Program
   BeforeStart
     receive_data≔[6,0,0,0,0,0,0]
     Move_To_Pos≔p[0,0,0,0,0,0]
     'Call '
     socket_open("10.0.2.1",33)
     task≔[0,0]
     coop≔0
   Robot Program
     'Wait: 2.0'
     task=socket_read_ascii_float(1)
     If task[1]≟2
       Call Position_auslesen
       task≔[0,0]
     ElseIf task[1]≟1
       Call move_robot
     Wait: 0.01
   greifer
     'RG2(40,40,0.0, True , False , False )'
   Thread_1
     If Move_To_Pos≠p[0,0,0,0,0,0]
       movel(Move_To_Pos,a=0.2,v=0.2,r=0)
   move_robot
     receive_data=socket_read_ascii_float(6)
     If receive_data[0]≠6
       socket_send_string("0")
     Else
       socket_send_string("1")
       pointer≔0
       Loop pointer<receive_data[0]
         Move_To_Pos[pointer]=receive_data[pointer+1]
         pointer≔pointer+1
       task≔[0,0]
   Position_auslesen
     pose_1=get_actual_tcp_pose()
     socket_send_string(pose_1)
