2-873
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Other Instructions
2
Task_IsActive
Task_IsActive
The Task_IsActive instruction determines if the specified task is currently in execution.
The Task_IsActive instruction determines if the task specified with TaskName is currently in execution
or on standby. “On standby” means that a high-priority task was started after this task was started, so
processing has been interrupted.
If it is being executed or on standby, the value of judgment Out is TRUE. If it is not being executed, the
value of Out is FALSE.
• You cannot use a variable to which a text string was assigned for TaskNam e. Directly specify a text
string.
• If this instruction is used in a ladder diagram, the value of Out changes to FALSE if an error occurs in
the previous instruction on the rung.
• An error occurs in the following case. The value of Out does not change.
• The task specified with TaskNam e does not exist.
Instruction Name FB/FUN Graphic expression ST expression
Task_IsActive Determine Task
Status
FUN Out:=Task_IsActive(
TaskName);
Variables
Name Meaning I/O Description Valid range Unit Default
TaskName Task name Input Task name 63 bytes max. (62 sin-
gle-byte alphanumeric
characters plus the final
NULL character)
--- ''
Out Judgement Output TRUE: Task is in execution
or on standby.
FALSE: Not active
Depends on data type.
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
TaskName OK
Out OK
Function
Precautions for Correct Use
(@)Task_IsActive
EN Out
TaskName