MES screen tweaks
Two small changes that shop-floor users ask for often.
A home-page link to MES
Section titled “A home-page link to MES”Users who use both the normal Kinetic menu and MES in the browser shouldn’t have to remember or type the MES address. Add a web link widget to their Kinetic home page that points at MES:
- Open MES in the browser once and copy the address from the address bar.
- On the Kinetic home page, add a widget and choose the web link type.
- Paste the MES address, give it a clear title such as Shop floor (MES), and save the home page.
For shared shop-floor PCs, a browser shortcut on the desktop that opens straight into MES does the same without a home page at all.
A live clock on an MES screen
Section titled “A live clock on an MES screen”Operators like to see the current time on the screen they clock in from. It’s tempting to fetch the time from the server, but a server call every second from every shop-floor PC adds up quickly. The browser already knows the time, so do it all client-side: one data view column, one control, and two events.
-
The column. Pick a scratch column to hold the time, for example
TransView.XX_CurrentTime.TransViewcolumns don’t need to be declared; binding to one creates it. -
The control. In the Layout designer, add a text box where you want the clock, name it
txtClock, bind it toTransView.XX_CurrentTimeand make it read-only. -
An event that sets the time. Create an event, say
XX_UpdateClock, with no trigger. Give it arow-updateaction that setsTransView.XX_CurrentTimeto the expression:'#_new Date().toLocaleString()_#'The
#_..._#wrapper runs JavaScript in the browser; see Expressions and JavaScript. -
An event that starts the clock. Create a second event triggered when
txtClockis created. Give it the samerow-update(so the clock shows immediately), then a timer widget that callsXX_UpdateClockevery second (check which interval unit the widget expects).
Use toLocaleTimeString() instead of toLocaleString() for the time without the date. The value is display-only and never saved, because nothing writes TransView back to the server.