Click to See Complete Forum and Search --> : real time application


Shiry
March 21st, 2001, 08:18 AM
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

coolbiz
March 21st, 2001, 10:25 AM
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