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

STRING REGISTER

  • Gunjan Trivedi
  • December 4, 2019 at 3:14 PM
  • Thread is Unresolved
  • Gunjan Trivedi
    Reactions Received
    1
    Trophies
    3
    Posts
    36
    • December 4, 2019 at 3:14 PM
    • #1

    I know about SR[R] , R[] , AR[] . What is AR ? Can i write SR[]='ANY STRING' ?

  • Robo_Eng_13
    Reactions Received
    26
    Trophies
    4
    Posts
    432
    • December 4, 2019 at 3:47 PM
    • #2

    1. AR is an Argument Register, which means it takes a value that you pass to it at declaration. Example, you can call a program SQUARE(2,3) and then SQUARE will read something along the lines of R[AR[1]] = AR[2] * AR[2], which will then place the value of 3 squared into register 2.

    2. Yes, you can use any string, within limits, in a string register. There will be some characters that i am sure you cannot make, and length limitations, but otherwise, a string is a string.

  • Muteki
    Reactions Received
    5
    Trophies
    3
    Posts
    27
    • December 4, 2019 at 4:29 PM
    • #3

    Fun fact about the String Registers, you can add them together and use them to indirectly call programs or vision processes.

    SR[1] = 'ANY'

    SR[2] = ' STRING'

    SR[3] = SR[1] + SR[2]

    Now SR[3] = 'ANY STRING'

    I use them a lot for choosing vision processes when my system has several different parts it needs to check or move.

  • dha
    Reactions Received
    29
    Trophies
    6
    Posts
    397
    • December 5, 2019 at 7:08 AM
    • #4

    Program:

    Code
    CALL MAKE_STR('ANY',' STRING')

    Program MAKE_STR:

    Code
    SR[1]=AR[1]+AR[2]
  • Gunjan Trivedi
    Reactions Received
    1
    Trophies
    3
    Posts
    36
    • December 5, 2019 at 1:13 PM
    • #5

    I can show a Register or String Register in a User Alarm?

  • SkyeFire
    Reactions Received
    1,060
    Trophies
    12
    Posts
    9,456
    • October 9, 2020 at 8:07 PM
    • #6

    Regarding manipulating SRs in TP (not KAREL), the trick of calling a subroutine with strings as arguments seen in Post #4 above works for me, but the direct assignment shown in Post #3 doesn't. So,

    CALL MAKE_STR ('Any', 'String') works

    SR[1] = AR[1] + AR[2] inside MAKE_STR works

    SR[1] = SR[2] + SR[3] works

    SR[1] = 'Any string' will not build in RoboGuide (I'm writing .LS files and compiling them to .TP).

    Is there a trick to doing this, or am I just running into an inherent limitation of TP language?

  • Nation
    Typical Robot Error
    Reactions Received
    552
    Trophies
    9
    Posts
    1,934
    • October 9, 2020 at 9:40 PM
    • #7

    Nope, setting a string directly is not allowed in TP. You have to call a 'setting' program like the make_str defined above.

    I think post #3 was just defining what was in the string registers.

    Check out the Fanuc position converter I wrote here! Now open source!

    Check out my example Fanuc Ethernet/IP Explicit Messaging program here!

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

Similar Threads

  • FANUC PROJECT: Data recording with background Karel program

    • Axillus
    • August 12, 2019 at 5:56 PM
    • Fanuc Robot Forum
  • Indirect access of system variables

    • Robot Programmer
    • June 10, 2019 at 10:00 PM
    • Fanuc Robot Forum
  • SR to a PLC

    • mathias39
    • June 3, 2019 at 1:14 PM
    • Fanuc Robot Forum
  • Numeric register

    • Akhil Mukundan
    • January 1, 2019 at 11:15 AM
    • Fanuc Robot Forum
  • :LS file or .TXT File to modify as .TP

    • ravitejagali
    • September 7, 2018 at 6:36 AM
    • Fanuc Robot Forum
  • String Registers

    • Fer_Rdz
    • October 25, 2016 at 2:56 PM
    • Fanuc Robot Forum
  • Setting string register from Karel

    • dha
    • February 16, 2016 at 11:36 AM
    • Fanuc Robot Forum

Tags

  • tp
  • AR
  • R

Users Viewing This Thread

  • 1 Guest
  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