Here is a code snippet from a long time ago (2008). This is a motion subroutine of a larger application. It moves workpieces from one stack to another stack.
The statements instruct the robot to move through a sequence of various locations with approaches, linear moves, retracts, and transitions between locations.
Much more than this, and you'll need a VAL3 training class.
<code>begin
// ==========================================================================
// PROGRAM RightToLeft()
//
//OPERATION:
// Starting point jSafe0 in pgm PickAndPut()
// pick from RIGHT stack to LEFT stack
// assumes RIGHT stack is full, LEFT stack is empty
//
//called from: PickAndPut()
//
//incoming parms: none
//outgoing parms: none
//
//by XXX 6mar08
// ===========================================================================
nFirstIndex=nStackQuantity-1
nLastIndex=0
nStep=-1
//
for nIndex=nFirstIndex to nLastIndex step nStep
pMovePoint=pRightStackBot
pMovePoint.trsf=pRightStackBot.trsf*{0,0,-nPlateThickness*nIndex,0,0,0}
//
movej(jOverRightStack,tPickTool,mTraverseSpeed)
movel(appro(pMovePoint,trApproach20),tPickTool,mApproachSpeed)
movel(pMovePoint,tPickTool,mPickSpeed)
waitEndMove()
io:bOut0=true
delay(nPickDelayTime)
movel(appro(pMovePoint,trApproach20),tPickTool,mPickSpeed)
movel(pOverRightStack,tPickTool,mCarrySpeed)
movej(jRightShowPlate,tPickTool,mCarrySpeed)
//movej(jOverRightStack,tPickTool,mTraverseSpeed)
//movej(jRightShowPlate,tPickTool,mTraverseSpeed)
//
movej(jMiddle,tPickTool,mCarrySpeed)
movej(jLeftShowPlate,tPickTool,mCarrySpeed)
//
// traverse across from RIGHT STACK to LEFT STACK and place the plate
//
pMovePoint=appro(pLeftStackBot,{0,0,(nPlateThickness*(nStackQuantity-nIndex))+nDelta,0,0,0})
pMovePoint.trsf=pLeftStackBot.trsf*{0,0,(-nPlateThickness*(nStackQuantity-nIndex))+nDelta,0,0,0}
movej(jOverLeftStack,tPickTool,mCarrySpeed)
//movej(jLeftShowPlate,tPickTool,mTraverseSpeed)
//movej(jOverLeftStack,tPickTool,mTraverseSpeed)
movel(appro(pMovePoint,trApproach20),tPickTool,mApproachSpeed)
movel(pMovePoint,tPickTool,mPutSpeed)
waitEndMove()
io:bOut0=false
delay(nPutDelayTime)
io:valve1=true
movel(appro(pMovePoint,trApproach20),tPickTool,mApproachSpeed)
waitEndMove()
io:valve1=false
movel(pOverLeftStack,tPickTool,mTraverseSpeed)
//movej(jOverLeftStack,tPickTool,mTraverseSpeed)
//
endFor
end
</code>