Help - Search - Members - Calendar
Full Version: Math Calculation
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
alonsonbeers
Hi, Guys:


I start not to long ago studying PLC on-line. I'm on timers right now. I have an exercise that is asking how many times a light comes on, with 29000(0.1)s as total time duration , 20(0.1) as preset for light frequency , and a 70(.01) as time duration. My calculations give me 322.2222 times, their answer is 330; but i did the ladder logic with a counter to obtain a total of 326. Can any body tell me is there is any formula to do this kind of calculations (Is not in the book) and i try different ways without luck but the same 322.22, lossing 1.043(0.1) per cycle.

Thank's for your help.


TWControls
That's interesting.

Can you post the problem as it is stated in the book? Maybe we are missing something
alonsonbeers
QUOTE(TWControls @ Jan 9 2007, 07:43 PM) [snapback]47521[/snapback]
That's interesting.

Can you post the problem as it is stated in the book? Maybe we are missing something


The preset value of T4:0 is set to 20 and the preset of T4:1 is set to 70. Output O:2/0 controls a flashing light. contact I:1/0 are closed for 29000 seconds. How many times does the light come on?
Alaric
29000 counts at a .1 second time base is 29000 * 1/10 s = 29000/10 = 2900 seconds.
20 counts at a .1 second time base is 20 * 1/10th s = 20/10 = 2 seconds.
70 counts at a .01 second time base is 70 * 1/100th s = 70/100 = 0.7 seconds.

Because of differences between scan time and actual timer completion time, you will almost never get exactly the same real result as what you will calculate.
alonsonbeers
QUOTE(Alaric @ Jan 9 2007, 07:56 PM) [snapback]47523[/snapback]
29000 counts at a .1 second time base is 29000 * 1/10 s = 29000/10 = 2900 seconds.
20 counts at a .1 second time base is 20 * 1/10th s = 20/10 = 2 seconds.
70 counts at a .01 second time base is 70 * 1/100th s = 70/100 = 0.7 seconds.

Because of differences between scan time and actual timer completion time, you will almost never get exactly the same real result as what you will calculate.


That lost of time comes on my calculations the logixpro is adding that 1.047(0.1) per cycle
TWControls
Yes, but shouldn't the answer be less counts than the theoretical number of 322.2222 and not more? Time should be lost, not gained right?
panic mode
QUOTE
how many times a light comes on, with 29000(0.1)s as total time duration , 20(0.1) as preset for light frequency , and a 70(.01) as time duration


sorry for my ignorance but i don't quite understand the question:

2900 seconds duration (ok)
2 seconds frequency (what exactly is this? frequency is measured in Hz, not seconds. is this the ON time maybe of one cycle?)
7 seconds duration (hmmm... duration of what? is this supposed to be the period of one cycle? 2 seconds on and 5 seconds off and so on for total time of 2900 seconds? how are timers connected in logic?)
alonsonbeers
QUOTE(panic mode @ Jan 9 2007, 08:38 PM) [snapback]47529[/snapback]
QUOTE
how many times a light comes on, with 29000(0.1)s as total time duration , 20(0.1) as preset for light frequency , and a 70(.01) as time duration


sorry for my ignorance but i don't quite understand the question:

2900 seconds duration (ok)
2 seconds frequency (what exactly is this? frequency is measured in Hz, not seconds. is this the ON time maybe of one cycle?)
7 seconds duration (hmmm... duration of what? is this supposed to be the period of one cycle? 2 seconds on and 5 seconds off and so on for total time of 2900 seconds? how are timers connected in logic?)

The 2 seconds are for the light to come on; a duration period of 7 seconds for the light to stay on. The logic I did was based on one TimerT4:0 for an extended period of 2900seconds or (48.33) minutes a cascading timer T4:1 with a 2 seconds on delay and a second timer T4:2 with a 7 sec. on delay to reset my first timer(T4:1) and T4:0 as an input with its TT. Also I put a counter that is activated with T4:/DN; Sorry for my poor information on the problem. My calculation is as follow 20+70=90; 29000/90=322.2222222. Or I'm miscalculating? Thank's again

QUOTE(alonsonbeers @ Jan 9 2007, 09:24 PM) [snapback]47532[/snapback]
QUOTE(panic mode @ Jan 9 2007, 08:38 PM) [snapback]47529[/snapback]
QUOTE
how many times a light comes on, with 29000(0.1)s as total time duration , 20(0.1) as preset for light frequency , and a 70(.01) as time duration


sorry for my ignorance but i don't quite understand the question:

2900 seconds duration (ok)
2 seconds frequency (what exactly is this? frequency is measured in Hz, not seconds. is this the ON time maybe of one cycle?)
7 seconds duration (hmmm... duration of what? is this supposed to be the period of one cycle? 2 seconds on and 5 seconds off and so on for total time of 2900 seconds? how are timers connected in logic?)

The 2 seconds are for the light to come on; a duration period of 7 seconds for the light to stay on. The logic I did was based on one TimerT4:0 for an extended period of 2900seconds or (48.33) minutes a cascading timer T4:1 with a 2 seconds on delay and a second timer T4:2 with a 7 sec. on delay to reset my first timer(T4:1) and T4:0 as an input with its TT. Also I put a counter that is activated with T4:/DN; Sorry for my poor information on the problem. My calculation is as follow 20+70=90; 29000/90=322.2222222. Or I'm miscalculating? Thank's again
T4:1/DN
BobLfoot
Lets see if I can share a reason for the book saying 330.

