# $ Functions: Tasks

    $Tasks.TaskName.Run()
Returns | N/A
Arguments | N/A
Description | Executes the Task specified by TaskName..

    $Tasks.TaskName.RunBlocks(["BlockName1", "BlockName2", ..., "BlockNameN"] : Strings)
Returns | N/A
Arguments | (["BlockName1", "BlockName2", ..., "BlockNameN"]): Array of strings, specifying the "names" of the specific Task Blocks to execute. For example, to run specific Task Blocks in the Task called IOTask, use the following function: $Tasks.IOTask.RunBlocks(["ScriptBlock", "InSightVisionBlock", "WriteIOBlock"])
Description | Specifies the execution of specific Task Blocks within the Task .

    $Tasks.TaskName.RunBlocksFromTo("fromBlock", "toBlock" : String)
Returns | N/A
Arguments | fromBlock: String, specifying the "name" of the specified Task Blocks to start the execution within the Task . toBlock: String, specifying the "name" of the specified Task Blocks at which to end the execution within the Task .
Description | Specifies the execution of specific Task Blocks within the Task , with a starting Task Block (specified with the fromBlockName argument) and an ending block (specified with the toBlockName argument). With this option, the starting block and all blocks between the starting block and the ending block are executed. Blocks to the left of the starting block and blocks to the right of the ending block will not be executed.

    $Tasks.TaskName.RunBlocksToEnd("fromBlock" : String)
Returns | N/A
Arguments | fromBlock: String, specifying the "name" of the specified Task Blocks to start the execution of the Task .
Description | Specifies a Task Blocks (with the fromBlock argument) that will be the starting point of the execution of the Task . The Task Blocks specified by fromBlock and all the blocks to its right will be executed.

    $Tasks.TaskName.RunSingleBlock("singleBlock" : String)
Returns | N/A
Arguments | singleBlock: String, specifying the "name" of the specified Task Blocks within the Task to execute.
Description | Executes a Task Blocks (specified with the singleBlock argument) within the Task .

Note:

When using any of the selective Task blocks $ functions, the following applies:

- The order of execution is defined within the specified Task , through their placement, left-to-right, in the flow diagram. The order in which the names of blocks are specified in the $ functions will not alter the execution order of the blocks within the specified task or sub task.
- The $ functions are only executed when the In-Sight vision system is Online.
- The execution of two blocks at the same time is prohibited; an error will be thrown.
- If the specified Task has not been executed yet, the specified blocks will use the previous output values for all of the blocks that are not specified to run.
- For blocks that are using input values from blocks that are not specified to execute, they will use the values from the last time that the non-specified block was run.