====== String Variable Control ====== Various actions are available to target HMI string variables. {{ :comfilehmi:hmieditor_string_variable_control:string_var_control_1.png? }} ===== String Assignment ===== Inserts a string into a string variable. When the action below is executed, ''$str1'' stores the string "Compiling Technology". {{ :comfilehmi:hmieditor_string_variable_control:string_var_control_2.png? }} ===== String Insertion ===== You can insert the desired string in a specific location in a string. {{ :comfilehmi:hmieditor_string_variable_control:string_var_control_3.png? }} If the contents of ''$str1'' was "uvwxy" then it would become "uvabcwxy" after the above action was taken. ===== String Deletion ===== You can delete all or part of the contents of a string variable. {{ :comfilehmi:hmieditor_string_variable_control:string_var_control_4.png? }} ===== String Conversion ===== If a string variable is in numeric form (for example, "123"), it can be replaced with a number and stored in the HMI variable. The opposite is also possible. {{ :comfilehmi:hmieditor_string_variable_control:string_var_control_5.png? }} ===== Parse String ===== You can divide the value of a string variable into multiple variables by delimiters. For example, if a string variable named ''$person_info'' contains the value "John,USA,36", it can be stored divided and stored into ''$name'', ''$country'', and ''$age'', respectively. The user can decide what the delimiter should be (for example, ''/'' or '','' etc.). If the delimiter can change at runtime, then you can specify the separator by the string variable name. To convert to numeric values, use numeric variables, not text variables. {{ :comfilehmi:hmieditor_string_variable_control:string_var_control_6.png? }} [[comfilehmi:index#screens| Back to ComfileHMI]]