DMC, Inc.

Beckhoff Setup Basics: TwinCAT HMI Configuration Steps

This blog is Part 3 of a multi-part series. Make sure to check out the other blogs on this topic:

  1. Beckhoff Setup Basics: IPC Configuration Steps
  2. Beckhoff Setup Basics: Getting Started with a Beckhoff PLC
  3. Beckhoff Setup Basics: HMI Configuration Steps

Term Definitions

Throughout this blog series, I refer to two devices repeatedly. For clarity, those devices are as follows:

  1. “Beckhoff IPC” – The industrial PC that will run the PLC and HMI server. Device configuration will occur on this device. Beckhoff sells these directly. Third-party IPCs can also be used, but licensing is more expensive.
  2. “Programming Computer” – A computer, such as an engineer’s laptop, where the TwinCAT XAE development environment is installed. Programming happens on this device, as well as some of the configuration of the Beckhoff IPC.

Configure HMI Server

First, we’ll need to configure the HMI server so we can publish to it. On the Beckhoff IPC, find the HMI server tray icon, and click on it.

Beckhoff HMI server tray icon

Note: If you do not see this icon, double-check that TE2000 HMI Server is installed on the Beckhoff IPC following the instructions in Part 1 of this blog series.

Select “Service Configuration.”

Beckhoff IPC service configuration

The webpage http://127.0.0.1:19800/ should open in the default browser.

On that page, add a new Server Instance by entering the information in the form and creating an HMI administrator password.

Beckhoff HMI configuration Add Server Instance

In the menu that appears, select the HMI Instance we created and select “Config.” (If there are issues, you may need to restart the HMI server through the same menu).

Beckhoff HMI setup "Config" screen

The default startup page will open.

If you get a “License Expired” error page, then double-check that you have a valid or trial license for TE2000.

Beckhoff HMI setup license expired error

In XAE Shell, ensure that TF2000 is selected and there is an active trial license.

TC3 HMI Server CPU license
Beckhoff Automation licensing

If you have created a new trial license but still experience this error, then restart the HMI Server Instance.

Beckhoff HMI setup "Restart" screen

Once the HMI Server has a valid or trial license, the Config page will show this. Enter the HMI administrator password created on the “Server Configuration” page.

TwinCAT HMI server configuration

The configuration will open. Navigate to TcHmiSrv > Webserver.

TcHmiSrv webserver endpoints

Expand the Endpoints menu and select “Add.”

Endpoints menu

Add the IP address of the HMI Server where it will be accessed externally (an external browser or HMI) and use your HTTPS port.

For this guide, we will assume the HMI server is on the Beckhoff IPC and use the URL: https://192.168.42.42:1021.

HMI server IP address

An “Add successful” message will appear at the top of the page if it is successful. If not, make sure the URL is correct and you’ve used https:// as a prefix to the IP address.

Publish HMI Program

Now that the HMI server is configured, we can create the HMI Project in XAE Shell on the Programming PC.

Once the HMI project is complete, we can publish it to the HMI server.

To do this, select the HMI program in the project tree.

Beckhoff HMI program

At the top of XAE Shell, change the platform dropdown to “TwinCAT HMI.”

TwinCAT HMI dropdown

At the top of XAE Shell, select TwinCAT HMI > Publish to TwinCAT HMI Server.

Publish to TwinCAT HMI Server

If you have not created any profiles, TwinCAT will prompt you to enter a profile name. Different profiles can be used for different environments (ex: development, release, etc)

Publish TwinCAT HMI Project module

Enter the IP address of the HMI endpoint created earlier, the appropriate port (1020), and the administrator password for the HMI Server set up earlier in this guide.

You can also click the “…” button to open a pop-up of available HMI servers to connect to.

Beckhoff HMI sever connection

It’s a good idea to click “Validate Connection” to ensure all information is correct and a connection is successful. If an error occurs during validation, you will not be able to publish until you correct it.

Then click “Publish” in the top-right corner to publish the HMI project to the Server.

It may take a long time for the project to publish. You can track progress in the bottom bar of XAE Shell.

HMI sever connection progress bar

Full-Screen HMI Start in Chrome/Firefox

When our Beckhoff IPC is booted, we usually want it to immediately open the HMI screen instead of requiring an operator to start the HMI manually. This can be accomplished with a very simple batch script.

Open Notepad on your Beckhoff IPC and paste in the following code:

BAT (Batchfile)
@echo off
start "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --kiosk -fullscreen --incognito http://127.0.0.1:1010
exit

Save this file as “StartHMI.bat” in your startup folder. For convenience, if the HMI screen ever does need to be started manually, create a shortcut for this batch script and place it on the desktop.

This will automatically open Chrome in full screen on startup. You may want to do this step after you’ve finished other setup steps, as it can be a bit of a nuisance after restarts.

Make sure the path for Chrome in the batch file is correct. The above is the default location, but it may not be correct.

Note: Similar instructions are available for Firefox.

Once the HMI is published on the server and starts in kiosk mode on startup, you are now complete with your Beckhoff PLC and HMI.

Have an upcoming project? DMC can help you get started or take the next step.

Learn more about DMC’s Beckhoff automation expertise and programming, and get started modernizing your system today.