- Name:
- #simtask
- Syntax:
-
#SIMTASK ALL
#SIMTASK tasknumber
- Description:
-
Programming Editor Only
This directive specifies which task to follow during simulation when using parallel multi-tasking M2 parts. If no task is specified task 0 will be automatically traced.
Multiple tasks can be traced at the same time by using ‘#simtask all’.
Simulating a single task
Using '#simtask 1'; when the simulation runs it will show only the commands executed for task1, those commands from the 'start1' label. The commands from the 'start0' label will not be shown but will still be simulated.
- Code Example:
-
#simtask 1 start0: toggle B.0 pause 100 goto start0 start1: toggle B.1 pause 200 goto start1
Copy Code Submit an Example
Simulating all tasks
Using '#simtask all'; when the simulation runs it will show the commands executed by all tasks.
- Code Example:
-
#simtask all start0: toggle B.0 pause 100 goto start0 start1: toggle B.1 pause 200 goto start1
Copy Code Submit an Example
Submit Your Own Code!
You must be logged in to submit code examples. Login now.