CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2001
    Location
    Israel
    Posts
    2

    real time application

    hi everyone,
    We need help!!!!
    we are writing an app that runs a motor throught a controller. the controller has it's own activex. for some reason when we are running the app, the motor won't run but if we have break points before the motor should run, it does run.
    we think maybe it has something to do with the OS.
    any help would be appreciated.
    shiry & dror


  2. #2
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: real time application

    Try to use Sleep() to suspend your process at where you have the breakpoint. Since breakpoint will stop the process untill you hit Run again, then Sleep() should do the trick for you.


    private Declare Sub Sleep Lib "kernel32" Alias "Sleep" (byval dwMilliseconds as Long)

    sub YourFunc()
    ' code before function to run motor
    Call Sleep(2*1000) 'sleep 2 secs
    ' code to run the motor
    end sub




    -Cool Bizs

    Good Luck,
    -Cool Bizs

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured