Fexcel sets all your FANUC register, position register and I/O comments straight from an Excel spreadsheet - over the network, with one command:
fexcel set "./doc/spreadsheet.xlsx" 192.168.1.101
No more typing comments one at a time on the teach pendant or using FANUC’s web-based comment tool by hand.
Fexcel also lets you write FANUC TP using named variables defined in an Excel spreadsheet instead of raw indices.
Compiler Example
Anyone who’s programmed FANUC robots knows the pain of having to lay out all their data and I/O. You have to constantly check your spreadsheet for what index is for what register, etc. If you write your code in a text editor like I do, it’s really easy to accidentally type the wrong address and end up with a bug in your code that won’t present itself until runtime.
And what if you have to move some stuff around? Painful.
Am I actually using this register for anything? Which programs?
That’s where Fexcel comes in. You’re working off of a spreadsheet anyway – Fexcel just takes it a step further and allows you to use the names/comments you’ve already defined and takes care of the addressing for you.
Here’s a quick example:
/PROG MV_PICK
/ATTR
DEFAULT_GROUP = 1,*,*,*,*;
/MN
: UFRAME_NUM=1 ;
: UTOOL_NUM=1;
: J PR[20:Pick] 50% CNT100 Tool_Offset,PR[21:PickAPTO] ;
: L PR[20:Pick] 250mm/sec CNT0 ;
/POS
/END
It’s annoying to have to address PR[20:Pick] and PR[21:PickAPTO]. I’d rather use
the names “Pick” and “PickAPTO”.
If you want to get a little fancier, Fexcel supports constants too. We can define constants for our pick user frame, pick utool, approach speed and pick speed. Heck, we could do our approach CNT and pick CNT also:
/PROG MV_PICK
/ATTR
DEFAULT_GROUP = 1,*,*,*,*;
/MN
: UFRAME_NUM=${UF_PICK} ;
: UTOOL_NUM=${UT_PICK} ;
: J PR{PICK} ${APPROACH_SPEED}% CNT${CNT_APPR} Tool_Offset,PR{PICK_APTO} ;
: L PR{PICK} ${PICK_SPEED}mm/sec CNT${CNT_PICK} ;
/POS
/END
Compile with:
fexcel compile "./doc/spreadsheet.xlsx" src/mv_pick.fls -o ls/mv_pick.ls
If you ever want to change where the Pick PR is located, just update the spreadsheet and retranslate.
NOTE: Obviously you’ll want to update the comments, which Fexcel also handles. You’re on your own for updating the PR data, though.
There’s a fairly complete material handling example in the source repository.
Shortcomings
The biggest shortcoming I’ve had with Fexcel is the same shortcoming I have in general with writing code on my PC and then pushing it to the robot. You have to religiously port any changes done on the teach pendant back to your PC if it’s going to be the source of truth. It’s hard to do, and I’ve definitely overwritten fixes that never got ported back to the original source.
The other issue is that you are just slightly removed from the actual source code that’s running on the robot. You’re writing Fexcel syntax, and the TP is displaying standard LS syntax. Luckily the syntax is so similar (e.g. R{foo} vs R[1:foo]) that we’re still super close to the metal.
Someday I’d like to improve Fexcel to be able to compare against what’s sitting on the robot and potentially rewrite the LS files on the robot into Fexcel syntax source files on my PC. Anyone want to take on that one? Pull Requests welcome!
