BSA – HMI Designer

The HMI Designer part is progressing, but I must admit that it is a large project and I don’t always have time to work on it. Finally started to wrap up the Property Editor and styling up HMI controls that still have light style. The example form above got a bit dark and close to the background so I need to visualize the borders a little more.

Upgraded the project to Visual Studio 2022 and intend to make a test port to Avalonia later. Avalonia is WPF for Windows, Linux and Mac with iOS and Android coming. This is open source with MIT license and contain a few components that interest me.

I have complained about QML making design over-complicated in the past, but I must admit WPF also has it’s tweaks. That said I have never regretted moving from QML to WPF – C# integration into Visual Studio makes it worth it and I am exited to learn about what Avalonia can do – later.

This first version will be able to design HMI with a datasource and read/write data from/to that, but it will not be able to do much intelligent processing before we add PLD and the rest. It will however generate code we can continue on. My first datasources will be Modbus, CANbus and some database – I will probably wrap up a SQLite module, and maybe MySQL – lets see.

I recently bought myself a 14″ Asus VivoBook – great laptop for the price. I only have the standard laptop mouse and a single screen on this – which is a reminder that I will need to adapt the user interface for a more – keyboard only – option later. The current interface is dpending on mouse and 3rd mouse wheel which is not that available on a laptop only. Myself I prefer a desktop with 2 screens as a minimum then I work, but the laptop enable me to work more from my living room.

Looking at the example above I typically have five events I need to process:

  • Starting the dialog
  • Updating the dialogĀ  with data from a datasource
  • Three button events.

In reality there will be more, but lets keep it simple – the challenge with a HMI only designer is how do I process those events? I have two options (1) I can generate code where the user add the missing part, or (2) I can add in a minimum of UML State Diagrams, meaning that a HMI only design will have little purpose except for being a milestone. I need to think about this one a little. I do however have a secret agenda because I work on QML from time to time and Qt’s HMI design tend to crash + I want to autogenerate a lot of the code to speed development up. This is why Qt/QML is on my target list.

Don’t take me wrong on QML – WPF/QML is the only two technologies I have found worth working with. QML is very capable and some parts are better than WPF, but I stick to WPF because it is much faster and more productive to work with – that said – my next system will be made in BSA.

Categories: HMI

Leave a Reply