Jump to content

Ams Ve Formülleme ( Matematik İşlemleri )


dragon3781
 Share

Recommended Posts

Merhabalar ;

AMS ile metematik işlemleri yapılabilirmi acaba ?

Yani excell de kullandığımız gibi AMS ile Formul çarpanları ve işlem sonuçları yazdırabilmemiz mümkünmüdür .

Not : Önemli olan sonuctaki yuvarlama değerleridir + yukarı yada - aşağı değil direk rakamı verebiliyormu AMS .

Bu konu hakkında bilgisi olan var ise bilgilendirirse sevinirim.

Çalıştığım Proje Makina Sektörü için Ağırlık Hesaplama Tablosudur.

Örnek Resim ;

[img]http://b1112.hizliresim.com/s/f/12sjx.jpg[/img]

Örnek Proje :

[code]http://www.multiupload.com/V35SAPO2LE[/code]

Kodlar & Formül :

[codebox]

MALZEME :

ÇELİK 0,00000785
DÖKÜM 0,00000725
BRONZ 0,0000089
ALÜMİNYUM 0,0000027
BAKIR 0,0000089
PİRİNÇ 0,0000085
TEFLON 0,0000021
PASLANMAZ 0,0000079
CIVA ÇELİĞİ 0,0000078
DELRİN 0,00000142
POLİETİLEN 0,000001
POLYAMİD 0,00000114
KESTAMİD 0,0000012
FİBER 0,0000014
POLİPROPİLEN 0,0000009
PVC 0,0000015
PLEXİGLAS 0,0000015

FORMÜL :

DÖRTGEN KALINLIK&DIŞ ÇAP* EN VEYA İÇ ÇAP * UZUNLUK *ADET*MALZEME)
YUVARLAK 3,14*( KALINLIK&DIŞ ÇAP* KALINLIK&DIŞ ÇAP)/4* UZUNLUK *ADET*MALZEME)
BORU 3,14*( KALINLIK&DIŞ ÇAP* KALINLIK&DIŞ ÇAP)/4* UZUNLUK)-(3,14*( EN VEYA İÇ ÇAP * EN VEYA İÇ ÇAP)/4* UZUNLUK))*ADET*MALZEME)
ALTIGEN 0,866* KALINLIK&DIŞ ÇAP* KALINLIK&DIŞ ÇAP* UZUNLUK *ADET*MALZEME)
[/codebox]


Amacım yukarıdaki Değerlerin aşağıdaki Formül ile uygunlanmasıdır.

Bu konuda bilgi veren bir arkadaş olursa sevinirim..

İyi günler...
Link to comment
Share on other sites

DÖRTGEN KALINLIK&DIŞ ÇAP* EN VEYA İÇ ÇAP * UZUNLUK *ADET*MALZEME)
YUVARLAK 3,14*( KALINLIK&DIŞ ÇAP* KALINLIK&DIŞ ÇAP)/4* UZUNLUK *ADET*MALZEME)
BORU 3,14*( KALINLIK&DIŞ ÇAP* KALINLIK&DIŞ ÇAP)/4* UZUNLUK)-(3,14*( EN VEYA İÇ ÇAP * EN VEYA İÇ ÇAP)/4* UZUNLUK))*ADET*MALZEME)
ALTIGEN 0,866* KALINLIK&DIŞ ÇAP* KALINLIK&DIŞ ÇAP* UZUNLUK *ADET*MALZEME)

Formülleri buraya yazmışsın zaten.Atıyorum kalınlık için Input.GetText("Input1") yazıp okutacan hepsi için geçerli bu (Dış çap, uzunluk vs vs).Sonra aynı kullandığın işaretlerle zaten işlemini yapacaksın.İşlem için küçük örnek;

[code]discap = Input.GetText("discap");
uzunluk = Input.GetText("uzunluk");
adet = Input.GetText("adet");
malzeme = ComboBox.GetItemData("malzemeturu",ComboBox.GetSelected("malzemeturu"));
bicim = ComboBox.GetItemText("malzemecinsi", ComboBox.GetSelected("malzemecinsi"));
if bicim == "YUVARLAK" then
sonuc=3,14*( discap* discap )/4* uzunluk *adet*malzeme
end
Input.SetText("toplam", sonuc)
[/code]

Tabi bunu yapmadan önce şunu yapman lazım malzemeturu comboboxun daki her itemi yanındaki data yerlerine uygununu yazmalısın (Mesela çelikse datası 0,00000785 olmalı.)Geri kalan kısmı ise zaten basit elseif bicim == "DİKDÖRTGEN" then diye gideceksin kolay gelsin.

Edited by MostWanted
Link to comment
Share on other sites

[code]Pilgetir ;

Öm ile detaylı olarak anlattım konuyu , tekrar bu konudada bahsedeyim isterseniz.[/code]

