Lenze PLC Designer PLC Designer (R2-x) Instrukcja Użytkownika Strona 57

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 844
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 56
L-force | PLC Designer
What is What in PLC Designer
DMS 3.2 EN 02/2011 TD29 55
Calling function blocks in ST
A function block is called in ST by writing the name of the instance of the function
block and then assigning the values of the parameters in parentheses. In the following
example a timer is called with assignments for the parameters IN and PT. Then the
result variable Q is assigned to the variable A.
The result variable, as in IL, is addressed with the name of the function block, a
following point, and the name of the variable:
CMD_TMR(IN := %IX5, PT := 300);
A:=CMD_TMR.Q
RETURN instruction
The RETURN instruction can be used to leave a POU, for example depending on a
condition
IF instruction
With the IF instruction you can check a condition and, depending upon this condition,
execute instructions.
Syntax:
IF <Boolean_expression1> THEN
<IF_instructions>
{ELSIF <Boolean_expression2> THEN
<ELSIF_instructions1>
.
.
ELSIF <Boolean_expression n> THEN
<ELSIF_instructions n-1>
ELSE
<ELSE_instructions>}
END_IF;
The part in braces {} is optional.
Przeglądanie stron 56
1 2 ... 52 53 54 55 56 57 58 59 60 61 62 ... 843 844

Komentarze do niniejszej Instrukcji

Brak uwag