I can't understand why the program is not executed?


#1

I can’t understand why the program is not executed?

local Option={CP=1, SpeedJ=50, AccJ=20}
MovJ(P1, Option)
Wait(0)
local P10={coordinate = {x = 0.0,y = 0.0,z = 0.0,r = 0.0}, tool = 0, user = 0}
GetPose(P10)

local Option={CP=1, SpeedL=50, AccL=20}

for i=0,10,1 do

	P10.coordinate.x = P10.coordinate.x + 10.0
	MovL(P10, Option)

end

#2
  1. Getpose(P10) is wrong
  2. The coordinate is unreachable

#3

I figured it out.
It is necessary to record:

local P10={coordinate = {0.0,0.0,0.0,0.0}, tool = 0, user = 0}

it is necessary to apply in the format

P10.coordinate[1] = P10.coordinate[1] + 10.0