Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Timed loop keeps running after stop

Solved!
Go to solution

I only saw this one time, but thought I should ask about it.  After pressing the stop button, I was surprized that the diagnostic LED on the front panel of the main vi kept blinking.  With execution highlighting ON the values showed that the timed loop was still running.  I checked the other 8 timed loops in subvis and they were running also. None of the Stop methods worked. Only quitting LV and aborting the cRIO cleared the problem.

Running LV2014 SP1 on cRIO-9067 with dual-core ARM processor.  Windows 7 x32.

BTW:  The toggle function of the LED control VI doesn't work on this unit.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 1 of 5
(4,845 Views)

Well why should it stop?  You wired a constant to the stop condition.  What would then cause the loop to stop?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(4,841 Views)

Michael,

 

The loop is never going to stop as he said. No I have some recommendations:

 

  • The LED you are using is affront panel object (it runs on the host computer even due is on the RT target). I will recommend you create a VI on the RT target and another on the host computer.
  • You need to place a control to stop the while (I recommend a network shared variable communicating with the host computer)

This document that I am attaching is quite old but it has a good explanation on how to program the host computer and the RT target.

http://www.ni.com/pdf/manuals/371375a.pdf

 

 

Randy @Rscd27@
0 Kudos
Message 3 of 5
(4,823 Views)

Randy, thank you for your help.  The document you suggested describes using the Enable Debbugging feature of the compiled rtstartup.exe to allow the local LabVIEW to monitor the code running on the cRIO.

In my situation the RT code is open on the desktop and has been changed.  The code is saved locally and then the top-level VI is run.  All the VIs are download to the cRIO and then executed.  When I need to make a change to the code I press the stop button on the top-level VI.  Here is where the code is still running all the timed loops and I cannot edit the code running inside the timed loops.  The only way to unlock the code is by quitting LV and selecting the option to abort the running code.

Michael Munroe, CLD, CTD, MCP
Automate 1M+ VI Search, Sort and Edit operations with Property Inspector 5.0, now with a new Interactive Window Manager!
Now supports full project automation using one-click custom macros or CLI.
0 Kudos
Message 4 of 5
(4,721 Views)
Solution
Accepted by topic author Michael_Munroe

You need to allow a command of some sort to be able to stop your loops.  A simple global variable would work well here.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(4,713 Views)