RobotStudio event

Rapid incremental move help

firstly please let me say that im only just starting to self teach programing rapid, so sorry if my questions are a little simple
 

I have a pick and place machine which has lots of place targets (100+)

but now i need to do a small move at every place target, (basically just a +x,-x,+y-y movement) but im being slightly lazy and dont want to write this move into every target, so i would like to use some sort of incremental move in a small program i can call on

 

so far i have tried to write this as a small program

PROC rWiggle()

VAR robtarget wiggling;

wiggling;= crobt(tool;=tool1wobj;=placetable);

MOVEL RELTOOL (wiggling,0,10,0),v500,fine,tool1wobj;=placetable);


MOVEL RELTOOL (wiggling,0,0,0),v500,fine,tool1wobj;=placetable);


MOVEL RELTOOL (wiggling,10,0,0),v500,fine,tool1wobj;=placetable);


MOVEL RELTOOL (wiggling,0,0,0),v500,fine,tool1wobj;=placetable);

ENDPROC

 

then i run this program after the target move

 

the problem is, crobt is loading the last postion which was used in the "main" modual, but all my target places are run in a different modual, is there anyway i can do this? (which im sure there is, just im a little slow at this)

 

thanks

Gareth

Comments

  • i thought i would update, i think i got it to work with a small timer involved, im guessing there wasnt enough time to load the varibles into memory
     


    PROC rWiggle()

    VAR robtarget wiggling;

    wait timer in here

    wiggling;= crobt(tool;=tool1wobj;=placetable);

    MOVEL RELTOOL (wiggling,0,10,0),v500,fine,tool1wobj;=placetable);


    MOVEL RELTOOL (wiggling,0,0,0),v500,fine,tool1wobj;=placetable);


    MOVEL RELTOOL (wiggling,10,0,0),v500,fine,tool1wobj;=placetable);


    MOVEL RELTOOL (wiggling,0,0,0),v500,fine,tool1wobj;=placetable);

    ENDPROC

     

    thanks for looking
  • crobt was propably being executed ahead of robot motion, so you were getting a previous position not the final position of the robot, wait timer will work, waituntil with the inpos option would make more sense though (or setting a fine point on the previous motion will acheive the same thing).


  • i havent looked yet, but im not sure how to do a wait untill action?

  • WaitUntilInPos, TRUE;


    That is the command I have used. Its slightly strange to do that but it works.

    Basically its waiting until TRUE is true with the option to wait until the robot is inposition as well.
  • thank you verry much for that, will have a go in a minute
  • well i programmed it into the rapid and it works a treat. thanks

    plus ive placed it in a few other locations and its really smoothed out a few niggles