Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Algorithm is 4x slower in RT than on Windows PC

OK people, I've created an signal processing algorithm that uses an input signal (typically 50,000 or so points) and outputs a small 2D array with the information I'm looking for.

It runs fairly well on my Host PC (Intel P4 at 3.2 GHz running LV 8.2 on Windows XP) with a computation time of about 20ms.  However, when I implement the same algorithm on my RT system (using the exact same code), I get somewhere around 85ms.  The RT system is a PXI-8187 (2.5 GHz P4-M).  Is the system architecture THAT much better on my desktop PC?

There is no DAQ going on, just some FFT and then a bunch of array operations and some loops... standard stuff.  I'm sure that this algorithm can be sped up some, but I'm wondering why my RT system is 4x slower doing the same calculations.

I've attached the VI of my algorithm.  In general, what causes significant slow-down on the RT system?
0 Kudos
Message 1 of 3
(4,117 Views)
Hi mschmith,
 
I've tried your algorithm VI on my PXI-8187 real time controller with the attached program and I've seen slower times than with the same controller on Windows. The Windows results are around 20 ms and the RT ones are around 11 ms.
These results can improve using the priority properties, if I set the "test.vi" as a Time critical VI, these results improve again.
About how to set different priorities to the VIs see this link:
 
 
These are other useful links:
 
 
 
 
I hope I can help you.
Regards
 
MarcoC
0 Kudos
Message 2 of 3
(4,032 Views)
Castel,

Thanks for the reply.  I figured out what the problem was however... I was keeping the algorithm font panel open while I was calling it from a test VI (like you did) for timing.  This means that the PXI-8187 was transferring data to display on the screen, when it should have only been processing the data.  I then reached the same conclusions you did... however, I did NOT know about the different priority levels for various VIs, so that's a big help in making my system more responsive.

Thanks again.

-Mike
0 Kudos
Message 3 of 3
(4,029 Views)