11/14/2012 9:32 PM | |
Joined: 10/28/2008 Last visit: 7/21/2023 Posts: 245 Rating:
|
Hello. I have created simple code to demonstrate this problem. Please see this simple code in attached images. I also add images from IBA analyzer to see TOF timer function in every PLC scan. For my particular situation I have found the solution to restart the timer. I hold log1 to another PLC scan (Mem bit). I run this this code in OB34 with 100ms cyclic interrupt. PT time for TOF timer is 2 seconds. So every 2 seconds time of this timer is up (see also from images). Cntr counter counts OB34 calls, so I restart timer every 20 calls off OB34... If you find the same behaviour, please let me know. Are there any versions of this SFB ? Or this is only one version in PLCs inside ? Thank you for your comments. Best regards. Georgio AttachmentTOFproblem.zip (337 Downloads) |
Georgio |
|
11/16/2012 9:49 AM | |
Joined: 4/11/2012 Last visit: 9/5/2024 Posts: 181 Rating:
|
From the images attached, it's impossible to confirm the bug. Too many unknown names are used, with no information on their memory area. Also, the program is too complex, considering you want to show a bug in the SFB5. Please simplify your program, and attach the archieved actual program that shows the bug in action. I did a test program for SFB5, and from my testing, it seems to be working ok. I'm doing same as you say you are doing, I'm calling SFB5 (t#2s) from OB35, every 100ms. At the start of OB35, I add 1 to counter, and when counter value is 20, I give signal to the SFB5 input. After that, I set the counter to 0. Result: SFB5 is constantly true, since the counter has same cycle time as the SFB5. The SFB5 seems to be working fine. Edit: I just noticed, you are using OB34, that's by default 200ms cyclic, yet you mention it like it's cycle time is 100ms. Maybe you chanced the times, but then again, it's impossible to know with only screenshots. AttachmentSFB5_Test.zip (318 Downloads) |
Last edited by: Elonen at: 11/16/2012 9:55 AMAdded the Edit: |
|
11/19/2012 7:19 AM | |
Joined: 4/11/2012 Last visit: 9/5/2024 Posts: 181 Rating:
|
Take a look at your OB34 cycle time. By default, it's 200ms. However, you mention OB34 like it's cycle time is 100ms. |
11/19/2012 10:00 AM | |
Joined: 10/28/2008 Last visit: 7/21/2023 Posts: 245 Rating:
|
I have tried to run the same program in simulator and also in real PLC. The behaviour is totally different. In simulator the behaviour of the SFB5 TOF timer is OK but in real PLC it follows the problem I have posted at the start of this thread. Please see attached project. If you run it on Simulator, everything is OK, but if you have the posibbility to run it in real PLC, please try it. Last interface change of the SFB is 8.9.1996 at 8:21:49 AM and the same is for last modified. It is the same for both simulator and real PLC. I do not really know where is the mistake. In attached program I changed OB35 time to 2s and timer goes for 20s, to see it better in VAT table when timer is up and there is a positive edge on input of the timer and output is zero when time is up... If you see solution please let me know. Thank you. Georgio AttachmentTofproblem_121119.zip (262 Downloads) |
Georgio |
|
11/19/2012 10:47 AM | |
Joined: 10/28/2008 Last visit: 7/21/2023 Posts: 245 Rating:
|
Yes. I download also HW configuration. I treied it once again and also I compared onli/offline by Comparison including SDBs... I tried it on simulator and on real PLC in the same way. If you have some real PLC, please try to run my code I attach. Best regards. Georgio AttachmentTofproblem_121119.zip (309 Downloads) |
Georgio |
|
Follow us on