Algoritma menu Blasting Konya
C.2. Algoritma menu Blasting Konya
Form Rancangan peledakan merupakan form inti dari perangkat lunak, form ini dibagi menjadi dua, yaitu : Form Blasting Ash dan Form Blasting Konya. Langkah – langkah pembuatan menu blasting ash adalah sebagai berikut :
1. Buat project baru pada Visual Basic 6.0 kemudian pilih Standard.exe
2. Tambahkan 2 buah control Timer dan 2 buah SSTab
3. Kemudian tambahkan ke Form, 89 buah Label, 89 buah TextBox, 4 buah CommandButton , 4 buah ComboBox, 2 buah Image, 1 buah Picture dan 1 buah control OLE.
4. Selanjutnya implementasikan Source Code Berikut ini : Private Sub Command1_Click()
Form3.Show Unload Me
End Sub Private Sub Combo1_Click() If Combo1.Text = "Diorite" Then Text88.Text = "2.75" ElseIf Combo1.Text = "Gabbro" Then Text88.Text = "3" ElseIf Combo1.Text = "Granite" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Andesite" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Basalt" Then Text88.Text = "2.8" ElseIf Combo1.Text = "Rhyolite" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Trchyte" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Conglomerate" Then Text88.Text = "2.6" ElseIf Combo1.Text = "Sandstone" Then Text88.Text = "2.5"
ElseIf Combo1.Text = "Shalc" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Dolomite" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Limestone" Then Text88.Text = "2.6" ElseIf Combo1.Text = "Limerock" Then Text88.Text = "2" ElseIf Combo1.Text = "Gneiss" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Marble" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Quartzite" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Schist" Then Text88.Text = "2.7" ElseIf Combo1.Text = "Serpentine" Then Text88.Text = "2.6" ElseIf Combo1.Text = "Slate" Then Text88.Text = "2.7" End If End Sub
Private Sub Combo2_Click() If Combo2.Text = "ANFO" Then Text2.Text = "0.85"
Text15.Text = "100" ElseIf Combo2.Text = "HEAVY ANFO" Then Text2.Text = "1.15" Text15.Text = "89" ElseIf Combo2.Text = "POWERGEL COAL" Then Text2.Text = "1.2" Text15.Text = "180" ElseIf Combo2.Text = "POWERGEL BUSTER" Then Text2.Text = "1.25" Text15.Text = "158" ElseIf Combo2.Text = "EMULSION BLEND" Then Text88.Text = "3" End If End Sub
Private Sub Combo3_Click() If Combo3.Text = "TEGAK" Then Text36.Text = "90" End If End Sub
Private Sub Combo4_Click() If Combo4.Text = "SERENTAK" Then S = (L + (2 * Bc)) / 3 ElseIf Combo4.Text = "BERUNTUN" Then S = (L + (7 * Bc)) / 8 End If End Sub
Private Sub Command10_Click() SSTab2.Visible = True End Sub
Private Sub Command12_Click() With Chart
On Error Resume Next .chartType = VtChChartType2dLine .AllowSelections = False .ColumnCount = 1 .RowCount = 5 .Row = 1 .RowLabel = "R20" .Data = Str(Text19.Text) .Row = 2 .RowLabel = "R40" .Data = Str(Text20.Text) .Row = 3 .RowLabel = "R60" .Data = Str(Text21.Text) .Row = 4 .RowLabel = "R80" .Data = Str(Text50.Text) .Row = 5 .RowLabel = "R100" .Data = Str(Text78.Text)
End With End Sub
Private Sub Command2_Click() SSTab1.Visible = True SSTab3.Visible = False End Sub
Private Sub Command3_Click() Form7.Show End Sub
Private Sub Command4_Click() frmAbout.Show End Sub
Private Sub Command8_Click() Form8.Show End Sub
Private Sub Form_Load() Timer2.Interval = 35
VScroll2.Max = Picture2.Height VScroll2.Min = 0 - Text77.Height VScroll2.Value = VScroll2.Max Form2.Top = Form2.Height * -1
Form2.Left = (Screen.Width - Form2.Width) / 2 posTengah = (Screen.Height - Form2.Height) / 2 Form2.Timer1.Interval = 50 End Sub
Private Sub Timer1_Timer() If Me.Top < posTengah Then
Me.Top = Me.Top + ((posTengah - Me.Top) / 2) Else Me.Top = posTengah Me.Timer1.Interval = 0
End If End Sub
Private Sub Timer2_Timer() If VScroll2.Value >= VScroll2.Min + 20 Then VScroll2.Value = VScroll2.Value - 30 Else VScroll2.Value = VScroll2.Max
DoEvents End If
Text77.Top = VScroll2.Value Text77.Visible = True
DoEvents End Sub
Private Sub Command14_Click() On Error Resume Next Dim RMD, JPS, JPO, SGI, HD, IP, FB, EXPLO As Single
RMD = Val(Text99.Text) JPS = Val(Text100.Text) JPO = Val(Text101.Text) SGI = Val(Text102.Text) HD = Val(Text103.Text) IP = Val(Text96.Text) FB = Val(Text97.Text) IP = 0.5 * (RMD + JPS + JPO + SGI + HD) FB = IP * 0.12 Text96.Text = Str(IP) Text97.Text = Str(FB) Text70.Text = Str(FB) End Sub
Private Sub Command9_Click() SSTab3.Visible = True On Error Resume Next Dim DL, SGe, Stv, Kr, Kd, Ks, L, L1, P1, TR, TH, B1, B2, B3, B4, B5, Bc, Bap, S, S1, T, SZ, J, H, PC, TJ, E, EN, de, TR1, TH1, V, V1, PF, RF, Q, RWS, den, A, W,
X, N, N4, R1, Xc, R20, R20M, R40, R40M, R60, R60M, R80, R80M, R100, R100M, IC, IR, TETAF, TETAC, QANFO, R, N3, SIGMA, Kf, RHO, C, P, PO, D, Q1, JBP, VB, DP, HR, PP, SP, SPTH, SPHR, Drb, AL, PB, PPH, JP As Single DL = Val(Text1.Text) SGe = Val(Text2.Text) Stv = Val(Text4.Text) Kr = Val(Text5.Text) Kd = Val(Text6.Text) Ks = Val(Text7.Text) TR = Val(Text8.Text) L = Val(Text9.Text) TH = Val(Text10.Text) RF = Val(Text12.Text) Q = Val(Text14.Text) RWS = Val(Text15.Text) den = Val(Text16.Text)
A = Val(Text17.Text) W = Val(Text18.Text) IC = Val(Text22.Text) IR = Val(Text23.Text) TETAC = Val(Text25.Text) QANFO = Val(Text26.Text) R = Val(Text27.Text) R1 = Val(Text85.Text) N3 = Val(Text28.Text) EM = Val(Text29.Text) Kf = Val(Text30.Text) DS = Val(Text65.Text)
C = Val(Text74.Text) P = Val(Text31.Text) PO = Val(Text32.Text)
D = Val(Text33.Text) JBP = Val(Text37.Text) JP = Val(Text82.Text) VB = Val(Text38.Text) DP = Val(Text36.Text) HR = Val(Text54.Text) PP = Val(Text51.Text) SP = Val(Text76.Text) Drb = Val(Text88.Text) AL = Val(Text36.Text) B1 = (3.15 * DL * (SGe / Drb) ^ 0.33) * 0.3048 B2 = (((2 * SGe / Drb) + 1.5) * DL) * 0.3048 B3 = (0.67 * DL * (Stv / Drb) ^ 0.33) * 0.3048 B4 = (B1 + B2 + B3) / 3 Bc = B4 * Kr * Kd * Ks B5 = Bc Bap = Bc / (Sin(AL / (180 / (22 / 7)))) If Combo4.Text = "SERENTAK" Then S = (L + (2 * Bc)) / 3 ElseIf Combo4.Text = "BERUNTUN" Then S = (L + (7 * Bc)) / 8 End If S1 = S L1 = L T = (0.7 * Bc) SZ = 0.05 * DL * 0.0254 J = (0.3 * Bc)
H = (L + J) / (Sin(AL / (180 / (22 / 7)))) PC = H - T
de = 0.508 * SGe * ((DL) ^ 2) PB = SP * (100 / (100 - P) PPH = PB / JP SPTH = PB * 12 SPHR = SPTH / HR
E = PC * de QANFO = E P1 = PPH / (R1 * Bc * L * Drb) N4 = R1 * (P1 / S1) EN = PC * de * N4 V1 = Bc * S * L VT = Bc * S * L * N4 TH1 = TH * S TR1 = TR * Bc PF = EN / VT
Q=E
X = RF * ((V1 / E) ^ 0.8) * (E ^ 0.167) * (RWS / 115) ^ -0.63 N = (2.2 - (14 * (Bc / (TETAC * 25.4)))) * (1 - (W / Bc)) * (1 + (((S / Bc) - 1) / 2)) * (PC / L) Xc = X / (0.693 ^ (1 / N)) R20 = (2.719 ^ (-((20 / Xc) ^ (N)))) * 100 R20M = 100 - R20 R40 = (2.719 ^ (-((40 / Xc) ^ (N)))) * 100 R40M = 100 - R40 R60 = (2.719 ^ (-((60 / Xc) ^ (N)))) * 100 R60M = 100 - R60 R80 = (2.719 ^ (-((80 / Xc) ^ (N)))) * 100 R80M = 100 - R80 R100 = (2.719 ^ (-((100 / Xc) ^ (N)))) * 100 R100M = 100 - R100 N1 = 1 - ((IC - IR) ^ 2 / (IC + IR) ^ 2) N2 = 1 / ((2.27 ^ (DL / TETAC)) - (2.27 - 1))
V = (((QANFO) ^ 0.5) / R) * (((N1 * N2 * N3 * EM * (1000000)) / (5 * Kf * ((Log(R)) / (Log(10))) * 3.14 * DS * C)) ^ 0.5) * 1000
F = (Kf * Log(R) / Log(10)) ^ -1 SC = E / V1 LMax = 50 * DL Tb = 0.1 * (DL ^ 0.6666667) SD = D / (QANFO ^ 0.33333333) NP = Bc / (QANFO ^ 0.33333333) Db = (20) * ((Log(P / PO)) / Log(10)) Text39.Text = CSng(B1) Text39.Text = FormatNumber(Text39, 2) Text40.Text = CSng(B2) Text40.Text = FormatNumber(Text40, 2) Text41.Text = CSng(B3) Text41.Text = FormatNumber(Text41, 2) Text42.Text = CSng(B4) Text42.Text = FormatNumber(Text42, 1) Text43.Text = CSng(Bc) Text43.Text = FormatNumber(Text43, 1) Text34.Text = CSng(Bap) Text34.Text = FormatNumber(Text34, 1) Text79.Text = Str(B5) Text79.Text = FormatNumber(Text79, 2) Text44.Text = CSng(S) Text44.Text = FormatNumber(Text44, 1) Text83.Text = Str(S1) Text83.Text = FormatNumber(Text83, 1) Text89.Text = Str(L1) Text89.Text = FormatNumber(Text89, 1) Text93.Text = CSng(P1)
Text93.Text = FormatNumber(Text93, 1) Text95.Text = CInt(N4) Text95.Text = FormatNumber(Text95, 2) Text45.Text = CSng(T) Text45.Text = FormatNumber(Text45, 1) Text46.Text = CSng(SZ) Text46.Text = FormatNumber(Text46, 3) Text47.Text = CSng(J) Text47.Text = FormatNumber(Text47, 1) Text48.Text = CSng(H) Text48.Text = FormatNumber(Text48, 1) Text49.Text = CSng(PC) Text49.Text = FormatNumber(Text49, 1) Text13.Text = CSng(TR1) Text13.Text = FormatNumber(Text13, 1) Text52.Text = CSng(EN) Text52.Text = FormatNumber(Text52, 2) Text37.Text = CSng(E) Text37.Text = FormatNumber(Text37, 2) Text53.Text = CSng(TH1) Text53.Text = FormatNumber(Text53, 1) Text75.Text = CSng(de) Text75.Text = FormatNumber(Text75, 1) Text11.Text = CSng(PF) Text11.Text = FormatNumber(Text11, 2) Text66.Text = CSng(X) Text66.Text = FormatNumber(Text66, 2) Text67.Text = CSng(N) Text67.Text = FormatNumber(Text67, 2) Text14.Text = CSng(Q) Text14.Text = FormatNumber(Text14, 2) Text26.Text = CSng(QANFO) Text26.Text = FormatNumber(Text26, 2) Text68.Text = CSng(Xc) Text68.Text = FormatNumber(Text68, 2) Text69.Text = CSng(R20) Text69.Text = FormatNumber(Text69, 2) Text19.Text = CSng(R20M) Text19.Text = FormatNumber(Text19, 2) Text70.Text = CSng(R40) Text70.Text = FormatNumber(Text70, 2) Text20.Text = CSng(R40M) Text20.Text = FormatNumber(Text20, 2) Text71.Text = CSng(R60) Text71.Text = FormatNumber(Text71, 2) Text21.Text = CSng(R60M) Text21.Text = FormatNumber(Text21, 2)
Text72.Text = CSng(R80) Text72.Text = FormatNumber(Text72, 2) Text50.Text = CSng(R80M) Text50.Text = FormatNumber(Text50, 2) Text73.Text = CSng(R100) Text73.Text = FormatNumber(Text73, 2) Text78.Text = CSng(R100M) Text78.Text = FormatNumber(Text78, 2) Text55.Text = CSng(N1) Text55.Text = FormatNumber(Text55, 2) Text56.Text = CSng(N2) Text57.Text = CSng(V) Text57.Text = FormatNumber(Text57, 2) Text94.Text = CSng(VT) Text94.Text = FormatNumber(Text94, 2) Text38.Text = CSng(V1) Text38.Text = FormatNumber(Text38, 2) Text58.Text = CSng(F) Text58.Text = FormatNumber(Text58, 2) Text59.Text = CSng(SC) Text59.Text = FormatNumber(Text59, 2) Text60.Text = CSng(LMax) Text61.Text = CSng(Tb) Text61.Text = FormatNumber(Text61, 2) Text62.Text = CSng(SD) Text62.Text = FormatNumber(Text62, 2) Text63.Text = CSng(NP) Text63.Text = FormatNumber(Text63, 2) Text64.Text = CSng(Db) Text64.Text = FormatNumber(Text64, 2) Text80.Text = CSng(PB) Text81.Text = CSng(PPH) Text86.Text = CSng(SPTH) Text87.Text = CSng(SPHR) End Sub
Private Sub Picture6_Paint() Dim N4 As Single N4 = Val(Text85.Text) If Text85.Text = "7" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000
Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Picture6.Circle (i + 200, 2400), 100, vbBlue Picture6.Circle (i + 800, 3000), 100, vbBlue Picture6.Circle (i + 200, 3600), 100, vbBlue Picture6.Circle (i + 800, 4200), 100, vbBlue
Picture6.Circle (i + 200, 4800), 100, vbBlue Next i
ElseIf Text85.Text = "2" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000 Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Next i
ElseIf Text85.Text = "3" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000 Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Picture6.Circle (i + 200, 2400), 100, vbBlue Next i
ElseIf Text85.Text = "4" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000 Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Picture6.Circle (i + 200, 2400), 100, vbBlue Picture6.Circle (i + 800, 3000), 100, vbBlue Next i
ElseIf Text85.Text = "5" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000 Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Picture6.Circle (i + 200, 2400), 100, vbBlue Picture6.Circle (i + 800, 3000), 100, vbBlue Picture6.Circle (i + 200, 3600), 100, vbBlue Next i
ElseIf Text85.Text = "6" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000 Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Picture6.Circle (i + 200, 2400), 100, vbBlue Picture6.Circle (i + 800, 3000), 100, vbBlue Picture6.Circle (i + 200, 3600), 100, vbBlue Picture6.Circle (i + 800, 4200), 100, vbBlue Next i
ElseIf Text85.Text = "8" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000 Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Picture6.Circle (i + 200, 2400), 100, vbBlue Picture6.Circle (i + 800, 3000), 100, vbBlue Picture6.Circle (i + 200, 3600), 100, vbBlue Picture6.Circle (i + 800, 4200), 100, vbBlue Picture6.Circle (i + 200, 4800), 100, vbBlue Picture6.Circle (i + 200, 5600), 100, vbBlue
Next i ElseIf Text85.Text = "9" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000 Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Picture6.Circle (i + 200, 2400), 100, vbBlue Picture6.Circle (i + 800, 3000), 100, vbBlue Picture6.Circle (i + 200, 3600), 100, vbBlue Picture6.Circle (i + 800, 4200), 100, vbBlue Picture6.Circle (i + 200, 4800), 100, vbBlue Picture6.Circle (i + 200, 5600), 100, vbBlue Picture6.Circle (i + 200, 6200), 100, vbBlue Next i
ElseIf Text85.Text = "10" Then For i = 1000 To (Text95.Text * 1000 / Text85.Text) Step 1000 Picture6.Circle (i + 200, 1200), 100, vbBlue Picture6.Circle (i + 800, 1800), 100, vbBlue Picture6.Circle (i + 200, 2400), 100, vbBlue Picture6.Circle (i + 800, 3000), 100, vbBlue Picture6.Circle (i + 200, 3600), 100, vbBlue Picture6.Circle (i + 800, 4200), 100, vbBlue Picture6.Circle (i + 200, 4800), 100, vbBlue Picture6.Circle (i + 200, 5600), 100, vbBlue Picture6.Circle (i + 200, 6200), 100, vbBlue Picture6.Circle (i + 200, 6800), 100, vbBlue Next i End If
End Sub