Timed Do Loop in VBS
Posted: Mon 10. Jul 2017, 12:05
Hi,
In our application (e-motor with Inverter) we have a main script with a do loop in which all the calculations, alarm handling, shutdown procedure, speed control, etc are executed. I would like that every iteration of my main loop would be timed at around 10 ms. is there a way to achieve that?
I tried with but if I calculate the frequency of every iteration (i.e. time difference between the previous iteration and the current one) and let it print in the "Ausgabe" window I always get some iteration which are longer:
MfG,
Frederick
In our application (e-motor with Inverter) we have a main script with a do loop in which all the calculations, alarm handling, shutdown procedure, speed control, etc are executed. I would like that every iteration of my main loop would be timed at around 10 ms. is there a way to achieve that?
I tried with
Code: Select all
wait 10
many thanks in advance.0 time_diff 35
1 time_diff 15
2 time_diff 27
3 time_diff 12
4 time_diff 11
5 time_diff 14
6 time_diff 19
7 time_diff 12
8 time_diff 15
9 time_diff 25
10 time_diff 12
11 time_diff 11
12 time_diff 30
13 time_diff 16
14 time_diff 15
15 time_diff 15
16 time_diff 13
17 time_diff 11
18 time_diff 11
19 time_diff 25
20 time_diff 11
MfG,
Frederick