Skip to content

TwinCAT HMI and more... Posts

Attach to debug TwinCAT HMI Server Extension with just one click

VisualStudio 2017, 2019 TE2000-HMI-Engineering 1.12.*.* (Download) and future releases Sources of this post: GitHub Repository Very often you have to implement your own business-logic in a TwinCAT HMI Server Extension (link: Beckhoff). To debug that extension you have to attach to the process which has loaded and runs the corresponding functionality. In TwinCAT HMI 1.12 the running process to execute that server extension has changed. In the TwinCAT HMI version 1.10 the server extension was…

6 Comments

Resolve index-based symbol mappings easily

VisualStudio 2017, 2019 TE2000-HMI-Engineering >= 1.12.718.* (Download) Sources of this post: GitHub Repository Array-based access to TwinCAT HMI symbols can be tricky, but in the latest version (>= 1.12.718.0) some convience functionalities has been added to the Server API. Let’s have a look. The TwinCAT HMI Server API is provided in “C:\TwinCAT\Functions\TE2000-HMI-Engineering\Infrastructure\TcHmiServer\Latest”. Right now we are interested in “TcHmiSrvExtNet.Core.dll”. With JetBrains dotPeek we can discover the internals of the DLL. Check the namespace “TcHmiSrv.Core.Extensions”, four…

Leave a Comment

Share Icon Sets and Media Files for TwinCAT HMI with NuGet Package Management

VisualStudio 2017, 2019 TE2000-HMI-Engineering 1.12.*.* (Download) and future releases Do you have a large set of individual icon set you like share easily with other developer or customer? The TwinCAT HMI provides an easy way to fullfil this requirement by use of the powerful NuGet package management already available in Microsoft VisualStudio. You can add any content which is supported by the TwinCAT HMI Gallery Explorer, e.g. images (PNG, JPEG, Bitmap, etc.) and videos (MPEG4,…

4 Comments

Modify Action&Condition Syntax Highlighting in TwinCAT HMI’ Designer

VisualStudio 2017, 2019 TE2000-HMI-Engineering 1.12.*.* (Download) and future releases As you already know the TwinCAT HMI uses a JSON-dialect for Action&Conditions of any Control. In 1.12 and higher syntax highlight functionality is added and activated by default. The user can change the colors for some categories. The possible settings are provided in VisualStudio’s font setting dialog: “Tools / Options… / Environment / Fonts and Colors / Display items:” It is up to you how the…

4 Comments

Register “Beckhoff TwinCAT HMI Type Library” Manually

VisualStudio 2017, 2019 TE2000-HMI-Engineering 1.12.*.* (Download) and future releases Sources of this post: GitHub Repository Under some circumstances it is possible that the “Beckhoff TwinCAT HMI Type Library” used by the TwinCAT HMI Automation Interface is not registered successfully. To solve this issue, just register the type library manually. The necessary tool for doing this should be already available on your machine, just search for “regasm.exe” (Assembly Registration Tool) [Microsoft Website]. Open the VisualStudio 2017/2019…

Leave a Comment

Query all available TwinCAT HMI control types and all available attributes

VisualStudio 2013, 2015, 2017 TE2000-HMI-Engineering 1.10.*.* (Download) and future releases Sources of this post: GitHub Repository The TwinCAT HMI provides a large set of default control types with several specific attributes. In case you already asked yourself how to query a full list of any information about theses information, just look into the small piece of code (see ShotAttributesCommand.cs for full implementation). Just create a HMI-project and call Execute(..), it is reachable in the VisualStudio…

Leave a Comment

Extend Visual Studio’s IntelliSense for TwinCAT HMI

VisualStudio 2017 TE2000-HMI-Engineering 1.10.*.* (Download) and future releases Sources of this post: GitHub Repository As you already know the TwinCAT HMI designer is a split view implementation. On one side a WYSIWYG-editor based on CEF (so-called Designer) is provided, on the other side the plain code editor of Visual Studio is usable to modify your HMI-implementation directly. To add new controls to your HMI you have multiple ways to reach your goal: use the Toolbox…

Leave a Comment

Create HMI-project programmatically by using EnvDTE

VisualStudio 2013, 2015, 2017, 2019 TE2000-HMI-Engineering 1.10.*.* (Download) and future releases Sources of this post: GitHub Repository If you whish to create a HMI-project programmatically EnvDTE is the key for success. Keep in mind, this is just one way of several other possible approaches. In this post we only focus C# but other programming languages are usable as well. Here, we will add a VisualStudio Command [Online] with the help of a VisualStudio Extension [Online].…

Leave a Comment

Query installed TwinCAT HMI version and build time

The information in this post can be used with: VisualStudio 2013, 2015, 2017, 2019 TE2000-HMI-Engineering 1.10.*.* (Download) and future releases Sources of this post: GitHub Repository Sometimes it can be very handy to know the currently installed TwinCAT HMI SDK and runtime, e.g. to allow build switches for different versions. Therefor, you only have to query the product version and linker date-time of any installed TwinCAT HMI DLL, e.g. “TcHmiCore.dll” or “TcHmiMSBuild.Publish.dll” etc. The output…

Leave a Comment

Mass Deployment of a TwinCAT HMI project

The information in this post can be used with: VisualStudio 2013, 2015, 2017 TE2000-HMI-Engineering 1.10.*.* (Download) Sources of this post: GitHub repository In case you like to update several remote machines with the same HMI project just implement some utilities to support this scenario. Everything you need is on-board. The source of any example in this post is accessible on GitHub in one of my repositories: “twincathmi / UseCases / MassDeployment”. The solution “TcHmiProject1” contains…

Leave a Comment