2-609
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
System Control Instructions
2
GetTraceStatus
In this sample, the GetTraceStatus instruction reads the execution status of the data trace with trace
number 3. If the data trace is in progress, the TraceTrig instruction is executed to trigger data tracing.
Sample Programming
LD
StaFlag
A
B
False
False
False
BOOL
BOOL
BOOL
P_On
StaFlag
StaFlag
AB
USINT#3
USINT#3
GetTraceStatus
EN ENO
TraceNo
IsStart
IsComplete
ParamErr
IsTrigger
TraceTrig
EN ENO
TraceNo
Variable
Data type
Initial value
Trace execution status
Comment
Variable
Data type
Initial value
ST
GetTraceStatus(TraceNo:=USINT#3, IsStart=>StaFlag);
IF ( (StaFlag=TRUE) AND (A=TRUE) AND (B=TRUE) ) THEN
TraceTrig(TraceNo:=USINT#3);
END_IF;
StaFlag
A
B
False
False
False
BOOL
BOOL
BOOL
Trace execution status
Comment