Description
Original instructions
Description of the function
The PL7_DRUM function block is a drum. Each step is associated with output bits or internal bits known as order bits. This function block is used to convert PL7 programs; it corresponds to the conversion of the %DRi’s under PL7.
The additional parameters EN and ENO can be configured.
NOTE: you cannot instantiate or modify the PL7_DRUM 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_DRUM the application cannot be transfered in the PLC.
FBD representation
Representation:
LD representation
Representation:
IL representation
Representation:
CAL PL7_Drum_1(R := Raz, U := Up, F => Full, W => %MW0)
ST representation
Representation:
IF Raz THEN
   RESET_PL7_DRUM(PL7_Drum_1);
END_IF ;
IF RE (Up) THEN
   UP_PL7_DRUM(PL7_Drum_1);
END_IF ;

Full := PL7_Drum_1.F ;
%MW0 := PL7_Drum_1.W ;
Description of parameters
The following table describes the input parameters:
Parameter
Type
Comment
R
"Return to step 0" input, at state 1 initializes the drum at step 0.
U
"Advance" input, on rising edge causes the drum to advance by one step and the updating of the order bits.
The following table describes the output parameters:
Parameter
Type
Comment
F
Output indicating that the final step defined is in progress.
W
Current step output value.
Description of variables
The following table describes the public variables:
Parameter
Type
Comment
LEN
Number of steps: possible values from 1 to 16 (default is 16).
ET
Time out or duration of current step. PL7_Drum_1.ET is between 0 and 9999. This integer can be reset to zero for each step change. It can be read and tested, but not written. The duration of a step is equal to PL7_Drum1.ET x PL7_Drum_1.TB.
S
Between 0 and 15, this is the number of the current step. This integer can be read and tested. It can only be written from an immediate value.
TB
Cyclical programmer time base. Possible values:
  • TB = 8: 1 mn (default value),
  • TB = 4: 1 s,
  • TB = 2: 100 ms,
  • TB = 1: 10 ms.
When the program is executed, the value of the time base (TB defined in offline mode) is rounded down to the nearest multiple of 2 (between 1 and 8).
W0...Wj
(j=LEN-1)
PL7_Drum_1.Wj is a word representing the state of step j. This word (type INT) indicates the state of each order bit for a given step. It is entered by the user using the data editor.
Note: There are as many Wj as there are steps (LEN).
CAUTION
UNEXPECTED BEHAVIOR AFTER WARM RESTART
Do no modify the time base (TB) in online mode, this would cause an unexpected behavior of the application on warm restart.
Failure to follow these instructions can result in injury or equipment damage.
Chart
Chart of the operation of the PL7_DRUM function block:
The number of the current step is incremented for each rising edge on the input PL7_Drum_1.U (or activation of the instruction UP_PL7_DRUM(PL7_Drum_1)). This number can be changed by the program.