Siemens NAN 67 Series Wartungshandbuch Seite 240

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 318
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 239
20-6
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
The parameters that have been defined in the VAR section of the block will
be displayed in the ladder box. Supplying parameters differs depending on
the type of block as follows:
S For a function (FC), you must supply actual parameters for all of the
formal parameters.
S The entry of actual parameters is optional with function blocks (FBs).
You must, however, attach an instance data block (instance DB) to the
FB. If an actual parameter has not been attached to a formal parameter,
the FB works with the values that exist in its instance DB.
S With multiple instances, you do not need to specify the instance DB since
the box that is called has already been assigned the DB number (for more
information about declaring multiple instances, refer to Section 3.5).
For structured IN/OUT parameters and parameters of the types “Pointer” and
“Array”, you must make an actual parameter available (at least during the
first call).
Every actual parameter that you make available when calling a function
block must have the same data type as its formal parameter.
For information on how to program a function or how to work with its
parameters, see the Programming Manual /234/.
Table 20-2 shows a box for calling FBs, FCs, SFBs, SFCs, and multiple
instances and describes the parameters common to the box for all these
blocks. When you call your block from the Instruction Browser, the block
number appears automatically at the top of the block (number of the FB, FC,
SFB, or SFC, for example, FC10).
Table 20-2 Box and Parameters for Calling FBs, FCs, SFBs, SFCs, and Multiple Instances
LAD Box Parameter Data Type Memory Area Description
Block no.
EN ENO
DB No.
DB No. BLOCK_DB
Instance data block number. You need to
supply this information for calling FBs
only.
EN ENO
IN
OUT
IN/OUT
EN BOOL I, Q, M, D, L Enable input
IN/OUT
ENO BOOL I, Q, M, D, L Enable output
DB13
EN
Start
Stop
Length
Run
ENO
Calls FB10 (using
instance DB13)
I 1.0
I 1.1
MW20
M2.1
FB10
Actual addresses,
the values of which
are copied into
instance data block
DB13 before
processing FB10.
Formal parameters of the FB
The value of this parameter is
copied from DB13 into M 2.1 after
processing FB10.
Figure 20-3 Call FB from Box
Parameters
Program Control Instructions
Seitenansicht 239
1 2 ... 235 236 237 238 239 240 241 242 243 244 245 ... 317 318

Kommentare zu diesen Handbüchern

Keine Kommentare