Home / Articles / FANUC
FANUC CRX Collaborative Robots TP Programming KAREL Programming HMI Forge Menu Utility R577

Prompting the operator on a FANUC robot: Menu Utility and the alternatives

Sometimes you need to get some information from the operator: confirm the gripper is empty, ask which fixture to proceed to, manual inspection confirmation, etc.

You may also want to give some information to the operator without having them dig through screens or adding another screen to your machine HMI.

FANUC has an option you can buy called Menu Utility (R577) that lets you define a few different types of operator prompts and status pages directly on the teach pendant.

There are five dialog types you can create from the Menu > Setup > Menu Utility menu. These are all initiated by calling their corresponding TP MACROs in your programs. The first two (prompt box, yes/no) pause the program and show a yellow popup for the operator to interact with. The list menu lets you offer more choices than just YES/NO and requires the operator to pick one. Status menus just display information, and operator entry allows you to essentially create a FANUC-esque setup menu for configuring values of various types.

Dialog types

Prompt Box

This is basically a “wait for user” instruction. You get 5 lines of text, and the operator has to hit OK to continue the program.

Note that 5 lines is all you get, and they’re exactly as dumb as they look: no wrapping, no centering, no formatting. If your message is longer than that, you’re breaking it across the lines yourself and counting characters.

You configure the text line by line on the setup screen:

The Menu Utility setup screen for a prompt message menu, with text entered on line 1

Then you call the macro with the menu number:

! prompt menu 2 ;
CALL PROMPTOK(2) ;
The resulting yellow popup on the teach pendant with an OK button

Yes/No

This is just like the Prompt Box, but now the user gets to choose YES or NO. The result gets stored in a numeric register you specify (0 = NO, 1 = YES), and you should use the result in your TP program.

The Menu Utility setup screen for a yes/no menu with the question entered on line 1
LBL[1] ;
! menu 2, result in R[3] ;
CALL PROMPTYN(2,3) ;
IF R[3]<>1,JMP LBL[500] ;
! user answered YES ;
! do something ;
END ;
 ;
LBL[500] ;
! user answered no ;
! do something else ;
! or retry ;
JMP LBL[1] ;
The yes/no popup on the teach pendant, showing YES and NO choices over the program that called it

Select from a list

This one gives you a little bit more functionality. You enter a title and define up to 8 menu options. Each option can optionally be set up to execute a TP program if it’s chosen. You can also modify the prompt that appears at the bottom of the screen.

The Menu Utility setup screen for a list menu, with a title, three options and the ActionTP column The resulting list menu on the teach pendant with three numbered options and a prompt line
LBL[1] ;
! menu 2, result in R[3] ;
CALL LISTMENU(2,3) ;
SELECT R[3]=1,CALL PART1 ;
       =2,CALL PART2 ;
       =3,CALL PART3 ;
JMP LBL[1] ;

I don’t like how you get this optional ActionTP column. There’s no way to see this in the program itself without documenting it with a comment or something.

The idea is to save you from writing some code, but I would argue this is bad practice. There’s no way for me to tell (by looking at the code) that some or all of the choices cause the robot to move.

FANUC’s example uses the ABORTIT macro to abort production, but again, I’d rather just have that in code:

LBL[1] ;
! fanuc sample menu 1, result in R[3] ;
CALL LISTMENU(1,3) ;
SELECT R[3]=1,JMP LBL[10] ;
       =2,CALL ABORTIT ;
       =3,JMP LBL[30] ;
JMP LBL[1] ;

Status menus

These allow you to display up to 9 live and updated pieces of data on the screen. FANUC’s example includes the name of the current program, the name of the current routine, the current line, the current program status and the current date and time.

You basically provide a label and then get to choose from a list of supported data types: numeric registers, I/O values, KAREL variables, system variables, TIMER values, program status, etc.

The Menu Utility setup screen for one status menu line, showing the label, variable type and data type The resulting status page on the teach pendant showing current program, routine, line, status and time
! status menu 1 ;
CALL STATPAGE(1) ;

Operator entry

Operator entry menus are the most configurable. You’re essentially defining a custom FANUC setup screen with up to 10 items.

Define a label and then, similar to the status menus, you get to choose where the entered value is going to get stored: a numeric register, a KAREL variable or a system variable. You have to choose what type the value will be (INTEGER, REAL, TEXT or BOOLEAN), and then you can provide a minimum and maximum value for the numeric types.

The Menu Utility setup screen for an operator entry line storing an INTEGER in R[2] with a min of 0 and a max of 9 The resulting operator entry screen on the teach pendant with a boolean and a numeric item, and a DONE softkey
! operator menu 1 ;
CALL OPERMENU(1) ;

