PDA

View Full Version : Lead Calculator v1.2



Lars-K
11-03-2015, 03:24 PM
[UPDATE 11.11.2015]

New version added for download.

Program for blending and calculating lead hardness.


http://www.weatherbyrifler.com/Download/Pics/LC12.png

http://www.weatherbyrifler.com/Download/Pics/LC13.png

bangerjim
11-03-2015, 04:55 PM
The numbers is generates make no sense. Hardness of 134, 245, 219???????? And you cannot input data in any dark gray field.


How about some directions to go with it?

banger

drfroglegs
11-03-2015, 05:01 PM
Yeah, my values are all over the place.. Instructions?

I'm getting negative fractions of lead.

http://i1303.photobucket.com/albums/ag158/drfroglegs/Capture_zpsn6cwpwus.jpg (http://s1303.photobucket.com/user/drfroglegs/media/Capture_zpsn6cwpwus.jpg.html)

Lars-K
11-03-2015, 06:12 PM
Hi, I have no clue why there is strange values developed. Seems like it's a format problem with decimals. I will release a new version as soon as I have figured out what's wrong with the code. For now, I have removed the exefile.

drfroglegs
11-03-2015, 06:40 PM
Please don't get discouraged, this looks like an exceptional program to have!

Lars-K
11-03-2015, 07:15 PM
Thanks!
I have tried to set the computer to US settings, and I get the same results as users here gets. I have found some of the source in the code that makes the problems. But, since there is a lot of code, I will need some time to sort all out. For now I have the first lines of code corrected, but for sure I need to do some debugging to make sure the program works as intended.

Stay Tuned!

scorpion
11-03-2015, 07:43 PM
Id be really intrested when u get this working !!

bangerjim
11-03-2015, 08:05 PM
Thanks for checking into it. From what I saw, this will be a cooooool program for us casters!

Let us know!

bangerjim

leeggen
11-03-2015, 10:14 PM
Lars-K thanks for the good try. Seems you are intent on fixing this for our use, so Thanks! Seems some of us are a little slack on brain cells when it comes to calculating lead.
Again thanks and let us know when you fix it.
CD

bangerjim
11-03-2015, 10:55 PM
Much easier to use an alloy calc pre-configured for the specific function than mess with stinky math formulas every single time one wants to mix alloy or play "what if?".

No brain slack in this engineering noodle! Just "tick----tock". Time is money. :bigsmyl2:

popper
11-04-2015, 09:54 PM
Lars - you using a Data table for fixed values? Check polarity ( or types) of values. Lino has a negative # for pure. Also check your pointers.

Lars-K
11-05-2015, 03:04 PM
It's mainly a problem with a math issue, and the compiler not taking into point decimal sign used in different countries. So, I can fix the code to work on my computer. Canging to US settings, the math is not working.

bangerjim
11-05-2015, 03:16 PM
So do you use a different set of math in Norway? HA....ha

popper
11-05-2015, 05:31 PM
Got to use signed int and cast to signed int before doing math (I/O). Can't use signed char. Check you declarations. You use comma for decimal point there? Error should be in input output - compilers don't use a decimal point - of any kind. What compiler?

Lars-K
11-06-2015, 05:16 PM
I know, that's why I'm struggling to figure out how to fix it.
Code is in Vb.Net.

stanford
11-06-2015, 07:49 PM
I know, that's why I'm struggling to figure out how to fix it.
Code is in Vb.Net.

It shouldn't be that hard, you are basically working with the math. I like c# these days and it just a matter of figuring out how to do the conversion for the language you are using. I know what you mean when you say struggling I have been there before, but when you see how the conversion is done per language everything just falls into place.

Lars-K
11-06-2015, 08:14 PM
The convertion is no problem. The challenge is to get it working for systems using both "." and ","
I can force the code to run US or NO systems, still it's not compatible.
Use this code for keyboard settings
Application.CurrentCulture = New CultureInfo("en-US")
I wrote this program years ago in VB6.0 There I have no issues to get it working.

Lars-K
11-09-2015, 03:03 PM
Have now sorted out the problems. Seems like the "easy" way is to do all the programming from scratch.
Be patient, I will release it when it's done.

drfroglegs
11-09-2015, 04:13 PM
I'm very anxious to see how it works out. I'm subscribed and patiently waiting!

Lars-K
11-09-2015, 06:30 PM
Done some more coding tonight. Seems like I have found the pitholes in my program.
Have tried it with both "dot" and "comma" separator and the values seems to be ok.
Will use a day or two to debug and tune the code before release. (Still some logic missing)
Here is a new pic of how it runs using "dot" and US computer settings.

http://www.weatherbyrifler.com/Download/Pics/LCB02.png

Lars-K
11-10-2015, 03:53 PM
Update:

The software will now detect what decimal system your computer is running. If the system uses comma "," it will generate a error msg. suggesting you to change to the Dot "." system. All buttons making calculations will be disabled. I could have automated the task, but I prefer you the user to have full control over your pc, and the possibility to restore the original settings as well. When the Dot system is enabled, so are the buttons in the software.
So, this way, there is just one version of the software working on all systems.
These settings can be adjusted using the button "Settings" (New button)

Now, how to use the program:



All greyed boxes are locked and no values can be added. (Lead weigth as an example is to make sure weigth vs. % is correct.)



Choose a lead type in the dropdown boxes, or type in the blend manually.
Remember to insert weigth of lead. If not you will get a error msg.
Use the BNH buttons if you want to interpolate the data.
When both Lead types and weigth is choosen, click "Calculate" and the result of the mix will be shown. There is no need to click "BHN" before "Calculate" if you prefer.


