Blog

Getting Started With a Beckhoff PLC: Part Three - HMI Configuration

Getting Started With a Beckhoff PLC: Part Three - HMI Configuration

This is the third and final installment of a three-part blog series covering all you need to know about getting started with a Beckhoff PLC/HMI. In this blog, we'll be covering how to configure the HMI and the final steps to configure your Beckhoff IPC.

Other Installments in This Series:

Steps

  1. Configure HMI Server
  2. Publish HMI Program
  3. (Optional) Use a Batch Script to Start Full-Screen HMI in Chrome on Startup

 

Term Definitions

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

  1. "Beckhoff IPC" - the hardware, likely obtained from Beckhoff, that will run the PLC and HMI server. Device configuration will occur on this device.
  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.

 

14. Configure HMI Server

Back to Step List

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

In the menu that appears, select the default instance (on Port 1010) and select "Config." (If there are issues, you may need to restart the HMI server through the same menu).

The default startup page will open, which is where you can set the administrator password for the server configuration. You’ll need this password later, so make sure to keep track of it.

The configuration will open. Navigate to TcHmiSrv > Webserver.

Expand the Endpoints menu and select "Add."

Add the IP address of the Programming Port and use port 1020.

For example, we will use the URL: https://192.168.42.42:1020

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://”

 

15. Publish HMI Program

Back to Step List

Back on the programming computer, select the HMI program in the project tree.

At the top of TwinCAT, change the platform dropdown to "TwinCAT HMI."

At the top of TwinCAT, select TwinCAT HMI > 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)

Enter the IP address of the Beckhoff IPC, the appropriate port (1020), and the administrator password for the HMI Server.

It’s a good idea to click “Validate Connection” to make sure all the information is correct and a connection is successful. If an error occurs while validating, you will not be able to publish until you correct the error.

You can continue with the “Next” button and change any settings you’d like, but for this demo we’ll leave all the settings at default. After validating, you can click “Publish.”

If you get a message about a proxy delay while validating or publishing, just click “OK” to continue.

It may take a long time for the project to publish. You can watch the progress at the bottom left of the screen.

 

16. (Optional) Use a Batch Script to Start Full-Screen HMI in Chrome on Startup

Back to Step List

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 paste in the following code:

@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 open Chrome in full screen on startup automatically. You may want to do this step after you’ve finished other setup steps, as it can be bit of a nuisance after restarts.

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

 

Demo complete!

You’ve just set up a Beckhoff IPC with a PLC and HMI from scratch!

Thanks to Carl Remler for contributing to the creation of this article.

Learn more about DMC's Beckhoff expertise and contact us today to get started on your next project.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts