Question
In Visual Basic/VB.net, how can I delay each step of a for loop? My code is below. I am writing to the console to see
In Visual Basic/VB.net, how can I delay each step of a for loop? My code is below. I am writing to the console to see if the for loop is working correctly, and it is, but I am sending commands to another machine and the for loop steps too quickly for the other machine to catch up. How can I have a delay in between each step? Maybe a timer? I am not sure.
Dim F As Integer Dim Frequency As Integer For F = 50 To 1000 Step 10
Frequency= F instrument.WriteString("FREQ" & Str$(F) & "MHZ") Console.WriteLine("Frequency" & F) 'Testing if this portion of the for loop is reached
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started