1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
Everywhere
  • Everywhere
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Members
  3. newuserpl123

Posts by newuserpl123

  • Aborting the cell program and reloading it.

    • newuserpl123
    • May 9, 2025 at 7:49 PM

    Thank you all for you answers.

    Quote from Leon

    Not possible, MoveEnable,DrivesOn and Extstart are necessary to be able to start.

    Okay, I just needed confirmation that these signals needed to be there for the interrupt to work. I was hoping there was a chance that this interrupt could work "somehow in the background".

    Quote from Leon

    which program continues if cell is stopped? How is cell stopped? why isn't it looping and waiting for commands from the PLC?

    I am testing my program in KukaSIM. I set the active program Cell.src and Submit SPS is running in the background. When I force RESTART simulating PLC. Sps responds to this, the STOP 1 command is executed and the simulation pauses. When I resume the simulation, the program lines in SPS fly through, i.e. CANCEL 1 and RUN CELL.src. But the simulation continues from the place where the STOP 1 command was triggered. The Cell.src program does not start from beginning and does not loop in this program waiting for the bExecute signal. It only continues to work in the program in which STOP 1 occurred, i.e. P10. Perhaps this is related to the fact that I am testing it in KukaSIM and not on a real controller or at least OfficeLite?

    Quote from Leon

    It is possible, the question is it necessary? If have been through your post several times and i have still trouble understanding what happened to the robot that you have to restart Cell.

    I think I have developed this issue above. After the unpause, the robot continues to work from the place where STOP 1 occurred.

    Quote from Leon

    Also it would be nice if you mention what type of controller you are working with (KRC2,KRC4 or KRC5) with the KSS version as stated in the "Read first" topic.

    Currently I don't have the robot with me yet, I'm preparing the entire project offline for now. But the controller will be KRC5 and I think it will be version KSS 8.7

    Quote from panic mode

    This 'solution' is done by someone not concerned with things like cost, downtime, collisions... There is ZERO validation if called program number is really correct. in other words this is a time bomb. single corrupt bit or loose I/O wire can result in calling wrong program and when that happes it will be a big and expensive mess. sure it works now but give it time...

    All of this is managed by the PLC controller. In our applications, it assigns the program to the robot based on many conditions. The robot in our applications is a regular tool, such as a servo drive. I give it a program number and a start command, and the robot, being in program P10, for example, returns number 10 to me, and I, on the PLC controller side, know about it. The robot executes the program and returns the DONE status to me and waits until I turn off the bExecute signal. Like an ordinary MoveAbsolute movement in a servo drive.

    Quote from panic mode

    you mean robot can continue working.

    Yes, I meant the robot. The Cell program is restarted/The program pointer is in Cell.src and not in the Subprogram and waits for a signal from the PLC controller which program should be executed again and the bExecute command.

    Quote from panic mode

    So...?

    The thing is that the interrupt solution won't work and I guess I have to handle it in SPS.

    Quote from panic mode

    What do you mean by "restart Cell"? robot program CANNOT run when move enable is false - that is by design. If you want to be able to select and run CELL (or whatever program) in other modes, you need to evaluate application needs and adapt PLC code, because that is what controls move enable. one common case is use of T1 to test and modify programs so normally move enable SHOULD be true when robot is in T1 mode.

    Sure, I understand, here I only meant to outline the situation in which I need to restart the Cell.src program, so that the program pointer loops and waits again for the program number from the PLC and the bExecute signal. I simply want the robot not to be in any subprogram after my restart, but for the Cell.src program to be loaded again. But without giving it the MoveEnable, DrivesOn and ExtStart signals. So everything then comes down to handling it in the SPS.

    Quote

    Someone wrestling with basic things like move enable, Drives on etc is not qualified to PROGRAM robots... And certainly should NOT be allowed to mess with advanced concepts such as use of interrupts.

    I will leave this without comment.

    Quote

    No it is not. One of the options is to manually select the program. in fact standard CELL.SRC that KUKA supplies in form of a template is meant for just that - manually select and start CELL program until robot is at home and BCO is done, THEN change mode to EXT and let PLC take over. and once it runs it should NEVER need deselecting of CELL.src. what kind of "emergency situations" you are running into that require reseleting of your CELL?

    This solution is not for me. I need to be able to remotely start the Cell.src program from beginning. I have several robots in my applications and I can't imagine going to the robot teachpedant/smartpad and selecting the Cell.src program on each one after a certain situation. For me, as a programmer responsible for starting the entire line, the robot is one of many subsystems that has to perform a task and return a signal that it has completed the task. Depending on the machine, the robot manufacturers often change and each robot has a different control, so please don't tell me that I shouldn't start programming robots because I've already started more than one. I just wanted to ask about certain issues, because everything happens differently on each robot.


    To sum up all my ramblings. I wanted to restart the Cell.src program - that is, for the robot to exit all sub-programs and the Cell.src program to load again with the program pointer in line 0. All this was to take place without giving the MoveEnable, DrivesOn, ExtStart signals. Only then does the superior PLC controller start the automatic cycle of the entire machine and the robot receives the MoveEnable > DrivesOn > ExtStart signals accordingly. And only then does the PLC controller give it the program number to execute and the bExecute signal to start for example program P10. And I wanted to get confirmation whether doing this from the SPS level with the commands: STOP 1, CANCEL 1 and RUN Cell.src will achieve this. And additionally, get the answer that testing this in KukaSIM has certain limitations and it may not work entirely.

  • Aborting the cell program and reloading it.

    • newuserpl123
    • May 8, 2025 at 10:07 AM

    Good morning,
    I am interfacing a Kuka robot with a PLC. I would like to be able to restart the Cell program in case of an emergency or just want to start over. I would like to be able to restart the Cell program in case of an emergency or just want to start over. I have one solution that is based on an interrupt and it looks like this. I found in one topic that someone does it similarly and for him to work. Here's code for my solution. Please do not judge not using Kuka's PGNO mechanism to inflict programs. This is the universal standard of my company that we use to handle robots of different companies.

    Quote

    DEF CELL ( )

    INTERRUPT DECL 1 WHEN InSig_bRestart == TRUE DO CellInterrupt()
    INTERRUPT OFF 1
    WAIT SEC 0.012
    INTERRUPT ON 1
    WAIT SEC 0.012
        
    labelStartMain:
       
    MainCell()
       
       GOTO labelStartMain
       
    END

    DEF MainCell()
    labelStart:
       
    IF InSig_bExecute THEN
          
    SWITCH InSig_nActionNumber ; Select with Programnumber
             
    CASE 10
    P10_BaseCheck()
                
    CASE 20
    P20_ClampsCheck()
                
    CASE 30
    P30_Welding()
                
    CASE 40
    P40_Cleaning()   
                
    CASE 100
    P100_Homing()
                
    CASE 110
    P110_ServicePos()   
                
    CASE 120
    P120_DisassemblyPos()
                
    CASE 130
    P130_TcpCheckPos()
                
    CASE 140
    P140_VisionCheck()  
                
    CASE 150
    P150_Cleaning()      
                
    DEFAULT
                GOTO labelEnd
                
    ENDSWITCH
          
    WAIT FOR InSig_bExecute==FALSE
    OutSig_nActionNumber = 0
          
    labelEnd:
          
    ENDIF
       
    OutSig_bDone = FALSE
    OutSig_bBusy = FALSE
    OutSig_nActionNumber = 0
       
    WAIT SEC 0
          
       GOTO labelStart

    END


    GLOBAL DEF CellInterrupt()
    INTERRUPT OFF 1
       BRAKE
    INTERRUPT ON 1
    WAIT SEC 0.1
       RESUME
    END

    Display More

    This solution works very well when the robot is in some sub program such as p10. It restarts the program and I can start working again. But only when we have MoveEnable signals etc. given, that is, the robot is in external automation mode. But what if I don't have these signals. There is a situation that the automatic mode of the machine from the PLC level is turned off which means the robot, also does not have the automatic on. I want to be able to restart Cell when I don't have MoveEnable, ExtStart etc signals. How to make the interrupt active when the robot is not running? Maybe the MoveEnable signal alone without DrivesOn and ExtStart is enough? Is the only option left is to restart the program from SPS with CWRITE commands(STOP>CANCEL>RUN)?

    Code
     ;Restart cell.src
     IF InSig_bRestart AND NOT sps_bRestart THEN
    	sps_bRestart = TRUE
     ENDIF
     IF NOT InSig_bRestart THEN
    	sps_bEndRestartSeq = FALSE
     ENDIF         
     IF sps_bRestart AND NOT sps_bEndRestartSeq THEN
    	CWRITE($CMD,s,m,"STOP 1")
    	WAIT SEC 0.1
    	CWRITE($CMD,s,m,"CANCEL 1")
    	WAIT SEC 0.1
    	CWRITE($CMD,STAT,MODE,"RUN /R1/CELL()")
    	WAIT SEC 0.1
    	sps_bRestart = FALSE
    	sps_bEndRestartSeq = TRUE            
     ENDIF
    Display More

    I'm testing this in KukaSIM, but it doesn't work. The simulation stops after a stop, and further when I start it again, the Cell does not restart and the program continues.

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download