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. ABB 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

How do I send the actual position of an ABB robot via GO's to PLC

  • RoboRuben
  • October 19, 2022 at 3:05 PM
  • Thread is Unresolved
  • RoboRuben
    Trophies
    3
    Posts
    11
    • October 19, 2022 at 3:05 PM
    • #1

    Dear,

    I want to make a clean function to send the actual position of the robot to the PLC. I want to do this via group outputs. (It is not that impirtant that the values are exact)

    I programmed something that works, but I'm sure you can make it cleaner in rapid. Has someone an Idea how I can send the actual position without the detour.

    (ABB, IRC5, Robotware 6.13)

    VAR intnum RAX1;

    VAR dnum nRAX1;

    VAR dnum rRAX1;

    VAR dnum sRAX1;

    Loop:

    ActPosCartTool0:=CRobT(\Tool:=tool0\WObj:=UserFrame0);

    ActPosJnt:=CJointT();

    RAX1:=ActPosJnt.robax.rax_1;

    nRAX1:=NumToDnum(RAX1);

    rRAX1:=RoundDnum(nRAX1);

    IF rRAX1<0 THEN

    sRAX1:=65535+rRax1;

    ELSE

    sRAX1:=rRax1;

    ENDIF

    SetGO GO1_CoordJ1,sRAX1;

    WaitTime 0.01;

  • Online
    Lemster68
    Reactions Received
    301
    Trophies
    9
    Posts
    2,469
    Blog Articles
    7
    • October 19, 2022 at 3:20 PM
    • #2

    There are already Rapid functions which can fetch the robot's position. CPos() gets trans, CRobT() gets the current robtarget position.

  • RoboRuben
    Trophies
    3
    Posts
    11
    • October 19, 2022 at 3:49 PM
    • #3
    Quote from Lemster68

    There are already Rapid functions which can fetch the robot's position. CPos() gets trans, CRobT() gets the current robtarget position.

    Sorry, but you've clearely not read the question. The question is how to send the data out of CRobT or CJointT to the PLC in Group outputs (16bit)?

  • Online
    Lemster68
    Reactions Received
    301
    Trophies
    9
    Posts
    2,469
    Blog Articles
    7
    • October 19, 2022 at 4:53 PM
    • #4

    So is the problem that you are having is that the DNum datatype is too large to send in a 16 bit group? The largest joint value possible ought to be no more than 400, so the Num datatype should suffice. If I had to do it, I would not map it as a group output, but as an analog representation of the value. With proper scaling, it should work fine. Not only that, but also, it will take care of the sign for you then too.

  • SomeTekk
    Reactions Received
    17
    Trophies
    4
    Posts
    202
    • October 20, 2022 at 7:43 PM
    • #5

    Here's a possibility (Multitasking would be handy. YES, lots of RAPID code & data is not included):

    WHILE TRUE DO

    jT1:=CJointT(\TaskRef:=T_1Id);

    nAx1ToPLC:=Abs(Round(jT1.robax.rax_1\Dec:=0));

    IF jT1.robax.rax_1<0 SetDO do_RAX1Neg1,1;

    IF jT1.robax.rax_1>=0 SetDO do_RAX1Neg1,0;

    SetGO go_RAX1_CurJnt,nAx1ToPLC;

    ... 2, 3 ...

    ENDWHILE

    Edited 4 times, last by SomeTekk (October 27, 2022 at 2:05 PM).

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

Tags

  • abb
  • robotstudio
  • position
  • irc5
  • PLC
  • Group Output
  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