Siemens NAN 67 Series Manual de servicio Pagina 34

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 318
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 33
3-10
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
3.5 Declaring Multiple Instances
A multiple instance results from declaring a static variable of the same data
type as a function block (FB). In the code section, the instance is called as a
Ladder element.
For more detailed information about multiple instances, refer to the
Programming Manual /234/. Part 2 of this manual explains the syntax for
calling a multiple instance.
Keep to the following rules when declaring multiple instances:
S Declaring multiple instances is only possible in function blocks
S Function blocks within which a multiple instance has been declared must
also have an associated instance DB.
S A multiple instance can only be declared as a static variable (declaration
type “stat”).
To declare a multiple instance, you enter the variable name in the “Symbol”
column after the declaration type “stat”. Under data type, you enter the
function block. This can be done either by entering the absolute name of the
FB or a symbolic name. You can also add an optional comment.
TRAFFIC\...\FB60-<Offline>
varin
varout
varinout
tempo
BYTE
BYTE
BYTE
REAL
B#16#0
B#16#0
B#16#0
in
out
in_out
stat
temp
0.0
2.0
4.0
0.0
locinst
local instance
FB6
Decl. Symbol Data TypeInitial Value CommentAddress
Figure 3-5 Declaration of Multiple Instances (Example)
Multiple Instances
Rules
Inputting Multiple
Instances
Creating Logic Blocks
Vista de pagina 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 317 318

Comentarios a estos manuales

Sin comentarios