Lenze DDS v2.3 Bedienungsanleitung Seite 41

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 340
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 40
Drive PLC Developer Studio
Programming languages
4-3
l DDS EN 2.3
The table lists some IL operators along with possible modifiers and their respective meaning:
Operator Modifiers Meaning
LD N (=”NOT”) Load Load instruction
ST N Store Save the current result in t he operand location
S Set Set Boolean operand to TRUE exactly if t he current result is TRUE.
R Reset Set Boolean operand to FALSE exactly if t he current result is TRUE.
AND N,( Bit-by-bit AND
OR N,( Bit-by-bit OR
XOR N,( Bit-by-bit exclusive OR
ADD ( Addition
SUB ( Subtraction
MUL ( Multiplication
DIV ( Division
GT ( > Greater than
GE ( >= Greater than or equal to
EQ ( = Equal to
NE ( <> Not equal to
LE ( <= Less than or equal to
LT ( < Less than
JMP/JMPC N Jump Jump to label
CAL/CALC N Call Call program or function block
RET/RETC N Return Return from calling a function block
) Evaluate operation that has been deferred
For a more comprehensive IEC operator list refer chapter 12.
Example
IL program using several modifiers
LD TRUE (* Load TRUE to the accumulator *)
ANDN BOOL1 (* Execute AND with the negated value
of the variable BOOL1 *)
JMPC label (* If the result was TRUE
jump to the label “label” *)
LDN BOOL2 (* save the negated value of *)
ST ERG (* BOOL2 in ERG *)
Label:
LD BOOL2 (* save the value of *)
ST ERG (* BOOL2 in ERG *)
IL also allows the setting of parentheses after an operation. The value in parentheses is taken as
operand.
Example 1 Example 2
LD 2 LD 2
MUL 2 MUL (2
ADD 3 ADD 3
)
ST Result ST
In example 1, the value of Result is 7.
In example 2 with parentheses the value for Result is 10, because the operation MUL will
only be evaluated on reaching ); the operand for MUL is 5.
Show/Hide Bookmarks
Seitenansicht 40
1 2 ... 36 37 38 39 40 41 42 43 44 45 46 ... 339 340

Kommentare zu diesen Handbüchern

Keine Kommentare