Final:

If there is a need for more mixes of Lead, please PM them to me and I will include them into the app.

Download will be available in less than 24h.

Stay tuned!

drfroglegs
11-10-2015, 09:50 PM
Awesome! Can't wait!

I wish someone could make this into an android/iPhone app!

Lars-K
11-11-2015, 02:29 PM
File uploaded. Can be found in post #1.

JeffG
11-12-2015, 12:18 AM
Thanks Lars, just downloaded and checked it out. Very nice work. I need to cast some 365-95-1R and 358-105-SWC this weekend, will use it and provide an update.

Lars-K
11-12-2015, 05:00 PM
Thanks JeffG!
Hope the program works as intended. Have done some more cleanup in the code since my last upload.
Next version will have a ToolStrip instead of a row of buttons.
Will also implement a online check for new version of the program.
Here is a pic of how it looks now:

http://www.weatherbyrifler.com/Download/Pics/LC14.png

AbitNutz
11-13-2015, 07:21 AM
Unfortunately, mine won't open at all. All I get is an hourglass. Windows 7 professional.

Lars-K
11-13-2015, 04:00 PM
The file you downloaded is a zip file. Sure you have unpacked the file?
Browse to the file, rightclick and choose "Extract All".
Select destination, and try to doubleclick on the exe file.

John Boy
11-13-2015, 04:29 PM
Lars, default output for Lyman #2 calculates as Bhn 14.65. Lyman #2's Bhn is 15.4
??

KenH
11-13-2015, 04:40 PM
Lars-K: Nice program with good idea, but how do I use pure lead in the system? Opening the program looks good, check the settings to be sure the "dot" has the green check. Selection Linotype and get the various values entered. Since the lead is a calculated value, how do I get 100% there?

BTW, the 10-1 mix puts a negative value in the lead box.

One suggestion would be to put the weight box in a separate spot, or someway to bring attention to the requirement that a value be entered in that spot.

GREAT IDEA and I do like they way it's laid out. Good work.

Ken H>

Lars-K
11-13-2015, 05:29 PM
Lars, default output for Lyman #2 calculates as Bhn 14.65. Lyman #2's Bhn is 15.4
??

Ok, is this BHN value from Lyman?

Update:
Lyman says that Lyman #2 has a BHN of 15.

Lars-K
11-13-2015, 05:34 PM
KenH, I get positive values using 10-1. The program calculates the lead value as (100 - (tin-antimony and so on))
What value of lead do you get?

KenH
11-13-2015, 08:55 PM
Lars-K: I've tried on two computers, both running Win7 Pro and both get the same thing. From "Lead Type #1" I select "10 to 1" from the dropdown, it will fill the value boxes with "Tin = 9.09" and "lead = 91" which is about what you'd expect. If I click the "BHN" button it will then put (no decimal I can see) "Lead = -809" with a "Brinell = 272.21" value.

OK, I go to "Lead type #2: and select "Linotype" it gives me about right with "Tin = 4.0", "Antimony = 12.0", and "Lead = 84", then click BHN and get "Brinell = 20.80"

I put "Weight = 5" in both sections, click "Calculate" and get the below results:

153283

It doesn't matter in which order I do the calculate as long as it's still the same results if I use the "10 to 1" selection. If I change "16 to 1" it works as it should. I've tried all the other combinations and they seem to work just fine.

A note on wheel weights - here in USA we've got clip on wheel weights that are what you show, except I think most of our older clip on wheel weights have a tad of aarsenic (1/4%?). We also have a "stick on" wheel weight that's now being used a lot and it's almost pure lead, (1/4% Tin?) and rest pure lead.

Shucks, I typed this a couple hrs ago and forgot to send "submit".

Ken H>
edit to re-enter image - not sure what happened that it didn't show.

John Boy
11-13-2015, 09:00 PM
Lyman says that Lyman #2 has a BHN of 15. Verified - Yes

Lars-K
11-14-2015, 07:36 AM
After using 10-1, I was finally capable of getting the same error. So with debugging I found the error in the code.
Instead of releasing a new version with US "problems" it would be nice to have some beta testers. (to validate the program)
If you want to join, please send me a PM.

KenH and others:

Please PM me other blends of lead wanted, and I will include them into the program.

Lars-K
11-14-2015, 12:59 PM
Next version will these types be added:
(Thanks to KenH)

Pure Lead
Stick On Wheel Weight: (about 1/4% Tin, rest lead)
Range Lead (avg.): (Tin= 0.17%; Antimony=1.00%; rest lead)
Clip On Wheel Weight: (to distinguish from Stick on WW)

JeffG
11-17-2015, 12:29 AM
Lars,

I used it a couple times over this past weekend figuring out weights of COWW and Tin needed to arrive at the desired alloy before casting some 358-105-WC and 365-95-1R. Very nice. The bullets came out looking very good.

Sincerely


Thanks JeffG!
Hope the program works as intended. Have done some more cleanup in the code since my last upload.
Next version will have a ToolStrip instead of a row of buttons.
Will also implement a online check for new version of the program.
Here is a pic of how it looks now:

http://www.weatherbyrifler.com/Download/Pics/LC14.png

Lars-K
11-17-2015, 11:38 AM
Thanks, JeffG!
I have now a new beta version out for testing. Will have added formulas, online update and some code changes.
If someone wants to test it, send me a PM.