2-871
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Other Instructions
2
GetMyTaskStatus
The GetMyTaskStatus reads the status of the current task. The task status includes the last task execu-
tion time LastExecTime, maximum task execution time MaxExecTime, minimum task execution time
MinExecTime, task execution count ExecCount, task period exceeded flag Exceeded, and task period
exceeded count ExceedCount.
MaxExecTime, MinExecTime, ExecCount, and ExceedCount are reset at the following times.
• When operation is started
• When a reset operation is executed from the Task Execution Time Monitoring Pane of the Sysmac
Studio.
• When the value of ExecCount or ExceedCount exceeds the maximum value of UDINT data
(4,294,967,295), it returns to 0.
• Return value Out is not used when the instruction is used in ST.
In this sample, the GetMyTaskStatus reads the status of the current task. If the previous task execution
time exceeds 400 µs (400000 ns), the value of the Warning variable changes to TRUE.
ExecCount OK
Exceeded OK
Exceed-
Count
OK
Function
Additional Information
Precautions for Correct Use
Sample Programming
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