Unlike other programming languages, in SCL (Structured Control Language) there are no special statements for evaluating signal edges. For this reason an auxiliary variable is employed in SCL. This provides rapid processing of commands and you retain a clear overview of the program.
Fig. 01 shows how the edge of the "pulse" signal can be evaluated using the auxiliary variable "flag".
The "edge_bit_1" and "edge_bit_2" variables are active only for one control cycle and can be used in the continued course of the program.
Also refer here to the "Rules for SCL statements" in the Online Help of SIMATIC (TIA Portal) V11.