T4:0 is set for 29000 at a time base of 0.1 seconds this translates to 2900 seconds, but with scan time fluctuation can be off and actually be 2,899.9 or 2,900.1 seconds. Assume it runs long for the sake of argument. SO later I'll use 29.001 in calculating.

T4:1 is set for 20 at a timebase of 0.1 seconds this translates to 2 seconds, but with scan time and other fluctuations can be off and actually be 1.9 or 2.1 seconds. Assume that it runs short for the sake of argument. So later I'll use 1.9 in calculating.

T4:2 is set for 70 at a timebase of 0.1 seconds this translates to 7 seconds, but with scan time and other fluctuations can be off and actually be 6.9 or 7.1 seconds. Assume that it runs short for the sake of argument. So later I'll use 6.9 in calculating.

Now the Calculations 2,900.1 divided by {1.9 plus 6.9} yields 2,900.1 / 8.8 or 329.55681 cycles. Your book question asked for the max number of cycles. Rounding to nearest whole number is 330.

Once again the theoretical has little or nothing to do with the real world.
TWControls
QUOTE(BobLfoot @ Jan 10 2007, 01:28 AM) [snapback]47540[/snapback]
Lets see if I can share a reason for the book saying 330.

T4:0 is set for 29000 at a time base of 0.1 seconds this translates to 2900 seconds, but with scan time fluctuation can be off and actually be 2,899.9 or 2,900.1 seconds. Assume it runs long for the sake of argument. SO later I'll use 29.001 in calculating.

T4:1 is set for 20 at a timebase of 0.1 seconds this translates to 2 seconds, but with scan time and other fluctuations can be off and actually be 1.9 or 2.1 seconds. Assume that it runs short for the sake of argument. So later I'll use 1.9 in calculating.

T4:2 is set for 70 at a timebase of 0.1 seconds this translates to 7 seconds, but with scan time and other fluctuations can be off and actually be 6.9 or 7.1 seconds. Assume that it runs short for the sake of argument. So later I'll use 6.9 in calculating.

Now the Calculations 2,900.1 divided by {1.9 plus 6.9} yields 2,900.1 / 8.8 or 329.55681 cycles. Your book question asked for the max number of cycles. Rounding to nearest whole number is 330.

Once again the theoretical has little or nothing to do with the real world.

I can follow your solution. That's the closest way I can see for it to happen. Wonder if the author of the book has ever seen a PLC?
alonsonbeers
QUOTE(TWControls @ Jan 10 2007, 07:10 AM) [snapback]47552[/snapback]
QUOTE(BobLfoot @ Jan 10 2007, 01:28 AM) [snapback]47540[/snapback]
Lets see if I can share a reason for the book saying 330.

T4:0 is set for 29000 at a time base of 0.1 seconds this translates to 2900 seconds, but with scan time fluctuation can be off and actually be 2,899.9 or 2,900.1 seconds. Assume it runs long for the sake of argument. SO later I'll use 29.001 in calculating.

T4:1 is set for 20 at a timebase of 0.1 seconds this translates to 2 seconds, but with scan time and other fluctuations can be off and actually be 1.9 or 2.1 seconds. Assume that it runs short for the sake of argument. So later I'll use 1.9 in calculating.

T4:2 is set for 70 at a timebase of 0.1 seconds this translates to 7 seconds, but with scan time and other fluctuations can be off and actually be 6.9 or 7.1 seconds. Assume that it runs short for the sake of argument. So later I'll use 6.9 in calculating.

Now the Calculations 2,900.1 divided by {1.9 plus 6.9} yields 2,900.1 / 8.8 or 329.55681 cycles. Your book question asked for the max number of cycles. Rounding to nearest whole number is 330.

Once again the theoretical has little or nothing to do with the real world.

I can follow your solution. That's the closest way I can see for it to happen. Wonder if the author of the book has ever seen a PLC?


Thak you guys for your time on my question, was driving me crazy see that a math calculation has tree different answers; thank's Alaric for his point on the scan time, BoblFoot for his visual math calculation, and the remark on theory agains real world. I'll have this on mind as I advance on my studies;
Have a good one and thank's again.
TWControls
Feel free to come back with more questions when you have them

And I forgot to say earlier, welcome to MrPLC
Peter Nachtwey
This is a good example of why I don't like PLC timers. They are abused and not used properly. A PLC timer instructions are software timers not hardware timers. The correct way to is to use a millisecond or even microsecond hardware timers. Then the error doesn't accumulate.

This application should be done with one timer counting to 29000. At each step one should compare with the appropriate time but NEVER RESET THE TIMER!!!. The error is introduced when reseting the timer.





alonsonbeers
QUOTE(TWControls @ Jan 10 2007, 05:00 PM) [snapback]47602[/snapback]
Feel free to come back with more questions when you have them

And I forgot to say earlier, welcome to MrPLC


Thank you for the welcoming, you're make me feel I'm not alone on my studies, since I don't have really no body to ask. The comp. I'm working for have a contractor as a programmer and he lives in South Carolina.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.