I recently had a potential HMI Forge customer relay his experience working with AI: 35+ iterations over several days and many hours, encountering lots of bugs along the way just to build a simple screen with 8 buttons and a status line.
That led me to wonder if I could give these agents a hand. Maybe I could teach them how to create HMI Forge documents directly… and so I went down the AI rabbit hole and created a custom prompt that does exactly that. These instructions give the agent leverage, allowing it to focus on the task: building a usable HMI, not the low-level details about how buttons, indicators, I/O or alarms work.
With these instructions, the same screen took one prompt and a minute or two.
Create new single screen HMI document with the FANUC theme. A label at the top says "BAGGER CELL". There are 2 rows of 3 buttons, one for each of 6 baggers. Their labels are of the form "Bagger X" where X is 1-6. Bagger 1 is tied to DO[1], Bagger 2 to DO[2], etc. The buttons have a red background when the output is OFF and a green background when ON. Pressing a button toggles the output. There is a start and stop button below the bagger buttons. Below the start/stop buttons is a status indicator that should show the program state (e.g. aborted, running, etc.)
Here’s a short YouTube video recreating the multi-screen FANUC Bike Demo with a single prompt.
The nice thing about working this way is that you and the agent are operating on the same level. If something’s not positioned quite right or needs a color tweak, you can do that instantly in the HMI Forge editor on the Tablet TP. You don’t have to go back to the agent, recompile, reload the plugin, cycle power, etc. Your changes are immediate and easy to make, even if you don’t know anything about writing code.
Why agents struggle
You’re asking the agent to work at the wrong level. It has to build everything from scratch using HTML, CSS, JavaScript and KAREL. Need a start button? The agent will have to figure out how to build one. What about fault handling, toggling I/O or displaying live indicators? Every one of those requires custom low-level code that’s difficult to maintain.
It’s like asking your AI to write the actual servo control code that gets a robot from A to B instead of just writing J P[1] 100% FINE. You trust that FANUC has already solved the hard stuff: kinematics, path planning and motion control.
By leveraging FANUC’s software and decades of experience, you get to focus on the actual job: teaching the robot where A and B are and telling it when to go there.
Imagine what it would be like having AI recreate the FANUC motion planner: weeks (months? years?) of debugging and finding obscure edge cases FANUC fixed 20 years ago.
That’s exactly what happens when an AI attempts to build an HMI from scratch – hours of hacking and round-trips between your laptop and the controller fixing stuff HMI Forge has already figured out. Give it the right layer to work on, and it can spend its effort on crafting an HMI, not building the pieces to make the HMI work.
For more information, check out the HMI Forge documentation entry for generating a screen with an AI assistant.