Communication
11.2 PROFINET
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
881
Data types for the parameters
The following table shows the parameters of the "T_DIAG" instruction:
REQ Input BOOL I, Q, M, D, L, T, C or
constant
Starts the instruction to check the connection
specified in the ID parameter when there is a
ID Input CONN_OUC
(WORD)
L, D or constant Reference to the assigned connection.
Range of values: W#16#0001 to W#16#0FFF
RESULT InOut VARIANT D Pointer to the structure in which the connec-
tion information is stored. The structure TDi-
ag_Status can be used at the RESULT
parameter (for a description, see the
"TDIAG_Status structure" table).
DONE Output BOOL I, Q, M, D, L Status parameter:
• 0: Instruction not yet started or still in pro-
gress.
• 1: Instruction executed without errors.
BUSY Output BOOL I, Q, M, D, L Status parameter:
• 0: Instruction not yet started or already
completed.
•
1: Instruction not yet completed. A new job
cannot be started.
ERROR Output BOOL I, Q, M, D, L Status parameter:
• 0: No error.
• 1: Error occurred.
Status of the instruction
Parameters BUSY, DONE, and ERROR
You can check the status of "T_DIAG" instruction execution with the BUSY, DONE, ERROR
and STATUS parameters. The BUSY parameter indicates the processing status. You use
the DONE parameter to check whether or not an instruction has been executed successfully.
The ERROR parameter is set if errors occur during execution of "T_DIAG".
The following table shows the relationship between the BUSY, DONE, and ERROR
parameters:
The instruction is being processed.
0 1 0 The instruction has been executed successfully. The data in the structure referenced by
RESULT are only valid if this is the case.
0 0 1 Instruction completed with an error. The cause of the error is output at the STATUS pa-
No new instruction has been assigned.