LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to overcome the problem of time consumption form system at time of closing the vi.

Hello,

 

I am facing problem regarding to time consumption means after finishing one operation vi should be stop but the thing is its take 2 to 3 min and some time more than this  time before stopping the vi.

And I have mansion this problem in other thread they told me that this vi is stop properly in our system, so might be there is problem form your system.

Will you please guide me that what are the possible reasons for that.??

How can I solve this problem which is not form labview but form the system that takes time after finishing one operation.

 

Thank you very much.

0 Kudos
Message 1 of 6
(2,430 Views)

So if I understand, your VI runs but when you go to stop it the VI can take 2 to 3 minutes to return to the idle state, correct?

 

One reason that I have seen for this is that the code is openning up a bunch of references (like DAQ devices or XML entities) and not closing them. When the VI stops, LV will automatically start closing all the references that the VI left open - which, depending on the number of open references, can take several minutes. I saw one VI several years ago that too over a half an hour to stop.

 

What exactly is your VI doing?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 6
(2,394 Views)

@AnkitRamani wrote:

 

And I have mansion this problem in other thread they told me that this vi is stop properly in our system, so might be there is problem form your system.


If you refer to another discussion here, please provide a link so we can see the details of the conclusions.

 

  • What does the program do? Is there DAQ hardware involved? External instruments? Ongoing communications? File IO?
  • How are you stopping the VI?
  • Is the stop button read immediately or are there other task that need to complete?
  • Is the program trapped in a long sequence that cannot be escaped?

Can you show us some code?

0 Kudos
Message 3 of 6
(2,387 Views)

Thank you very much for reply.

Here in attachment I have attach my vi.

My vi is for measuring the capacitance form hameg8118 LCR bridge (which is connected trough GPIB cable ) with changing the voltage which is measure from the charge amplifier and its connected with PC with DAQ (analog card reader form NI).

After finishing all the measurement when user press Stop button then vi should be close suddenly but its take time to be stop.

 

Hope you will get my point.

Thank you very much once again.

0 Kudos
Message 4 of 6
(2,385 Views)

Your code is pretty hopeless and should be rewritten from scratch.

 

Most things make no sense:

 

  • You start with a CPU burner loop
  • During the run of the program, you are constantly enqueung elements, but you never dequeue anything.
  • At the end you are destroying the queue unseen! What is the purpose? How big does the queue get?
  • You have interactive loops inside event structures.
  • You are growing arrays forever.
  • Why are you repeating the two first visa writes even if they are not used in the current iteration?

In what state is the program when you try to stop?

Message 5 of 6
(2,378 Views)

Thank you very much for suggestion Smiley Happy.

 yea you are right that's all things which you mentioned were sense less I have removed that all and now I will try with that one.

But I have to wait for testing,as measurement devices are busy with other testing.

So I will let you know if every thing is fine or not.

Thank you very much once again for guidance.

0 Kudos
Message 6 of 6
(2,355 Views)