DMC, Inc.

How to Build an HMI in Keyence VT Studio

This blog is Part Two in a two-part series on exploring PLC and HMI programming capabilities in Keyence VT Studio. To learn more about setting up a new project, visit Getting Started with Keyence VT Studio.

At this point, you have created a new VT Studio project, configured communication with your Keyence PLC, and imported your KV Studio tags into VT Studio. With this foundation in place, you’re ready to begin building out the functionality of your HMI.

In Part Two, we’ll continue from here and explore more of VT Studio’s capabilities, including how to use your imported tags as you develop your HMI application.

Screen Content Creation

Navigate to and open “Screen 1” in the project tree. On the right-hand side of the project, select the “Call up screen” tool and ensure it covers the entirety of Screen 1. A “Call up screen” pop-up should appear once you place the call-up screen, and in it, select the original screen we are using as our background and press “OK.”

Now that the background screen has been called into our first screen, we can add some content to it. For Screen 1, we will use the tags with both read/write permissions to create a button to write to the Boolean tag and a numeric entry field to write to the Integer. Using the “Switch” and the “Numeric entry field” objects along with labels, add the content to the screen.

Double-click on the switch object that was created to open up the properties. Ensure “Set bit” is the function selected, and select your tag with input permissions as the “Target bit device.” In our case, this tag is “bTestTag1.” You can change the “Switch mode” to a few different functions, but for this guide, we will stick with “Set momentary” for this guide. Press “OK” to finish.

Next, double-click on the numeric entry field created and select “iTestTag1” as the “Reference word device”. There are many options to play around with here in the settings tab, but we will only set the tag here in this guide and ensure that it is the correct data format to match what is in the PLC.

Next, navigate to the “Key Entry” tab and ensure that “Key entry” and “Select by switch and display window” is are selected. “Key Entry” will allow the field to be used for input, and “Select by switch and display window” is important for HMI’s that do not have a keyboard attached, as it will show a pop-up with a touch keypad that can be used to enter the value. Press “OK” to finish.

For screen 2, we will use the “Read Only” tags to create a Boolean indicator and an integer display. Using the “Lamp” tool, and the “Numerical value display,” add content to the screen along with labels and a title.

For the Lamp indicator, configure the nameplate and style On/Off to have different display versions based on the Boolean value using the “Property” side panel after clicking on it.

Next, double-click the Lamp to set the “Lamp bit device” to the read-only “bTestTag2” and press “OK”.

Finally, for the numeric display field, follow the same instructions on the “Settings” page as for Screen 1, except link “iTestTag2” instead. Navigate to the “Key Entry” tab and this time ensure “Key Entry” is not selected and press “OK”.

Now you have learned to use the basics of VT Studio with screen creation, navigation, and tag reading/writing; these principles can be applied to create complex HMI screens with fantastic potential.

Alarms

Alarming in VT Studio is very straightforward when combined with a Keyence PLC and KV Studio. To start, navigate to “System setting” > “Alarm” and press “New”. Select your Alarm ID and press “OK”.

After you press “OK,” you should be greeted with the Alarm Settings page. There are many settings you may modify here, but the most important is the “Number of devices” setting. Each “Device” corresponds to a data memory word, where each bit of the word corresponds to a different alarm that will become active as long as the corresponding data memory bit is enabled.

We will include 2 devices in this tutorial to showcase this. Next, navigate to the “Message” tab under the new alarm folder you created.

There, you will see a table where you can input your alarm message to correspond with each bit of the data memory “devices” you selected. From this screen, we can see that there are 32 potential messages between the two devices we selected. We will add a message to bit 0 of each word, and then press “Option setting mode” to reveal more options.

There, you are presented with additional functions and settings, including settings bits, alarm level, playing audio files, and more. For this tutorial, we’ll adjust the alarm level for one of our alarms.

To trigger the alarm, you just need to set that memory bit in the PLC. This logic can look as simple as the following code, and the alarm will stay active as long as the bit is high.

To display the alarms on the HMI itself, the easiest way is to use a pre-created screen. Under the “View” settings tab, select “Screen catalog,” which pulls up a plethora of pre-made screens you can use. On this page, select “Alarm” from the dropdown and click and drag one of the screens into your project window to import it.

Within the new alarm screen, double-click on the alarm table, and ensure that “Alarm ID” is set to match the alarm ID of the alarm table you created previously. From there, you can adjust settings to suit your specific needs.

Modify and link this page to the rest of your HMI screens, and you have a functional alarm log page!

Simulation

VT and KV Studio pair together to provide a very useful simulation function for testing both the HMI and PLC. To begin, make sure your VT and KV Studio projects are open, and you have imported the most recent version of tags into VT Studio from KV Studio. Next, go to “Tool” > “Start up VT simulator…” and open it.

Once you get to the “Start up VT simulator” page, select the “KV STUDIO” setting and choose the project you have running. Make sure the PLC no. matches, press “OK,” and then “Simulation start.”

This will then open up your KV Studio project and ask you to enter “Run” mode. Press ”Yes,” and KV Studio will now be in “Simulator mode”, and a pop-up window containing your simulated HMI shall appear. You can now use this to test both your HMI and PLC, as the interactions between them should now work as they would with physical hardware.

Key Takeaways

With your screens configured, alarms in place, and project tested using VT Studio’s simulation tools, you now have the building blocks of a functional HMI application. These features can serve as a foundation for developing more complex interfaces tailored to your system and operator needs.

As you continue working in Keyence VT Studio, you can build on these fundamentals to create HMIs that provide operators with clear information, intuitive controls, and greater visibility into their processes.

Ready to get started with your next automation project? DMC can help!

Learn more about DMC’s HMI programming expertise and reach out to our Manufacturing Automation team to kick off your next project.