LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Extremely slow performance with SR5105 Lockins in LabView 7.1

Hello,

I currently have an application which I've created for controlling a device used in cervical cancer diagnosis. This software has various controls ranging from controlling filter wheels with stepper motors, video capture, lockin data analysis and other various functions.

Everything is working well except the update rate at which I'm receiving results from my 2 Signal Recovery (SR) model 5105 lockins.
SR has provided labview drivers and even a starting interface which works perfectly under normal conditions. However I'm running 2 lockins concurrently and I'm getting very laggy results.

When I run the lockin vi from SR, the update rate is about once every .25 seconds or at least twice a second. When I put the same code into my application the update rate becomes very slow, ranging from once every 3 to once every 6 seconds. I've read the forums thoroughly as well as contacted an NI tech engineer but couldn't resolve this problem. I've heard that there might be a way to change execution settings in labview which would speed this up or perhaps I'm just doing something wrong (I'm pretty new at labview, about a year experience).

I'm including the code that I have. Unfortunately it won't run on your machine because it needs to be connected to proper hardware.
Pretty much I have about 5-6 parallel loops and at the very top you can see two identical copies of the lockin code. What can I do to improve performance? Thanks in advance.

Roman
0 Kudos
Message 1 of 3
(2,668 Views)
Roman,

Have you tried debugging the code during execution? You can step through your VI's execution one piece at a time in order to see whether any particular subVI is stalling out and taking all of those seconds to execute. You can also use the Profile VI feature located in the Tools->Advanced menu in order to see a breakdown of how much time all of your subVIs are taking. Your application is quite complex, so narrowing down where the delay is occurring would be a huge first step!

Regards,
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(2,641 Views)
Thanks for your reply. I have actually found a way to fix the problem and it had nothing to do with the subvi's in my application (well almost nothing :). The first thing I tried doing was taking out the display local variables which displayed lockin data on 3 screens of my application into 1 separate while loop and replacing the Lockin driver code with global variables which had only the data I wanted to display. This helped a little bit but here's what fixed my problem completely.

When I created 2 lockin SubVIs I forgot to go into File->VI Properties->Execution and there select Time critical priority and in the other option drop down list: data acquisition.

As soon as I did that in the 2 subvi's the lockins actually began performing in real time and now it takes milliseconds to detect the signal and to update the displays.

I hope this helps. I'm surprised the NI Tech rep I spoke with, hasn't recommended this even though I asked if there are perhaps some sort of compiling or priority options in LabView.

Well I'm happy since my problem is now fixed, I just need to get a little more RAM now.
Message 3 of 3
(2,634 Views)