TaskUpdateConfig
- Last UpdatedOct 29, 2026
- 2 minute read
TaskUpdateConfig is a built-in function that updates a runtime task in order to reload a task worksheet during project run time.
|
Function |
Group |
Execution |
String Exp. |
Windows |
Windows Embedded |
IoT View |
Thin Clients |
Mobile Access |
|---|---|---|---|---|---|---|---|---|
|
TaskUpdateConfig |
Module Activity |
Asynchronous |
No |
Supported |
Not supported |
Not supported |
Not supported |
Not supported |
Syntax
TaskUpdateConfig(strTask,numWorksheet)
TaskUpdateConfig ( { strTask | " { Math | Scheduler | Script | TCPClient | OPCUAClient } " } ,numWorksheet)
strTask
The name of the runtime task to be updated. It must be one of the following string values:
|
Value |
Description |
|---|---|
|
Math |
Math worksheets, which are executed as part of the Background Task |
|
Scheduler |
Scheduler worksheets, which are executed as part of the Background Task |
|
Script |
Script worksheets, which are executed as part of the Background Task |
|
XDB |
Database/ERP |
|
OPCUAClient |
OPC UA Client |
|
TCPClient |
TCP/IP Client |
For more information, see Runtime Tasks.
numWorksheet
The number of the worksheet to be reloaded.
Return value
This function returns one of the following possible values:
|
Value |
Description |
|---|---|
|
0 |
Failure (for example, invalid task name, specified task not started, specified worksheet not found) |
|
1 |
Success |
Notes
If you use the project development environment to edit and then save a task worksheet in a project running locally, that worksheet is automatically and immediately reloaded by the project. You do not need to use this function to reload the worksheet.
This function is used to reload worksheet files that have been created or edited outside the project development environment and then manually added to the project folder. As such, it is not intended for typical users of this software. If you want more information about how to use this function, please contact your software distributor.
Worksheet files must be located in the project folder, and each worksheet file name must include both the type of worksheet and the worksheet number. For example, Math worksheet number 3 is saved at the following location:
<project name>\Config\MATH003.MAT
The specified task must be started before this function is called; calling this function does not start the specified task. If the task was not automatically started when the project was run, you can use either the Runtime Tasks command or the StartTask function to manually start the task.
Examples
Update the Math task in order to reload worksheet number 3 (MATH003.MAT):
TaskUpdateConfig("Math",3)