Cancel Program and Send Pointer to Cell.

  • Yes your right. Every single line where is P00. And maybe it will be a weird question, but where should i declare it? Which .dat file? Cause this is cell.src

  • You can create a cell.dat, or you can declare them in $config.dat, or you can create another dat file with attribute public and declare the variable as global.

    I am trying this out for a cell I'm working with and I am stuck here. How do I declare dmy on the $config.dat? I tried writing a few different lines and I'm confused as to what to write there.

  • exactly as it is already defined in CELL.SRC


    just comment out:


    Code
    DECL CHAR DMY[3]
    DMY[]="---"

    and add it in a DAT file:

    Code
    DECL CHAR DMY[3]
    DMY[]="---"
    
    or 
    
    DECL CHAR DMY[3]
    DMY[1]="-"
    DMY[2]="-"
    DMY[3]="-"

    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

  • if you open project in WoV, place mouse cursor on variable and then press F12. it takes you to declaration of the variable.

    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 have been testing hermann's method of cancelling and resetting the cell program and it stops working whenever the robot is stopped due to turning off the enable signal or any safety stop happening, while any sub-program is running. It works great when the abort signal is sent while the robot is running the sub-program without interruptions. However, after restarting the robot, after a stop, and attempting to abort from the line it's in inside of a sub-program (without completing the sub-program), it does not work. In fact the robot continues executing the sub-program while keeping the program active and the application running signals OFF. So my PLC doesn't even know that the robot has continued executing the sub-program it's in and the abort signal does not work.
    The use case I want to add is to be able to abort the robot while it is being held by any signal, safety or otherwise. Which is something I currently can't do. When I get stuck in this state I need to reset the cell program from the teach pendant.

  • not sure what post you are referring to, hermann made a lot of posts...

    you can use CWRITE to select, stop or cancel program.

    this has to run in submit of course, CWRITE cannot operate on own thread or interpreter.


    DECL STATE_T s

    DECL MODUS_T m

    CWRITE($CMD,s,m,"STOP 1")

    CWRITE($CMD,s,m,"CANCEL 1")

    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 am using the interrupt method. I got it to work now. Basically the interrupt was turning off anytime enable or a safety signal triggered a robot stop, so I threw something on a sub to always turn it on.

    Never mind, this did not fix it after all. I will try to use CWRITE.

  • one of the issues with aborting program by some automated mechanism (RESUME, CWRITE) is that robot is not necessarily in known position and automated recovery may not be safe unless done very carefully.

    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

  • one of the issues with aborting program by some automated mechanism (RESUME, CWRITE) is that robot is not necessarily in known position and automated recovery may not be safe unless done very carefully.

    Yeah, I have dealt with recovery programs in FANUC robots, but this cell program does not have an automatic homing command. I have a custom go home sub-program that can be manually requested from the HMI and it has keep out zones defined for known obstacles, while running at a slow override speed. So I am aware of these risks.

  • This worked perfectly for my current setup. Much better than the interrupt for what I need. Thanks!

  • .. but this cell program does not have an automatic homing command....

    Nobody hinders you to modify the cell program, and add a automatic homing routine.

    Much better than the interrupt for what I need.

    Can't imagine what's the problem with the interrupt. Have programmed uncountable robots myself with this technique, and know hundreds of robots that have been programmed like that with no problems.

    But if you are happy with your solution, be happy :smiling_face:

  • Nobody hinders you to modify the cell program, and add a automatic homing routine.

    Can't imagine what's the problem with the interrupt. Have programmed uncountable robots myself with this technique, and know hundreds of robots that have been programmed like that with no problems.

    But if you are happy with your solution, be happy :smiling_face:

    The interrupt doesn't work under specific circumstances. The robot has to be running the cell program in order for the interrupt to work and I may want to interrupt the program while the cell program is paused. What happens then is that the interrupt stops working for some reason if I trigger it while the cell program is paused and if I start the robot, it restarts from the current line and doesn't send me the signals of program active and application running. I use these two signals to determine that the robot is executing a sub-program. So I get stuck inside of the sub-program with no way to exit it from the PLC. I hope this explains it better. CWRITE works regardless of the cell program being running or paused, since it's on a sub of course.

  • The robot has to be running the cell program in order for the interrupt to work

    This is unclear. "Running the CELL program" could mean the program pointer is in the CELL program, or it could mean that whatever subprogram is running was called from the CELL program.

    Either way, if the Interrupt is declared Globally, this should not be a problem.

    I may want to interrupt the program while the cell program is paused.

    "Paused" how, exactly? If program execution is halted, then no, the Interrupt can't fire. OTOH, if the CELL program is merely looping, or at a WAIT command, then the Interrupt should still work fine.

    if I start the robot, it restarts from the current line and doesn't send me the signals of program active and application running.

    APPL_RUN is dependent on certain parts of CELL and P00, but $PRO_ACT is a system signal that should always work regardless of program conditions -- it reflects the status of the R icon at all times.

  • Quote

    I may want to interrupt the program while the cell program is paused

    if the CELL is paused so is any subprogram that CELL is calling.

    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

Advertising from our partners