Jump to content
OMRON Forums

Programatically call undefine


NigelInWindsor

Recommended Posts

What is the correct procedure to implement, before calling UNDEFINE and DELETE LOOKAHEAD within and at the end of a motion program.

At the moment I simply place a DWELL 100 but this is prone to fail as it’s based on time and not based on whether the motion program has truly finished with all the resources.

open prog 1

:

:

DWELL 100

cmd “&3 UNDEFINE”

cmd “&3 delete lookahead”

close

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

Have you tried using a PLC that checks a status element and flag to sychronize with your motion program completion? See the example I put below.

 

Such as:

 

[PROG]

 

OPEN PROG 1

:

:

DWELL 100

MotionCompleteFlag = 1 //User flag to indicate it went through the whole motion program

 

CLOSE

 

 

[PLC]

 

OPEN PLC 1

 

IF(MotionCompleteFlag == 1 && Coord[x].ProgRunning == 0)

{

cmd “&3 UNDEFINE”

cmd “&3 delete lookahead”

MotionCompleteFlag = 0 //Resets status of flag

}

 

CLOSE

 

This is an example of using a PLC to synchronize with your motion program completion through the use of user-flags and status elements.

Link to comment
Share on other sites

What is the correct procedure to implement, before calling UNDEFINE and DELETE LOOKAHEAD within and at the end of a motion program.

At the moment I simply place a DWELL 100 but this is prone to fail as it’s based on time and not based on whether the motion program has truly finished with all the resources.

open prog 1

:

:

DWELL 100

cmd “&3 UNDEFINE”

cmd “&3 delete lookahead”

close

 

Hi,

 

I think the C.S. has completed all the move by the time "dwell" start to execute.

 

According to ppmac user mannual, one should delete lookahead buffer first before add/remove axis definition in that C.S. .Maybe it is because the controller need to re-plan its linearly-managed lookahead buffer. So, you can do like this:

 

"dwell 10 // Stop lookahead execution

cmd "&1 delete lookahead"

cmd "&1 undefine"

sendallcmds"

 

 

Hikor

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...