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

Is there any way to unset a variable?

  • robotecnik
  • June 22, 2020 at 8:32 PM
  • Thread is Unresolved
  • robotecnik
    Reactions Received
    19
    Trophies
    4
    Posts
    568
    • June 22, 2020 at 8:32 PM
    • #1

    KRC2, KSS5.x.

    I've prepared a palletizing program that has been working for days now...

    All day they have been making parts and "suddenly" the robot started rotating the 6th axis while going to pick the part.

    I'm sure they have made a modification in the program... But tomorrow I will confirm it.

    There are 3 points to get a box:

    1. Approximation (pPre1).

    2. Vacuum cups almost touching the box (to allow them to adjust the cups if needed) (pPre2).

    3. Pick position (p).

    In the first point I've set the T value, the other 2 ones have not...

    I assign the coordinates this way:

    Code
    rX = iXBox/2.0
    rY = iYBox/2.0
    rZ = iZBox*1.0
    rA = 90.0
    
    
    pPre1.X = rX
    pPre1.Y = rY
    pPre1.Z = rZ + rZOffs
    pPre1.A = rA
    pPre1.T = 'B 100010'
    
    
    pPre2.X = rX
    pPre2.Y = rY
    pPre2.Z = rZ + rZOffs
    pPre2.A = rA
    
    
    p.X = rX
    p.Y = rY
    p.Z = rZ
    p.A = rA
    Display More

    The robot starts rotating going from pPre1 to pPre2... which should not as the point has the same coords except from Z and T (which pPre1 has initialized and pPre2 has not).

    As you can see I've not updated the T parameter of "pPre2" nor "p"...

    Of course, if they have touched up the position the S and T will have appeared and therefore the robot could want to go to the destination position...

    I can solve it by accessing the $Config.dat file and remove it manually, but... could I do it programatically?

    If that would be possible I would be able to program a small routine to leave the points as I want before starting the program.

    As always thank you in advance.

    http://www.robotecnik.com | Robots, CNC and PLC programming.

  • panic mode
    Reactions Received
    1,268
    Trophies
    11
    Posts
    13,040
    • June 23, 2020 at 12:58 AM
    • #2

    >> " Is there any way to unset variable?"

    not that i know of... but you can create new runtime variable and not initialize parts you don't care about which i believe is what you are trying to do.

    ;P1 is fully initialized for example P1=$POS_ACT

    PTP P1 ; move to P1 (using all elements of the P1 which is usually E6POS), including Turn value

    P1 = WithoutTurn(P1) ; update P1 but ignore (unsets) Turn for example

    PTP P1 ; now we have no turn value programmed....


    DEFFCT E6POS WithoutTurn(P:in)

    DECL E6POS P, temp

    temp.X = P.X ; selectively copy elements of P. elements not copied will be uninitialized

    temp.Y = P.Y

    temp.Z = P.Z

    temp.A = P.A

    temp.B = P.B

    temp.C = P.C

    temp.S = P.S

    ; temp.T is not initialized

    temp.E1 = P.E1

    temp.E2 = P.E2

    temp.E3 = P.E3

    temp.E4 = P.E4

    temp.E5 = P.E5

    temp.E6 = P.E6

    RETURN temp

    ENDFCT

    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

  • robotecnik
    Reactions Received
    19
    Trophies
    4
    Posts
    568
    • June 23, 2020 at 2:26 PM
    • #3

    Great!

    Thank you panic mode !

    By the way... Nothing was wrong with the program nor the robot... I've went to the customer place because an operator had added a point into the program...

    ^^¡

    http://www.robotecnik.com | Robots, CNC and PLC programming.

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
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • 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
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • 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