Sample Programming
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.
LD
Variable
StaFlag
A
B
P_On
USINT#3
StaFlag
A
B
ST
Variable
StaFlag
A
B
GetTraceStatus(TraceNo:=USINT#3, IsStart=>StaFlag);
IF ( (StaFlag=TRUE) AND (A=TRUE) AND (B=TRUE) ) THEN
TraceTrig(TraceNo:=USINT#3);
END_IF;
NY-series Instructions Reference Manual (W560)
Data type
BOOL
BOOL
BOOL
GetTraceStatus
EN
ENO
TraceNo
StaFlag
IsStart
IsComplete
ParamErr
IsTrigger
TraceTrig
EN
ENO
USINT#3
TraceNo
Data type
BOOL
BOOL
BOOL
2 Instruction Descriptions
Initial value
FALSE
Trace execution status
FALSE
FALSE
Initial value
FALSE
Trace execution status
FALSE
FALSE
Comment
2
Comment
2-805