Use the System objectΒΆ

Introduction

To display and edit the system settings, the dedicated widgets available in Q Studio can be used, or all the graphic components and logics desired (e.g., linking the DHCP enabled property to the Active property of a Switch) can be manually configured.

In any case, the System object must be configured and, depending on requirements, the DateTimeConfiguration and WiFiConfiguration objects.

Important

use a single System object in the project.

Available widgets

Widget

Purpose

Use the HMI50 Network Configurator widget

Display and edit the settings for WAN, LAN and WiFi network interfaces.

Use the Date and time configurator widget

Display and edit system date, time and time zone manually or via remote NTP server.

Create the System object

In Project, right-click Model, then select All > System > System: the System object appears in the project.

Configure the reading of the network interface settings

  1. In the System object, next to the Network interfaces property, click image1 to add a network interface in which to display/edit the settings at runtime.

  2. In the Interface name property, type the desired interface type.

    Important

    insert the interface types written exactly as in System Manager: LAN, WAN, Wi-Fi.

  3. Repeat steps 1 and 2 for each desired network interface.

Use the HMI50 Network Configurator widget

  1. Configure the reading of the network interface settings.

  2. Click image2 to open the template library, then from Widgets drag HMI50 Network Configurator into Project: the widget appears in the project.

  3. To associate the system settings with the widget, drag the System object on the SystemNode property of HMI50NetworkConfiguratorDialog(type).

  4. At runtime, perform the desired edits, then click Apply.

Use the Date and time configurator widget

  1. Configure the reading of the network interface settings.

  2. Click image3 to open the template library, then from Widgets drag Date and time configurator into Project in the UI folder: the widget appears in the project.

  3. To associate the system settings with the widget, drag the System object on the SystemNode property of DateTimeConfiguratorDialog(type).

  4. At runtime, perform the desired edits, then click Apply: for the date and time changes to take effect, close the application and restart the system (see Create a button to restart the system).

Create a button to restart the system

  1. Create a Button object.

  2. Associate the following methods with a button event, for example MouseUp Event, in the order:

    • Close global method

    • Restart method exposed by the System object