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
If you hear about S7-200 Smart plc then in this plc there is system memory bit "SM0.6"
This bit is a scan cycle clock that is ON for one scan and then OFF for the next scan, alternating ON and OFF on subsequent scans. This bit can be used as a scan counter input.
Basically I need not this but if any kind system memory bit like this available then this will also work for me.
My requirement is for every scan cycle that bit give me a pulse for high speed counter input.
literally understanding what you meant...
I would suggest the following.
plc -> properties -> enable the use of system memory byte.
Always 1 (high) : is your answer.
Every single cycle (default 150 ms) the plc OS assigns to this bit "high".
That's all.