Like all the previous menu types, the program is paused while this screen is displayed. The program will continue when the operator hits the DONE softkey.

Where it’s good

Menu Utility is a good low-cost option for allowing the operator to do some minimal configuration at runtime, directly on the teach pendant. The API is simple, and it’s quick to set up. It’s been around forever, so it’s available on just about any FANUC robot if you buy the option.

Alternatives

You could use the MESSAGE[] instruction or a User Alarm (UALM[]) to prompt the user, but neither of these provide a good way of getting an answer back from the user.

MESSAGE[Hey something is wrong!] ;
PAUSE ;
! something is wrong ;
UALM[1] ;

Custom iPendant HTML Screens are another option and are probably worth their own blog post. Basically FANUC allows you to load custom *.stm files onto the robot and visit them from the iPendant browser. FANUC provides a set of “iPendant Controls” you can download from the CRC website.

The major downsides are that these controls are based on Microsoft ActiveX controls (introduced in 1996, deprecated in 2024-2025), and they recommend using either Microsoft Expression Web 4 (deprecated 2012) or Microsoft SharePoint Designer 2007 (deprecated 2017).

You can also hand-edit HTML files, but you’ll have to manually add the ActiveX controls and adjust all of their parameters, which would be pretty painful.

Little-known fact, but FANUC actually supports the definition of a Dialog Box with an XML file. You could then call a KAREL program to display the dialog. Here’s a quick example of a message prompt, but you’re stuck with hand-editing XML and you’ll need to buy the KAREL option from FANUC to use it.

<DIALOG posx="220" posy="170" width="220" height="140" bgcolor="#C0C0C0">
	<DLGTILE posx="10" posy="10" width="200" height="120">
		<object classid="clsid:7106065C-0E45-11D3-81B6-0000E206D650" id="LABEL1"> <!-- label control -->
			<param name="Caption" value="Hi from KAREL">
			<param name="DataType" value="100"> <!-- static -->
			<param name="FontSize" value="16">
			<param name="ForeColor" value="16777215"> <!-- hex #ffffff -->
			<param name="BackColor" value="255"> <!-- hex #ff0000 (red)-->
		</object>
	</DLGTILE>
</DIALOG>

Load the above dlghi.xml file onto MC:.

PROGRAM runhi
%NOLOCKGROUP
%INCLUDE klevkmsk
%INCLUDE klevccdf

VAR
	term_char : INTEGER
	status    : INTEGER
BEGIN
	DISCTRL_DIAG('MC:\DLGHI.XML', kc_prev_key, term_char, status)
	-- check status here; ignored for brevity
END runhi

Translate and load runhi.pc onto the robot.

Then add a call in your TP program:

CALL RUNHI ;

The dialog can be dismissed by hitting the PREV key, as specified in the 2nd argument to DISCTRL_DIAG.

The resulting red dialog with white text saying Hi from KAREL showing on the iPendant

Not super trivial. You could spec out an XML file and a corresponding KAREL file for a Yes/No prompt or picking from a list, but it’s probably not worth your time.

Doing it in HMI Forge

HMI Forge allows you to design custom prompts for your operators. There are templates to quickly create messages, yes/no questions or picking from lists, but you can also design whatever you like: any size, add images, buttons, labels, etc. Drop them into your TP program with a custom icon that automatically lists all your documents and prompts. Use the “Answer prompt” button action to send a value back to your TP program.

To create a new message prompt in HMI Forge, simply touch the + Prompt button and choose the Message template.

Selecting the Message prompt template in HMI Forge

You’re then presented with something like this:

A default message prompt from template

You can easily move or edit the text of these labels, add images, indicators, buttons, etc.

To show the prompt, just add a HMI Prompt icon to your timeline in the FANUC timeline editor:

Using the HMI Prompt timeline icon in FANUC's timeline editor

I actually recorded a couple of quick videos showing how the prompts feature works.

This first one is a general overview of the feature and how you can quickly create message prompts, yes/no prompts or choice prompts from templates.

This one shows how to create a dynamic part-select prompt where a part image dynamically changes when the user selects an option, and the user is prompted to confirm their choice before continuing.

If you want to see how far you can take this, I rebuilt FANUC’s own Custom HMI demo in five minutes using the same editor.

HMI Forge is a plugin for FANUC CRX robots or any FANUC robot with the Tablet TP. It’s a full-featured HMI editor and runtime that allows you to easily create useful custom operator screens directly on the pendant. For more information, check out the HMI Forge website.

Robot Whispering
Want the whole picture?
Frames, offsets, KAREL and more — all in Robot Whispering.
Get the book →
// (ALMOST) EVERY TUESDAY

Get the next article in your inbox.