PL7_REGISTER_32 : 32 word memory register
Original instructions
Description of the function
The PL7_REGISTER_32 function block is a memory register that can store up to 32 words (of the INT type).
There are two storage modes:
The additional parameters EN and ENO can be configured.
NOTE: you cannot instantiate or modify the PL7_REGISTER_32 function in online mode. This means you must be in offline mode and therefore you must transfer the project in the PLC.
NOTE: If you create more than 255 instances of PL7_REGISTER_32 the application cannot be transfered in the PLC.
FBD representation
Representation:
LD representation
Representation:
IL representation
Representation:
CAL R_1 (R := Raz, I := In_Pulse, O := Out_Pulse, E => Empty, F => Full)
ST representation
Representation:
IF Raz THEN
   RESET_PL7_REGISTER_32 (R_1) ;
END_IF ;

IF RE(In_Pulse) THEN
   GET_PL7_REGISTER_32 (R_1) ;
END_IF ;

IF RE(Out_Pulse) THEN
   PUT_PL7_REGISTER_32 (R_1) ;
END_IF ;

Empty := R_1.E ;
Full := R_1.F ;
Description of parameters
The following table describes the input parameters:
Parameter
Type
Comment
R
Input of reset to zero, if R_1.R equals 1 the register is emptied.
I
Storage input, on rising edge, the input word of the register is stored in the register.
O
Destock input, on rising edge, the input word is written with the information ready to be destocked from the register.
The following table describes the output parameters:
Parameter
Type
Comment
E
Empty register output. When the register is empty, it is no longer possible to destock information.
F
Full register output. When the register is full, it is no longer possible to store information.
NOTE: when both inputs (store and destock) are activated simultaneously, storing is carried out before destocking.
Description of variables
The following table describes the public variables:
Parameter
Type
Comment
FIFO
Mode of operation of the register:
  • True : FIFO.
  • False : LIFO (default).
IN W
Input word of the register; it can be read, tested or written.
OUT W
Output word of the register; it can be read, tested or written.
LEN
Number of words of the register.
Operating modes
The following table describes the specific modes of operation of the PL7_REGISTER_32 function:
Effect...
Description
of a cold restart
(%S0=1), causes the initialization of the contents of the register. The output bit indicating that the register is empty is set at 1.
of a warm restart
(%S1=1) has no effect on the content of the register or on the state of the output bits.
of a reset to zero
The effect of the reset to zero differs according to the language used :
  • in LD and FBD, the input histories are updated with the cabled values,
  • in IL, the input histories are not updated and each input retains the value it had prior to the call.
  • in ST, the input histories are set to zero.