Do cyclic interrupt OBs use the process image to read input signals?

Yep that is what the plc does, when updating the image it copies the PW to the IW anyway all you are doing is exactly the same thing but at a rate or time you want, you can update the Image at any time as posted before you could do that a dozen times in OB1 between calls to other blocks although not consistent i.e. if a call to the update is before & again after some program block the time will vary depending on the internmediate block scan time for example
C PB1 (takes 5ms) some code
C PB100 (takes 2ms) the PIW update
C PB2 (Takes 15ms) some code
C PB100 (takes2ms) The PIW update
& so on
So every call to PB100 the delay between the update will vary i.e. first call 5ms
Second call 15ms but if the total scan of the program was 100ms at least you can update as fast as the slowest block scan.
 
Not sure about Step-7, but in PCS7, you can define PIP's (process image partition) and assign each PIP a specific OB, such as OB35. Then when you are laying out your hardware, and assigning addresses, you also assign a PIP for the image updates. The PIP OB and the logic OB should be the same. You can use OB1 for everything, but it is not recommend.


It's a PLC feature, supported in S7400 and 1500, but not 300 or 1200. I'm sure it gets way more use in PCS7 on the 400 than it does in "regular" 400s, but it is still available in step 7.


As JesperMP said, it doesn't really make sense for just a couple bits, but it can make things easier when its gets to be a decent chunk of data, probably all in the same rack.
 
Jesper my friend, this is gold.
So if I do this code in the OB38, every 10ms I will be reading my input and writing it into MB10.2?
Would it work if I use temp byte in order not to waste M area?


Since your question question wasn't directly answered, yes you could. I agree that the other solution of writing it to the process image tag is even simpler.
 
If it's critical, then I would go with an external pulse stretcher i.e. essentially build your own high-speed counter/detector; solving a hardware problem with a software solution is non-trivial; PLC scanning is non-deterministic and there is no way to guarantee sampling intervals.
 

Similar Topics

Hello to all, I know there are a few people here very experienced with Codesys. I wonder does Codesys have something similar to OB35 in STEP7...
Replies
3
Views
628
Hi! Just a question of curiosity and self education. I have always wondered, what are these for or why/how do we use them? Why can't we write...
Replies
4
Views
6,233
Hello all, I've decided to have a play with TIA Portal V13. In Step7 you can evaluate the value of the temp variable #OB35_Exec_Freq to...
Replies
3
Views
5,890
Hi I am very new to the field of PLC programming. I am programming an anticollision program on a Siemens SIMATIC ET200S. I have learned that it...
Replies
1
Views
2,366
Is there any kind of system function or something that stops cyclic interrupt during excitation of some other function. So for example inside fc3...
Replies
6
Views
2,008
Back
Top Bottom