Hi. I created a PTP motion for a UR3 robot using this Python script
from vcScript import *
app=getApplication()
comp=getComponent()
robot=comp.findBehaviour("Executor")
prog=robot.Program
main=prog.MainRoutine
main.clear()
s=main.addStatement(VC_STATEMENT_PTPMOTION)
matrix=s.Positions[0].PositionInWorld
vec=matrix.P
vec.X=230
vec.Y=431
vec.Z=1215
matrix.P=vec
s.Positions[0].PositionInWorld=matrix
It works fine in Visual Components when I click the play button. But when I click Export → Post Process to export as a script, I get all zeroes in the movej
def script():
set_tcp(p[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000])
movej([0.000000,0.000000,0.000000,0.000000,0.000000,0.000000],v=3.142)
end #script
script()
Then if I go back to Visual Components and click “Touch up” on the motion statement, the export works fine and I get
def script():
set_tcp(p[0.000000, 0.000000, 0.000000, 0.000000, 0.000000, 0.000000])
movej([3.069233,-2.115247,1.896788,1.789200,-1.570741,1.643185],v=3.142)
end #script
script()
So how can I modify my Python script so I don’t need to click touch-up ? And what does touch-up do?