working fine but when i launch event all outputs changes condition and
then it takes while when board resets itself... Oopic III+ C1.1+
Dim Valo1 As New oDIO1 (26,cvOutput)
Dim Valo2 As New oDIO1 (28,cvOutput)
Dim Valo3 As New oDIO1 (11,cvOutput)
Dim Valo4 As New oDIO1 (13,cvOutput)
Dim Valo5 As New oDIO1 (14,cvOutput)
Dim Pun As New oButton
Dim Vih As New oButton
Dim Kyt As New oButton
Dim A As New oEvent
Dim D As New oDIO1
Dim W As New oWire
' I have tried this fix but it didnt help...
Dim RAM_Access3 As oRAM
Const Event_Obj_Location3 = 332 ' oEvent "Event" memory location
Const EventCode_Location_Hi3 = 1 ' Event_Code EEPROM location High
Const EventCode_Location_Lo3 = 76 ' Event_Code EEPROM location Low
Sub Main()
Pun.IOLine = 16
Vih.IOLine = 4
Kyt.IOLine = 18
D.IOLine = 1
D.Direction = cvInput
W.Input.Link(D)
W.Output.Link(A.Operate)
W.InvertIn = cvTrue
W.Operate = cvTrue
Valo5 = 0
ooPIC.Delay = 1000
Sekvenssi
Valo5 = 1
Do
If Kyt = 0 Then
If Pun = 0 Then
Sekvenssi
End If
End If
If Kyt = 1 Then
If Pun = 0 Then
Valo1 = 0
Valo2 = 0
Valo3 = 0
Valo4 = 0
' Valo5 = 0
ooPIC.Delay = 100
End If
If Vih = 0 Then
Valo1 = 1
Valo2 = 1
Valo3 = 1
Valo4 = 1
' Valo5 = 1
ooPIC.Delay = 100
End If
End If
Loop
End Sub
Sub Sekvenssi
Valo1 = 0
ooPIC.Delay = 1000
Valo2 = 0
ooPIC.Delay = 1000
Valo3 = 0
ooPIC.Delay = 1000
Valo4 = 0
ooPIC.Delay = 1500
Valo1 = 1
Valo2 = 1
Valo3 = 1
Valo4 = 1
End Sub
Sub A_Code()
Do Until Vih = 0
Valo5.Value = ooPIC.Hz1
Loop
ooPIC.Delay = 500
Valo5 = 1
End Sub
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/oopic/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/oopic/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:oopic-digest@yahoogroups.com
mailto:oopic-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
oopic-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
No comments:
Post a Comment