INTERRUPT ON BETWEEN PTP C_PTP

  • Hi,


    I want to move without advance run stop to F_MOVEDOWN position.

    Pseudo code:

    PTP to F_MOVE2 C_PTP

    PTP to F_PICK C_PTP

    start interrupts

    PTP to F_MOVEDOWN and stop when interrupts are triggered and Z position is saved to F_TEMP.Z


    but the problem is I want to move with C_PTP between F_PICK an F_MOVEDOWN.

    Interrupt ON is stopping ADVANCE run.


    Is there a possibility to run INTERRUPT ON somehow between two movements without stopping advance run?

    I tried to just add function and running:

    CONTINUE

    interrupt on etc.

    but I'm worried that interrupt will be triggered before ptp to F_PICK movement end and there will be collision.


    Any suggestions?


    Here is the code:

  • rvsh

    Changed the title of the thread from “INTERRUPT ON BETWEEN PTP C_DIS” to “INTERRUPT ON BETWEEN PTP C_PTP”.
  • I tried something like this.


    Pseudo code:

    Interrupts on

    run movetopick

    In this routine run three moves:

    ptp to F_MOVE2 C_PTP

    ptp to F_PICK C_PTP

    ptp to F_MOVEDOWN


    in interrupt check coordinates it POS_INT.X and POS_INT.Y is different from F_MOVEDOWN.X and F_MOVEDOWN.Y just resume - dont runt interrupt code.

    INT_OMIT is used because these interrupts are used in other lines of this program too - so to not affect that code.


    Will it work? Any help?


    Edited once, last by rvsh ().

  • "I want to move without advance run stop"


    ok, just don't use anything that causes advance run stop




    "Interrupt ON is stopping ADVANCE run."


    No it isn't.



    "I tried to just add function and running:


    CONTINUE

    interrupt on


    but I'm worried that interrupt will be triggered before ptp to F_PICK movement end and there will be collision."


    INTERRUPT ON does not cause advance run stop so do not use CONTINUE there.

    stop is caused by BRAKE command after interrupt is triggered. so do not call MOVEDOWN() and remove BRAKE from ISR and there will be no stop.

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • Thanks - I was mistaken regarding INTERRUPT ON stopping the advance run.

    I would like to achieve movement with aproximation like this:

    PTP to F_MOVE2 C_PTP

    PTP to F_PICK C_PTP

    PTP to F_MOVEDOWN

    but I would like interrupts on (with brake) only when PTP to F_MOVEDOWN.


    If the INTERRUPT ON doesn't stop advance run does this mean that the Interrupt will be on on all three moves (if $advance = 3) even if i put the command INTERRUPT ON just before F_MOVEDOWN??

    Like this:

    PTP to F_MOVE2 C_PTP

    PTP to F_PICK C_PTP

    (here INTERRUPT ON)

    PTP to F_MOVEDOWN


    Thank you in advance.

  • learn to walk before you run. in this case learn about advance run before getting into interrupts.


    CONTINUE is an example of command that only has effect on the very next line. but when it comes to program instuctions, this is rather an exception, not the rule...

    just about everything else has effect from the moment it is set, to the moment it is rest.

    that inclused interrupt on/off

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • So you are saying that adding simple C_PTP (line 22) like below will do the job and all moves will be with approximation (no "approximation not possible error")?

  • Quote

    So you are saying that adding simple C_PTP (line 22) like below will do the job and all moves will be with approximation (no "approximation not possible error")?

    no.... i did not say all of them. but that would make move in line 22 approximated.

    however i would advise to consider using different motion type there if you are going to approximate.


    i stated that you seem to battle on two fronts and get dragged into interrupts programming while still unclear on advance run.


    one simple thing to try is:

    if you suspect that INTERRUPT ON/OFF is causing advance run stop, comment them out and see if the motions are blended. or read system variable manual and try $stopnoapprox....

    1) read pinned topic: READ FIRST...

    2) if you have an issue with robot, post question in the correct forum section... do NOT contact me directly

    3) read 1 and 2

  • I will try if the code works with blended moves. If not I will try to use TRIGGER - that looks like very good idea - Hadn't thought about it this way. Thanks DannyDJ!


    Panic Mode - I know how advance run works and I need to use interrupts. I don't know any other more effective solution to stop at search path. Still I learned something - thank you. I read a lot of your answers on forum and you helped me many many times even that you didn't know it :smiling_face:


    $stopnoaprox isn't a solution - message is not important - not blended moves are.

    I will publish results tommorow.

  • Hi,


    Last code works ok. Just C_PTP and moves are blended and interrupts are on. Thank you Panic Mode.


    TRIGGER doesn't work - there is an error that INTERRUPT ON must be placed on new line.


    Thanks for help

  • To me it does work, you just have to try harder :winking_face:

Advertising from our partners