Iec 61131-3 Second edition 2003-01 Programmable controllers – Part 3: Programming languages
Table 53 - Function block invocation and
Download 1.35 Mb. Pdf ko'rish
|
ourdev 569653
- Bu sahifa navigatsiya:
- Table 53 - Function block invocation and Function invocation features for IL language No. DESCRIPTION/EXAMPLE
Table 53 - Function block invocation and
Function invocation features for IL language No. DESCRIPTION/EXAMPLE 1a CAL of function block with non-formal argument list: CAL C10(%IX10, FALSE, A, OUT, B) CAL CMD_TMR(%IX5, T#300ms, OUT, ELAPSED) 1b CAL of function block with formal argument list: CAL C10( CU := %IX10, Q => OUT) CAL CMD_TMR( IN := %IX5, PT := T#300ms, Q => OUT, ET => ELAPSED, ENO => ERR) 2 CAL of function block with load/store of arguments (note 2) LD A ADD 5 ST C10.PV LD %IX10 ST C10.CU CAL C10 3 Use of function block input operators: LD A ADD 5 PV C10 LD %IX10 CU C10 4 Function invocation with formal argument list: LIMIT( EN:= COND, IN:= B, MN:= 1, MX:= 5, ENO=> TEMPL ) ST A 5 Function invocation with non-formal argument list: LD 1 LIMIT B, 5 ST A Copyright International Electrotechnical Commission Provided by IHS under license with IEC Not for Resale No reproduction or networking permitted without license from IHS --``````-`-`,,`,,`,`,,`--- – 128 – 61131-3 IEC:2003(E) Table 53 - Function block invocation and Function invocation features for IL language No. DESCRIPTION/EXAMPLE NOTE 1 A declaration such as VAR C10 : CTU; CMD_TMR : TON; A, B : INT; ELAPSED : TIME; OUT, ERR, TEMPL, COND : BOOL; END_VAR is assumed in the above examples. NOTE 2 This usage is an exception to the rule given in 2.5.2.1 that “The assignment of a value to the inputs of a function block is permitted only as part of the invocation of the function block.” The input operators shown in table 54 can be used in conjunction with feature 3 of table 53. This method of invocation is equivalent to a CAL with an argument list, which contains only one variable with the name of the input operator. Arguments, which are not supplied, are taken from the last assignment or, if not present, from initialization. This feature supports problem situations, where events are predictable and therefore only one variable can change from one call to the next. EXAMPLE 1 Together with the declaration VAR C10: CTU; END_VAR the instruction sequence LD 15 PV C10 gives the same result as CAL C10(PV:=15) The missing inputs R and CU have values previously assigned to them. Since the CU input detects a rising edge, only the PV input value will be set by this call; counting cannot happen because an unsupplied argument cannot change. In contrast to this, the sequence LD %IX10 CU C10 results in counting at maximum in every second call, depending on the change rate of the input %IX10. Every call uses the previously set values for PV and R. EXAMPLE 2 With bistable function blocks, taking a declaration VAR FORWARD: SR; END_VAR this results into an implicit conditional behavior. The sequence LD FALSE S1 FORWARD does not change the state of the bistable FORWARD. A following sequence LD TRUE R FORWARD resets the bistable. Copyright International Electrotechnical Commission Provided by IHS under license with IEC Not for Resale No reproduction or networking permitted without license from IHS --``````-`-`,,`,,`,`,,`--- |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling