SOLUCION PARCIAL 2. NOVIEMBRE 28 DE 2012 MECATRONICA

Anuncio
SOLUCION PARCIAL 2. NOVIEMBRE 28 DE 2012 MECATRONICA Sub Main () Dim sw1 as byte Dim sw2 as byte Dim infra500 as byte Dim infra1000 as byte Dim X as byte Dim Recipiente500 as byte Dim Recipiente1000 as byte Do Debug.Print”Coloque el Recipiente” X=0 Recipiente500= 0 Recipiente1000= 0 Do while (x=0) Infra500 = GetPin(11) Infra1000=GetPin(10) If (infra500=0) and (infra1000=1) then Recipiente500=1 X=1 End If If (infra500=0) and (infra1000=0) then Recipiente1000=1 X=1 End If Loop Debug.Print ”Seleccione el abono a preparar” X=0 Do while (x=0) Sw1=GetPin(8) Sw2=GetPin(9) If(Sw1=1) and (Recipiente500=1) then Call Abono202020500() X=1 End If If(Sw1=1) and (Recipiente1000=1) then Call Abono2020201000() X=1 End If If(Sw2=1) and (Recipiente500=1) then Call AbonoOrquidea500() X=1 End If If(Sw2=1) and (Recipiente1000=1) then Call AbonoOrquidea1000() X=1 End If Loop Loop End Sub Sub Abono202020500() Debug.Print”Abono en Preparacion” Call PutPin(5,1) Delay(3.0) Call PutPin(5,0) Call PutPin(6,1) Delay(0.6) Call PutPin(6,0) Call PutPin(7,1) Delay(0.6) Call PutPin(7,0) Debug.Print”Tome su Preparacion” End Sub Sub AbonoOrquidea500() Debug.Print”Abono en Preparacion” Call PutPin(5,1) Delay(3.0) Call PutPin(5,0) Call PutPin(6,1) Delay(0.4) Call PutPin(6,0) Call PutPin(7,1) Delay(1.2) Call PutPin(7,0) Debug.Print”Tome su Preparacion” End Sub Sub Abono2020201000() Debug.Print”Abono en Preparacion” Call PutPin(5,1) Delay(6.0) Call PutPin(5,0) Call PutPin(6,1) Delay(1.2) Call PutPin(6,0) Call PutPin(7,1) Delay(1.2) Call PutPin(7,0) Debug.Print”Tome su Preparacion” End Sub Sub AbonoOrquidea1000() Debug.Print”Abono en Preparacion” Call PutPin(5,1) Delay(6.0) Call PutPin(5,0) Call PutPin(6,1) Delay(0.8) Call PutPin(6,0) Call PutPin(7,1) Delay(2.4) Call PutPin(7,0) Debug.Print”Tome su Preparacion” End Sub 
Descargar