RobotStudio event

Is it possible to overwrite a MoveL instruction?

Options
Hi There,

I am just wondering if it is possible to overwrite a MoveL instruction? 

I have created a C# application that feeds an array of position coordinates of my computer mouse into a RAPID module. 

Instead of the end effector going through each position coordinate that is recorded with the mouse, I am trying to get the robot to go to the lastest recoreded point. So that the robot follows the mouse and not just the trajectory. 

(NOTE: using the IRB-360 and IRC5) 

Thanks, 

Brian. 

Answers

  • lemster68
    Options
    You could make the MoveL with a variable robtarget.  MoveL pVariable, v100, tTool;
    Lee Justice
  • BrianHoll
    Options
    lemster68 said:
    You could make the MoveL with a variable robtarget.  MoveL pVariable, v100, tTool;
    Hi lemster68, 

    Thank you for your reply, just so I understand what this might look like in a RAPID module, are you envisioning something like this? 


    VAR robtarget TG_10:=[[-200,-200,0],[1,0,0,0],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];

        PROC OpenBuffTest()
            MoveL TG_10,v50, z10,tool0\WObj:=canvas1;
            WHILE TRUE DO 
                WaitTime 3; 
                TG_10:=[[200,200,0],[1,0,0,0],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
                WaitTime 3;
                TG_10:=[[-200,-200,0],[1,0,0,0],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
            ENDWHILE 
            !MoveL TG_20,v50, z10,tool0\WObj:=canvas1;
        ENDPROC


    PROC main()
       WHILE TRUE DO 
          OpenBuffTest
       ENDWHILE
    ENDPROC


    Tried to implement this and my simulation didn't  seem to like it, wondering if I may have implemented something incorrectly from your idea? 

    Thanks again,
    Brian. 
  • lemster68
    Options
    Brian,

        Kind of like that.  I will assume that your workobject is declared somewhere else.  I also will assume that your assignments represent your application feeding the robtargets to the robot.  The While TRUE DO is an infinite loop, so having it in your OpenBufferTest will cause it to never leave that loop.  That is fine I suppose if you put your MoveL into the While loop.  Let me know if there is some error coming up in reference to your saying the simulation didn't like it.
    Lee Justice