LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Consumer loop gets slower and slower in a long duration monitoring process


@Mads wrote:

Nothing obvious in the framework itself, perhaps something is building up in any of the many missing subVIs...Have you tried logging which states are executed and their execution time...Just streaming it to an open text file e.g., to see if any particular parts are slowing down and at which rate? If any of the underlying functions are building arrays, reopening resources, files etc? There is a save to file function that might indicate that you are budiling the content of that e.g...


I monitored the states and their execution time. Once the monitoring process starts, it's strictly "Idle" and "Monitor Establish Count Time" at the rate of 250ms at the beginning. But after about 1000 seconds, the loop starts to slow down. 

 

The save to file function is not building any file in LabVIEW. It is simply retrieving a file from the instrument over http and writing to a local file.. all done in Python. As I mentioned earlier, there are no arrays being built. No data is being accumulated in LabVIEW. All data is on the instrument. 

 

Could it be some limitation on the rate or duration of opening and closing Python nodes? Every 250ms when the state changes to "Monitor" the Python node is opened to execute the Python function.

0 Kudos
Message 11 of 13
(167 Views)

@abvenk wrote:

Could it be some limitation on the rate or duration of opening and closing Python nodes? Every 250ms when the state changes to "Monitor" the Python node is opened to execute the Python function.


Can you open the node outside the loop, run it in the loop, then close outside? If it is the same function should be possible. Opening/closing references could be an issue.

0 Kudos
Message 12 of 13
(158 Views)

If you disable the python call and replace it with some dummy action, does the slowdown disappear?

 

If the slowdown is confirmed to be linked to the python nodes the opening and closing is as someone already suggested a possible issue. If that does not fix the issue, could you use native LabVIEW web functions to retrieve the data instead of Python?

0 Kudos
Message 13 of 13
(139 Views)