Siemens NAN 67 Series Manual de servicio Pagina 236

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 318
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 235
20-2
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
20.1 Calling FCs/SFCs from Coil
You can use the Call FC/SFC from Coil instruction to call a function (FC) or
a system function (SFC) that has no parameters. Depending on the preceding
link, the call is conditional or unconditional (see the example in Figure 20-1).
In the case of a conditional call, you cannot enter parameters of data type
BLOCK_FC in the code section of a function (FC). Within a function block
(FB), however, you can enter BLOCK_FC as a parameter type.
A conditional call is executed only if the RLO is 1. If a conditional call is not
executed, the RLO after the call instruction is 0. If the 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 current local data range to the previous 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
After all this, program processing continues in the called block. For
information on the passing of parameters, see the Programming Manual
/120/.
Table 20-1 Call FC/SFC from Coil Element and Parameter
LAD Element
Parameter Data Type Memory Area Description
CALL
Number
Number BLOCK_FC
Number of the FC or SFC (for example,
FC10 or SFC59). The SFCs that are
available depend on your CPU.
In the case of a conditional call, you
cannot enter parameters of data type
BLOCK_FC within a function (FC).
Within a function block, however, you
can enter BLOCK_FC as a parameter
type.
Description
Program Control Instructions
Vista de pagina 235
1 2 ... 231 232 233 234 235 236 237 238 239 240 241 ... 317 318

Comentarios a estos manuales

Sin comentarios