advertisement
from the Automation List department...
Timer delay
Programming languages. topic
Posted by Anonymous on 22 November, 2006 - 12:00 am
I need help w/ timer delay

Need to call sum fx tgether in a loop

B4 execute next fx, there is a delay of 200ms

I tried this

'Walk

Private Sub Walk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Walk.Click
Dim a As String
Dim b As Integer
Dim c As String
Dim d As String

a = &HFF
b = &H5F
c = &H11

Call RLeg_Up()
Timer2.Start()

d = (SendWalk(0) Xor SendWalk(1) Xor SendWalk(2) Xor SendWalk(3) Xor SendWalk(4) Xor SendWalk(5) Xor SendWalk(6) Xor SendWalk(7) Xor SendWalk(8) Xor SendWalk(9) Xor SendWalk(10) Xor SendWalk(11) Xor SendWalk(12) Xor SendWalk(13) Xor SendWalk(14) Xor SendWalk(15) Xor SendWalk(16)) And &H7F
Dim all As Byte() = {a, b, c, SendWalk(0), SendWalk(1), SendWalk(2), SendWalk(3), SendWalk(4), SendWalk(5), SendWalk(6), SendWalk(7), SendWalk(8), SendWalk(9), SendWalk(10), SendWalk(11), SendWalk(12), SendWalk(13), SendWalk(14), SendWalk(15), SendWalk(16), d}

SerialPort1.Open()
SerialPort1.Write(all, 0, 21)
SerialPort1.Close()

End Sub

Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Timer2.Stop()
If Timer2.Interval = 3000 Then
Call RLeg_Down()
End If

End Sub


To call RLeg_Up first, b4 RLeg_Down

RLeg_Up is called n then nothing happens

Help??

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2010 Nerds in Control, LLC. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, MySQL and Apache. Be happy.


Fortune
Bell Labs Unix -- Reach out and grep someone.
Advertise here
Advertisement
our advertisers
Help keep our servers running...
Patronize our advertisers!
Visit our Post Archive