2 Instruction Descriptions
2-874
NJ-series Instructions Reference Manual (W502)
In this sample, the instruction determines whether periodic task Tc2 is active when the value of variable
A changes to TRUE. If it is active, the value of variable B changes to TRUE.
Sample Programming
LD
A
B
Tc2_Run
False
False
False
Task Tc2 execution status
BOOL
BOOL
BOOL
A
’Tc2’
Tc2_Run
A
Tc2_Run
Task_IsActive
EN
TaskName
B
Variable
Initial
value
Data type
Comment
ST
IF (A=TRUE) THEN
Tc2_Run:=Task_isActive(’Tc2’);
IF (Tc2_Run=TRUE) THEN
B := TRUE;
END_IF;
END_IF;
// Determine task status.
// Make variable B TRUE if Tc2 is running.
A
B
Tc2_Run
False
False
False
Task Tc2 execution status
BOOL
BOOL
BOOL
Variable
Initial
value
Data type
Comment