I'm coming to you for a small coding issue...
I'm working on S7 5.5 (coding a S7 300) for self training (I'm a newbies).
I explain the problem : I use the siemens routine as base time :
UN T 1
L S5T#500MS
SV T 1
NOT
BEB
L DB1.DBB 2
INC 1
T DB1.DBB 2
It generate a binary number in DB1.DBB2 (global variable).
My time set point is a byte variable in hex stored in DB1.DBB4 (global variable).
I want to generate a blinking bit that acts when this set point (for example 8 (hex) is reached).
It means 8 x 500 MS, for instance 4 secs.
The set point is a byte variable that I increase or decrease by action on push buttons. There are a max and min limit that are also adjustable.
I already tried to mask the value with xow or uw, but it seems to simple for this problem.
I tried also with mathematics funtions, but can't achieve good results...

Have anyone some ideas to solve this problem ????
Да свиданя