Siemens Simatic S7 Series System Manual page 347

Hide thumbs Also See for Simatic S7 Series:
Table of Contents

Advertisement

Error conditions with ENO = 0
0006H Indirect address
008H Maximum subroutine nesting
exceeded
Input / output
Data type
SBR_n
WORD
IN
BOOL
BYTE
WORD, INT
DWORD, DINT
STRING
IN_OUT
BOOL
BYTE
WORD, INT
DWORD, DINT
OUT
BOOL
BYTE
WORD, INT
DWORD, DINT
Only AC1, AC2 or AC3 (AC0 not allowed)
1
Must be from byte offset 30 to byte offset 999 for read/write access
2
Calling a subroutine with call parameters
Subroutines have the option of using passed parameters. The parameters are defined in the
variable table of the subroutine. Each parameter must be assigned a local symbol name (a
maximum of 23 characters), a variable type, and a data type. A maximum of sixteen
parameters can be passed to or from a subroutine. The VAR_Type type field in the variable
table defines whether the variable is passed into the subroutine (IN), passed into and out of
the subroutine (IN_OUT), or passed out of the subroutine (OUT).
To add a new parameter row, place the cursor on the Var_Type field of the type (IN,
IN_OUT, OUT, or TEMP) that you want to add. Click the right mouse button to get a menu of
options. Select the Insert option and then the Row Below option. Another parameter row of
the selected type will appear below the current entry.
Temporary (TEMP) parameters can be assigned in the variable table to store data that is
valid only within the scope of the subroutine execution. Local TEMP data is not passed as a
call parameter. You can also assign TEMP parameters in the main routine and interrupt
routines, but only subroutines can use IN, IN_OUT, and OUT call parameters.
S7-200 SMART
System Manual, 09/2015, A5E03822230-AC
SM bits affected
None
Operand
Constant: 0-127
V, I, Q, M, SM, S, T, C, L, Power Flow (LAD), Logic flow (FBD)
VB, IB, QB, MB, SMB, SB, LB, AC, *VD, *LD, *AC
VW, T, C, IW, QW, MW, SMW, SW, LW, AC, AIW, *VD, *LD, *AC
VD, ID, QD, MD, SMD, SD, LD, AC, HC, *VD, *LD, *AC
&T, &C, &SB, &AI, &AQ, &SMB, Constant
*VD, *LD, *AC
, Constant
1
V, I, Q, M, SM
, S, T, C, L
2
VB, IB, QB, MB, SMB
, SB, LB, AC, *VD, *LD, *AC
2
VW, T, C, IW, QW, MW, SMW
VD, ID, QD, MD, SMD
, SD, LD, AC, *VD, *LD, *AC
2
V, I, Q, M, SM
, S, T, C, L
2
VB, IB, QB, MB, SMB
, SB, LB, AC, *VD, *LD, *AC
2
VW, T, C, IW, QW, MW, SMW
VD, ID, QD, MD, SMD
, SD, LD, AC, *VD, *LD, *AC
2
, Constant
1
1
1
, SW, LW, AC, *VD, *LD, *AC
2
1
1
, SW, LW, AC, AQW, *VD, *LD, *AC
2
1
Program instructions
7.18 Subroutine
, Constant
1
, &VB, &IB, &QB, &MB,
1
1
347

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart series

Table of Contents