11-13-2024 04:58 PM - edited 11-13-2024 05:05 PM
Brilliant! I found the culprit! By Adding in frames I was able to detect what builds up over time when in real time interactive mode. At first (maybe about 15 seconds) my loop runs fine at 20ms even with the large spike at the beginning. but over time, it slows down to 200-300 or longer! Any idea what is wrong with my 2nd frame? possible the FPGA Side of the code?
EDIT:
Just confirmed for the first minute or so it is fine at roughly 700-1000 elements in the FIFO per loop, but after about a minute, it starts to accumulate thus slowing down the loop
11-14-2024 06:34 AM
Your loop timer "x-y" is timing the entire loop time. The increase in timing could be due to anything. Do you maybe have an unbounded array as a UI element or something similar. Just because you have the timing calculation in the second frame, doesn't mean the problem is actually located there. To measure that, you would need a sequence of "timer" "code" "Timer" and then take the difference between the two timers.
At the moment, your timer is between iterations of your whole loop, and as such the timing delta you see is for the whole loop.
11-14-2024 11:19 AM
Not an Array but a UI Element! ** Note to anyone else. Don't use front panel elements for quick lookup tables! I suspect it might have to do with lag over the network or something.
Removing this IMMEDIATELY dropped my max loop rate down from hundreds of ms to 20 ms. runs incredible smooth now.