Iec 61131-3 Second edition 2003-01 Programmable controllers – Part 3: Programming languages
b Function block instance name as VAR_IN_OUT (graphical) See figure 11b 7a
Download 1.35 Mb. Pdf ko'rish
|
ourdev 569653
- Bu sahifa navigatsiya:
- Table 33 - Function block declaration and usage features No. Description Example 10b
6b
Function block instance name as VAR_IN_OUT (graphical) See figure 11b 7a Function block instance name as external variable (textual) VAR_EXTERNAL EX_TMR : TOF ;END_VAR EX_TMR(IN:=A_VAR, PT:=T#10S); EXPIRED := EX_TMR.Q; (* Note 1 *) 7b Function block instance name as external variable (graphical) See figure 11c 8a 8b Textual declaration of: rising edge inputs falling edge inputs FUNCTION_BLOCK AND_EDGE (* Note 2 *) VAR_INPUT X : BOOL R_EDGE; Y : BOOL F_EDGE; END_VAR VAR_OUTPUT Z : BOOL ; END_VAR Z := X AND Y ; (* ST language example *) END_FUNCTION_BLOCK (*- see 3.3 *) 9a 9b Graphical declaration of: rising edge inputs falling edge inputs FUNCTION_BLOCK (* Note 2 *) +-----------+ (* External interface *) | AND_EDGE | BOOL---->X Z|---BOOL | | BOOL---- +-----------+ +---+ (* Function block body *) X---| & |---Z (* FBD language example *) Y---| | (* - see 4.3 *) +---+ END_FUNCTION_BLOCK 10a VAR_EXTERNAL declarations within function block type declarations Copyright International Electrotechnical Commission Provided by IHS under license with IEC Not for Resale No reproduction or networking permitted without license from IHS --``````-`-`,,`,,`,`,,`--- – 72 – 61131-3 IEC:2003(E) Table 33 - Function block declaration and usage features No. Description Example 10b VAR_EXTERNAL CONSTANT declarations within function block type declarations 11 VAR_TEMP declarations (see 2.4.3) within function block type declarations NOTE 1 It is assumed in these examples that the variables EXPIRED and A_VAR have been declared of type BOOL. NOTE 2 The declaration of function block AND_EDGE in the above examples is equivalent to: FUNCTION_BLOCK AND_EDGE VAR INPUT X : BOOL; Y : BOOL; END_VAR VAR X_TRIG : R_TRIG ; Y_TRIG : F_TRIG ; END_VAR X_TRIG(CLK := X) ; Y_TRIG(CLK := Y) ; Z := X_TRIG.Q AND Y_TRIG.Q; END_FUNCTION_BLOCK See 2.5.2.3.2 for the definition of the edge detection function blocks R_TRIG and F_TRIG. Copyright International Electrotechnical Commission Provided by IHS under license with IEC Not for Resale No reproduction or networking permitted without license from IHS --``````-`-`,,`,,`,`,,`--- 61131-3 IEC:2003(E) – 73 – FUNCTION_BLOCK +--------------+ (* External interface *) | INSIDE_A | TON---|I_TMR EXPIRED|---BOOL +--------------+ +------+ (* Function Block body *) | MOVE | I_TMR.Q---| |---EXPIRED +------+ END_FUNCTION_BLOCK FUNCTION_BLOCK +--------------+ (* External interface *) | EXAMPLE_A | BOOL---|GO DONE|---BOOL +--------------+ E_TMR (* Function Block body *) +-----+ I_BLK | TON | +--------------+ GO---|IN Q| | INSIDE_A | t#100ms---|PT ET| E_TMR---|I_TMR EXPIRED|---DONE +-----+ +--------------+ END_FUNCTION_BLOCK NOTE I_TMR is not represented graphically in this figure since this would imply invocation of I_TMR within INSIDE_A, which is forbidden by rules 4) and 5) of 2.5.2.2. See also feature. 5 a) of table 33. Download 1.35 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling