5 Designing Tasks
5-42
NJ-series CPU Unit Software User’s Manual (W501)
Processing in the case that actual variable access time became longer than
set value
If actual variable access time became longer than the set value, the following processing is per-
formed depending on the number of variable accesses in one task period.
Set a sufficiently long access time so that multiple variable accesses can be completed within a task
period.
The following instructions are supported to read the status of the current task, to determine if execution
is in progress for other tasks, and to perform exclusive control for regional concurrency between tasks.
Number of vari-
able accesses in
one task period
Processing
Multiple times Variable accesses are executed for the number of times that can be completed within
the set variable access time. The rest of accesses that could not be done will be exe-
cuted in the next task period.
This means, the multiple variable accesses cannot be completed within the same task
period.
Once Variable accesses continue even after the set variable access time is exceeded. This
means, the task execution time gets longer.
5-2-15 Instructions Related to Tasks
Instruction Instruction name Introduction
GetMyTaskStatus Read Current Task
Status
Reads the following status of the current task.
Last Task Execution Time, Maximum Task Execution Time, Minimum
Task Execution Time, Task Execution Count, Task Period Exceeded
Flag, and Task Period Exceeded Count
Task_IsActive Determine Task
Status
Determines if the specified task is currently in execution.
Lock Lock Tasks Starts a lock between tasks. Execution of any other task with a
lock region with the same lock
number is disabled.
Unlock Unlock Tasks Stops a lock between tasks.
ActEventTask Activate Event
Tas k
Activates the specified event task.