First of all Thank u so much for the kind of informative video provided by you on YouTube.
My question is I am using S7 Plc with TIA Portal, and I want to use scan cycle bit means for every scan cycle that bit goes high. Any kind of solution.
Thank u.
What you are trying to do is not possible. If you are trying to recognize a pulse i.e. a rising edge in your programm, then this bit you are watching needs to be 0 at a certain time an 1 at another time obviously.
The PLC scan its inputs, runs your program and writes the outputs. Then its starts over with scanning the inputs. Between scanning and writing time stand still for the CPU, it cannot recognize differences in certain bits during that time. Therefore, if you had a bit that is true everytime the CPU does a scan cycle, that means its always true, giving you exactly what miks suggested.
Nevertheless, it should be possible to build that bit you mentioned. I mean the one that is true in one cycle and than false in the other one.
Just write the negation of your bit to the bit itself at the end of your last executed OB.
something like
AN yourbit
= yourbit