How do you program Fanuc robots?

  • How do you usually program Fanuc robots? 41

    1. I write all TP programs from the robot teach pendant (17) 41%
    2. I write simple/small programs in Roboguide, most of the programs are done using the robot teach pendant. (4) 10%
    3. I use Roboguide most of the time to write all BG Logic, Macros, Motion program routines and use the robot teach pendant to teach the robot points. (12) 29%
    4. I use third-party software. (1) 2%
    5. I use Text editor/ Notepad++ for program and teach pendant to teach the robot points. (6) 15%
    6. None of above. (1) 2%

    Hi guys,


    I'm about to start my new internal project. It's related to Roboguide and Fanuc programming. If you don't mind, could you participate in the following poll.


    Thank you in advance!

  • Starting out I used the TP, the more confidence I build up now, the more I steer towards:

    - text editor.

    - load into roboguide for checking/verification and debugging.


    I do similar with Kawasaki too, although Fanuc has a better TP teaching facility.

  • Notepad++, then Roboguide, then real robot.


    Notepad++ (or any other text editor) is used to start the project and do the heavy lifting. Scratch, copy, paste, etc. I know Roboguide has an internal (and somewhat hidden) text editor, but I prefer N++ because it is faster.


    With the raw program(s) written, is time to upload it to Roboguide and debug. Maybe teach some basic positions, etc.


    With these more "mature" programs, is time to upload in the robot itself, touch up the rest of the path and make tests.


    But this happens mostly on small projects with single/few robots. Big deployments normally have virtually commissioned OLP programs that in theory are plug and play.


    Emphasis on "In theory"...

  • The best way to start programming with a text editor is to copy some .LS files from an existing robot. .LS files are the text versions of the programs. Then you can see how it is constructed and practice making changes.


    Then you need a way to compile/convert the .LS files to .TP files. This can be done with Roboguide, OLPCPro, MakeTp, or Ascii upload.

  • I tried a few times to write my own LS files, but got frustrated with programs not importing, and offering no debug info.


    I now usually:

    1. create a cell in roboguide with all machine models to verify reachability
    2. create a roboguide 'simulation' program that quickly does the 'pick' and 'place' routines. No fancy logic... just checking paths are clear and cycle times, reducer life-expectancy, and overheating.
    3. draft my programs with pseudo-code in a text editor (Visual Studio Code). this allows me to make bird's-eye representation of my logic flow
    4. rewrite the programs on the virtual TP in roboguide
    5. teach all points in roboguide
    6. transfer programs and PRs or Ps to the physical robot
    7. touch up points
  • I tried a few times to write my own LS files, but got frustrated with programs not importing, and offering no debug info.

    If a program fails to import, there is usually an explanation in the alarm history, along with a line number. Some stuff, particularity involving UFRAME names usually, just craps out and don't give a line number.

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

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

  • If a program fails to import, there is usually an explanation in the alarm history, along with a line number. Some stuff, particularity involving UFRAME names usually, just craps out and don't give a line number.

    Yeah... I would export an LS file, perform no modifications, and it would fail when re-importing. I can't explain it.

  • When using N++ what language coding do you use in order to get the best TP code visibility?

    And second issue: which encoding do you use?

  • When using N++ what language coding do you use in order to get the best TP code visibility?

    And second issue: which encoding do you use?

    I use my own syntax highlighting set. With N++ is pretty easy create a new one.


    Some years ago I uploaded my .xml file here on the forum.


    Re: Off line editor


    The current one is different. Simpler, I think. Follows attached.


    Regarding the syntax highlight, my biggest concerns are: what is a instruction, what is a comment, and, in FANUC case, what is a commented instruction.


    And, about encoding, N++ can handle this very well.


    But if You are creating a program from scratch, what You must observer isn't encoding, but line endings. Newer robots normally handle this well, but older robots wants UNIX (LF) line endings.

  • Currently I use similar extension for LS and KL in N++. But it doesn't make me feel better comparing with Roboguide option. Both versions is time consuming from all perspectives.

  • Programming in text is way faster, but you have to have a good setup. Create templates and common code snippets that you can paste in.


    When you reuse templates/snippets then you save a lot of time and also reduce typos.

Advertising from our partners