[code]MostWanted ;

Vermiş oldugun kodları bir deniyecegim umarım çözebilmiş ve anlamışımdır .[/code]

[code]blackman 12 ;

Bu program ile ölçüleri olan malzemelerin terazi olmadan ağırlıkları hesaplanabilir , buda benim günlük 1 saatimi alır en az işyerinde..

Örnek olarak :

100 mm Kalınlık
100 mm En
1000 mm Uzunluk

Yukarıdaki ölçülere sahip Bakır Malzeme Kaç KĞ eder ?

İşte ComboBox ve Inputlar ile bunu Formullerı kullanarak hesaplamak mumkunmudur diye sormustum.

Umarım anlatımım karışık olmamıştır.[/code]

Link to comment
Share on other sites

MostWanted ;

Verdiğin Kodları Denemeye Çalışınca bir hata aldım ;


[codebox]

discap = Input.GetText("discap");
iccap = Input.GetText("iccap");
uzunluk = Input.GetText("uzunluk");

adet = Input.GetText("adet");

malzeme = ComboBox.GetItemData("malzemeturu",ComboBox.GetSelected("malzemeturu"));
bicim = ComboBox.GetItemText("malzemecinsi", ComboBox.GetSelected("malzemecinsi"));

if bicim == "YUVARLAK" then
sonuc=3,14*( discap* discap )/4* uzunluk *adet*malzeme

elseif bicim == "DORTGEN" then
sonuc=discap*iccap*uzunluk*adet*malzeme

elseif bicim == "BORU" then
sonuc=3,14*( discap*discap )/4* uzunluk - 3,14*( iccap * iccap )/4* uzunluk *adet*malzeme

elseif bicim == "ALTIGEN" then
sonuc=0,866* discap* discap* uzunluk *adet*malzeme

end
Input.SetText("toplam", sonuc)

[/codebox]

[img]http://b1112.hizliresim.com/s/g/135u9.jpg[/img]

Proje Dosyası ;

[code]http://www.multiupload.com/S3GQG84HSE[/code]

Not : Verdiğin kodlara iccap = Input.GetText("iccap"); kısımını ekledim , ComboBox data degerlerinide girdim.

Edited by dragon3781
Link to comment
Share on other sites

ReaLyMaN

Elimdeki verilerin bulundugu excell ile AMS verileri neden farklı çıkıyor olabilir acaba ?

Orjınal Tablo .xls ;

[code]http://www.multiupload.com/TFQFP64700[/code]

.apz çalışma ;

[code]http://www.multiupload.com/LWO4WAIK15[/code]

AMS Degerlerin sonuclarını yuvarlama yaparakmı verıyor .

Link to comment
Share on other sites

Bu kodlarda bir sorun varmı..

ComboBox menusunden yapılan her secımde Inputların bazıları aktif - bazıları deaktif olmalı.


[code]
discap = Input.GetText("discap");
iccap = Input.GetText("iccap");
uzunluk = Input.GetText("uzunluk");
adet = Input.GetText("adet");
malzeme = String.ToNumber(ComboBox.GetItemData("tur",ComboBox.GetSelected("tur")));
bicim = ComboBox.GetItemData("malzemecinsi", ComboBox.GetSelected("malzemecinsi"));


bicim = "1" if
Input.SetEnabled("iccap", false) then
Input.SetEnabled("adet", true)
Input.SetEnabled("discap", true)
Input.SetEnabled("uzunluk", true)

bicim = "2" if
Input.SetEnabled("iccap", true) then
Input.SetEnabled("adet", true)
Input.SetEnabled("discap", true)
Input.SetEnabled("uzunluk", true)

bicim = "3" if
Input.SetEnabled("iccap", false) then
Input.SetEnabled("adet", true)
Input.SetEnabled("discap", true)
Input.SetEnabled("uzunluk", true)

bicim = "4" if
Input.SetEnabled("iccap", false) then
Input.SetEnabled("adet", true)
Input.SetEnabled("discap", true)
Input.SetEnabled("uzunluk", true)


end
end
end
end
[/code]

Link to comment
Share on other sites

ilki if [color="#FF0000"]koşul[/color] then diğerleri else if [color="#FF0000"]koşul[/color] then şeklinde olmalı.

[spoiler][codebox]discap = Input.GetText("discap");

iccap = Input.GetText("iccap");

uzunluk = Input.GetText("uzunluk");

adet = Input.GetText("adet");

malzeme = String.ToNumber(ComboBox.GetItemData("tur",ComboBox.GetSelected("tur")));

bicim = ComboBox.GetItemData("malzemecinsi", ComboBox.GetSelected("malzemecinsi"));





if bicim = "1" then

Input.SetEnabled("iccap", false) then

