LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Frozen Elapsed Time

Ok, wll how about posting a sample of code that exhibits the problem. I'd like to play with it a bit and see what I find.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

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

For help with grief and grieving.
0 Kudos
Message 11 of 20
(960 Views)
Mike,

Here's the program I've been working on. Thanks,

Taylor
0 Kudos
Message 12 of 20
(948 Views)
Without looking at the code, I set the number of iterations to 2, got an elapsed time of 1 s. If I understand what you are asking.  It is not related to the code directly

Paul
0 Kudos
Message 13 of 20
(943 Views)
Although you did not ask for it, I made some minor modifications to your VI to try and clean it up a bit.  I made notes of all the changes that I made.  The idea being that you learn a little since you did self proclaim that your rather new to this. I did not question what you are trying to accomplish, only some small cleanup and corrections that may help you in the future.
good luck.

Paul
Message 14 of 20
(935 Views)
Paul,

Thank you so very much. I realize that my style leaves a lot to be desired but I am still learning. I have no idea what happened to my other vi.

Taylor
0 Kudos
Message 15 of 20
(930 Views)

Here is an idea that may help.  Convert the VI like suggested by right clicking on the VI and selecting open front panel.

In that new VI open the diagram and then open the subVI "subElapsedTime.VI"  On that VIs diagram there should be a constant wired into the conditional terminal.  The constant should be a true and the terminal should have the red stop sign showing.  Is that what you see?

0 Kudos
Message 16 of 20
(925 Views)
glad to help, no explainations required.  Did the V3 version fix your other problem?  Honestly, it was nothing that I did if it works.  Maybe just a bad linkage.

Paul
Message 17 of 20
(920 Views)
Paul,

Yes it did. Thanks,

Taylor
0 Kudos
Message 18 of 20
(903 Views)
Paul did a good job cleaning up the code.
 
While I don't completely understand the logic of the small inner while loop, I think you should eliminate it and instead use the outer while loop for the shift registers. Currently, your shift registers never clear between runs, thus their data can grow without limits, potentially leading to memory issues. (Especially since you run that loop at full bore without any wait). Here is one possible alternative if I understand correctly what you are trying to do. Look at the comments on the diagram (see image and diagram comments).
You reset the two indicators "complete" and "failure" on the left. Since complete gets written anyway as soon as the loop starts, you don't need to write the local. The current desing flow requires resetting "failure". For consistency, I would always define execution order. It is no big deal here, but if it were used as a control inside the loop, you could create a race condition if you don't ensure that it gets written before the loop starts.
 
 
For the failed timer in your case, I cannot reproduce it. Do the following:
Convert the "elapsed time" to a regular VI by opening its front panel. (right-click...open front panel. this will not do anything permanent to the installation!). Now open the "subElapsed time.vi", press "ctrl+m" to change it to edit mode. Save it under a new name elsewhere. Attach it here.
Now go back to the mani VI and press ctrl+z to undo. 🙂

Message Edited by altenbach on 06-15-2007 10:01 AM

Message 19 of 20
(898 Views)
Greetings,

Thanks for all your help. The version I sent before was a skeletal one. The test and boolean switches were just to see if it worked like I wanted it to. I have since added the 'meat' and comments. The one thing I am unsure of is whether the read should be inside the main loop or outside like I have it. I only want it to read once when the it first comes on each iteration.

Taylor
0 Kudos
Message 20 of 20
(890 Views)