Siemens NAN 67 Series Wartungshandbuch Seite 215

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 318
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 214
16-11
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
Table 16-7 Rotate Left Double Word Box and Parameters
LAD Box Parameter Data Type Memory Area Description
EN BOOL I, Q, M, D, L Enable input
ROL_DW
EN ENO
ENO BOOL I, Q, M, D, L Enable output
IN
EN
OUT
ENO
IN DWORD I, Q, M, D, L Value to rotate
IN
N
OUT
N WORD I, Q, M, D, L
Number of bit positions by which to
rotate
OUT DWORD I, Q, M, D, L Result of rotate operation
Status Word Bits
BR CC 1 CC 0 OV OS OR STA RLO FC
Write x x x x x x x 1
I 0.0
A signal state of 1 at input I 0.0 activates the
instruction.
Memory double word MD0 is rotated to the left
by the number of bits specified in memory word
MW4.
The result is put into memory double word
MD10. If the signal state of the bit shifted last
was 1, output Q 4.0 is set.
Q 4.0
ROL_DW
N
OUT
EN ENO
MW4
IN
Function is executed (EN = 1):
MD10
MD0
S
Figure 16-10 Rotate Left Double Word
A signal state of 1 at the Enable (EN) input activates the Rotate Right Double
Word instruction. This instruction rotates the entire contents of input IN bit
by bit to the right. Input N specifies the number of bits by which to rotate.
The value of N can be between 0 and 31. If N is larger than 32, the double
word is rotated ((N–1) modulo 32) +1) places. The bit positions at the left are
filled with the signal states of the bits rotated. The result of the rotate
operation can be scanned at output OUT.
The operation triggered by this instruction always resets the CC 0 and OV
bits of the status word to 0. If the box is executed (EN = 1), ENO shows the
signal state of the bit shifted last (same as CC 1 and RLO in the status word).
The result is that other functions following this box that are connected by the
ENO (cascade arrangement) are not executed if the bit shifted last had a
signal state of 0.
Certain restrictions apply to the placement of the Rotate Right Double Word
box (see Section 6.1).
Rotate Right
Double Word
Shift and Rotate Instructions
Seitenansicht 214
1 2 ... 210 211 212 213 214 215 216 217 218 219 220 ... 317 318

Kommentare zu diesen Handbüchern

Keine Kommentare