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

Macros for the complete amateur

  • SkyeFire
  • June 16, 2023 at 7:11 PM
  • Thread is Unresolved
  • Online
    SkyeFire
    Reactions Received
    1,038
    Trophies
    12
    Posts
    9,373
    • June 16, 2023 at 7:11 PM
    • #1

    So, having done some TP and KAREL coding, I have a general sort of question about Macros. Basically... why? I mean, what do Macros have that regular TP programs don't? Are they just a leftover from a bygone age, or do they still have real advantages that make them worth using?

    To start on answering my own question, I can see that Macros can be called (asynchronously?) from a DI, or triggered to execute as a Manual Function. And a Macro can be CALLed from inside a TP program just like another TP program, or with a 'handle" that isn't limited to the standard naming scheme of TP programs. So I can see where that could be convenient at times. But I'm interested in the experiences of people who spend more time in Fanuc-land than I do. Do you like Macros? If so, why? What keeps you coming back to them? When and why do you use them instead of regular TP?

  • Go to Best Answer
  • DS186
    Reactions Received
    198
    Trophies
    6
    Posts
    1,050
    • June 16, 2023 at 7:39 PM
    • #2

    I am normally using Macros only for small utility programs, e.g. to control my EOATs from TP buttons during commissioning phase.

    In my opinion the main "advantage" of Macros is that they can be also called from inputs, buttons, etc. and not just from CALL or RUN commands like normal TP programs.

    However, instead of using Macros you could also use BG Logic.

  • robotrollcall2
    Guest
    • June 16, 2023 at 8:28 PM
    • #3

    Creating a simple program to actuate an EOAT or turn on/off any robot-IO-controlled device and assigning them to Tool1 and/or Tool1 keys on the pendant can save lots of time.

    Assign to UK[1] and [2] on the macro table

  • Bout_de_ficelle
    Reactions Received
    14
    Trophies
    1
    Posts
    52
    • June 16, 2023 at 8:53 PM
    • #4
    Quote from SkyeFire

    So, having done some TP and KAREL coding, I have a general sort of question about Macros. Basically... why? I mean, what do Macros have that regular TP programs don't? Are they just a leftover from a bygone age, or do they still have real advantages that make them worth using?

    To start on answering my own question, I can see that Macros can be called (asynchronously?) from a DI, or triggered to execute as a Manual Function. And a Macro can be CALLed from inside a TP program just like another TP program, or with a 'handle" that isn't limited to the standard naming scheme of TP programs. So I can see where that could be convenient at times. But I'm interested in the experiences of people who spend more time in Fanuc-land than I do. Do you like Macros? If so, why? What keeps you coming back to them? When and why do you use them instead of regular TP?

    Hello,

    I use macros for basic EOATs, for example, and also when I've taken over a point and I reset the robot so that it returns to its starting point.

    I've even created a program and used a macro to do what the STAUBLI ALIGN function does.

  • HawkME
    Reactions Received
    567
    Trophies
    10
    Posts
    3,268
    • June 17, 2023 at 8:42 PM
    • #5

    You kind of answered it in your original post. The only advantage is they can be triggered with various methods that a normal program can't.

    Personally, I never use them.

  • ceilingwalker
    Reactions Received
    5
    Trophies
    1
    Posts
    92
    • June 21, 2023 at 3:39 PM
    • #6

    So, when I actuate my vacuum gripper in sim, is this really a macro that its running?

  • Bout_de_ficelle
    Reactions Received
    14
    Trophies
    1
    Posts
    52
    • June 21, 2023 at 3:46 PM
    • #7
    Quote from ceilingwalker

    So, when I actuate my vacuum gripper in sim, is this really a macro that its running?

    In SIM mode, DO and DI or RO are often used to force them.

  • ceilingwalker
    Reactions Received
    5
    Trophies
    1
    Posts
    92
    • June 21, 2023 at 3:57 PM
    • #8
    Quote from Bout_de_ficelle

    In SIM mode, DO and DI or RO are often used to force them.

    I mean when I create a sim program and tell it to grip parts, is that actually a macro that it's using, since it's calling for an action within a program?

  • Bout_de_ficelle
    Reactions Received
    14
    Trophies
    1
    Posts
    52
    • June 21, 2023 at 3:58 PM
    • #9
    Quote from ceilingwalker

    I mean when I create a sim program and tell it to grip parts, is that actually a macro that it's using, since it's calling for an action within a program?

    Can you send the program?

  • ceilingwalker
    Reactions Received
    5
    Trophies
    1
    Posts
    92
    • June 21, 2023 at 4:00 PM
    • #10

    I should have included the reason for why I wanted to know about the macro. I have a very large vacuum gripper that I need to put J4-J6 in a safe position before the robot moves any of the other axes. Would a macro be recommended? Although, I am using UF's for all my machines in this cell so I will probably need a program for that because I will need to change UF's for the desired motion, I think.

  • HawkME
    Reactions Received
    567
    Trophies
    10
    Posts
    3,268
    • June 21, 2023 at 4:35 PM
    • #11

    By Sim program I assume you are meaning a simulation program in RoboGuide. Those are only for RoboGuide. They aren't real programs that can be used on a real robot.

    I don't recommend using macros unless you have to.

  • Doctor_C
    Reactions Received
    33
    Trophies
    4
    Posts
    198
    • June 21, 2023 at 7:31 PM
    • Best Answer
    • #12

    Tool controls programs from the UK inputs, yes, but the other thing I have used them for is without a PLC for instance if someone pushes an ENTRY request button I dont want to do anything now but I do want to set R[6:entry req] = 1.

    By triggering of a DI it will work without TP on and it only fires off the rising edge of the DI.

    I can then address entry request when I want to (one example large parts in hand, I want the gripper empty).

    LBL[100]

    WAIT DI[machine ready]=on or R[6:entry req]<>0

    If R[6:entry req]=0, JMP LBL[101

    Pause

    R[6entry req]= 0

    JMP LBL[100

    LBL[101]

  • ceilingwalker
    Reactions Received
    5
    Trophies
    1
    Posts
    92
    • June 24, 2023 at 3:33 AM
    • #13
    Quote from SkyeFire

    So, having done some TP and KAREL coding,

    What does one use the Karel coding for?

  • Online
    SkyeFire
    Reactions Received
    1,038
    Trophies
    12
    Posts
    9,373
    • June 26, 2023 at 3:37 PM
    • #14
    Quote from ceilingwalker

    What does one use the Karel coding for?

    Whatever one wants? KAREL provides many higher-level functions that TP code does not, like using TCP/IP socket communications, or advanced math functions.

    Years ago, KAREL was also used for advanced motion programming, but these days FANUC has mostly deprecated that functionality. They've also been adding features to TP over time, narrowing the gap (at least slightly) between KAREL and TP.

    KAREL code can also be rendered "invisible" -- a FANUC controller can export the ASCII versions of TP programs, but not of KAREL programs. Thus, orgs that want to write proprietary code to run on FANUCs without exposing the source code can write and ship compiled KAREL binaries.

  • ceilingwalker
    Reactions Received
    5
    Trophies
    1
    Posts
    92
    • June 26, 2023 at 5:23 PM
    • #15

    I assume KAREL must be fundamentally the same as other scripting languages such as C++ and JavaScript......which I am familiar with?

  • Online
    SkyeFire
    Reactions Received
    1,038
    Trophies
    12
    Posts
    9,373
    • June 27, 2023 at 4:11 PM
    • #16
    Quote from ceilingwalker

    I assume KAREL must be fundamentally the same as other scripting languages such as C++ and JavaScript......which I am familiar with?

    More like really old FORTRAN or Pascal. It will look a little bit more like a full-up programming language (not "scripting") than TP does, but pretty old-school.

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