09-30-2009 04:54 PM
I have this code that isn't keeping up with the data inputs and was wondering how I could optimize it. Specifically, the NEU1 and NEU2 portions of the data frame are each 24 bytes that need to be handled quickly enough to keep up with the data stream. Each frame comes in with a frequency of 950kHz, so each frame loop needs to finish in sometime less than 1ms.
I've only been using labview for a couple of weeks, so I don't really have a clue how to optimize the code. I've attached the relevant vi and sub-vis in the NEU1 and NEU2 trees. There is another interpolation sub-vi but I can only attach 3 files. I may ask about this one later. I have this problem even when I remove interpolation. Any help would be appreciated.
Solved! Go to Solution.
09-30-2009 06:15 PM
10-01-2009 04:19 PM - edited 10-01-2009 04:20 PM
I've now done this and I still have the same problem. Its clear that the analysis loop isn't able to keep up with the data gathering loop because each update to the various plots gets a little bit slower. I've attached this new vi separating my data gathering from data analysis (which I was hoping to be able to do anyway, thanks).
I've also attached the last sub-vi in the critical path (the NEU signals).
10-01-2009 05:17 PM
10-02-2009 01:04 AM
If you are using say LV 2009 then you can use the Performance Monitor (under Tools - I think) to at least establish which VIs in your application are consuming the most time. This will help you to pin-point the VIs you need to focus your effort on.
I can tell you from experience any of the little things you can do to optimise the performance such as disabling VI debugging will not help you. As perviously suggested you need to address the architecture and/or the processing operations or logic.
In the case of UI the best way to improve performance is to use an Event structure. In your case, since you're using DAQ, this will not help.