Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VS2005 VB wait statement?

Hi all,
I would like to preface this by stating that I am new to VB and trying to learn it on the fly.
I am reconstructing an ATE program that was originally written in GW Basic using VS2005 VB.
One part of the program controls an AC Pwr source in steps of .2volts. After each step I check the state of an I/O interface. I need a delay of 4sec. (doesn't need to be accurate) between steps during part of the program. Right now I am using timers to accomplish this but I am wondering if there is a simpler way. In the old GW Basic I could do this with one line of code and using the PC clock.
Thanks.
Karl
0 Kudos
Message 1 of 2
(3,944 Views)
Try something like System.Threading.Thread.CurrentThread.Sleep(4000). The numerical value is the amount of time to sleep, in msec.
0 Kudos
Message 2 of 2
(3,936 Views)