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

the SPS cycletime

  • irobot
  • August 25, 2014 at 7:54 AM
  • Thread is Resolved
  • irobot
    Trophies
    4
    Posts
    271
    • August 25, 2014 at 7:54 AM
    • #1

    Hello,

    1. would somebody tell me the the cycle time of SPS ?
    2. I wrote some lines code to record the sps cycle time, and I learn it is about 12ms. But I have a question I can not understand my codes: when I monitoring the value of $timer[2], why is it not always 12, sometimes it is 0(the initial value of $timer[1] )?
    3. If my codes is wrong, what's the right codes to measure the cycle time?

    Images

    • sps_cycle_1.png
      • 38.52 kB
      • 600 × 411
      • 123
    • sps_cycle_2.png
      • 48.67 kB
      • 599 × 416
      • 73
    • sps_cycle_3.gif
      • 15.67 kB
      • 599 × 415
      • 75

    Files

    sps_cycle_1.png_thumb 11.47 kB – 269 Downloads sps_cycle_2.png_thumb 10 kB – 265 Downloads sps_cycle_3.gif_thumb 10.69 kB – 265 Downloads

    KUKA Conntroller : _________<br />KSS Software : ____________ <br />Robot Model: _____________

    Edited once, last by irobot (August 25, 2014 at 8:46 AM).

  • OrangeApps
    Reactions Received
    2
    Trophies
    3
    Posts
    21
    • August 25, 2014 at 8:56 AM
    • #2

    Hi irobot,

    the variable display updates on every change of the timer value. So it updates also the display if you set the value back to "0". Also the update rate of a "VariableInfo" is around 100ms. That's the reason why you see sometimes "0" and sometimes "12".
    Write the timer value to an integer variable and observe this integer value. That will work...

    Regards
    Daniel

    Download the latest version (2.0.16) of OrangeEdit now on http://www.OrangeApps.de

  • Online
    SkyeFire
    Reactions Received
    1,061
    Trophies
    12
    Posts
    9,463
    • August 25, 2014 at 6:12 PM
    • #3

    The $TIMER variables increment in 12ms blocks.

    The SPS only executes for (if I recall correctly) about 2ms out of every 12ms IPO cycle. A short SPS program can execute in less then that time, so it might execute multiple loops within that time window.

    What I did to get a rough idea of SPS timing was this:
    in a Global DAT file:

    Code
    DECL INT TimeVal [100]
    TimeVal[1] = 0
    ...
    TimeVal[100]=0

    Then, in the SPS:

    Code
    DECL INT _Index
    ;init section
    _Index = 1
    $TIMER[1] = 0
    $TIMER_STOP[1] = FALSE
    LOOP
    IF _Index < 100 THEN
      TimerVal[_Index] = $TIMER[1]
      _Index = _Index + 1
    ENDIF
    ...
    ENDLOOP
    Display More

    The Timer value will be saved at a new position in the array every cycle. An analysis of the array's contents should give you at least a rough idea of the SPS timing. Keep in mind, since the SPS is only executed for a short time out of every IPO cycle, the cycle time of the SPS will change with the length of the SPS, or with how the SPS branches. A long SPS might take so long to execute, that a single loop requires more than one IPO cycle.

  • irobot
    Trophies
    4
    Posts
    271
    • August 26, 2014 at 2:52 AM
    • #4

    I use array to save the time , they are:

    Quote

    0
    12
    24
    36
    36
    48
    60
    72
    84
    108
    108
    120
    ...
    864
    888

    Display More

    KUKA Conntroller : _________<br />KSS Software : ____________ <br />Robot Model: _____________

  • Online
    SkyeFire
    Reactions Received
    1,061
    Trophies
    12
    Posts
    9,463
    • August 26, 2014 at 7:35 PM
    • #5

    hm... hard to do a "beat frequency" analysis on that, but I would say that your SPS is taking just slightly less than one timeslice to execute. So most of the time, you only get one $TIMER entry per loop, but once in a while you manage to make slightly more than one full loop, leading to the repeated 36 and 108 readings. On the other hand, I'm not sure why there's a skip from 84 to 108, or from 864 to 888. I can only guess that you have a branch in your SPS that doesn't execute identically every cycle.

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