Siemens NAN 67 Series Manual de Serviço Página 238

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 318
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 237
20-4
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
20.2 Calling FBs, FCs, SFBs, SFCs, and Multiple Instances
You can call function blocks (FBs), functions (FCs), system function blocks
(SFBs), and system functions (SFCs), and multiple instances by selecting
them from the “Program Elements” list box. They are at the end of the list of
instruction families under the following names:
S FB Blocks
S FC Blocks
S SFB Blocks
S SFC Blocks
S Multiple Instances
S Libraries
When you select one of these blocks, a box appears on your screen with the
number or symbolic name of the function or function block and the
parameters that belong to it.
The block that you call must have been compiled and must already exist in
your program file, in the library, or on the CPU.
If the call FB, FC, SFB, SFC, and multiple instances instruction is executed,
it performs the following functions:
S Saves the address that it needs to return to the calling block
S Saves the selectors of both current data blocks (DB and DI)
S Changes the previous local data range to the current local data range
S Pushes the MA bit (MCR Active bit) to the block stack (BSTACK)
S Creates the new local data range for the called FC or SFC
Note
When the DB and DI registers are saved, they may not point to the data
blocks that you opened. Because of the copy-in and copy-out mechanism for
passing parameters, especially where function blocks are concerned, the
compiler sometimes overwrites the DB register. See the Programming
Manual /234/ for more details.
After this, program processing continues in the called block.
Description
Program Control Instructions
Vista de página 237
1 2 ... 233 234 235 236 237 238 239 240 241 242 243 ... 317 318

Comentários a estes Manuais

Sem comentários