LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

derivative problem

Solved!
Go to solution

Ezzow_0-1665406077700.png

 

I tried to figure it out with a shift register and it also worked perfectely. Thank you so much @CARYA 😊 

 

0 Kudos
Message 11 of 14
(665 Views)
Solution
Accepted by Ezzow

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.

 

altenbach_0-1665419753625.png

 

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.)

0 Kudos
Message 12 of 14
(641 Views)

@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? 

0 Kudos
Message 13 of 14
(605 Views)

@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.

0 Kudos
Message 14 of 14
(581 Views)