Jump to content
OMRON Forums

motion with lookahead


yizhou

Recommended Posts

With the same definition of lookahead, like "&2 define lookahead 500,50", and same target point data, the following motion run differnce path.

prog 1063 runs wrong path while prog runs correct path, who can tell me why? thank you very much!

 

 

OPEN PROG 1063 CLEAR

ABS

FRAX(X,Y,Z)

LINEAR

P8007=0

while(P8007< P8010)

M855=0+p8007

M857=100+p8007

M859=200+p8007

M861=300+p8007

M863=400+p8007

M865=500+p8007

F(P4050)

TA(P4051)

X(m854)Y(m856)Z(m858)A(m860)B(m862)C(m864)

endwhile

M1014==1

DWELL10

CLOSE

 

;for example, when p8010=3

OPEN PROG 1066 CLEAR

ABS

FRAX(X,Y,Z)

LINEAR

P8007=0

while(P8007< P8010)

M855=0+p8007

M857=100+p8007

M859=200+p8007

M861=300+p8007

M863=400+p8007

M865=500+p8007

p(6001+100*P8007)=m854

p(6002+100*P8007)=m856

p(6003+100*P8007)=m858

p(6004+100*P8007)=m860

p(6005+100*P8007)=m862

p(6006+100*P8007)=m864

endwhile

F(P4050)

TA(P4051)

X(p6001)Y(p6002)Z(p6003)A(p6004)B(p6005)C(p6006)

X(p6101)Y(p6102)Z(p6103)A(p6104)B(p6105)C(p6106)

X(p6201)Y(p6202)Z(p6203)A(p6204)B(p6205)C(p6206)

M1014==1

DWELL10

CLOSE

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Your examples do not give enough information to tell what you are trying to do. Many calculated variable values are not used, and many used variable values are not calculated in the example. So I will have to guess what is going on.

 

You say (I think) that the 2nd program acts as you want it to, but the 1st program does not. In the 2ndprogram, all variable values are calculated before any move commands are processed, so there are no timing issues.

 

In the 1st program, your are calculating some variable values, and then a move command, inside a loop. You have to remember that with lookahead, move calculations can be happening many moves ahead of the actual execution of moves. In this case, the program could be going through the loop several times ahead of the actually executing move, so things could seem to be out of sequence.

Link to comment
Share on other sites

The programs are different and have different variables. Have you checked these? What happens if you turn off lookahead?

 

when I turn off lookahead, both of two programs run correct path; but with setting up the same variables, the first motion program run unexpected path while the second program run right path.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...