Input.SetEnabled("adet", true)

Input.SetEnabled("discap", true)

Input.SetEnabled("uzunluk", true)



else if bicim = "2" then

Input.SetEnabled("iccap", true) then

Input.SetEnabled("adet", true)

Input.SetEnabled("discap", true)

Input.SetEnabled("uzunluk", true)



else if bicim = "3" then

Input.SetEnabled("iccap", false) then

Input.SetEnabled("adet", true)

Input.SetEnabled("discap", true)

Input.SetEnabled("uzunluk", true)



else if bicim = "4" then

Input.SetEnabled("iccap", false) then

Input.SetEnabled("adet", true)

Input.SetEnabled("discap", true)

Input.SetEnabled("uzunluk", true)





end

end

end

end[/codebox][/spoiler]

Edited by ReaLyMaN
Link to comment
Share on other sites

ReaLyMaN ;

Kodu ComboBox " On Select " kısmına yazdım ama her secımde aynı fonksıyon , verdigım komut olmuyor ılk bastakı ınputların gorevlerı hepsınde oluyor .

Kısacası her secım ıcın ayrı ınput ( enable , disable ) tanımlayamıyorum.


Not : Kodlardakı Input Bos ıse eger Dıalog message ,.... dolayı olmasın ..olabilirmi ?

Edited by dragon3781
Link to comment
Share on other sites

[quote name='dragon3781' date='15 December 2011 - 12:58 ' timestamp='1323946708' post='1129433']
AMS onadalık değerleri düzgün toplayamıyormu acaba ?

0,0000008 * 0,0000007 gibi değerleri , bu gibi değerler için ayrı bir kodamı gerek var yoksa .


Bu konuda bilen arkadaslar yardımcı olurlarsa sevinirim.
[/quote]
[b]Virgül kullanmayacaksınız nokta kullanacaksınız;[/b]

[quote]0[color=red][b].[/b][/color]0000008[/quote]

Link to comment
Share on other sites

[quote name='pilgetir' date='15 December 2011 - 14:08 ' timestamp='1323958111' post='1129546']
[b]Virgül kullanmayacaksınız nokta kullanacaksınız;[/b]
[/quote]


Pardon virgül koymusum örnek olarak ama projede zaten nokta olarak işlendi kodlara.

Küsüratlı değerleri toplayamıyor nedense AMS yada ben hata yapıyorum bir yerlerde.

Link to comment
Share on other sites

[size="3"][font="Times New Roman"]Şimdi windows hesap makinesinde [color=red]0.0000008 + 0.0000007 [/color]sayılarını topladığımda çıkan sonuç [color=red][b]0,0000015[/b][/color] ams yapısında ise topladığımda çıkan sonuç [color=red][b]1.5e-006[/b][/color] windows hesap makinesinde son iki hanesi 15 çıkmıştı amsdekinde ise 1.5 diye çıkmışttı senin yapacağın 1 ile 5 arasındaki noktayı yok saymak ve 15 gibi okumak 006 bölümüne gelince 6 adet sıfır koyacağını söylüyor öncesine tek çözümü bu gibi görünüyor çok uğraştım çünki[/font][/size]

Edited by pilgetir
Link to comment
Share on other sites

[quote name='pilgetir' date='15 December 2011 - 15:31 ' timestamp='1323963110' post='1129605']
[size="3"][font="Times New Roman"]Şimdi windows hesap makinesinde [color=red]0.0000008 + 0.0000007 [/color]sayılarını topladığımda çıkan sonuç [color=red][b]0,0000015[/b][/color] ams yapısında ise topladığımda çıkan sonuç [color=red][b]1.5e-006[/b][/color] windows hesap makinesinde son iki hanesi 15 çıkmıştı amsdekinde ise 1.5 diye çıkmışttı senin yapacağın 1 ile 5 arasındaki noktayı yok saymak ve 15 gibi okumak 006 bölümüne gelince 6 adet sıfır koyacağını söylüyor öncesine tek çözümü bu gibi görünüyor çok uğraştım çünki[/font][/size]
[/quote]


Merhaba ;

Farklı bir yöntem deniyecegim ;

Ağırlık hesabında kullanılan formul ve oranları degıstırerek denıyecegım

0.0000000070 değilde 0.70 olarak artı formullemede degısecek ozaman

Desimetreküp milimetrekare ye çevirilecek .

Evde pc olmadıgında dolayı yarın işyerinde deneyerek sonucun olumlu olumsuz oldugunu bildirecegim.

Diğer türlü bahsettiğin sekilde yanıltabilir ufak degerlerde mecburen nokta olacagından dolayı noktayı onlarda yok sayarsak bu sefer malıyette yanıltır benı , oda işyerinde maliyet hesaplamada sıkıntı çıkartır.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...