1/15/2013 10:36 AM | |
Joined: 9/23/2005 Last visit: 11/19/2024 Posts: 4353 Rating: (1454)
|
Hi, forthe case of long time sums ("integrations"), I suggest adapt the sample program that stay on: How is numerical integration for the S7-1200 programmed in STEP 7 (TIA Portal) V11? http://support.automation.siemens.com/BR/view/en/42469594 |
Denilson Pegaia |
|
1/15/2013 11:35 AM | |
Posts: 15 Rating: (0) |
Thanks for answer, version of TIA is V11 SP2. As i Said, at this time i already have FB that calculate final power consumption but at the end of pulse the TONR timer is reseted and the final value is also reseted. So i need some function that hold the value or exactly before the end of pulse read final value just before reseting the TONR (to count next pulses). As time between pulses grows in miliseconds, the consumption at the and of calculator decreases. And just while next pulse comes, the final value is reseted. I thought to use some MOVE instruction to move the value to other memory adress and then use it (to use for webserver, etc.). But how to say to MOVE instruction when it has to read the value... I look at your link but i though i am too close to solve it :). I have not project here, later i attach the project to have a look. |
1/18/2013 5:40 PM | |
Joined: 9/8/2009 Last visit: 7/17/2023 Posts: 1410 Rating: (153) |
I made this applicatin nearly 15yrs ago, sorry only remainds. Maybe a look how bench instruments work will help you, I have found one link: http://www.leapsecond.com/pdf/an200.pdf From what I understand error is defined: (1/N)*100%, N is number of pulses that can be pulses of your signal that came in a period of measuring or number of pulses of internal source gerator (RTC timer) in a time beetwen two pulses of your source. Now this let me to one fast conclusion: If measured signal has 1Hz we get: 1. mesuring time from one pulse to other with rtc timer we get 1000 pulses (if rtc resloution is 1ms), error is (1/1000)*100%=0.1% 2. measuring number of pulses within a period of 10s (cyclic interrupt) gives 10 counts -> error =(1/10)*100%=10% If we measure inputsignal of 10Hz we get: 1. method1 : (1/100)*100%=1% 2 method2: (1/100)*100%=1% All higher frequencies will give better accuracy using method 2, all frequencies below 10Hz will give better result with method 1. You can improve measuring with syncronizing time base with end signal like described in link of instrument. I do not have a plug&play solution for you, so sorry. |
Follow us on