Labeling FANUC Robot IO and Data Directly From Excel

Filed under: FANUC Open Source Workflow

I remember when I first discovered that FANUC robots had the web-based Comment Tool. No longer would I have to endure the pain of trying to mash F1 five times just to get the letter “E”, only to accidentally get “F” due to an extra keypress. I just have to unlock KAREL, head to the robot webpage and start commenting away.

Better, but still not great.

Most of us use Excel spreadsheets to keep track of our robot data, so we still have to manually copy things over from the spreadsheet to the robot.

I’ve seen some people develop tools that will export excel data in a special format for use with a custom KAREL routine that loads the comments. I’ve seen others write custom CM files based on their spreadsheet data.

Even better, but I’d rather just use my spreadsheet itself.


Introducing fexcel

fexcel is a free open-source tool for setting the comments on your FANUC robot data and I/O directly from Excel.

fexcel supports a bunch of configuration flags that tell it where to look for your data. You tell it where your numeric registers start, where your position registers start, where your digital inputs are, etc. and fexcel does the rest.

Let’s say you have a spreadsheet that looks like this:

  A B C D E
1 R Comment   PR Comment
2 1 status   1 home
3 2 counter   2 maintenance
4 3     3 LPOS
5 4     4 JPOS

Send the numeric register and position register comments to the robot with the following command:

> fexcel -numregs A2 -posregs D2 spreadsheet.xlsx 127.0.0.101

If you renamed your worksheet from the default “Sheet1,” pass in the -sheet flag:

> fexcel -sheet data -numregs A2 -posregs D2 spreadsheet.xlsx 127.0.0.101

Have an extra column between the ids and the comments? No problem. Set the -offset flag:

  A B C D E F G
1 R Other Stuff Comment   PR More stuff... Comment
2 1 ... status   1 ... home
3 2 ... counter   2 ... maintenance
4 3       3 ... LPOS
5 4       4   JPOS
> fexcel -offset 2 -sheet data -numregs A2 -posregs E2 spreadsheet.xlsx 127.0.0.101

fexcel will set the comments on all the pieces of data you specify. It’ll start in the cell you tell it to and keep reading down that column until it sees a cell that’s not an integer.


The source code and a full description of configuration flags is available on GitHub. You can download the latest binary release on the releases page.


Want posts like this delivered right to your inbox?

If you liked this post, please sign up for my mailing list!