10/5/2010 4:00 PM | |
Posts: 197 Rating: (3) |
Thanks for the reply Zenta, So , In OB35 : AN M 0.2 S M 0.2 while maintaining same codes in OB1? Actually,I was looking for answers to my questions. Regards |
10/6/2010 2:53 AM | |
Joined: 10/7/2005 Last visit: 11/19/2024 Posts: 3027 Rating: (1057)
|
Assuming OB35 call rate is 100ms, M0.2 will be ON for 100ms, OFF for 100ms, ON for 100ms etc. etc.
Resetting M0.2 in "any other FC" that it being called from OB1can be done, but will not change/improve the functionality of the logic. OB35 will simple toggle the status of M0.2 every time it is called (e.g. every 100ms). OB1 now (cyclically) checks it is ON and - if so - resets it and sets M0.4 ON for one (OB1) scan. It seems the aim of the logic is to create a One Shotbit (M0.4) in a rather convoluted way. They could have just used the CPU clock bits together with a rising edge detection to do so (perhaps this S7 "logic" comes from an S5 upgrade?).
OB1 will reset M0.2 when the logic in OB1 is executed. OB35 can and willinterrupt the cyclic (OB1 related) at any time as per its configured call rate. Once OB35 has set M0.2 ON, he reset of itis can as suchbe "delayed" by as much as OB1 scan time(e.g. OB35 interrupt to set M0.2 ON took place right after the OB1 M0.2 related reset logic was executed). As OB35'sexecution is timed by the OS in the background (i.e. independend of OB1 cycle time), you willhave on average a 100ms one shot with M0.4, as long as OB1's cycle time is less than the call rate of OB35. I hope this helps |
Cheers |
|
10/6/2010 10:55 AM | |
Joined: 10/7/2005 Last visit: 11/19/2024 Posts: 3027 Rating: (1057)
|
Program size as wellas "runtime intensive" programming (e.g.doing search or sort loops throughlarge arrays)are the main candidates for larger cycle times. Having said that, the default cycle time monitoring setting is 150ms in a 300 CPU (which can be changed) andone must try really hard to exceed even 100ms cycle time in a modern 300 CPU in my humble oponion (it's not unheard of though). |
Cheers |
|
Follow us on