MVWAIT but distance from the start of the movement

  • Hello,


    I want to trigger some time critical signals during the CP movement of my robot. Upon looking into AS language manual, I noticed the command MVWAIT that can be used to trigger signals when the robot reaches a certain distance before the target pose.


    For example:

    LMOVE pose1

    MVWAIT 10mm

    SIGNAL 500 ;This will turn signal 500 to high when to robot is 10mm away from pose1


    However, I would like to trigger a signal after the robot has travelled a specified distance. Basically something similar to MVWAIT but instead of measuring the distance from the target (pose), I would like to measure the distance from the start of the movement.


    Is there anyway to do such an operation?


    My controller type is E controller.


    Thank you in advance for your help.

  • SkyeFire

    Approved the thread.
  • Check out the following AS Commands:

    - WHILE/DO

    - DISTANCE

    - IF/END


    Due to forward processing and speed command differences you will more than likely need a WHILE/DO condition after the motion segment or the motion segment to be wrapped inside a WHILE/DO condition; checking DISTANCE in order to trigger signals or process non motion commands between motion segments.

  • @kwakisaki

    Thank you for quick reply. Its interesting that I would able to execute a WHILE loop before the motion command has completed its execution. Would I need to switch on PREFETCH.SIGINS for this?


    The reason I ask is because not only do I want trigger SIGNAL 500 after some distance from the start, but also SIGNAL 501 at the end of the LMOVE, while maintaining the CP movement.


    Currently, I trigger SIGNAL 501 by having PREFETCH.SIGINS OFF. So it triggers the signal after the end of LMOVE. But for DO/WHILE forward processing I am assuming I would need to have PREFETCH.SIGINS ON. In that case the strategy that I have for triggering SIGNAL 501 after the end of movement will no longer work.


    I could use MVWAIT 0mm but I am not sure if 0mm is a valid input. Sorry if this is a bit off topic.

  • Personally, I never change the prefetches when using AS as in many cases you then have to manage it changing states regularly to avoid issues.

    Example is when using MVWAIT and how it is explained in the manual.

    So I try to manage the automatic function of them by use of AS commands if I can.


    I also steer clear of signal setting as being used as positional references as you have to carefully manage (turn off and on) and also they can change state by many different influences such as an operator manually moving the robot to a different location and therefore the signal(s) are not relative now and could cause issues with auto recovery programs if you are using them as positional markers.


    The WHILE loop can be executed at any point in time it is just an instruction and not necessarily reserved for motion segments.

    It is very useful to loop a motion segment until the condition is met so that you could just 'walk' your robot to other Cartesians and manage signal states without having to bash the states of the system switches.

    So during motion segments you can then also monitor and change signals etc within the routine.


    SYSTEM SWITCHES can be used to automatically set conditions too, but they can have a negative effect on areas of the process too, so you need to manage them effectively the classic is RPS (that is another topic altogether).


    The power and flexibility of AS allows instructions/functions to be used and hence has many iterations of possible instructions and function combinations that can be achieved effectively instead.

  • I forgot to add, Kawasaki did release an additional option called 'Signal Output Within Path Function'.


    You will need to contact your local Kawasaki distributor in order to obtain it (they may charge you).

    May be something to consider if it appears more in line with what you need.


    I have never used it, but attached is the manual and reads like it does what is intended for signal synchronization during motion segments.

Advertising from our partners