MB_Container.txt --------------------------------------------------------------------------- The predefined container variables in MicroBrowser: V.1.6.51.158.0 _KEYPAD_LEAVE_WRITEDONE quit edit mode either On escape (0) or on enter (1) V.1.6.51.157.1 MB_StartProcessResult, MB_StartProcessError and MB_StartProcessErrorCode to read the result of MB_StartProcess V.1.6.51.157 "MB_sort_atblrow", to support the sorting of CODESYS V.2 alarm tables "MB_TEQ_WIDTH" and "MB_TEQ_HEIGHT" to read the size of the TEQ "MB_App.goBack", "MB_App.close" and "MB_isScreenOn" for Android V.1.6.51.156 "_KEYPAD_EN", to enable or disable the keypad/alphapad TEQ (uBrowser.sip) "MB_DumpScreen" for Linux too, to create a screenshot in a BMP file in 24 bpp V.1.6.51.154.4 MB_DisableTouch to enable or disable the touch V.1.6.51.154.2 MB_Calendar.Cweek Returns the calendar week number MB_Calendar.Cweek.daysInMonthBefore Returns the number of days before the selected month MB_Calendar.Cweek.prevStartDay MB_Calendar.Cweek.prevStartMonth MB_Calendar.Cweek.prevStartYear MB_Calendar.Cweek.currStartDay MB_Calendar.Cweek.currStartMonth MB_Calendar.Cweek.currStartYear MB_Calendar.Cweek.calendarWeekStartDay MB_Calendar.Cweek.calendarWeekStartMonth MB_Calendar.Cweek.calendarWeekStartYear V.1.6.51.154.1 "MB_ping" Write the IP address of the target to ping "MB_ping_errno" Read error code of the previous ping request V.1.6.51.154 "MB_InstanceNr" The instance number, when you start the MicroBrowser with argument like "-i 2", to store the position of the window for another instance "MB_SystemTicks" System ticks in milliseconds (unsigned int 32 bit) "MB_copyright_files[i]" for each line (file) found in copyright_files.txt "MB_copyright_files.size" number of entries in MB_copyright_files[i] "MB_Calendar.hour_INDCO.x" rw: hours (0..23) "MB_Calendar.minute_INDCO.x" rw: minutes (0..59) "MB_Calendar.second_INDCO.x" rw: seconds (0..59) And init following variables with action "GET_TS" and "GET_DATETIME" "MB_Calendar.wday_INDCO.x" (0..6) "MB_Calendar.yday_INDCO.x" (0..365) -- "MB_Tooltip_OnMouseDown" if enabled (1) it will show the Tooltip of the painter on touch down -- Not supported -- "MB_TooltipOnTouch" if enabled (1), it will show the tool-tip of the painter on touch, skip the action and automatically reset the variable after 4 sec. or on double-click (300 ms) "MB_ShowTooltips" if enabled (1), it will show the tool-tips of all visible objects "MB_Config.WWW_user" Username for HTTP Basic Authentication "MB_Config.WWW_pass" Password for HTTP Basic Authentication "MB_Config.Proxy_user" Username for Proxy Authentication "MB_Config.Proxy_pass" Password for Proxy Authentication "MB_Config.StartScriptOnLongPress" To launch a script on long press V.153.4 "MB_SpcSessionId" to show the value of the Cookie "SpcSessionId" from SpiderControl SCADA Server V.153.2 "MB_Config.S7_user" Username for S7 login "MB_Config.S7_pass" Password for S7 login V.153.1 "MB_Calendar.hour" ro: hours (0..23) "MB_Calendar.minute" ro: minutes (0..59) "MB_Calendar.second" ro: seconds (0..59) "MB_Calendar.wday" ro: week day (0..6) "MB_Calendar.yday" ro: week day (0..365) V.153 MB_DumpScreen Save a Screen shot of the current view in the specified file in value If value is emty, the Save As dialog will appear. If value ends with ".bmp" the bitmap file will automatically be saved, with the base name of the current view (TEQ file name without extension) "MB_MOUSE.move.x" to show mouse X position (with scale factor) "MB_MOUSE.move.y" to show mouse Y position (with Scale factor) "MB_MOUSE.move.px" to show mouse X position in pixel (without Scale factor) "MB_MOUSE.move.py" to show mouse Y position in pixel (without Scale factor) V.152 MB_BuildDateTime Returns build date and time of the MicroBrowser app V.151.11 MB_Period Returns the refresh period in millisecond MB_Timestamp Returns the timestamp in second MB_Timestamp_ms Returns the timestamp in millisecond (if supported, depending on hardware) MB_Timestamp_us Returns the timestamp in microsecond (if supported, depending on hardware) V.151.3 "MB_Random" Read only variable, it generates a random number on every read "MB_Config.ScaleFactor" 0: Auto scale keep ratio (Isotropic), 1: No auto-scale, -1: Stretch (Anisotropic), any other values can be used by specifying a positive scale factor like 1.6 V.150 "MB_ScaleFactorX" Current scale factor on X-axis (Horizontal) "MB_ScaleFactorY" Current scale factor on Y-axis (Vertical) V.145 "MB_DebugBoxLevel" If value is greater than 0 system shows debug box with performance info Is also enabled with debug_level 2 V.140 "MB_CursorHide" r/w: Write 0 or 1 to respectively hide or show the cursor on Windows New container variables for internal heaps, usage and max memory in bytes and KB MB_Heap[n].max Memory max size in bytes MB_Heap[n].max_kb Memory max size in KB MB_Heap[n].use Memory usage in bytes MB_Heap[n].use_kb Memory usage in KB Where n is the 0-based index 0: Video Heap for Image cache (if defined) 1: Heap 1, for TEQ file, current PPO list 2: Heap 2, for Container variables, TCR, static HTML tags, macro instances... 3: Heap 3, for Offline Alarm and Trend macros 4: Heap 4, for Online trend macro 5: -- RFU -- 6: Utility heap to decompress images for example (if defined) 7: LR-Heap, for Language Resource File (HTML-Tags in CSV file) 8: Ramdisk (TEQ file cache) V.136 "MB_imageCacheUsage" Current image cache used "MB_imageCacheMax" Maximal image cache V.132 "MB_IsApp" returns "1" on Android and iOS App "MB_BrowserTypeID" returns "20" for MicroBrowser (1:Applet, 5:HTM5, 10: nanoBrowser, 20: MicroBrowser) - Supports AuditTrail service (logging of Syslog events): "AuditTrail.ServerURL" URL of AuditTrail service, e.g. http://192.168.1.1/cgi-bin/AuditTrail.exe "AuditTrail.Enabled" Bit 0: PPO log Bit 1: CONTAINER log Bit 2: JUMP log Bit 3: MOUSE log "AuditTrail.UserName" User name sent with event "AuditTrail.UpdateFrequency" Events are sent after x refreshs "AuditTrail.PPOExclude" List of PPOs to exclude, separated with "," "AuditTrail.ContainerInclude" List of CONTAINERs to include, separated with "," - Support basic authentication login within HMI: "MB_AUTH.user" User name "MB_AUTH.pass" Password "MB_AUTH.action" Write "2" in this CONTAINER to log in V.131g "MB_clearFileCache" Bit 0: clear teq_cache (Ramdisk/intern file cache) Bit 1: clear image cache Bit 2: reload the current view For examples: Write 1 to clear teq_cache only (Ramdisk/intern file cache) Write 2 to clear image cache only Write 3 to clear both caches Write 7 to clear both caches and reload the current view V.131 - Supports Calendar macro with container variables to read and write date and time "MB_Calendar.day" r/w: day in month (1..31) "MB_Calendar.month" r/w: month 0-based (0..11) "MB_Calendar.year" r/w: year like 2013 "MB_Calendar.time" r/w: time in form "HH:MM:SS", depending on global TMZ setting ("MB_tmz_en") "MB_Calendar.timestamp" r/w: timestamp im ms since Jan. the 1st 1970 0:00:00 "MB_Calendar.daysInMonth" r/-: read only variable to get the number of days in the month, from MB_Calendar.month and -.year varaiables "MB_Calendar.action" -/w: write only variable, to perform any action with the specified value. action = "SET_TS": set timestamp variable "MB_Calendar.timestamp", from date and time variables (MB_Calendar.day, -.month, -.year, -.time) action = "GET_TS": initialize date and time variables (MB_Calendar.day, -.month, -.year, -.time) depending on "MB_Calendar.timestamp" action = "GET_DATETIME": initialize date and time variables (MB_Calendar.day, -.month, -.year, -.time) with the local date and time of the system action = "SET_DATETIME": set date and time of the system (not implemented yet for all platforms), with date and time variables (MB_Calendar.day, -.month, -.year, -.time) Since V.131e * Supports instance variables in Calendar macro, like "MB_Calendar.name_INDCO.1234567890" * Supports "MB_Calendar.Wday1InMonth" r/-: read only variable to get the week day (since Sunday - [0,6]) of the first day in month. using container variables "MB_Calendar.month" and "MB_Calendar.year" For example, January the 1st 1970 was a Thursday, Wday1InMonth(1970, 0) -> 4 V.130 "MB_REQ_REDRAW", write only variable to schedule a new redraw Possible values: 1: Full redraw or conditional redraw, depending on the platform (conditional for embedded MB, full for MB-XP/iOS/Android/Linux/..., tbd for CE) 2: Force full redraw 3: Conditional redraw V.124 "@CURRENT_URL" Display the current URL, like "@CURRENT_PAGE" for TEQ files, "@CURRENT_URL" shows the current URL like "http://mydomain.com/PLCSample.html" or "PLCSample.html" for local files. V.123 "MB_APP_NAME" Display product name "MicroBrowser" "MB_APP_LONGNAME" Display product long name: "SpiderControl MicroBrowser" V.119 "MB_SkipPPORefresh" to skip the ppo refresh, if the value is set to "1". V.116 "MB_ERRORTYPE" to get error type (0: general, 1: min/max or out of range error, ...) V.113 "MB_ConcecutivUpdatePPOCGIErrorsCount" to get the number of consecutively failed CGI requests in PPO updates. V.112 "_KEYPAD_MIN" show the min value of the editied (PPO) variable "_KEYPAD_MAX" show the max value of the editied (PPO) variable "_KEYPAD_FORMAT" show the format value defined in TCR file, of the editied (PPO) variable "MB_SCREEN_BPP" show the number of bit per pixel used by the display, 8, 16 or 24-bpp V.111 "MB_PM_AM" to get and set the runtime variable PM_AM. "MB_LocalDateTime" show the local date and time, depending on the format specified by the container "MB_PM_AM". "MB_LocalDate" show the local date, depending on the format specified by the container "MB_PM_AM". "MB_LocalTime" show the local time, depending on the format specified by the container "MB_PM_AM". "MB_LocalHostName", show the local host name "MB_HEAP1_SIZE" show the size in bytes of MicroBrowser Heap 1 (read only). "MB_HEAP2_SIZE" show the size in bytes of MicroBrowser Heap 2 (read only). "MB_HEAP3_SIZE" show the size in bytes of MicroBrowser Heap 3 (read only). V.109c "MB_OS_NAME" show the OS name, like "Windows CE 5.0" (read only). "_KEYPAD_X" to specify the X position of the keypad.teq file "_KEYPAD_Y" to specify the Y position of the keypad.teq file V.103d "MB_RunningTime" A read only variable, to get the number of seconds since when the program is running. V.102i Note: The following container variables are used in a special mode, and customers may not attempt to use them! "MB_SEND_FKEY" Write on this variable the name of the function key to send on the current view, "ENTER", "ESC", "UP", "DOWN", "LEFT", "RIGHT", "FKEY_1" for F1, "FKEY_2" for F2, ... "MB_SEND_CHAR" Write on this variable the character to send on the current view, "1", "2", "3", "A", "b", "c"... "MB_SEND_CHAR_CODE" Write on this variable the ascii code of the character to send on the current view, "8" for backspace, "10" for line feed, ... Ver.5.13.100 "MB_EditObjId" show the Object id of the current edit-box in edit mode, or -1 if no object is currently in edition. Ver.5.12.098 "MB_SerNumber" Show serial number of the device when supported "MB_DeviceName" Show device name when supported "MB_ColorDepth" Show color depth of the display, in byte per pixel, when supported "MB_Brightness" get and set brightness of the display, when supported "MB_Contrast" get and set contrast of the display, when supported "MB_HornState" turn on (write 1) or turn off (write 0) the horne, when supported Ver.5.12.097h (CE) "MB_AlwaysOnTop" Write 0 or 1 to respectively disable or enable the property "Always On Top" of the MicroBrowser main window. Ver.5.12.098 "MB_InactivityCounterMin" this container counts up every minute. It is reset to 0 on any mouse or key actions of the user. Usefull for logout. Ver.5.12.093b "_NOINITSESSCO_0" Session container variable 0 "_NOINITSESSCO_1" Session container variable 1 "_NOINITSESSCO_2" Session container variable 2 ... ... "_NOINITSESSCO_19" Session container variable 19 Ver.5.12.092h "MB_Buzzer" write "0" or "1" to disable or enable the buzzer "MB_FOCUS" get object id (0..n) of the current focused object or write the the current focus. "-1" means no selection. Ver.5.12.092b "MB_tmz_en" enable or disable TMZ, to display date and time for alarming, trending or calendar macros. Ver.5.12.090 "MB_inactivity_to_sec" show inactivity_to_sec defined in the xml configuration file. "MB_inactivity_pts_ms" show inactivity_pts_ms defined in the xml configuration file. Ver.5.12.089 "MB_PollTimeSubstitute" allow to set at any time a new refresh period in ms, (0: use default period defined in the project) Ver.5.10.088 "MB_VERSION" show version of the xml configuration file. "MB_APP_VERSION" show version of the MicroBrowser. "MB_OS_VERSION" show version of the OS. "MB_PLATFORM" show the platform name, is one of the following "uBT", "uBCE", "uBXP", ... "MB_SCREEN_WIDTH" show the width of the screen "MB_SCREEN_HEIGHT" show the height of the screen "MB_IpAddress", show the IP address of the panel. "MB_Subnet", show the subnet mask of the panel. "MB_Gateway", show the gateway address of the panel. "MB_Volume" this container is used to get and set the volume in percent. "AUTOINCRCO" this container is incremented on every period. "@BLINKCO" is AUTOINCRCO modulo 2. "MB_InactivityCounter" this container counts up every second. It is reset to 0 on any mouse or key actions of the user. Usefull for logout. "@MB_InactivityCounter" this container counts up every second. It is reset to 0 on any mouse or key actions of the user. Usefull for logout. "MB_StartProcess" this container is used to write the name of the application to start. Write "killme" will close the MicroBrowser program itself. "MB_ExeToTop" this container is used to write the name of the program to bring on the top. It will start the program if this one is not already running (Not supported for Windows CE!). "MB_BringWindowToTop" this container is used to write the name of the window, or a part of it, to bring the application on the top. writing "_self" will bring the MicroBrowser on top. "MB_WakeUp" write 1 to wake up the computer and to stop the screen saver "MB_Backlight" write 0 or 1 to turn off/on the display or the LCD backlight. "MSGBOX_NR" show the number of messages appended in the message box. "MessageBoxCO" show the text in message box. "MB_UpdateAfterPpoWrite" write "0" or "1" to improve the reaction time after writing on any PPO "MB_UpdateAfterCoWrite" write "0" or "1" to improve the reaction time after writing on any CO "@MODAL_FOREGROUND" write "0" or "1" to disable or enable the modal foreground teq. "@LANGUAGE" to write the name of the new CSV file to load. "@MB_FKEY_EVENT" show the last function key proceed. "@MB_FULL_REDRAW" - Is no longer supported - (write "0" or "1" to disable or enable the full redraw mode) "@CURRENT_PAGE" show the name of the current page (TEQ file). "IsWebBrowser" Is equals to "0" for browsing with local file, = "1" for remote access "_KEYPAD" used by the keypad teq to edit the value (initial value). "_KEYPAD_DEST_NAME" used by the keypad teq to save the name of the destination to write (PPO or CONTAINER name). "_KEYPAD_DEST_TYPE" used by the keypad teq to save the type of the destination to write (1: PPO, 5: CONTAINER). "_KEYPAD_SHIFT" used by the keypad teq as caps-lock "_KEYPAD_OPEN" used by the keypad teq to open a new keypad (write "keypad.teq" or "alphapad.teq") "_KEYPADCLOSE" used by the keypad teq to close the keypad, or to switch between alpha-pad and numeric-pad. "_KEYEVENT" used by the keypad teq to append new characters. "_KEYPAD_TF_FOCUS" used by the keypad teq to select the editable text field after closing the keypad. "MB_PERCO_0" Persistent container 0 stored in "uBrowsCo.xml" "MB_PERCO_1" Persistent container 1 stored in "uBrowsCo.xml" "MB_PERCO_2" Persistent container 2 stored in "uBrowsCo.xml" ... "MB_PERCO_19" Persistent container 19 stored in "uBrowsCo.xml" Note: These container variables are not all supported on each platfrom and we do not give any guarantee to support all of them in the future. --------------------------------------------------------------------------- MicroBrowser Config page (MB_Config) The MicroBrowser Config page is enabled with the following parameters in uBrowser.xml 0 mb_config/Config.html mb_config.ini Here, the MicroBrowser will automatically start the project under ./mb_config/Config.html This is a SpiderControl project that allows you to define parameters like the start URL, the time to wait before starting the URL, configure the auto-scale, orientations and so on. These parameters are all defined with the prefix "MB_Config.", there are stored in the config file specified in uBrowser.xml For example: # MicroBrowser Config MB_Config.Start.Timeout=5 MB_Config.Start.URL=http://localhost/start.html ... Predefined Variables MB_Config.Start.URL Specify the start URL MB_Config.Start.Timeout Time to wait before starting the URL (the start page shows a count down) Note: if the device is not reachable, it will automatically return to the config page and retry after the timeout MB_Config.ReturnToConfigInSec With this parameter one can set the time (in seconds) to return in the config page, by holding the touch or mouse pressed on the display. O is disabled MB_Config.StartScriptOnLongPress To define the script to launch on long press. Default is empty and it will return on the Setup page. MB_Config.CheckForUpdateMin is used to automatically reload the HMI when the project has changed MB_Config.BackgroundColor is used to define a background color, out of the TEQ size Load settings MB_Config_LoadFile Load settings from the specified file, default settings in Setup page are under "mb_config.default" The MicroBrowser can change the Ethernet settings on statup MB_Config.Eth.BootApply=0 Enable/disable this feature MB_Config.Eth.Iface=0 Interface number like 0 for eth0 MB_Config.Eth.IP=192.168.1.99 Static IP address MB_Config.Eth.Subnet=255.255.255.0 Subnet mask MB_Config.Eth.Gateway=192.168.1.1 Gateway (if needed) MB_Config.Eth.DNS1 MB_Config.Eth.DNS2 MB_Config.Eth.DHCP Enable or not (1:DHCP, 0:Static IP) Apply Ethernet settings with one of them MB_Config_Eth.Apply Set DHCP or Static IP with Subnet and Gateway MB_Config_Eth.WriteToFile Write Ethernet settings into the config file (MB_Config_NetworkFile), depending on the platform Static IP "0;ethX;IP;Subnet;Gateway;DNS1;DNS2" or with DHCP: "1;eth0;DNS1;DNS2" or just "1;eth0" And read the following variables: MB_Config_Eth.Name like "eth0" MB_Config_Eth.Desc MB_Config_Eth.MAC MAC address (Hardware) MB_Config_NetworkFile Config file found to store network settings, like "/etc/network/interfaces" or "/etc/dhcpcd.conf" The MicroBrowser can turn the backlight off after a specified time of inactivity, defined with the following parameter (in minutes), 0 is disabled MB_Config.LCD.BLITimeout Set scale factor or enable auto scale MB_Config.ScaleFactor 0: Isotropic auto-scale on screen size (keep the width/height ratio of the original view) -1: Anisotropic scaling (stretch the view on the screen size) 1: Scale factor 1 (scaling is disabled) Or any other scale factor can be applied with a positive real number, like 1.6 Since V.1.6.51.151.3, parameters like "MB_Config.AutoScale" and "MB_Config.AutoScaleEn" are deprecated with "MB_Config.ScaleFactor" Set Orientation (if anisotropic scaling is not enabled and the view size does not match the screen size) MB_Config.Orientation For example: 0 is top-left and 4 is middle centered (vertically and horizontally) 0 1 2 3 4 5 6 7 8 Other CONTAINER variables can be defined for your own pupose, there will be automatically saved in the same config file, as long as they have the same prefix. MB_Config_Error: 0: No error 1: Failed to connect 10: No route to host 2: File not found 3: Invalid device 4 or 401: Authentication Required 5: Invalid HTML 6: CoDeSys not supported For Authentication: "MB_Config.WWW_user" Username for HTTP Basic Authentication "MB_Config.WWW_pass" Password for HTTP Basic Authentication "MB_Config.Proxy_user" Username for Proxy Authentication "MB_Config.Proxy_pass" Password for Proxy Authentication "MB_Config.S7_user" Username for S7 login "MB_Config.S7_pass" Password for S7 login --------------------------------------------------------------------------- (c) 2020 iniNet Solutions GmbH, 4132 Muttenz (Switzerland) info@ininet.ch www.spidercontrol.ch