LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Benchmark time no where near VI analyzer time

Some strange behavior on my cRIO. I am benchmarking my loops (6 of them) and all of them are running at the expected rate (about 100 ms per loop and I'm using waits to inforce this) except one. It is taking about 1500 ms to execute according to my benchmarking (standard tick count subtraction). However, when I run the VI analyzer I don't get a single subVI taking longer than 70 ms to execute. Is it possible that the processor is being starved but not while that loop is executing a subVI so it doesn't show up in the analyzer? Any tips and tricks for troubleshooting this? I have no idea why that particular loop is taking so long.

0 Kudos
Message 1 of 4
(2,571 Views)

What's your CPU usage on the RIO? Can you give us some ideas on what you've got inside that culprit loop? (File writes, networking, ...)

0 Kudos
Message 2 of 4
(2,560 Views)

all it does is average a 2d array with some other 2d arrays and then send the data up to the host. That is the only connection inside that thread. I benchmarked the subVI where the tcpwrite was actually taking place and it only took about 1 ms. I'll do some more benchmarking tomorrow and also get back to you on the CPU usage.

0 Kudos
Message 3 of 4
(2,551 Views)

Solution -- USER FRIGGIN ERROR. I had a timeout on a dequeue element of 1000 ms. This dequeue was in a loop. I realized this was the issue when I changed the number of times it was supposed to loop and started getting longer or shorter timeouts. Sorry for wasting your time haha.

0 Kudos
Message 4 of 4
(2,531 Views)