Академический Документы
Профессиональный Документы
Культура Документы
Page 1 of 8
Runtime control
This chapter contains the following information:
Parameters
The "Restart cycle monitoring time" instruction has no parameters.
file://C:\Users\TOP\AppData\Local\Temp\~hh9A7D.htm
01/11/2016
Runtime control(S7-1200,S7-1500)
Page 2 of 8
Declaration
Data type
Memory area
Description
ERROR
Output
ErrorStruct
D, L
Error information
Data type
Description
ERROR_ID
WORD
Error ID
FLAGS
BYTE
REACTION
BYTE
Default reaction:
0: Ignore (write error),
1: Continue with substitute value "0" (read error),
2: Skip instruction (system error)
CODE_ADDRESS
CREF
BYTE
BLOCK_TYPE
1: OB
2: FC
3: FB
CB_NUMBER
UINT
OFFSET
UDINT
BYTE
MODE
Mode
file://C:\Users\TOP\AppData\Local\Temp\~hh9A7D.htm
(A)
(B)
(C)
(D)
(E)
01/11/2016
Runtime control(S7-1200,S7-1500)
OPERAND_NUMBER
UINT
Page 3 of 8
Offset
Area
Location
Scope
Number
Area
Offset
Area
DB no.
Offset
PtrNo./Acc
Area
DB no.
Offset
PtrNo./Acc
Slot
No. /
Scope
Area
DB no.
Offset
POINTER_NUMBER_LOCATION
UINT
SLOT_NUMBER_SCOPE
UINT
DATA_ADDRESS
NREF
BYTE
AREA
DB_NUMBER
UINT
OFFSET
UDINT
ID*
(decimal)
Description
No error
2503
9475
Invalid pointer
2505
9477
2520
9504
Invalid STRING
file://C:\Users\TOP\AppData\Local\Temp\~hh9A7D.htm
01/11/2016
Runtime control(S7-1200,S7-1500)
2522
9506
2523
9507
2524
9508
2525
9509
2528
9512
2529
9513
252C
9516
Invalid pointer
2530
9520
2533
9523
2534
9524
2535
9525
2538
9528
2539
9529
253A
9530
253C
9532
253D
9533
253E
9534
253F
9535
2550
9552
2551
9553
2575
9589
2576
9590
2942
10562
2943
10563
Page 4 of 8
*The error codes can be displayed as integer or hexadecimal value in the program editor. For additional information on
toggling display formats, refer to "See also".
The ENO enable output of the "Get error locally" instruction is only set if the EN enable input has the signal state "1" and
error information is present. If one of these conditions is not fulfilled, the remaining program execution is not affected by the
"Get error locally" instruction.
The "Get error locally" instruction can also be used to forward an alarm about the error status to the calling block. To do this,
the instruction must be positioned in the last network of the called block.
file://C:\Users\TOP\AppData\Local\Temp\~hh9A7D.htm
01/11/2016
Runtime control(S7-1200,S7-1500)
Page 5 of 8
Note
The "Get error locally" instruction enables local error handling within a block. If "Get error locally" is inserted in the
program code of a block, any predefined system responses are ignored when an error occurs.
Example
The following example shows how the instruction works:
When an error occurs, the "Get error locally" instruction returns the error information to the locally created "#error" structure
at the ERROR output. The error information is converted and evaluated using the "Equal" comparison instruction.
Information about the type of error is the first comparison value assigned to the instruction. The value "1" is specified in
operand "substitute" as the second comparison value. If the error is a read error, the condition of the comparison instruction
is fulfilled. The "#out" and "OK" outputs are reset in this case.
Parameters
The following table shows the parameters of the "Get error ID locally" instruction:
file://C:\Users\TOP\AppData\Local\Temp\~hh9A7D.htm
01/11/2016
Runtime control(S7-1200,S7-1500)
Page 6 of 8
Parameters
Declaration
Data type
Memory area
Description
ID
Output
WORD
I, Q, M, D, L
Error ID
Parameters ID
The following table shows the values that can be output in the ID parameter:
ID*
(hexadecimal)
ID*
(decimal)
Description
No error
2503
9475
Invalid pointer
2505
9477
2520
9504
Invalid STRING
2522
9506
2523
9507
2524
9508
2525
9509
2528
9512
2529
9513
252C
9516
Invalid pointer
2530
9520
2533
9523
2534
9524
2535
9525
2538
9528
2539
9529
253A
9530
253C
9532
253D
9533
253E
9534
253F
9535
2550
9552
file://C:\Users\TOP\AppData\Local\Temp\~hh9A7D.htm
01/11/2016
Runtime control(S7-1200,S7-1500)
Page 7 of 8
2551
9553
2575
9589
2576
9590
2942
10562
2943
10563
*The error codes can be displayed as integer or hexadecimal value in the program editor. For additional information on
toggling display formats, refer to "See also".
Declaration
Data type
Memory area
Description
EN
Input
BOOL
I, Q, M, D, L
Enable input
ENO
Output
BOOL
I, Q, M, D, L
Enable output
REQ
Input
BOOL
I, Q, M, D, L, T, C or
constant
RET_VAL
Output
INT
I, Q, M, D, L
Error information:
If an error occurs
during execution of
the instruction, an
error code is output
on the RET_VAL
parameter.
Explanation
file://C:\Users\TOP\AppData\Local\Temp\~hh9A7D.htm
01/11/2016
Runtime control(S7-1200,S7-1500)
Page 8 of 8
0000
No error
80B5
The instruction cannot be executed because it was not programmed within a startup OB.
8xyy
*The error codes can be displayed as integer or hexadecimal value in the program editor. For additional information on
toggling display formats, refer to "See also".
Example
The following example shows how the instruction works:
If the operands "TagIn_1" and "Tag_REQ" have signal state "1", the instruction is executed. The retain data of all data
blocks, bit memories and SIMATIC timers and counters are reset If the instruction is executed without errors, the ENO
enable output has the signal state "1".
Declaration
Data type
Memory area
Description
EN
Input
BOOL
I, Q, M, D, L
Enable input
ENO
Output
BOOL
I, Q, M, D, L
Enable output
WT
Input
INT
I, Q, M, D, L, P or
constant
Time delay in
microseconds (s)
file://C:\Users\TOP\AppData\Local\Temp\~hh9A7D.htm
01/11/2016