SPLat Logo

# HMI Android & Windows

NOTICE: We are updating our website. For product enquiries and orders please contact us directly.
NOTICE: SPLat Controls has moved. We are now at 1/85 Brunel Rd, Seaford, 3198. map

# HMI Android & Windows

Please note the Android and Windows implementations of SimpleHMI have been deprecated.  Both were little used and have been superseded by the HMI series of SPLat Controllers.

The HMI hash command is used to control a SPLat "Simple HMI". This can be either the SimpleHMI function built into SPLat/PC, or the SimpleHMI Android (smartphone) app. In either case the SPLat program is identical, so whatever works inside SPLat/PC will also work when an Android device is used as an HMI.

Example:

# HMI    Cursor(5,0) Text("Hello World")

will place the HMI cursor at row 5, column 0 and display the text "Hello World" (providing the serial port has been suitably initialized and the required connection to an HMI device exists).

In the above code line Cursor and Text are hash functions that specify what to do with the HMI. All the hash functions that are possible with the HMI hash command are listed in this section.

Event handlers

Some of the HMI-related hash functions include a parameter for specifying "Event handlers". Example:

# HMI    ButtonEvent(, 3, 4, 5, 10, "Test Button", MyButtonEvent)

When the SPLat controller executes this hash command, it will display button number 1 on the HMI at row 3, column 4, with height 5 and width 10. The label on the button will be "Test button". When an Enduser clicks the button, the SPLat will automatically execute a GoSub MyButtonEvent. It is then up to you to have a subroutine at a line labelled MyButtonEvent which does whatever you want to do when the user clicks the button, then executes a Return. That subroutine is called an Event handler, because it "handles" the "button_click event".

Event handlers are possible only if your program uses MultiTrack. The feature uses just one MultiTrack task.

SimpleHMI Tutorial