RobotStudio event

Problem in programming a loop during the movements

Hi everyone, I'm Filippo, and i'm an industrial designer with a very low knowledge in robotics!
I'm currently working on a 3d printing development project, wich involve an ABB robot.
Since i'm new in the world of robotics, i still have some problems in the programming phase, and i hope someone can help me!

I think what i'm tryng to do is pretty simple, especcialy for someone who knows well the rapid language.

I connected my extruder directly to the I\O board of the robot, and set the output to one of the free keys on the teach pendant so that i can control it manually while the robot is moving.
That was fine for the very first testing phase, but now i'd like to integrate the output pulsation directly in my rapid file, so that everithing is controlled by the robot.

My target is having a continous series of regular pause and pulsation during the whole moving process. For instance, while the robot is making a straight line of 100mm, the extruder should generate 50 pulsation every 2 seconds.

I tried myself with something like that:

MODULE lnpls
   PERS tooldata WelTor := [TRUE,[[300.499969482422,0.0694613456726074,83.9059276580811],[1,0,0,0]],[1,[-103.249973297119,-7.22313165664673,-55.985221862793],[1,0,0,0],0,0,0]];
   VAR speeddata SSlow := [50,21,5000,1000];
   VAR bool repeat;
   VAR num times;
   CONST robtarget Target0:=[[1205.85040283203,0,131],[0.705697660668477,2.79396772384644E-09,0.708513099192273,0],[0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]];
   CONST robtarget Target1:=[[1205.85040283203,0,931],[0.705697660668477,2.79396772384644E-09,0.708513099192273,0],[0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]];
   CONST robtarget Target2:=[[1205.85040283203,0,950],[0.705697660668477,2.79396772384644E-09,0.708513099192273,0],[0,0,0,0],[0,9E9,9E9,9E9,9E9,9E9]];
   PROC Main()
      ConfJ \Off;
      ConfL \Off;
      MoveL Target0,SSlow,z1,WelTor \Wobj:=Wobj0;
   repeat := TRUE;
   times := 50;
      IF repeat THEN
          FOR i FROM 1 TO times DO
          WaitTime 1;
      PulseDo\PLength:=1,do11;
       ENDFOR
     ENDIF
      MoveL Target1,SSlow,z1,WelTor \Wobj:=Wobj0;
      MoveL Target2,SSlow,z1,WelTor \Wobj:=Wobj0;
     ENDPROC
ENDMODULE

But of course, what happen is that the robot reach the firs target, stops,  start making the pulsation cycle and once the 50th pulsation is done starts moving again to the second target!

I really hope someone can give me a hand,
   Thanks  F.





Answers

  • Hi gfilly,
     there are few different solutions for your problem.
    The first one that come to me is to use a task in order to control the output while the robot is moving.
    If you need any further help, please free to ask.

    Ciao
    Fabio
    C.I.A. Automation and Robotics
    www.ciaautomazione.it