Short description
The shift register function reads an input value and shifts the bits. The output value corresponds with the configured shift register bit. The shift direction can be changed at a special input.
For LOGO! 0BA6, you can use only one shift register in one circuit program, but for LOGO! 0BA7 and LOGO! 0BA8 devices, you can use a maximum of four shift registers with eight bits for each shift register in one circuit program.
|
Connection |
Description |
|---|---|
|
Input In |
The function when started reads this input value. |
|
Input Trg |
The SFB is started with a positive edge (0 to 1 transition) at input Trg (Trigger). A 1 to 0 transition is irrelevant. |
|
Input Dir |
You define the shift direction of the shift register bits Sx.1 to Sx.8 at the Dir input: Dir = 0: shift up (Sx.1 >> Sx.8) NOTE: "x" refers to the index of the shift register. |
|
Parameter |
Shift register index: the index of shift register in the circuit program. Possible settings: 1 to 4
Shift register bit that determines the value of output Q. Retentivity set (on) = the status is retentive in memory. |
|
Output Q |
The output value corresponds with the configured shift register bit. |
Parameter
LOGO! 0BA7 or 0BA8 devices provide four shift registers, with eight bits for each shift register. The shift register index corresponds to one of the four shift registers in the circuit program. The shift register bits are numbered in Sx.y, in which x is the index, and y is the bit number.
Timing diagram
If the shift register index is 1, the shift register bits will be S1.1 to S1.8.
Description of the function
The function reads the value of input In with a positive edge (0 to 1 transition) at input Trg (Trigger).
This value is written to shift register bits Sx.1 to Sx.8, depending on the set shift direction:
Dir = 0 (Shift up): Sx.1 accepts the value of input In, the previous value of Sx.1 is shifted to Sx.2, Sx.2 to Sx.3 ... Sx.7 to Sx.8
Dir = 1 (Shift down): Sx.8 accepts the value of input In; the previous value of S1.8 is shifted to Sx.7, Sx.7 to Sx.6 ... Sx.2 to Sx.1.
Q outputs the value of the configured shift register bits.
If retentivity is not enabled, the shift function restarts at Sx.1 or Sx.8 after a power failure.