Results 1 to 5 of 5

Thread: Timers

  1. #1
    Join Date
    Mar 2004
    Posts
    128

    Unanswered: Timers

    Hi,
    How I can read from LPT port by timers.
    I want to make an endless loop which read from the LPT for example each 0.3 sec and to stop for 0.7 sec,I mean to make pulse to read for 0.3 sec and to stop for 0.7 sec.
    My problem is that the application will do also other things.If I do the loop the computer will be busy all the time.
    is it right?
    please help me...
    best regards...

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    maybe i missed something in the question - this seems too simple.

    Private Sub Form_Load()
    Me.TimerInterval = 300
    End Sub

    Private Sub Form_Timer()
    If Me.TimerInterval = 300 Then
    Me.TimerInterval = 700
    'do your read here
    Else
    Me.TimerInterval = 300
    'do nothing
    End If
    End Sub

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Mar 2004
    Posts
    128

    timers

    Hi,
    this code does my code for one time.
    my question is how to make like a loop of timers.
    to read each 0.3
    thanks...

  4. #4
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    no sir!

    the timer runs until you pull the plug out of the wall.
    try frm0 in the attached.

    izy
    currently using SS 2008R2

  5. #5
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    ...keep the form open!
    timer is a form property - close the form and the timer goes away.

    izy
    currently using SS 2008R2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •