RobotStudio event

custom motion command

can anyone help me in creating a custom motion command,i need to add a analog output in every motion command
For eg -

Comments

  • Is there some reason you do not want to use the Rapid instruction MoveLAO?
    Lee Justice
  • Try this.

    MODULE Grind(SYSMODULE,NOSTEPIN,VIEWONLY,READONLY)
        !***********************************************************
        !
        ! Module: Unnamed 
        !
        ! Description:
        !   Custom motion proc for Move with analog output
        !
        ! Author: Lemuel
        !
        ! Version: 1.0
        !
        !***********************************************************
    CONST robtarget myRobtarget10:=[[100,200,300],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
    CONST robtarget myRobtarget20:=[[100,200,300],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];
    CONST robtarget myRobtarget30:=[[100,200,300],[1,0,0,0],[0,0,0,0],[9E9,9E9,9E9,9E9,9E9,9E9]];

        PROC GrindL(VAR Robtarget pPos,
            VAR Speeddata Speed
            \num Time,
            VAR zonedata zone,
            PERS tooldata tool,
            \PERS wobjdata Wobj,
            VAR signalAO analog,
            num value)
            
            MoveLAO pPos,Speed\T?Time,Zone,tool\Wobj?Wobj,Signal,value;
        ENDPROC

        PROC TestMotion()
            GrindL myRobtarget10,v100,z10,tool0,AO1,2.5;
            GrindL myRobtarget20,v200,z50,tool0,AO1,5;
            GrindL myRobtarget30,v80,z10,tool0,AO1,3.5;
        ENDPROC
    ENDMODULE
    Lee Justice