| View previous topic :: View next topic |
| Author |
Message |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Wed Aug 05, 2009 2:46 am Post subject: |
|
|
i think (keyword here "think") this is the line i would have to add my math to:
rpm = (graphpixels(UBound(graphpixels)) + graphpixels(UBound(graphpixels) - 1)) / 2
t = j * ((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) - (2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60)) / (Timer2.Interval / 1000)
power = ((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5) / (Timer2.Interval / 1000)
________
Buy Iolite
Last edited by sclark on Sat Feb 12, 2011 7:25 am; edited 1 time in total |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Wed Aug 05, 2009 12:19 pm Post subject: |
|
|
Yep, those 2 lines are the ones.
_________________ cheers
Dave |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Wed Aug 05, 2009 10:54 pm Post subject: |
|
|
| Dave? wrote: | | Yep, those 2 lines are the ones. |
ok cool iam on the right track the only thing is i dont understand the ()
in the first post is the math i need to added
________
Volcano vaporizer reviews
Last edited by sclark on Sat Feb 12, 2011 7:25 am; edited 1 time in total |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Wed Aug 05, 2009 11:10 pm Post subject: |
|
|
so if i wanted to add this Hp= watts x 0.00134
is this how you would do it?
power = (((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5) / (Timer2.Interval / 1000)*0.00134)
or no..lol
________
[URL=http://www.ford-wiki.com/wiki/Jaguar_420_and_Daimler_Sovereign_(1966?69)]Jaguar 420 and daimler sovereign (1966?69) specifications[/URL]
Last edited by sclark on Sat Feb 12, 2011 7:25 am; edited 1 time in total |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Thu Aug 06, 2009 2:54 am Post subject: |
|
|
is the above right any one please
thanks
________
VAPORIZER STORE
Last edited by sclark on Sat Feb 12, 2011 7:25 am; edited 1 time in total |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Thu Aug 06, 2009 9:45 am Post subject: |
|
|
| sclark wrote: | so if i wanted to add this Hp= watts x 0.00134
is this how you would do it?
power = (((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5) / (Timer2.Interval / 1000)*0.00134) |
Yes... or maybe not. It depends on what UBound, graphpixels or j are? I assume that graphpixels is the number of holes in the disc.
Whoever wrote the original code clearly wanted to keep it obvious what the math is doing. If you found an article on math for cars you'd find similar formulae for calculating power from the number of rotations per second of a cylinder of a known diameter. Or btter yet, get yourself a copy of this excellent book:
http://www.amazon.com/exec/obidos/ASIN/1557880204/webcars/103-1859529-2448658
But... the first thing I'd do is simplify the math. The circumference of the disc/wheel/drum etc equals 2 times pi. Or 2 x 3.14 (which equals 6.28 ).
But I digress... The answer to your question could either:
| Code: | | power = (((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5) / (Timer2.Interval / 1000)) * 0.00134 |
or
| Code: | | power = ((((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5)) * 0.00134) / (Timer2.Interval / 1000) |
You'll have to discover which one is correct by either breaking down the math or testing it and seeing if the results are correct.
Are you sure that the result is not in KW? If it is you should be using 1.341 and not 0.00134
_________________ cheers
Dave |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Thu Aug 06, 2009 11:47 pm Post subject: |
|
|
| Dave? wrote: | | sclark wrote: | so if i wanted to add this Hp= watts x 0.00134
is this how you would do it?
power = (((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5) / (Timer2.Interval / 1000)*0.00134) |
Yes... or maybe not. It depends on what UBound, graphpixels or j are? I assume that graphpixels is the number of holes in the disc.
Whoever wrote the original code clearly wanted to keep it obvious what the math is doing. If you found an article on math for cars you'd find similar formulae for calculating power from the number of rotations per second of a cylinder of a known diameter. Or btter yet, get yourself a copy of this excellent book:
http://www.amazon.com/exec/obidos/ASIN/1557880204/webcars/103-1859529-2448658
But... the first thing I'd do is simplify the math. The circumference of the disc/wheel/drum etc equals 2 times pi. Or 2 x 3.14 (which equals 6.28 ).
But I digress... The answer to your question could either:
| Code: | | power = (((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5) / (Timer2.Interval / 1000)) * 0.00134 |
or
| Code: | | power = ((((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5)) * 0.00134) / (Timer2.Interval / 1000) |
You'll have to discover which one is correct by either breaking down the math or testing it and seeing if the results are correct.
Are you sure that the result is not in KW? If it is you should be using 1.341 and not 0.00134 |
iam not 100% sure but i think it is just watts..i see what you are saying about the code hummm i know the timer fuction is for how many secs it reads the rotation of the shaft if i recall
________
Big-Block Engine
Last edited by sclark on Sat Feb 12, 2011 7:25 am; edited 1 time in total |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Thu Aug 06, 2009 11:57 pm Post subject: |
|
|
graphpixels - is the window where it gets the "number" from
j = is the od,id of the shaft size of the hardware itself
________
Marijuana sativa
Last edited by sclark on Sat Feb 12, 2011 7:25 am; edited 1 time in total |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sat Aug 08, 2009 6:28 am Post subject: |
|
|
| sclark wrote: | | Nm = 123 x 2.205 x 3.28 = ft-lbs |
That is incorrect. Where are the Newton metres? You've got 3 constants but no Nm.
ft-lbs = Nm x 0.737561
_________________ cheers
Dave |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sat Aug 08, 2009 10:25 am Post subject: Re: Visual Basic help |
|
|
Instead of screwing with the existing math code, just add the following lines after line 658
| Code: |
'Convert to Imperial
t = t * 0.737561
power = power * 0.00134 |
And don't forget to change the Captions on line 41 and 114
| Code: | Caption = "Power (HP)"
Caption = "Torque (ft-lb)" |
And change line 518
| Code: | | Print #1, "RPM,Power (HP),Torque (ft-lb)" |
After compiling this, and building the hardware, you may discover that the graph scale is way out. The graph's scale was designed to display watts, not horsepower. With 745.6 watts per horsepower you may end up a visually very flat looking power curve (unless YOU can figure out how to change the vertical scale of the power graph) - assuming that the code does not automatically adjust the scale to suit the values being displayed.
| sclark wrote: | I have some source code that was given to me however the author of the source code is no longer around |
Are you saying that the author of the sci-spot.com website has passed away? Or now that he's finished Uni he has no interest in updating the site or answering emails?
_________________ cheers
Dave |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Sat Aug 08, 2009 2:27 pm Post subject: |
|
|
hello
yes that is right author doesnt update the site or answering emails ( i sent him e-mails and no answer) the scale does update while the program is running meaning the valus on the side 1500, etc change when running. i dont know if it will when i added the code you siad i would assume it will?
________
FORD XP FALCON SPECIFICATIONS
Last edited by sclark on Sat Feb 12, 2011 7:25 am; edited 1 time in total |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Sat Aug 08, 2009 2:58 pm Post subject: |
|
|
also i must be doing something wrong cause my form1 only goes to line 200 col 1? so i dont know how you figure after line 658,etc?
________
Kitchen Measures
Last edited by sclark on Mon Mar 14, 2011 8:38 pm; edited 1 time in total |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Sat Aug 08, 2009 3:10 pm Post subject: |
|
|
ohh i forgot to add that iam opening this up in VB..i dont know if that is what you are using to view code or not
________
IOLITE VAPORIZER
Last edited by sclark on Sat Feb 12, 2011 7:26 am; edited 1 time in total |
|
| Back to top |
|
 |
sclark Newbie
Joined: 02 Aug 2009 Posts: 22
|
Posted: Sat Aug 08, 2009 4:49 pm Post subject: |
|
|
ahh i see you must of using notepad that is what you are going by
so doing what you are saying is the same thing as this then:
power = (((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5) / (Timer2.Interval / 1000)) * 0.737561
so how do you know it shouldnt be like this: (like you was saying in the other post):
power = ((((2 * 3.14 * graphpixels(UBound(graphpixels)) / 60) ^ 2 * j * 0.5) - ((2 * 3.14 * graphpixels(UBound(graphpixels) - 1) / 60) ^ 2 * j * 0.5)) * 0.737561) / (Timer2.Interval / 1000)
________
Gina
Last edited by sclark on Sat Feb 12, 2011 7:26 am; edited 1 time in total |
|
| Back to top |
|
 |
DaveR Valued Contributor


Joined: 03 Sep 2005 Posts: 413 Location: Australia
|
Posted: Sun Aug 09, 2009 9:33 am Post subject: |
|
|
Download and use the attached source files.
| Description: |
| dyno_src.zip modified to display imperial values. |
|
 Download |
| Filename: |
imperial_dyno-src.zip |
| Filesize: |
11.14 KB |
| Downloaded: |
1955 Time(s) |
_________________ cheers
Dave |
|
| Back to top |
|
 |
|