|
| Tutorial Arm Servo Robot | |
| | Pengirim | Message |
---|
CROZZYE Top Nubie
Jumlah posting : 47 Points : 119 Reputation : 2 Join date : 24.08.11
| Subyek: Tutorial Arm Servo Robot Wed Aug 24, 2011 7:11 pm | |
| Mohon Bimbingannya.... Sukses terus buat BC... dah salam kenal ya om" BC semua... Asyik ada sub forum robotic Kerennnn salut buat Momodnya... First post bagi ane nih... klo ada salah" harap maklum...hmmhmm dulu buat ini ane stress banget... Arm Servo Robot:- Spoiler:
[You must be registered and logged in to see this image.]
Arm Servo Robot adalah salah satu bentuk manipulator industri dengan geometri anthropomorphic (menyerupai tangan manusia). Robot ini berfungsi sebagai pemindah benda dari posisi satu ke posisi lain. Dengan 5 sumbu gerak dan satu gripper sebagai end-effector-nya membuat robot ini sangat tepat untuk pelatihan teknologi kontrol, implementasi elektronika (mekatronika), pemrograman dan otomasi industri. Kelima sumbu gerak itu adalah: waist(joint1), shoulder(joint2), elbow(Join3), pitch(joint4), roll(joint5) dimana untuk joint 4 dan 5 diberi nama Wrist. Pada robot ini satu joint berputar sebesar 45derajat (Joint-2), dua joint berptar sebesar 90derajat (joint-3, joint-4) dan dua joint berputar sebesar 180derajat ( Joint-1 dan Joint-5 ). Robot ini dikendalikan oleh komputer dan mikrokontroller yang berkomunikasi secara serial. Mikrokontroller yang digunakan adalah jenis PIC dengan seri 16F877A dan disupport dengan kristal 20Mhz. Gerakan posisi pada robot ini menggunakan tenaga motor servo sebagai actuatornya, dan gripper sebagai end effectornya. BAGIAN UTAMA ROBOTRobot ini bekerja dengan sistem koordinat sebagai acuannya dimana koordinatnya dapat ditentukan dari komputer maupun dari remote. Perangkat lunak (software) untuk menggontrol robot ini adalah Visual Basic 6.0. Komputer akan berkomunikasi secara serial dengan mikrokontroller untuk menjalankan robot. Mikrokontroller pada sistem ini digunakan untuk mengontrol sistem kerja motor servo. Sistem alat ini juga dilengkapi dengan rangkaian mekanik, rangkaian elektronika , rangkaian mikrokontroler, software Visual Basic 6.0, dan remote. Diagram kerjaSistem Pergerakan - Gambar menunjukan bahwa PIC 16F877A mengatur keseluruhan system pergerakan Arm Servo Robot dimana proses pergerakan robot dilakukan menggunakan sebuah komputer atau bisa melalui remote dimana keduanya akan berperan terhadap pergerakan axis robot. Jika tombol save ditekan dari komputer atau remote maka setiap posisi pergerakan dari robot akan tersimpan kedalam database pada Visual Basic 6.0 yang terkolaborasi dengan Microsoft Office Access 2007. Setiap posisi yang telah di simpan dalam data base menjadi acuan pergerakan robot sesuai dengan program input yang dimasukkan dalam visual basic. Robot akan bergerak pada posisi awal terlebih dahulu, lalu bergerak pada posisi – posisinya sesuai dengan program input yang telah diberikan. Bagian GripperCara kerja singkat: Saat motor servo berputar (misal: searah jarum jam), maka akan mengakibatkan lengan pencekam dapat menutup. Dan begitupula sebaliknya. Dimana motor memutar gear yang bersinggungan langsung dengan gigi pencekam. Konveyor1. Motor DC 2. Belt 3. Roller AktuatorUntuk kelima sumbu gerak dan satu gripper sebagai end-effector-nya seluruhnya menggunakan motor servo. Sedangkan untuk konveyor menggunakan motor dc. Motor RC Servo HS-322HD Servo adalah sebuah system kendali otomatis yang dipakai untuk mengatur kecepatan sebuah motor dc. Servo menggunakan sistem umpan balik. Sensor untuk mendeteksi putaran motor terhubung ke rangkaian umpan balik ini, lalu sistem akan menghitung besarnya kesalahan dan memutuskan untuk mempercepat atau memperlambat putaran motor. Catu Daya Rangkaian PIC dan Sensor TV menggunakan catu daya yang diambil dari komputer menggunakan USB. Catu daya 5V / 5A – 8A sebagai sumber untuk motor servo Catu daya 12V/ 1A – 5A sebagai sumber untuk menggerakan motor DC Sensor TV Transmitter Receiver Sensor Receiver Kontroller Menggunakan mikrokontroller PIC 16F877A. nih program di microcontoller nya (PIC 16F877A) ya.. ane pake "PiC basic "disambungin kabel rs232 serial..: - Code:
-
TRISC.0 = 1 'PortC.0 sebagai input LOW PORTA.1 LOW PORTA.0 LCD_DTPIN = PORTD.4 LCD_RSPIN = PORTC.4 LCD_ENPIN = PORTC.5 LCD_INTERFACE = 4 ' 4-bit Interface LCD_LINES = 2 LCD_TYPE = 0 HSERIAL_BAUD = 9600 HSERIAL_RCSTA = %10010000 HSERIAL_TXSTA = %00100100 HSERIAL_CLEAR = ON all_digital=true DIM POS AS WORD ' Servo Position DIM POS1 AS WORD ' Servo Position DIM POS2 AS WORD ' Servo Position DIM POS3 AS WORD ' Servo Position DIM POS4 AS WORD ' Servo Position DIM POS5 AS WORD ' Servo Position dim time[4] as word SYMBOL PIN = PORTB.2 SYMBOL PIN1 = PORTB.3 SYMBOL PIN2 = PORTB.4 SYMBOL PIN3 = PORTB.5 SYMBOL PIN4 = PORTB.6 SYMBOL PIN5 = PORTB.7 POS = 2400 POS1 =2400 POS2 =2400 pos3=2400 pos4=2400 pos5=600 delayms 500
main: IF PORTd.2 = 1 Then ‘portD high ke VB gosub VB else IF PORTD.2=0 THEN ‘portD low ke remote gosub remote end if goto main
VB: PORTA.1 = 1 PORTA.0 = 0 waist: HSERIN 10, waist1,[WAIT( "0A" )] if pos < 600 then pos=pos+10 if pos > 600 then pos=pos-10 if pos = 600 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist
waist1: HSERIN 10, waist2,[WAIT( "1A" )] if pos < 800 then pos=pos+10 if pos > 800 then pos=pos-10 if pos = 800 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist1
waist2: HSERIN 10, waist3,[WAIT( "2A" )] if pos < 1000 then pos=pos+10 if pos > 1000 then pos=pos-10 if pos = 1000 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist2
waist3: HSERIN 10, waist4,[WAIT( "3A" )] if pos < 1200 then pos=pos+10 if pos > 1200 then pos=pos-10 if pos = 1200 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist3
waist4: HSERIN 10, waist5,[WAIT( "4A" )] if pos < 1400 then pos=pos+10 if pos > 1400 then pos=pos-10 if pos = 1400 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist4
waist5: HSERIN 10, waist6,[WAIT( "5A" )] if pos < 1600 then pos=pos+10 if pos > 1600 then pos=pos-10 if pos = 1600 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist5
waist6: HSERIN 10, waist7,[WAIT( "6A" )] if pos < 1800 then pos=pos+10 if pos > 1800 then pos=pos-10 if pos = 1800 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist6
waist7: HSERIN 10, waist8,[WAIT( "7A" )] if pos < 2000 then pos=pos+10 if pos > 2000 then pos=pos-10 if pos = 2000 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist7
waist8: HSERIN 10, waist9,[WAIT( "8A" )] if pos < 2200 then pos=pos+10 if pos > 2200 then pos=pos-10 if pos = 2200 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist8
waist9: HSERIN 10,shoulder,[WAIT( "9A" )] if pos < 2400 then pos=pos+10 if pos > 2400 then pos=pos-10 if pos = 2400 then hserout["pos",13] end if SERVO PIN , Pos delayms 5 goto waist9
shoulder: HSERIN 10, shoulder1,[WAIT( "0B" )] if pos1 < 600 then pos1=pos1+10 if pos1 > 600 then pos1=pos1-10 if pos1 = 600 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder
shoulder1: HSERIN 10, shoulder2,[WAIT( "1B" )] if pos1 < 800 then pos1=pos1+10 if pos1 > 800 then pos1=pos1-10 if pos1 = 800 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder1
shoulder2: HSERIN 10, shoulder3,[WAIT( "2B" )] if pos1 < 1000 then pos1=pos1+10 if pos1 > 1000 then pos1=pos1-10 if pos1 = 1000 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder2
shoulder3: HSERIN 10, shoulder4,[WAIT( "3B" )] if pos1 < 1200 then pos1=pos1+10 if pos1 > 1200 then pos1=pos1-10 if pos1 = 1200 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder3
shoulder4: HSERIN 10, shoulder5,[WAIT( "4B" )] if pos1 < 1400 then pos1=pos1+10 if pos1 > 1400 then pos1=pos1-10 if pos1 = 1400 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder4
shoulder5: HSERIN 10, shoulder6,[WAIT( "5B" )] if pos1 < 1600 then pos1=pos1+10 if pos1 > 1600 then pos1=pos1-10 if pos1 = 1600 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder5
shoulder6: HSERIN 10, shoulder7,[WAIT( "6B" )] if pos1 < 1800 then pos1=pos1+10 if pos1 > 1800 then pos1=pos1-10 if pos1 = 1800 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder6
shoulder7: HSERIN 10, shoulder8,[WAIT( "7B" )] if pos1 < 2000 then pos1=pos1+10 if pos1 > 2000 then pos1=pos1-10 if pos1 = 2000 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder7
shoulder8: HSERIN 10, shoulder9,[WAIT( "8B" )] if pos1 < 2200 then pos1=pos1+10 if pos1 > 2200 then pos1=pos1-10 if pos1 = 2200 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder8
shoulder9: HSERIN 10,elbow,[WAIT( "9B" )] if pos1 < 2400 then pos1=pos1+10 if pos1 > 2400 then pos1=pos1-10 if pos1 = 2400 then hserout ["pos1",13] end if servo pin1,pos1 delayms 5 GOTO shoulder9
elbow: HSERIN 10, elbow1,[WAIT( "0C" )] if pos2 < 600 then pos2=pos2+10 if pos2 > 600 then pos2=pos2-10 if pos2 = 600 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow
elbow1: HSERIN 10, elbow2,[WAIT( "1C" )] if pos2 < 800 then pos2=pos2+10 if pos2 > 800 then pos2=pos2-10 if pos2 = 800 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow1
elbow2: HSERIN 10, elbow3,[WAIT( "2C" )] if pos2 < 1000 then pos2=pos2+10 if pos2 > 1000 then pos2=pos2-10 if pos2 = 1000 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow2
elbow3: HSERIN 10, elbow4,[WAIT( "3C" )] if pos2 < 1200 then pos2=pos2+10 if pos2 > 1200 then pos2=pos2-10 if pos2 = 1200 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow3
elbow4: HSERIN 10, elbow5,[WAIT( "4C" )] if pos2 < 1400 then pos2=pos2+10 if pos2 > 1400 then pos2=pos2-10 if pos2 = 1400 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow4
elbow5: HSERIN 10, elbow6,[WAIT( "5C" )] if pos2 < 1600 then pos2=pos2+10 if pos2 > 1600 then pos2=pos2-10 if pos2 = 1600 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow5
elbow6: HSERIN 10, elbow7,[WAIT( "6C" )] if pos2 < 1800 then pos2=pos2+10 if pos2 > 1800 then pos2=pos2-10 if pos2 = 1800 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow6
elbow7: HSERIN 10, elbow8,[WAIT( "7C" )] if pos2 < 2000 then pos2=pos2+10 if pos2 > 2000 then pos2=pos2-10 if pos2 = 2000 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow7
elbow8: HSERIN 10, elbow9,[WAIT( "8C" )] if pos2 < 2200 then pos2=pos2+10 if pos2 > 2200 then pos2=pos2-10 if pos2 = 2200 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow8
elbow9: HSERIN 10,pitch,[WAIT( "9C" )] if pos2 < 2400 then pos2=pos2+10 if pos2 > 2400 then pos2=pos2-10 if pos2 = 2400 then hserout ["pos2",13] end if servo pin2,pos2 delayms 5 goto elbow9
pitch: HSERIN 10, pitch1,[WAIT( "0D" )] if pos3 < 1000 then pos3=pos3+10 if pos3 > 1000 then pos3=pos3-10 if pos3 = 1000 then hserout ["pos3",13] end if servo pin3,pos3 delayms 5 GOTO pitch
pitch1: HSERIN 10, pitch2,[WAIT( "1D" )] if pos3 < 1200 then pos3=pos3+10 if pos3 > 1200 then pos3=pos3-10 if pos3 = 1200 then hserout ["pos3",13] end if servo pin3,pos3 delayms 5 GOTO pitch1
pitch2: HSERIN 10, pitch3,[WAIT( "2D" )] if pos3 < 1400 then pos3=pos3+10 if pos3 > 1400 then pos3=pos3-10 if pos3 = 1400 then hserout ["pos3",13] end if servo pin3,pos3 delayms 5 GOTO pitch2
pitch3: HSERIN 10, pitch4,[WAIT( "3D" )] if pos3 < 1600 then pos3=pos3+10 if pos3 > 1600 then pos3=pos3-10 if pos3 = 1600 then hserout ["pos3",13] end if servo pin3,pos3 delayms 5 GOTO pitch3
pitch4: HSERIN 10, pitch5,[WAIT( "4D" )] if pos3 < 1800 then pos3=pos3+10 if pos3 > 1800 then pos3=pos3-10 if pos3 = 1800 then hserout ["pos3",13] end if servo pin3,pos3 delayms 5 GOTO pitch4
pitch5: HSERIN 10, pitch6,[WAIT( "5D" )] if pos3 < 2000 then pos3=pos3+10 if pos3 > 2000 then pos3=pos3-10 if pos3 = 2000 then hserout ["pos3",13] end if servo pin3,pos3 delayms 5 GOTO pitch5
pitch6: HSERIN 10, pitch7,[WAIT( "6D" )] if pos3 < 2200 then pos3=pos3+10 if pos3 > 2200 then pos3=pos3-10 if pos3 = 2200 then hserout ["pos3",13] end if servo pin3,pos3 delayms 5 GOTO pitch6
pitch7: HSERIN 10, roll,[WAIT( "7D" )] if pos3 < 2400 then pos3=pos3+10 if pos3 > 2400 then pos3=pos3-10 if pos3 = 2400 then hserout ["pos3",13] end if servo pin3,pos3 delayms 5 GOTO pitch7
roll: hserin 10, roll1,[WAIT("0E")] if pos4 < 600 then pos4= pos4 + 10 if pos4 > 600 then pos4= pos4 - 10 if pos4 = 600 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll
roll1: hserin 10, roll2,[WAIT("1E")] if pos4 < 800 then pos4= pos4 + 10 if pos4 > 800 then pos4= pos4 - 10 if pos4 = 800 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll1
roll2: hserin 10, roll3,[WAIT("2E")] if pos4 < 1000 then pos4= pos4 + 10 if pos4 > 1000 then pos4= pos4 - 10 if pos4 = 1000 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll2
roll3: hserin 10, roll4,[WAIT("3E")] if pos4 < 1200 then pos4= pos4 + 10 if pos4 > 1200 then pos4= pos4 - 10 if pos4 = 1200 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll3
roll4: hserin 10, roll5,[WAIT("4E")] if pos4 < 1400 then pos4= pos4 + 10 if pos4 > 1400 then pos4= pos4 - 10 if pos4 = 1400 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll4
roll5: hserin 10, roll6,[WAIT("5E")] if pos4 < 1600 then pos4= pos4 + 10 if pos4 > 1600 then pos4= pos4 - 10 if pos4 = 1600 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll5
roll6: hserin 10, roll7,[WAIT("6E")] if pos4 < 1800 then pos4= pos4 + 10 if pos4 > 1800 then pos4= pos4 - 10 if pos4 = 1800 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll6
roll7: hserin 10, roll8,[WAIT("7E")] if pos4 < 2000 then pos4= pos4 + 10 if pos4 > 2000 then pos4= pos4 - 10 if pos4 = 2000 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll8
roll9: hserin 10, roll9,[WAIT("8E")] if pos4 < 2200 then pos4= pos4 + 10 if pos4 > 2200 then pos4= pos4 - 10 if pos4 = 2200 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll8
roll9: hserin 10,gripper,[WAIT("9E")] if pos4 < 2400 then pos4= pos4 + 10 if pos4 > 2400 then pos4= pos4 - 10 if pos4 = 2400 then hserout["pos4",13] end if servo pin4,pos4 delayms 5 goto roll9
gripper: hserin 10, gripper1,[wait("OFF")] if pos5 < 600 then pos5= pos5 + 10 if pos5 > 600 then pos5= pos5 - 10 if pos5 = 600 then hserout["pos5",13] end if servo pin5,pos5 delayms 5 goto gripper
gripper1: hserin 10,WAIST,[wait("ON")] if pos5 < 1000 then pos5= pos5 + 10 if pos5 > 1000 then pos5= pos5 - 10 if pos5 = 1000 then hserout["pos5",13] end if servo pin5,pos5 delayms 5 goto gripper1
RETURN
REMOTE: PORTA.0 = 1 PORTA.1 = 0 repeat time[0]=PULSIN portC.0, 1 UNTIL time[0] > 1000 time[0]=PULSIN portC.0, 0 time[1]=PULSIN portC.0, 0 time[2]=PULSIN portC.0, 0 time[3]=PULSIN portC.0, 0
IF time[3] < 500 AND time[2] < 500 AND time[1] < 500 AND time[0] < 500 THEN ELSE IF time[3] < 500 AND time[2] < 500 AND time[1] < 500 AND time[0] > 500 THEN IF POS1 < 2400 THEN POS1 = POS1 + 200 DELAYMS 3 HSEROUT["B",@Pos1,13] ELSE IF time[3] < 500 AND time[2] < 500 AND time[1] > 500 AND time[0] < 500 THEN IF POS1 > 600 THEN POS1 = POS1 - 200 DELAYMS 3 HSEROUT["B",@Pos1,13] ELSE IF time[3] < 500 AND time[2] < 500 AND time[1] > 500 AND time[0] > 500 THEN IF POS2 < 2400 THEN POS2 = POS2 + 200 DELAYMS 3 HSEROUT["C",@Pos2,13] ELSE IF time[3] < 500 AND time[2] > 500 AND time[1] < 500 AND time[0] < 500 THEN IF POS2 >600 THEN POS2 = POS2 - 200 DELAYMS 3 HSEROUT["C",@Pos2,13] ELSE IF time[3] < 500 AND time[2] > 500 AND time[1] < 500 AND time[0] > 500 THEN IF POS > 600 THEN POS = POS - 200 DELAYMS 3 HSEROUT["A",@Pos,13] ELSE IF time[3] < 500 AND time[2] > 500 AND time[1] > 500 AND time[0] < 500 THEN hserout["SAVED",13] ELSE IF time[3] < 500 AND time[2] > 500 AND time[1] > 500 AND time[0] > 500 THEN IF POS3 < 2400 THEN POS3 = POS3 + 200 DELAYMS 3 HSEROUT["D",@Pos3,13] else IF time[3] > 500 AND time[2] < 500 AND time[1] < 500 AND time[0] < 500 THEN IF POS3 > 600 THEN POS3 = POS3 - 200 DELAYMS 3 HSEROUT["D",@Pos3,13] ELSE IF time[3] > 500 AND time[2] < 500 AND time[1] < 500 AND time[0] > 500 THEN IF POS4 > 600 THEN POS4 = POS4 - 100 DELAYMS 3 HSEROUT["E",@Pos4,13] ELSE IF time[3] > 500 AND time[2] < 500 AND time[1] > 500 AND time[0] < 500 THEN DELAYMS 3 hserout["NSTNG",13] ELSE IF time[3] > 500 AND time[2] < 500 AND time[1] > 500 AND time[0] > 500 THEN IF POS5 < 800 THEN POS5 = POS5 + 200 DELAYMS 3 hserout["ONNNN",13] ELSE IF time[3] > 500 AND time[2] > 500 AND time[1] < 500 AND time[0] < 500 THEN IF POS5 > 600 THEN POS5 = POS5 - 200 DELAYMS 3 hserout["OFFFF",13] ELSE IF time[3] > 500 AND time[2] > 500 AND time[1] < 500 AND time[0] > 500 THEN IF POS4 < 2400 THEN POS4 = POS4 + 100 DELAYMS 3 HSEROUT["E",@Pos1,13] ELSE IF time[3] > 500 AND time[2] > 500 AND time[1] > 500 AND time[0] < 500 THEN ELSE IF time[3] > 500 AND time[2] > 500 AND time[1] > 500 AND time[0] > 500 THEN IF POS < 1700 THEN POS = POS + 200 DELAYMS 3 hserout["A",@Pos,13] end if SERVO PIN , Pos SERVO PIN1, POS1 SERVO PIN2, POS2 SERVO PIN3, POS3 SERVO PIN4, POS4 SERVO PIN5, POS5 delayms 10 RETURN Klo nih program PROGRAM VISUAL BASIC nyee.... - Code:
-
FORM1 Private Sub fk25_Timer() 'timer feedback kirim 25 fb25.Text = Form2.MSComm1.Input If fb25.Text = "pos" Then kirim26.Enabled = True kirim25.Enabled = False fk25.Enabled = False End If End Sub
Private Sub fk26_Timer() 'timer feedback kirim 26 fb26.Text = Form2.MSComm1.Input If fb26.Text = "pos1" Then kirim27.Enabled = True kirim26.Enabled = False fk26.Enabled = False End If End Sub
Private Sub fk27_Timer() 'timer feedback kirim 27 fb27.Text = Form2.MSComm1.Input If fb27.Text = "pos2" Then kirim28.Enabled = True kirim27.Enabled = False fk27.Enabled = False End If End Sub
Private Sub fk28_Timer() 'timer feedback kirim 28 fb28.Text = Form2.MSComm1.Input If fb28.Text = "pos3" Then kirim29.Enabled = True kirim28.Enabled = False fk28.Enabled = False End If End Sub
Private Sub fk29_Timer() 'timer feedback kirim 29 fb29.Text = Form2.MSComm1.Input If fb29.Text = "pos4" Then kirim30.Enabled = True kirim29.Enabled = False fk29.Enabled = False End If End Sub
Private Sub fk30_Timer() 'timer feedback kirim 30 fb30.Text = Form2.MSComm1.Input If fb30.Text = "pos5" Then Form2.Timer6.Enabled = True kirim30.Enabled = False fk30.Enabled = False End If End Sub
Private Sub fk31_Timer() 'timer feedback kirim 31 fb31.Text = Form2.MSComm1.Input If fb31.Text = "pos" Then kirim32.Enabled = True kirim31.Enabled = False fk31.Enabled = False End If End Sub
Private Sub fk32_Timer() 'timer feedback kirim 32 fb32.Text = Form2.MSComm1.Input If fb32.Text = "pos1" Then kirim33.Enabled = True kirim32.Enabled = False fk32.Enabled = False End If End Sub
Private Sub fk33_Timer() 'timer feedback kirim 33 fb33.Text = Form2.MSComm1.Input If fb33.Text = "pos2" Then kirim34.Enabled = True kirim33.Enabled = False fk33.Enabled = False End If End Sub
Private Sub fk34_Timer() 'timer feedback kirim 34 fb34.Text = Form2.MSComm1.Input If fb34.Text = "pos3" Then kirim35.Enabled = True kirim34.Enabled = False fk34.Enabled = False End If End Sub
Private Sub fk35_Timer() 'timer feedback kirim 35 fb35.Text = Form2.MSComm1.Input If fb35.Text = "pos4" Then kirim36.Enabled = True kirim35.Enabled = False fk35.Enabled = False End If End Sub
Private Sub fk36_Timer() 'timer feedback kirim 36 fb36.Text = Form2.MSComm1.Input If fb36.Text = "pos5" Then Form2.Timer7.Enabled = True kirim36.Enabled = False fk36.Enabled = False End If End Sub
Private Sub fk37_Timer() 'timer feedback kirim 37 fb37.Text = Form2.MSComm1.Input If fb37.Text = "pos" Then kirim38.Enabled = True kirim37.Enabled = False fk37.Enabled = False End If End Sub
Private Sub fk38_Timer() 'timer feedback kirim 38 fb38.Text = Form2.MSComm1.Input If fb38.Text = "pos1" Then kirim39.Enabled = True kirim38.Enabled = False fk38.Enabled = False End If End Sub
Private Sub fk39_Timer() 'timer feedback kirim 39 fb39.Text = Form2.MSComm1.Input If fb39.Text = "pos2" Then kirim40.Enabled = True kirim39.Enabled = False fk39.Enabled = False End If End Sub
Private Sub fk40_Timer() 'timer feedback kirim 40 fb40.Text = Form2.MSComm1.Input If fb40.Text = "pos3" Then kirim41.Enabled = True kirim40.Enabled = False fk40.Enabled = False End If End Sub Private Sub fk41_Timer() 'timer feedback kirim 41 fb41.Text = Form2.MSComm1.Input If fb41.Text = "pos4" Then kirim42.Enabled = True kirim41.Enabled = False fk41.Enabled = False End If End Sub
Private Sub fk42_Timer() 'timer feedback kirim 42 fb42.Text = Form2.MSComm1.Input If fb42.Text = "pos5" Then Form2.Timer8.Enabled = True kirim42.Enabled = False fk42.Enabled = False End If End Sub
Private Sub fk43_Timer() 'timer feedback kirim 43 fb43.Text = Form2.MSComm1.Input If fb43.Text = "pos" Then kirim44.Enabled = True kirim43.Enabled = False fk43.Enabled = False End If End Sub
Private Sub fk44_Timer() 'timer feedback kirim 44 fb44.Text = Form2.MSComm1.Input If fb44.Text = "pos1" Then kirim45.Enabled = True kirim44.Enabled = False fk44.Enabled = False End If End Sub
Private Sub fk45_Timer() 'timer feedback kirim 45 fb45.Text = Form2.MSComm1.Input If fb45.Text = "pos2" Then kirim46.Enabled = True kirim45.Enabled = False fk45.Enabled = False End If End Sub
Private Sub fk46_Timer() 'timer feedback kirim 46 fb46.Text = Form2.MSComm1.Input If fb46.Text = "pos3" Then kirim47.Enabled = True kirim46.Enabled = False fk46.Enabled = False End If End Sub
Private Sub fk47_Timer() 'timer feedback kirim 47 fb47.Text = Form2.MSComm1.Input If fb47.Text = "pos4" Then kirim48.Enabled = True kirim47.Enabled = False fk47.Enabled = False End If End Sub
Private Sub fk48_Timer() 'timer feedback kirim 48 fb48.Text = Form2.MSComm1.Input If fb48.Text = "pos5" Then Form2.Timer9.Enabled = True kirim48.Enabled = False fk48.Enabled = False End If End Sub
Private Sub fk49_Timer() 'timer feedback kirim 49 fb49.Text = Form2.MSComm1.Input If fb49.Text = "pos" Then kirim50.Enabled = True kirim49.Enabled = False fk49.Enabled = False End If End Sub
Private Sub fk50_Timer() 'timer feedback kirim 50 fb50.Text = Form2.MSComm1.Input If fb50.Text = "pos1" Then kirim51.Enabled = True kirim50.Enabled = False fk50.Enabled = False End If End Sub
Private Sub fk51_Timer() 'timer feedback kirim 51 fb51.Text = Form2.MSComm1.Input If fb51.Text = "pos2" Then kirim52.Enabled = True kirim51.Enabled = False fk51.Enabled = False End If End Sub
Private Sub fk52_Timer() 'timer feedback kirim 46 fb52.Text = Form2.MSComm1.Input If fb52.Text = "pos3" Then kirim53.Enabled = True kirim52.Enabled = False fk52.Enabled = False End If End Sub
Private Sub fk53_Timer() 'timer feedback kirim 53 fb53.Text = Form2.MSComm1.Input If fb53.Text = "pos4" Then kirim54.Enabled = True kirim53.Enabled = False fk53.Enabled = False End If End Sub
Private Sub fk54_Timer() 'timer feedback kirim 54 fb54.Text = Form2.MSComm1.Input If fb54.Text = "pos5" Then Form2.Timer10.Enabled = True kirim54.Enabled = False fk54.Enabled = False End If End Sub
Private Sub fk55_Timer() 'timer feedback kirim 55 fb55.Text = Form2.MSComm1.Input If fb55.Text = "pos" Then kirim56.Enabled = True kirim55.Enabled = False fk55.Enabled = False End If End Sub
Private Sub fk56_Timer() 'timer feedback kirim 56 fb56.Text = Form2.MSComm1.Input If fb56.Text = "pos1" Then kirim57.Enabled = True kirim56.Enabled = False fk56.Enabled = False End If End Sub
Private Sub fk57_Timer() 'timer feedback kirim 51 fb57.Text = Form2.MSComm1.Input If fb57.Text = "pos2" Then kirim58.Enabled = True kirim57.Enabled = False fk57.Enabled = False End If End Sub
Private Sub fk58_Timer() 'timer feedback kirim 46 fb58.Text = Form2.MSComm1.Input If fb58.Text = "pos3" Then kirim59.Enabled = True kirim58.Enabled = False fk58.Enabled = False End If End Sub
Private Sub fk59_Timer() 'timer feedback kirim 59 fb59.Text = Form2.MSComm1.Input If fb59.Text = "pos4" Then kirim60.Enabled = True kirim59.Enabled = False fk59.Enabled = False End If End Sub
Private Sub fk60_Timer() 'timer feedback kirim 54 fb60.Text = Form2.MSComm1.Input If fb60.Text = "pos5" Then 'Form2.Timer10.Enabled = True kirim60.Enabled = False fk60.Enabled = False End If End Sub
Private Sub kirim25_Timer() 'timer untuk mengirim program 5 posisi 1 Form2.MSComm1.Output = pwaist4.Text & "A" If kirim25.Interval = 1 Then fk25.Enabled = True End If End Sub
Private Sub kirim26_Timer() 'timer untuk mengirim program 5 posisi 2 Form2.MSComm1.Output = pshoulder4.Text & "B" If kirim26.Interval = 1 Then fk26.Enabled = True End If End Sub
Private Sub kirim27_Timer() 'timer untuk mengirim program 5 posisi 3 Form2.MSComm1.Output = pelbow4.Text & "C" If kirim27.Interval = 1 Then fk27.Enabled = True End If End Sub
Private Sub kirim28_Timer() 'timer untuk mengirim program 5 posisi4 Form2.MSComm1.Output = ppitch4.Text & "D" If kirim28.Interval = 1 Then fk28.Enabled = True End If End Sub
Private Sub kirim29_Timer() 'timer untuk mengirim program 5 posisi5 Form2.MSComm1.Output = proll4.Text & "E" If kirim29.Interval = 1 Then fk29.Enabled = True End If End Sub
Private Sub kirim30_Timer() 'timer untuk mengirim program 5 posisi6 Form2.MSComm1.Output = pgripper4.Text If kirim30.Interval = 1 Then fk30.Enabled = True End If End Sub
Private Sub kirim31_Timer() 'timer untuk mengirim program 6 posisi 1 Form2.MSComm1.Output = pwaist5.Text & "A" If kirim31.Interval = 1 Then fk31.Enabled = True End If End Sub
Private Sub kirim32_Timer() 'timer untuk mengirim program 6 posisi 2 Form2.MSComm1.Output = pshoulder5.Text & "B" If kirim32.Interval = 1 Then fk32.Enabled = True End If End Sub
Private Sub kirim33_Timer() 'timer untuk mengirim program 6 posisi 3 Form2.MSComm1.Output = pelbow5.Text & "C" If kirim33.Interval = 1 Then fk33.Enabled = True End If End Sub
Private Sub kirim34_Timer() 'timer untuk mengirim program 6 posisi4 Form2.MSComm1.Output = ppitch5.Text & "D" If kirim34.Interval = 1 Then fk34.Enabled = True End If End Sub
Private Sub kirim35_Timer() 'timer untuk mengirim program 6 posisi5 Form2.MSComm1.Output = proll5.Text & "E" If kirim35.Interval = 1 Then fk35.Enabled = True End If End Sub
Private Sub kirim36_Timer() 'timer untuk mengirim program 5 posisi6 Form2.MSComm1.Output = pgripper5.Text If kirim36.Interval = 1 Then fk36.Enabled = True End If End Sub
Private Sub kirim37_Timer() 'timer untuk mengirim program 7 posisi 1 Form2.MSComm1.Output = pwaist6.Text & "A" If kirim37.Interval = 1 Then fk37.Enabled = True End If End Sub
Private Sub kirim38_Timer() 'timer untuk mengirim program 7 posisi 2 Form2.MSComm1.Output = pshoulder6.Text & "B" If kirim38.Interval = 1 Then fk38.Enabled = True End If End Sub
Private Sub kirim39_Timer() 'timer untuk mengirim program 7 posisi 3 Form2.MSComm1.Output = pelbow6.Text & "C" If kirim39.Interval = 1 Then fk39.Enabled = True End If End Sub
Private Sub kirim40_Timer() 'timer untuk mengirim program 7 posisi4 Form2.MSComm1.Output = ppitch6.Text & "D" If kirim40.Interval = 1 Then fk40.Enabled = True End If End Sub
Private Sub kirim41_Timer() 'timer untuk mengirim program 7 posisi5 Form2.MSComm1.Output = proll6.Text & "E" If kirim41.Interval = 1 Then fk41.Enabled = True End If End Sub
Private Sub kirim42_Timer() 'timer untuk mengirim program 7 posisi6 Form2.MSComm1.Output = pgripper6.Text If kirim42.Interval = 1 Then fk42.Enabled = True End If End Sub
Private Sub kirim43_Timer() 'timer untuk mengirim program 8 posisi 1 Form2.MSComm1.Output = pwaist7.Text & "A" If kirim43.Interval = 1 Then fk43.Enabled = True End If End Sub
Private Sub kirim44_Timer() 'timer untuk mengirim program 8 posisi 2 Form2.MSComm1.Output = pshoulder7.Text & "B" If kirim44.Interval = 1 Then fk44.Enabled = True End If End Sub
Private Sub kirim45_Timer() 'timer untuk mengirim program 8 posisi 3 Form2.MSComm1.Output = pelbow7.Text & "C" If kirim45.Interval = 1 Then fk45.Enabled = True End If End Sub
Private Sub kirim46_Timer() 'timer untuk mengirim program 8 posisi4 Form2.MSComm1.Output = ppitch7.Text & "D" If kirim46.Interval = 1 Then fk46.Enabled = True End If End Sub
Private Sub kirim47_Timer() 'timer untuk mengirim program 8 posisi5 Form2.MSComm1.Output = proll7.Text & "E" If kirim47.Interval = 1 Then fk47.Enabled = True End If End Sub
Private Sub kirim48_Timer() 'timer untuk mengirim program 8 posisi6 Form2.MSComm1.Output = pgripper7.Text If kirim48.Interval = 1 Then fk48.Enabled = True End If End Sub
Private Sub nt_Timer() Form2.MSComm1.Output = "NT" If nt.Interval = 1 Then fbnt.Enabled = True End If End Sub
Private Sub kirim49_Timer() 'timer untuk mengirim program 9 posisi 1 Form2.MSComm1.Output = pwaist8.Text & "A" If kirim49.Interval = 1 Then fk49.Enabled = True End If End Sub
Private Sub kirim50_Timer() 'timer untuk mengirim program 9 posisi 2 Form2.MSComm1.Output = pshoulder8.Text & "B" If kirim50.Interval = 1 Then fk50.Enabled = True End If End Sub
Private Sub kirim51_Timer() 'timer untuk mengirim program 9 posisi 3 Form2.MSComm1.Output = pelbow8.Text & "C" If kirim51.Interval = 1 Then fk51.Enabled = True End If End Sub
Private Sub kirim52_Timer() 'timer untuk mengirim program 9 posisi4 Form2.MSComm1.Output = ppitch8.Text & "D" If kirim52.Interval = 1 Then fk52.Enabled = True End If End Sub Private Sub kirim53_Timer() 'timer untuk mengirim program 9 posisi5 Form2.MSComm1.Output = proll8.Text & "E" If kirim53.Interval = 1 Then fk53.Enabled = True End If End Sub
Private Sub kirim54_Timer() 'timer untuk mengirim program 9 posisi6 Form2.MSComm1.Output = pgripper8.Text If kirim54.Interval = 1 Then fk54.Enabled = True End If End Sub
Private Sub kirim55_Timer() 'timer untuk mengirim program 10 posisi 1 Form2.MSComm1.Output = pwaist9.Text & "A" If kirim55.Interval = 1 Then fk55.Enabled = True End If End Sub
Private Sub kirim56_Timer() 'timer untuk mengirim program 10 posisi 2 Form2.MSComm1.Output = pshoulder9.Text & "B" If kirim56.Interval = 1 Then fk56.Enabled = True End If End Sub
Private Sub kirim57_Timer() 'timer untuk mengirim program 10 posisi 3 Form2.MSComm1.Output = pelbow9.Text & "C" If kirim57.Interval = 1 Then fk57.Enabled = True End If End Sub
Private Sub kirim58_Timer() 'timer untuk mengirim program 10 posisi4 Form2.MSComm1.Output = ppitch9.Text & "D" If kirim58.Interval = 1 Then fk58.Enabled = True End If End Sub
Private Sub kirim59_Timer() 'timer untuk mengirim program 10 posisi5 Form2.MSComm1.Output = proll9.Text & "E" If kirim59.Interval = 1 Then fk59.Enabled = True End If End Sub
Private Sub kirim60_Timer() 'timer untuk mengirim program 10 posisi6 Form2.MSComm1.Output = pgripper9.Text If kirim60.Interval = 1 Then fk60.Enabled = True End If End Sub
Private Sub tim10_Timer() embuh10.Text = Form2.MSComm1.Input If embuh10.Text = "pos" Then kirim31.Enabled = True tim9.Enabled = False tim10.Enabled = False End If End Sub
Private Sub tim11_Timer() Form2.MSComm1.Output = pwaist6.Text & "A" If tim11.Interval = 1 Then tim12.Enabled = True End If Form2.led7.FillStyle = 0 Form2.led7.FillColor = &HC0& End Sub Private Sub tim12_Timer() embuh12.Text = Form2.MSComm1.Input If embuh12.Text = "pos" Then kirim37.Enabled = True tim11.Enabled = False tim12.Enabled = False End If End Sub
Selanjutnya: - Code:
-
Private Sub tim13_Timer() Form2.MSComm1.Output = pwaist7.Text & "A" If tim13.Interval = 1 Then tim14.Enabled = True End If Form2.led8.FillStyle = 0 Form2.led8.FillColor = &HC0& End Sub
Private Sub tim14_Timer() embuh14.Text = Form2.MSComm1.Input If embuh14.Text = "pos" Then kirim43.Enabled = True tim13.Enabled = False tim14.Enabled = False End If End Sub
Private Sub tim15_Timer() Form2.MSComm1.Output = pwaist8.Text & "A" If tim15.Interval = 1 Then tim16.Enabled = True End If Form2.led9.FillStyle = 0 Form2.led9.FillColor = &HC0& End Sub
Private Sub tim16_Timer() embuh16.Text = Form2.MSComm1.Input If embuh16.Text = "pos" Then kirim49.Enabled = True tim15.Enabled = False tim16.Enabled = False End If End Sub
Private Sub tim17_Timer() Form2.MSComm1.Output = pwaist9.Text & "A" If tim17.Interval = 1 Then tim18.Enabled = True End If Form2.Left.FillStyle = 0 Form2.led10.FillColor = &HC0& End Sub
Private Sub tim18_Timer() embuh18.Text = Form2.MSComm1.Input If embuh18.Text = "pos" Then kirim55.Enabled = True tim17.Enabled = False tim18.Enabled = False End If End Sub
Private Sub tim7_Timer() Form2.MSComm1.Output = pwaist4.Text & "A" If tim7.Interval = 1 Then tim8.Enabled = True End If Form2.led5.FillStyle = 0 Form2.led5.FillColor = &HC0& End Sub
Private Sub tim8_Timer() embuh8.Text = Form2.MSComm1.Input If embuh8.Text = "pos" Then kirim25.Enabled = True tim7.Enabled = False tim8.Enabled = False End If End Sub
Private Sub tim9_Timer() Form2.MSComm1.Output = pwaist5.Text & "A" If tim9.Interval = 1 Then tim10.Enabled = True End If Form2.led6.FillStyle = 0 Form2.led6.FillColor = &HC0& End Sub Form 2 nya: - Code:
-
FORM 2 Option Explicit Dim Rs As New ADODB.Recordset
Private Sub Command1_Click() tampil.Text = "" tampil1.Text = "" tampil2.Text = "" tampil3.Text = "" tampil4.Text = "" tampil5.Text = "" T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False End Sub
Private Sub Command10_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False tampil2.Text = Val(tampil2.Text) - 1 If tampil2.Text > 9 Then tampil2.Text = 9 If tampil2.Text < 0 Then tampil2.Text = 0 T6.Enabled = True End Sub
Private Sub Command11_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False tampil3.Text = Val(tampil3.Text) + 1 If tampil3.Text > 9 Then tampil3.Text = 9 If tampil3.Text < 0 Then tampil3.Text = 0 T7.Enabled = True End Sub
Private Sub Command12_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False tampil3.Text = Val(tampil3.Text) - 1 If tampil3.Text > 9 Then tampil3.Text = 9 If tampil3.Text < 0 Then tampil3.Text = 0 T8.Enabled = True End Sub
Private Sub Command13_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False If tampil4.Text >= 0 Then tampil4.Text = Val(tampil4.Text) + 1 Else tampil4.Text = 0 End If T9.Enabled = True End Sub
Private Sub Command14_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T11.Enabled = False T12.Enabled = False If tampil4.Text <= 11 Then tampil4.Text = Val(tampil4.Text) - 1 Else tampil4.Text = 11 End If T10.Enabled = True End Sub
Private Sub Command15_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T12.Enabled = False tampil5.Text = "ON" T11.Enabled = True End Sub
Private Sub Command16_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False tampil5.Text = "OFF" T12.Enabled = True End Sub
Private Sub Command17_Click() With Rs .AddNew .Fields("Waist").Value = tampil.Text .Fields("Shoulder").Value = tampil1.Text .Fields("Elbow").Value = tampil2.Text .Fields("Pitch").Value = tampil3.Text .Fields("Roll").Value = tampil4.Text .Fields("Gripper").Value = tampil5.Text .Update End With End Sub
Private Sub Command19_Click() 'REFRESH led1.FillStyle = 1 led2.FillStyle = 1 led3.FillStyle = 1 led4.FillStyle = 1 led5.FillStyle = 1 led6.FillStyle = 1 led7.FillStyle = 1 led8.FillStyle = 1 led9.FillStyle = 1 led10.FillStyle = 1 pgm2.Text = "" pgm3.Text = "" pgm4.Text = "" pgm5.Text = "" pgm6.Text = "" pgm7.Text = "" pgm8.Text = "" pgm9.Text = "" pgm10.Text = "" pgrm2.Text = "" pgrm3.Text = "" pgrm4.Text = "" pgrm5.Text = "" pgrm6.Text = "" pgrm7.Text = "" pgrm8.Text = "" pgrm9.Text = "" pgrm10.Text = "" pwaist1.Text = "" pshoulder1.Text = "" pelbow1.Text = "" ppitch1.Text = "" proll1.Text = "" pgripper1.Text = "" pwaist2.Text = "" pshoulder2.Text = "" pelbow2.Text = "" ppitch2.Text = "" proll2.Text = "" pgripper2.Text = "" pwaist3.Text = "" pshoulder3.Text = "" pelbow3.Text = "" ppitch3.Text = "" proll3.Text = "" pgripper3.Text = "" Form1.pwaist4.Text = "" Form1.pshoulder4.Text = "" Form1.pelbow4.Text = "" Form1.ppitch4.Text = "" Form1.proll4.Text = "" Form1.pgripper4.Text = "" Form1.pwaist5.Text = "" Form1.pshoulder5.Text = "" Form1.pelbow5.Text = "" Form1.ppitch5.Text = "" Form1.proll5.Text = "" Form1.pgripper5.Text = "" Form1.pwaist6.Text = "" Form1.pshoulder6.Text = "" Form1.pelbow6.Text = "" Form1.ppitch6.Text = "" Form1.proll6.Text = "" Form1.pgripper6.Text = "" Form1.pwaist7.Text = "" Form1.pshoulder7.Text = "" Form1.pelbow7.Text = "" Form1.ppitch7.Text = "" Form1.proll7.Text = "" Form1.pgripper7.Text = "" Form1.pwaist8.Text = "" Form1.pshoulder8.Text = "" Form1.pelbow8.Text = "" Form1.ppitch8.Text = "" Form1.proll8.Text = "" Form1.pgripper8.Text = "" Form1.pwaist9.Text = "" Form1.pshoulder9.Text = "" Form1.pelbow9.Text = "" Form1.ppitch9.Text = "" Form1.proll9.Text = "" Form1.pgripper9.Text = "" fb1.Text = "" fb2.Text = "" fb3.Text = "" fb4.Text = "" fb5.Text = "" fb6.Text = "" fb7.Text = "" fb8.Text = "" fb9.Text = "" fb10.Text = "" fb11.Text = "" fb12.Text = "" fb13.Text = "" fb14.Text = "" fb15.Text = "" fb16.Text = "" fb17.Text = "" fb18.Text = "" fb19.Text = "" fb20.Text = "" fb21.Text = "" fb22.Text = "" fb23.Text = "" fb24.Text = "" Form1.fb25.Text = "" Form1.fb26.Text = "" Form1.fb27.Text = "" Form1.fb28.Text = "" Form1.fb29.Text = "" Form1.fb30.Text = "" Form1.fb31.Text = "" Form1.fb32.Text = "" Form1.fb33.Text = "" Form1.fb34.Text = "" Form1.fb35.Text = "" Form1.fb36.Text = "" Form1.fb37.Text = "" Form1.fb38.Text = "" Form1.fb39.Text = "" Form1.fb40.Text = "" Form1.fb41.Text = "" Form1.fb42.Text = "" Form1.fb43.Text = "" Form1.fb44.Text = "" Form1.fb45.Text = "" Form1.fb46.Text = "" Form1.fb47.Text = "" Form1.fb48.Text = "" Form1.fb49.Text = "" Form1.fb50.Text = "" Form1.fb51.Text = "" Form1.fb52.Text = "" Form1.fb53.Text = "" Form1.fb54.Text = "" Form1.fb55.Text = "" Form1.fb56.Text = "" Form1.fb57.Text = "" Form1.fb58.Text = "" Form1.fb59.Text = "" Form1.fb60.Text = "" embuh.Text = "" embuh1.Text = "" embuh3.Text = "" embuh4.Text = "" embuh5.Text = "" embuh6.Text = "" Form1.embuh7.Text = "" Form1.embuh8.Text = "" Form1.embuh9.Text = "" Form1.embuh10.Text = "" Form1.embuh11.Text = "" Form1.embuh12.Text = "" Form1.embuh13.Text = "" Form1.embuh14.Text = "" Form1.embuh15.Text = "" Form1.embuh16.Text = "" Form1.embuh17.Text = "" Form1.embuh18.Text = "" End Sub
Private Sub Command2_Click() 'perintah untuk menghapus satu database Dim setuju As String setuju = MsgBox("Data akan benar-benar akan dihapus?", vbYesNo, "konfirmasi") If setuju = vbYes Then Rs.Delete MsgBox ("1 record(s) terhapus!") statusrec.SimpleText = Rs.RecordCount & " record(s) " End If End Sub
'perintah untuk run program Private Sub Command3_Click() If nt.Text = "NT" Then Timer1.Enabled = True Else MsgBox ("Masukkan Program NETSPOINT (NT)") End If End Sub
Private Sub Command5_Click() T2.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False tampil.Text = Val(tampil.Text) + 1 If tampil.Text > 9 Then tampil.Text = 9 If tampil.Text < 0 Then tampil.Text = 0 T1.Enabled = True End Sub
Private Sub Command6_Click() T1.Enabled = False T3.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False tampil.Text = Val(tampil.Text) - 1 If tampil.Text > 9 Then tampil.Text = 9 If tampil.Text < 0 Then tampil.Text = 0 T2.Enabled = True End Sub
Private Sub Command7_Click() T1.Enabled = False T2.Enabled = False T4.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False tampil1.Text = Val(tampil1.Text) + 1 If tampil1.Text > 9 Then tampil1.Text = 9 If tampil1.Text < 0 Then tampil1.Text = 0 T3.Enabled = True End Sub
Private Sub Command8_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T5.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False tampil1.Text = Val(tampil1.Text) - 1 If tampil1.Text > 9 Then tampil1.Text = 9 If tampil1.Text < 0 Then tampil1.Text = 0 T4.Enabled = True End Sub
Private Sub Command9_Click() T1.Enabled = False T2.Enabled = False T3.Enabled = False T4.Enabled = False T6.Enabled = False T7.Enabled = False T8.Enabled = False T9.Enabled = False T10.Enabled = False T11.Enabled = False T12.Enabled = False tampil2.Text = Val(tampil2.Text) + 1 If tampil2.Text > 9 Then tampil2.Text = 9 If tampil2.Text < 0 Then tampil2.Text = 0 T5.Enabled = True End Sub Selanjutnya : - Code:
-
'timer feedback kirim 1 Private Sub fk1_Timer() fb1.Text = MSComm1.Input If fb1.Text = "pos" Then kirim2.Enabled = True kirim1.Enabled = False fk1.Enabled = False End If End Sub
Private Sub fk10_Timer() 'timer feedback kirim10 fb10.Text = MSComm1.Input If fb10.Text = "pos3" Then kirim11.Enabled = True kirim10.Enabled = False fk10.Enabled = False End If End Sub Private Sub fk11_Timer() 'timer feedback kirim11 fb11.Text = MSComm1.Input If fb11.Text = "pos4" Then kirim12.Enabled = True kirim11.Enabled = False fk11.Enabled = False End If End Sub
Private Sub fk12_Timer() 'timer feedback kirim12 fb12.Text = MSComm1.Input If fb12.Text = "pos5" Then Timer3.Enabled = True kirim12.Enabled = False fk12.Enabled = False End If End Sub
Private Sub fk13_Timer() 'timer feedback kirim 13 fb13.Text = MSComm1.Input If fb13.Text = "pos" Then kirim14.Enabled = True kirim13.Enabled = False fk13.Enabled = False End If End Sub
Private Sub fk14_Timer() 'timer feedback kirim 14 fb14.Text = MSComm1.Input If fb14.Text = "pos1" Then kirim15.Enabled = True kirim14.Enabled = False fk14.Enabled = False End If End Sub
Private Sub fk15_Timer() 'timer feedback kirim 15 fb15.Text = MSComm1.Input If fb15.Text = "pos2" Then kirim16.Enabled = True kirim15.Enabled = False fk15.Enabled = False End If End Sub
Private Sub fk16_Timer() 'timer feedback kirim 16 fb16.Text = MSComm1.Input If fb16.Text = "pos3" Then kirim17.Enabled = True kirim16.Enabled = False fk16.Enabled = False End If End Sub
Private Sub fk17_Timer() 'timer feedback kirim 17 fb17.Text = MSComm1.Input If fb17.Text = "pos4" Then kirim18.Enabled = True kirim17.Enabled = False fk17.Enabled = False End If End Sub
Private Sub fk18_Timer() 'timer feedback kirim 18 fb18.Text = MSComm1.Input If fb18.Text = "pos5" Then Timer4.Enabled = True kirim18.Enabled = False fk18.Enabled = False End If End Sub
Private Sub fk19_Timer() 'timer feedback kirim 19 fb19.Text = MSComm1.Input If fb19.Text = "pos" Then kirim20.Enabled = True kirim19.Enabled = False fk19.Enabled = False End If End Sub
'timer feedback kirim2 Private Sub fk2_Timer() fb2.Text = MSComm1.Input If fb2.Text = "pos1" Then kirim3.Enabled = True kirim2.Enabled = False fk2.Enabled = False End If End Sub
Private Sub fk20_Timer() 'timer feedback kirim 20 fb20.Text = MSComm1.Input If fb20.Text = "pos1" Then kirim21.Enabled = True kirim20.Enabled = False fk20.Enabled = False End If End Sub
Private Sub fk21_Timer() 'timer feedback kirim 21 fb21.Text = MSComm1.Input If fb21.Text = "pos2" Then kirim22.Enabled = True kirim21.Enabled = False fk21.Enabled = False End If End Sub
Private Sub fk22_Timer() 'timer feedback kirim 22 fb22.Text = MSComm1.Input If fb22.Text = "pos3" Then kirim23.Enabled = True kirim22.Enabled = False fk22.Enabled = False End If End Sub
Private Sub fk23_Timer() 'timer feedback kirim 23 fb23.Text = MSComm1.Input If fb23.Text = "pos4" Then kirim24.Enabled = True kirim23.Enabled = False fk23.Enabled = False End If End Sub
Private Sub fk24_Timer() 'timer feedback kirim 24 fb24.Text = MSComm1.Input If fb24.Text = "pos5" Then Timer5.Enabled = True kirim24.Enabled = False fk24.Enabled = False End If End Sub
'timer feedback kirim 3 Private Sub fk3_Timer() fb3.Text = MSComm1.Input If fb3.Text = "pos2" Then kirim4.Enabled = True kirim3.Enabled = False fk3.Enabled = False End If End Sub
Private Sub fk4_Timer() 'timer feedback kirim 4 fb4.Text = MSComm1.Input If fb4.Text = "pos3" Then kirim5.Enabled = True kirim4.Enabled = False fk4.Enabled = False End If End Sub
Private Sub fk5_Timer() 'timer feedback kirim 5 fb5.Text = MSComm1.Input If fb5.Text = "pos4" Then kirim6.Enabled = True kirim5.Enabled = False fk5.Enabled = False End If End Sub
Private Sub fk6_Timer() 'timer feedback kirim 6 fb6.Text = MSComm1.Input If fb6.Text = "pos5" Then Timer2.Enabled = True kirim6.Enabled = False fk6.Enabled = False End If End Sub Private Sub fk7_Timer() 'timer feedback kirim 7 fb7.Text = MSComm1.Input If fb7.Text = "pos" Then kirim8.Enabled = True kirim7.Enabled = False fk7.Enabled = False End If End Sub
Private Sub fk8_Timer() 'timer feedback kirim 8 fb8.Text = MSComm1.Input If fb8.Text = "pos1" Then kirim9.Enabled = True kirim8.Enabled = False fk8.Enabled = False End If End Sub
Private Sub fk9_Timer() 'timer feedback kirim 9 fb9.Text = MSComm1.Input If fb9.Text = "pos2" Then kirim10.Enabled = True kirim9.Enabled = False fk9.Enabled = False End If End Sub
Private Sub Form_Load() Dim NmDatabase As String 'koneksi serial MSComm1.PortOpen = True 'Koneksi database With Rs NmDatabase = App.Path & "\robot.accdb" .ActiveConnection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" & NmDatabase & ";Persist Security Info=False" .CursorLocation = adUseClient .LockType = adLockOptimistic .CursorType = adOpenStatic .Source = "select * from posisi" .Open End With With dgposisi Set .DataSource = Rs .Refresh .Columns(0).Caption = "No" .Columns(0).Width = 500 .Columns(1).Caption = "Waist" .Columns(1).Width = 1000 .Columns(2).Caption = "Shoulder" .Columns(2).Width = 1000 .Columns(3).Caption = "Elbow" .Columns(3).Width = 1000 .Columns(4).Caption = "Pitch" .Columns(4).Width = 1000 .Columns(5).Caption = "Roll" .Columns(5).Width = 1000 .Columns(6).Caption = "Gripper" .Columns(6).Width = 1000 statusrec.SimpleText = Rs.RecordCount & "record(s)" .Splits.Item(0).Locked = True End With End Sub Private Sub Form_Unload(Cancel As Integer) Set Rs = Nothing MSComm1.PortOpen = False End Sub Terusan programnya nanti dibawah aja ya.. terlalu panjang.... gak bisa masukin lagi.. nanti klo ada yang post baru ane terusin... hehehehehmm Cara Pengoperasianye: Perangkaian hardware robot a. Pastikan catu daya sudah terpasang b. Pastikan rangkaian PIC sudah mendapat supplay tegangan. c. Pasang kabel serial untuk komunikasi serial antarmuka robot dengan PC. d. Pastikan Led Indikator pada rangkaian mikrokontroler menyala. e. Pastikan kabel motor servo sudah terhubung dengan konektor servo sesuai nomor yang tertera pada kabel. 3.2 Menjalankan Software untuk menjalankan robot a. Buka file aplikasi Arm Servo Robot . b. Tentukan posisi dengan mode otomatis dari program komputer (teach in dan set joint coordinates) atau mode manual melalui remote. Sebelum menjalankan program tekan dahulu tombol reset. c. Penyimpanan posisi dengan cara menekan tombol save. d. Untuk Pemograman, pilih icon Program, kemudian masukkan Posisi sesuai dengan posisi yang diinginkan. Untuk menggerakan robot posisi 1, menggunakan perintah comman “MOVE 1” (gerakan keposisi 1) No MOVE No Posisi e. Perintah untuk program awal No NT f. Untuk menjalankan robot tekan dahulu reset g. Jalankan program dengan menekan perintah Run Program dah dulu ya.. me kaboor... | |
| | | | Tutorial Arm Servo Robot | |
|
Similar topics | |
|
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
| Latest topics | » Baktrack TutorialSun Jul 28, 2019 2:26 am by kenta » aplikasi gambas pada linuxTue Apr 30, 2019 10:28 am by kenta » beli linux ubuntu terbaru di surabayaSun Mar 31, 2019 10:08 am by kenta » desain robotFri Jan 19, 2018 1:25 pm by kenta » membuat robot tidak susahFri Jan 19, 2018 1:15 pm by kenta » Salam.. Salam.. Salam..Thu Nov 30, 2017 7:42 am by BumiayuKita» teknologi penyaring udara dan airWed Oct 04, 2017 8:41 am by kenta » [CloudMILD] VPS SSD IIX 2X RAM + Xtra SSD SpaceMon Jul 24, 2017 10:46 am by BumiayuKita» cara menutup akses dari situs negatifTue Apr 04, 2017 1:04 pm by kenta » Aplikasi Google TalkMon Mar 20, 2017 3:00 am by BumiayuKita» Driver buat Webcam PC ?? merknya M-Tech,, Fri Jan 30, 2015 8:51 pm by aelgrim » Portal Blog,,,,,Sun Dec 14, 2014 12:38 am by robofics» Appteknodroid - Seputar Dunia AndroidMon Nov 10, 2014 11:32 pm by Pr0phecy » Software animasi yang agan2 pakeTue Sep 30, 2014 1:11 pm by X_campus » INDO BILLING 6.70 + KEYSun Sep 21, 2014 2:17 pm by abdul halim |
Statistics | Total 12294 user terdaftar User terdaftar terakhir adalah Adlygans
Total 31710 kiriman artikel dari user in 5734 subjects
|
Banner Forum | Dukung forum Blackc0de dengan memasang bannernya.
|
Social Networking |
|
|