User Tools

Site Tools

한국어

comfilehmi:hmieditor_function:index

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
comfilehmi:hmieditor_function:index [2024/03/13 16:42]
COMFILE Technology [System Functions]
comfilehmi:hmieditor_function:index [2024/03/13 17:05] (current)
COMFILE Technology [System Functions]
Line 146: Line 146:
   * ''​exit_project()'':​ Causes the current project to exit.  This is the same effect as touching the upper right corner of the screen 5 times in quick succession.   * ''​exit_project()'':​ Causes the current project to exit.  This is the same effect as touching the upper right corner of the screen 5 times in quick succession.
   * ''​enable_status_monitoring(enable = 1)'': ​ Enables status monitoring messages to appear overlaid on the panel PC's screen. The ''​enable''​ argument is optional and defaults to ''​1''​.   * ''​enable_status_monitoring(enable = 1)'': ​ Enables status monitoring messages to appear overlaid on the panel PC's screen. The ''​enable''​ argument is optional and defaults to ''​1''​.
-  * ''​free_memory_bytes()'':​ Returns the amount of free system memory in bytes.+  * ''​free_memory_bytes()'':​ Returns the amount of free system memory in bytes.  This function always returns ''​0''​ when running in the simulator or on a PC.
   * ''​firmware_version()''​ : Retrieves the firmware version running on the panel PC.  For example ''​273''​ corresponds to v2.73.   * ''​firmware_version()''​ : Retrieves the firmware version running on the panel PC.  For example ''​273''​ corresponds to v2.73.
   * ''​idle_seconds()''​ : Returns the number of seconds since the screen was last touched.   * ''​idle_seconds()''​ : Returns the number of seconds since the screen was last touched.
Line 163: Line 163:
   * ''​scale(input,​ minimum input, maximum input, minimum output, maximum output)''​ : Scales ''​input''​ proportionally to (''​maximum input''​ - ''​minimum input''​) / (''​maximum output''​ - ''​minimum output''​).   * ''​scale(input,​ minimum input, maximum input, minimum output, maximum output)''​ : Scales ''​input''​ proportionally to (''​maximum input''​ - ''​minimum input''​) / (''​maximum output''​ - ''​minimum output''​).
   * ''​screen_id()''​ : Returns the id of the current screen.   * ''​screen_id()''​ : Returns the id of the current screen.
-  * ''​self_ip_addr()''​ - Returns the IP address of the panel PC as a string (for example: 192.68.0.50). Note: This function returns a null string in the simulator.+  * ''​self_ip_addr()''​ - Returns the IP address of the panel PC as a string (for example: 192.68.0.50). Note: This function returns a null string ​when running ​in the simulator ​or on a PC.
   * ''​set_backlight_state(value)'': ​ Sets the state of the LCD backlight on or off.  If ''​value''​ is ''​1''​ the LCD backlight turns on, if ''​value''​ is ''​0''​ the LCD backlight is turns off.   * ''​set_backlight_state(value)'': ​ Sets the state of the LCD backlight on or off.  If ''​value''​ is ''​1''​ the LCD backlight turns on, if ''​value''​ is ''​0''​ the LCD backlight is turns off.
   * ''​set_data_processing_period(value)''​ : This function can be used to throttle CPU usage. ​ If the CPU usage for a project is too high, the data processing period can be increased to throttle back the amount of resources that the HMI software dedicates to processing data.  ''​value''​ is in units of milliseconds. ​ This function can be useful when the CPU utilization increases due to an increase in the number of events or actions in the project. ​ Typically, it would only be called once at the start of a project, but it can be called multiple times in a project to adjust the CPU utilization dynamically. ​ Setting this value to 0ms will cause the data processing to run as fast as possible, but will also cause the highest CPU utilization. ​ Values below 50ms should be used with caution. ​ If the CPU utilization is approaching 100%, set this value to approximately 100ms, and the communication interval to 30ms as a reasonable starting point. ​ Beginning with firmware v3.87, this value defaults to 50ms.  In prior versions the default is 0ms.   * ''​set_data_processing_period(value)''​ : This function can be used to throttle CPU usage. ​ If the CPU usage for a project is too high, the data processing period can be increased to throttle back the amount of resources that the HMI software dedicates to processing data.  ''​value''​ is in units of milliseconds. ​ This function can be useful when the CPU utilization increases due to an increase in the number of events or actions in the project. ​ Typically, it would only be called once at the start of a project, but it can be called multiple times in a project to adjust the CPU utilization dynamically. ​ Setting this value to 0ms will cause the data processing to run as fast as possible, but will also cause the highest CPU utilization. ​ Values below 50ms should be used with caution. ​ If the CPU utilization is approaching 100%, set this value to approximately 100ms, and the communication interval to 30ms as a reasonable starting point. ​ Beginning with firmware v3.87, this value defaults to 50ms.  In prior versions the default is 0ms.
Line 174: Line 174:
   * ''​tick_count()''​ : The number of milliseconds since the system was powered on.  This is a 32-bit millisecond timer that will overflow every 49.7 days.   * ''​tick_count()''​ : The number of milliseconds since the system was powered on.  This is a 32-bit millisecond timer that will overflow every 49.7 days.
   * ''​touch_duration()''​ : The number of milliseconds since the last time the screen was touched. ​ If the screen has never been touched -1 is returned.   * ''​touch_duration()''​ : The number of milliseconds since the last time the screen was touched. ​ If the screen has never been touched -1 is returned.
-  * ''​verify_developer_key(value)''​ : Using the ComfileHMI panel PC's runtime configuration screen, a unique key can be assigned to a individual device or group of devices. ​ ''​verify_developer_key''​ can then be used at runtime within a project to test which device a project is running on and dynamically offer a different experience. The developer key cannot be read; one can only check if ''​value''​ matches the developer key assigned to the device. ​ This function returns ''​1''​ if the ''​value''​ matches the developer key assigned to the device or ''​0''​ if it does not.  This feature is only supported on PCs with a software licensing USB dongle. ​ Whether or not this function is supported in the simulator is determined by runtime settings. The PC runtime verifies the given value against the developer key registered to the USB licensing dongle.+  * ''​verify_developer_key(value)''​ : Using the ComfileHMI panel PC's runtime configuration screen, a unique key can be assigned to a individual device or group of devices. ​ ''​verify_developer_key''​ can then be used at runtime within a project to test which device a project is running on and dynamically offer a different experience. The developer key cannot be read; one can only check if ''​value''​ matches the developer key assigned to the device. ​ This function returns ''​1''​ if the ''​value''​ matches the developer key assigned to the device or ''​0''​ if it does not.  This feature is only supported on PCs with a software licensing USB dongle. ​ Whether or not this function is supported in the simulator is determined by runtime settings. The PC runtime verifies the given value against the developer key registered to the USB licensing dongle.  The developer key can be registered to the USB licensing dongle from within the simulator or PC runtime settings.
   ​   ​
 ===== Action Parameters and Related Functions ===== ===== Action Parameters and Related Functions =====
comfilehmi/hmieditor_function/index.1710315744.txt.gz · Last modified: 2024/03/13 16:42 by COMFILE Technology