FAQ

  1. The TwinCAT 3 UI Client reports the error code -202 (ERR_CERT_AUTHORITY_INVALID) when connecting to a web page via HTTPS.
  2. How can the TwinCAT 3 UI Client start automatically after logging on to the operating system?
  3. How can the operating system automatically log in a user after the boot process?
  4. How can the TwinCAT 3 UI Client start with different web applications?
  5. How can the display and touch input under TwinCAT/BSD® be used in portrait mode?
  6. How can I create relevant log files for the UI client under TwinCAT BSD?

1. The TwinCAT 3 UI Client reports the error code -202 (ERR_CERT_AUTHORITY_INVALID) when connecting to a web page via HTTPS.

FAQ 1:

Background: The certificate used for the HTTPS connection is classified as insecure by Chromium because it is not known to the operating system (e.g. self-signed certificates).

Answer: The following options are available:

Use an official certificate for the web server that is configured as trustworthy for the operating system or trust the self-signed certificate if this is trustworthy. Alternatively, set the switch in the configuration:

commandLineSwitches": ["ignore-certificate-errors"]

2. How can the TwinCAT 3 UI Client start automatically after logging on to the operating system?

Answer: The following options are available under Windows:

Create a link from the TwinCAT UI Client in the TwinCAT StartUp folder.

Path: TwinCAT\3.1\Target\StartUp

When TwinCAT switches to Run Mode, the TwinCAT UI Client is started.

FAQ 2:

If TwinCAT is operated in configuration mode, you can create a link from the TwinCAT UI Client in your user's startup directory. You can access the folder directly using the following command (shortcut Windows + R):

Shell:startup

FAQ 3:

Path: %AppData%\Microsoft\Windows\Start Menu\Programs\Startup

The following options are available under TwinCAT/BSD:

When installing via the setup-full.sh script, the autostart can be set up via the "--autostart" parameter.

The setup-autostart.sh script is located under /usr/local/etc/TwinCAT/Functions/TF1200-UI-Client/scripts, with which the autostart can be set up subsequently.

3. How can the operating system automatically log in a user after the boot process?

Answer: Under Windows, a user can be configured for Auto Logon in the TwinCAT project under the SYSTEM node and the Settings tab.

FAQ 4:

The following options are available under TwinCAT/BSD

When installing via the setup-full.sh script, the autostart can be set up via the "--autostart" parameter.

The setup-autologin.sh script is located under /usr/local/etc/TwinCAT/Functions/TF1200-UI-Client/scripts, with which the autostart can be set up subsequently.

4. How can the TwinCAT 3 UI Client start with different web applications?

The executable file of the TwinCAT 3 UI Client can be given a path to another configuration file via the -config-path parameter. This means that several TwinCAT 3 UI Clients can start different web applications in parallel when kiosk mode is disabled. The configuration can be copied and adapted from the existing one.

Alternatively, a new Config can be created using the --exit parameter. The --config-path parameter is used to specify the path and name of the new Config

Under Windows, the shortcut can be given the parameters for further configuration in the properties:

FAQ 5:

Only one UI Client is currently supported under TwinCAT/BSD.

5. How can the display and touch input under TwinCAT/BSD® be used in portrait mode?

The UI client under TwinCAT/BSD® uses the Sway window manager. For portrait mode, the image under the touch input must be rotated by 90 or 270 degrees. To do this, add the following lines to the Sway configuration file (path: /home/TF1200/.config/sway/config) with administrator rights and restart the operating system or Sway.

output * transform 90
input type:touch calibration_matrix 0 1 0 "-1" 0 1

6. How can I create relevant log files for the UI client under TwinCAT BSD?

By default, the UI client sends output and error messages to the console. It may be helpful to write the information to a file for error analysis:

  1. Open the sway configuration file with admin rights (path: /home/TF1200/.config/sway/config)
  2. At the end of the file, add the redirection of messages and errors to a file:
exec "/usr/local/etc/TwinCAT/Functions/TF1200-UI-Client/TF1200-UI-Client" > /home/TF1200/TF1200-UI-Client.log 2>&1

Sway also sends the output and error messages to the console. To redirect to a file, proceed as follows:

  1. Open the configuration file from the user’s Autostart with admin rights (path: /home/TF1200/.shrc)
  2. At the end of the file, add the redirection of messages and errors to a file:
sway -c "/home/TF1200/.config/sway/config" > /home/TF1200/sway.log 2>&1

Note that logging to a file on the hard disk can affect system performance.