Configuration file
The UI Client is configured via the config.json file. Depending on the operating system, the file is located in the following directories.
Operating system | Path to the configuration | Path to the help page |
---|---|---|
Windows | %AppData%\Beckhoff\TF1200-UI-Client | %TwinCAT3dir%\Functions\TF1200-UI-Client\documentation\TF1200-UI-Client.html |
TwinCAT/BSD | /home/USER/.config/TF1200-UI-Client USER = User that the UI Client was installed for. | /usr/local/etc/TwinCAT/Functions/TF1200-UI-Client/documentation/TF1200-UI-Client.html |
*The help page is set as the StartUrl and is displayed on the first start.
The configuration file contains the following properties in configVersion = 1.5.
Property | Default value* | Default config | Data Type | Examples | Description | Required |
---|---|---|---|---|---|---|
allowMove | True | True | Boolean | True / False | Allows the window to be moved when kiosk mode is disabled. | - |
allowResize | True | True | Boolean | True / False | Allows you to change the size of the window when kiosk mode is disabled. |
|
autoUpdateConfig | False | True | Boolean | True / False | Activates the automatic update of the configuration file with new properties for future versions. | - |
commandLineSwitches | - | - | String Array | “ignore-certificate-errors” | Platform-specific command line switches supported by Electron and read by Chromium without leading hyphens according to the following documentation: https://www.electronjs.org/docs/latest/api/command-line-switches. | - |
configVersion | 1.5 | 1.5 | String | Is set by the UI Client. | Current version of the config.json file. | ✔ |
defaultTheme | ““ | ““ | String | "system" "light" "dark" | Default theme that is used to overwrite and replace the value that Chromium wants to use internally. | - |
enableDevTools | True | True | Boolean | True / False | Enable developer tools so that they can be opened automatically or by pressing the configured key or shortcut. | - |
enableIncognitoMode | True | True | Boolean | True / False | Enable incognito mode so that the session-related data in the memory is deleted when the application is closed. | - |
enableKioskMode | True | False | Boolean | True / False | Enable kiosk mode so that the application runs in full screen mode and the menu bar is removed. | - |
enableMenuBar | True | False | Boolean | True / False | "Enable the default menu bar. This setting is ignored and the menu bar is disabled if kiosk mode is enabled." | - |
extensions | “” | ““ | Object | {name: “MyExtension“, version: “1.0.0“, directory: “ "%ProgramData%\\Beckhoff\\TcUiClient\MyExtension”, debugPort:60000} | Name of the extension Semantic version no. Path of the extension that contains the file "<name>.Config.json" for describing the extension. Port (1-65535) for debugging the extension. | If set, the name, version and path to the directory are required. |
maxVisualZoomLevelLimit | 1 | 1 | Number | - | The maximum limit value for reduction and enlargement. The default value fixes that zooming is only allowed up to 100% of the original size, which means that no zooming is allowed at all. Larger values allow zooming up to the specified limit, e.g. 200 % if a value of 2 is specified. | - |
openDevTools | False | False | Boolean | True / False | Open the developer tools automatically in the browser window if they are enabled. | - |
persistPosition | False | True | Boolean | True / False | The current position of the browser window is persisted when closing if the kiosk mode is disabled. | - |
persistSize | False | True | Boolean | True / False | The current size of the browser window is persisted when closing if the kiosk mode is disabled". | - |
position | - | Will be saved when the client is closed if persistSize=true. | Object | {“x“: 100, y: 100} Data type x = Integer y = Integer | Specifies the position of the browser window relative to the top left corner of the main screen when kiosk mode is disabled | If set, x and y must be specified. |
quitApplicationKeys | “Esc“ | “Esc“ | String | "Alt+F4", "CmdOrCtrl+W" | Defines the key or shortcut for quitting the application. | - |
reloadBrowserWindowKeys | ““ | „“F5“ | String | "F5", "CmdOrCtrl+R" | Defines the key or shortcut with which the browser window is reloaded. | - |
retryErrorCodes | [ ] | [-7,-100,-101,-102,-103,-104,-106,-109,-118,-119,-120,-121,-130,-133,-137,-139,-154,-352,-802,-803] | Array (Integers) | The complete list of error codes and their meaning can be found here: https://source.chromium.org/chromium/chromium/src/+/main:net/base/net_error_list.h“ | Chromium's network error codes to retry loading the specified start URL if this fails. | - |
retryInterval | 0 | 5000 | Integer | - | Interval in milliseconds to repeat the loading of the specified start URL if this fails. If 0 is specified, loading of the specified start URL is not retried in the event of an error. | - |
retryMaxCount
| 0 | 5 | Integer | - | Maximum number of retries to load the specified start URL if this fails. If 0 is specified, loading of the specified start URL is not repeated in the event of an error | - |
size | - | {"width": 800, "height": 600} | Object | - | Specifies the size of the browser window when kiosk mode is disabled. | - |
startUrl | Windows: "%ProgramData%\\Beckhoff\\TcUiClient\\resources\\app.asar\\doc\\TF1200-UI-Client.html" TwinCAT/BSD: "/usr/local/www/${USER}/TF1200-UI-Client/default.html" |
| String | "https://www.beckhoff.com/" “https://127.0.0.1:2020/” | URL of the website or (platform-specific) path of the local HTML file that is loaded at startup. Environment variables in platform-specific notation are replaced if they exist. | ✔ |
toggleDevToolsKeys | “” | “” | String | "F12", "CmdOrCtrl+Shift+I"
| Defines the key or shortcut for switching the developer tools when they are enabled. | - |
windowTitle | ““ | ““ | String | “TwinCAT UI Client“ | Title of the browser window. If no title is specified, the title of the website or the local HTML file that is loaded at startup is used. | - |
*Default value applies if the property is not set in the configuration.