10-10-2022 07:48 AM
I tried to figure it out with a shift register and it also worked perfectely. Thank you so much @CARYA 😊
10-10-2022 11:29 AM - edited 10-10-2022 11:38 AM
Since you are not interested in absolute times, (just time differences), I would substitute "high resolution relative seconds" (Simpler datatypes, no coercion dots, etc.) and a feedback node.
Note that you get a division by zero on the first iteration (that possibility exists even in your code!). You can program your way around thus but since you don't even initialize the upper shift register, it seems you don't really care.
(Of course since you do single point acquisition, you should probably run the loop at a defined loop rate. Then you don't even need to measure dt because you already know it.)
10-11-2022 03:31 AM
@altenbach
I really apreciate your help. I tried it with "high resolution relative seconds" and it worked properly 😉
(Of course since you do single point acquisition, you should probably run the loop at a defined loop rate. Then you don't even need to measure dt because you already know it.)
Do you mean by using a wait function?
10-11-2022 08:47 AM
@Ezzow wrote:
@altenbach
Do you mean by using a wait function?
Yes. Just make sure it is the determining factor, i.e. it is the slowest part of all loop code.