RobotStudio event

MoveJSync with a ProcCall with parameters

I`d like to call a procedure with parameters in a "MoveJSync"-instruction like:

MoveJSync pTarget,vFast,z100,tGripper,"ProcCall with Parameter";
which calls following procedure:

PROC ReleaseFixture(num nFixture)
       !do something with nFixture
ENDPROC

Is there a way to do the ProcCall with parameter synchronously at movement?

Thanks for Help
Tagged:

Comments

  • Micky
    Micky ✭✭✭
    Hello Thomas,

    the standard RAPID instruction MoveJSync can not handle parameters for the sync routine, because it is an encapsulate trigger interrupt.

    The software option "RobotWare MachineTending" and the German Add-in "Homepos Running" provides additional optional parameters ("num", "dnum" or "string") for the sync routine.

    See following routine interface:
       MT_MoveJSync
            [\Conc] ActPos ToPoint speed [\T] zone [\Inpos]
            Tool [\Wobj] ProcName [\PNum] [\PDnum] [\PStr]


    In the moment you could create several sync routines which calls your routine and hands over the fixture number:

    Example;

       PROC Sync_RelFix1()
          ReleaseFixture 1;
       ENDPROC

      PROC Sync_RelFix2()
          ReleaseFixture 2;
       ENDPROC

    MoveJSync pTarget,vFast,z100,tGripper,"Sync_RelFix1";
    MoveJSync pTarget,vFast,z100,tGripper,"Sync_RelFix2";

    Best regards
    Micky





  • Another option?

    Globally define your variable nFixture , set it to the correct value before the MoveJSync instruction, then the called ReleaseFixture routine uses nFixture directly.

  • Micky
    Micky ✭✭✭
    Hello graemepaulin,

    i think the use of a global variable is not a good idea, because if you use a zone for the move instruction the program pointer did not wait until the zone of the target point is reached.
    That means, if you want to release the fixture 1 and 2 via two MoveJSync instruction and use program code which looks similar to the following:
       
        nFixture:=1;
        MoveJSync *,...
       
        nFixture:=2;
        MoveJSync *,...

    You have the problem, that the variable nFixture is set to value 2 before the 1. sync routine is executed. In this case each sync routine is using the value 2 instead of the values 1 and 2.

    Best regards
    Micky
  • Hi Micky,


    Thanks for pointing this out - if a zone is used (as opposed to a fine point) this would be the case as the logic pointer can move ahead of the motion pointer.

    Would think in this type of situation that the robot should be stopped (fine point) while doing something with the fixture?


    Regards

    Graeme

  • Micky
    Micky ✭✭✭
    Hello graemepaulin,
    I think if you want to grip a part you should use a fine point, so that the part is always gripped in the same way. For saving cycle time you could start the closing of the gripper via a trigger instruction
    In case of you use a fine point for the grip poisition there is no need to use a trigger instruction because the logic can be added directly behind the move instruction.
    BR
    Micky