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
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. KUKA Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Understanding cell.src

  • iDio
  • May 15, 2018 at 8:57 PM
  • Thread is Resolved
  • iDio
    Trophies
    3
    Posts
    140
    • May 15, 2018 at 8:57 PM
    • #1

    Hello everyone.
    Introduction: first time implementing automatic external in a Kuka robot ( kr16-2 controller KRC4 ).

    1- I add a lot of trouble when trying to choose the program based on the "selected bit" -> PGNO_TYPE 1
    I couldn't select the program at first try. Sometimes after 3 or 4 attempts I was able to change the program. But i never could figure out how or why. It looked like the "synchronization time" was not ok everytime. I was sending pulses like it's supposed to in the integrator manual. Does anyone have a ladder example?

    2- What's the point of using cell.src, if i can run,cancel and start a regular program from sps.sub? Do i actually need the BCO check XHOME or can i remove it?

    3 - Can i simply add code to sps.sub to select programs at runtime, based on the fact that i'll have only 4 progs?
    Something like

    Code
    IF $IN[1]		;PROGRAM SELECTION
    	cancel/r1/programs/myProgram() 	
    	run/r1/programs/myProgram()
    	ELSEIF $IN[2]
    	cancel/r1/programs/myProgram()
    	run/r1/programs/maintenancePos()
    	ENDIF
    
    	IF $IN[10]
     	start/r1/prgrams/myProgram()
    	ELSEIF $IN[20]
    	start/r1/prgrams/maintenacePos()
    	ENDIF
    Display More

    The robot and robot cell are already on the way to the final customer and I'm gonna install it next week. So.. any additional information can either be neutral or very usefull to me :uglyhammer2:
    Thank you

  • panic mode
    Reactions Received
    1,296
    Trophies
    11
    Posts
    13,133
    • May 18, 2018 at 5:53 PM
    • #2

    Hello,

    There are three types of PGNO, all are well docummented.

    For few programs type 3 may be simpler (specially if using wired signals between PLC and KRC). Note that control sequence is a bit different though...

    things to watch for is signal type - Some signals are EDGE-SENSITIVE, while others are LEVEL-SENSITIVE. this is a very important distinction. edge sensitive signals in this case are rising-edge sensitive. this means that if the signal is already true (or is not low long enough) edge may not be sensed.

    for edge sensitive signals one must ensure correct timing. i would recommend 20ms as minimum duration for on and off states...

    crude but simple workaround is to simply use symmetrical and low frequency clock (10Hz for example) in PLC logic on all PLC outputs that are driving KRC edge sensitive inputs. but like anything, doing things without understanding is ... not very good.

    CELL is used as a standard, documented and flexible way to start user programs using external controller. of course one can create own logic too and modify or replace CELL completely but i would suggest being careful. in my experience it is usually those who are least qualified to make such workarounds that try hardest to make something on their own... somehow they think they can make "better" programs when in reality they are literally killing resources or causing all kind of problems - some that may not be immediately observable (then they blame problems on robot).

    they are also the ones annoyed by BCO and just "want it gone...". this can have a very bad consequences and i see it as a red flag. when i think about it, i have never heard trained programmer complain about BCO.

    BCO check in CELL is configurable and can be removed if needed (there is no BCO in EXT mode) but - there is no need to delete any code. CELL is already created to be flexible, it is enough to toggle variable CHECK_HOME. this can be done from single variable monitor.

    and to answer the last question...
    if you have ever seen annoying popup windows showing up faster than you can can close them - your pseudo code is basically doing sort of the same thing with submit interpreter. reason is that CWRITE commands are asynchronous and may take relatively long time to execute. Submit is running in "bursts" so one scenario is that same line of code may be processed many times. this means that slow async instructions like CWRITE will "stutter" or run multiple instances in parallel. i hope this illustrates how something that looked like a good idea can turn out to be something different. this can still work as long as KSS garbage collector can keep up and clean the mess without running out of resources. chances are it will work well enough to look ok (at least for the time you are there). reality is that would be just an illusion that everything is fine.


    better way is add some code and use strategy to avoid problems. that includes using one-shots, checking for instruction completion etc.

    my recommendation is to take a formal training or buddy up (get help from someone experienced when doing first project).

    hope this helps.

    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

    Edited once, last by panic mode (May 19, 2018 at 12:29 AM).

  • panic mode
    Reactions Received
    1,296
    Trophies
    11
    Posts
    13,133
    • May 18, 2018 at 6:34 PM
    • #3

    here is an example ladder code using type1 PGNO and reflection (parity check is in this case turned off).
    reason parity is off (signal set to 0) is that reflection is superior - parity check can only detect corruption of a single PGNO bit, while reflection checks all PGNO bits. as a bonus, this saves you some programming effort - no need to figure out how to calculate parity in PLC any more. this would require counting set bits somehow (using loops or series of XORs for example).

    Files

    ext_ladder.pdf 123.97 kB – 893 Downloads

    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

    Edited once, last by panic mode (May 19, 2018 at 12:36 AM).

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • krc5
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000
  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